[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/i18n/RFC.md fully. Find ONE feature... #66
2 changed files with 14 additions and 2 deletions
|
|
@ -820,15 +820,21 @@ func ProgressSubject(verb, subject string) string {
|
|||
return ""
|
||||
}
|
||||
suffix := getPunct(lang, "progress", "...")
|
||||
if subject == "" {
|
||||
return Title(g) + suffix
|
||||
}
|
||||
return Title(g) + " " + renderWord(lang, subject) + suffix
|
||||
}
|
||||
|
||||
// ActionResult returns a completion message: "File deleted"
|
||||
func ActionResult(verb, subject string) string {
|
||||
p := PastTense(verb)
|
||||
if p == "" || subject == "" {
|
||||
if p == "" {
|
||||
return ""
|
||||
}
|
||||
if subject == "" {
|
||||
return Title(p)
|
||||
}
|
||||
return renderWordOrTitle(currentLangForGrammar(), subject) + " " + p
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -725,7 +725,7 @@ func TestActionResult(t *testing.T) {
|
|||
{"delete", "config.yaml", "Config.yaml deleted"},
|
||||
{"build", "project", "Project built"},
|
||||
{"", "file", ""},
|
||||
{"delete", "", ""},
|
||||
{"delete", "", "Deleted"},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
|
@ -1070,9 +1070,15 @@ func TestCompositeHelpersRespectWordMap(t *testing.T) {
|
|||
if got, want := ProgressSubject("build", "go_mod"), "Building go.mod..."; got != want {
|
||||
t.Fatalf("ProgressSubject(%q, %q) = %q, want %q", "build", "go_mod", got, want)
|
||||
}
|
||||
if got, want := ProgressSubject("build", ""), "Building..."; got != want {
|
||||
t.Fatalf("ProgressSubject(%q, %q) = %q, want %q", "build", "", got, want)
|
||||
}
|
||||
if got, want := ActionResult("delete", "go_mod"), "go.mod deleted"; got != want {
|
||||
t.Fatalf("ActionResult(%q, %q) = %q, want %q", "delete", "go_mod", got, want)
|
||||
}
|
||||
if got, want := ActionResult("delete", ""), "Deleted"; got != want {
|
||||
t.Fatalf("ActionResult(%q, %q) = %q, want %q", "delete", "", got, want)
|
||||
}
|
||||
if got, want := ActionFailed("delete", "go_mod"), "Failed to delete go.mod"; got != want {
|
||||
t.Fatalf("ActionFailed(%q, %q) = %q, want %q", "delete", "go_mod", got, want)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue