[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/i18n/RFC.md fully. Find features de... #153
1 changed files with 12 additions and 14 deletions
26
grammar.go
26
grammar.go
|
|
@ -754,13 +754,7 @@ func ArticlePhrase(word string) string {
|
|||
lang := currentLangForGrammar()
|
||||
word = renderWord(lang, word)
|
||||
article := Article(word)
|
||||
if article == "" {
|
||||
return ""
|
||||
}
|
||||
if strings.HasSuffix(article, "'") {
|
||||
return article + word
|
||||
}
|
||||
return article + " " + word
|
||||
return prefixWithArticle(article, word)
|
||||
}
|
||||
|
||||
// DefiniteArticle returns the language-specific definite article for a word.
|
||||
|
|
@ -791,13 +785,7 @@ func DefinitePhrase(word string) string {
|
|||
lang := currentLangForGrammar()
|
||||
word = renderWord(lang, word)
|
||||
article := DefiniteArticle(word)
|
||||
if article == "" {
|
||||
return ""
|
||||
}
|
||||
if strings.HasSuffix(article, "'") {
|
||||
return article + word
|
||||
}
|
||||
return article + " " + word
|
||||
return prefixWithArticle(article, word)
|
||||
}
|
||||
|
||||
func definiteArticleForCurrentLanguage(lowerWord, originalWord string) (string, bool) {
|
||||
|
|
@ -871,6 +859,16 @@ func TemplateFuncs() template.FuncMap {
|
|||
}
|
||||
}
|
||||
|
||||
func prefixWithArticle(article, word string) string {
|
||||
if article == "" || word == "" {
|
||||
return ""
|
||||
}
|
||||
if strings.HasSuffix(article, "'") {
|
||||
return article + word
|
||||
}
|
||||
return article + " " + word
|
||||
}
|
||||
|
||||
// Progress returns a progress message: "Building..."
|
||||
func Progress(verb string) string {
|
||||
lang := currentLangForGrammar()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue