[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/i18n/RFC.md fully. Find ONE feature... #81
2 changed files with 17 additions and 1 deletions
|
|
@ -440,7 +440,7 @@ func (s *Service) getEffectiveContextGenderLocationAndFormality(data any) (strin
|
|||
if m, ok := data.(map[string]any); ok {
|
||||
var context string
|
||||
var gender string
|
||||
var location string
|
||||
location := s.location
|
||||
formality := s.formality
|
||||
if v, ok := m["Context"].(string); ok {
|
||||
context = core.Trim(v)
|
||||
|
|
|
|||
|
|
@ -349,6 +349,22 @@ func TestServiceTranslationContextExtrasInLookup(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestServiceDefaultLocationAppliesToMapData(t *testing.T) {
|
||||
svc, err := New()
|
||||
if err != nil {
|
||||
t.Fatalf("New() failed: %v", err)
|
||||
}
|
||||
|
||||
svc.AddMessages("en", map[string]string{
|
||||
"welcome._workspace": "welcome aboard",
|
||||
})
|
||||
svc.SetLocation("workspace")
|
||||
|
||||
if got := svc.T("welcome", map[string]any{}); got != "welcome aboard" {
|
||||
t.Errorf("T(welcome, map[]) with default location = %q, want %q", got, "welcome aboard")
|
||||
}
|
||||
}
|
||||
|
||||
func TestServiceSubjectCountPlurals(t *testing.T) {
|
||||
svc, err := New()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue