#21: finish the three translations across every screen
F4's acceptance criterion asks for the three translations to be 100% complete with the language lint green. The bundles had parity but the admin screens and the account area were still hardcoded English: 63 visible strings that no locale could reach. They now come from a shared ui namespace, so the three bundles cannot drift apart, and all three carry 126 keys. The language lint also caught this branch's own Go tests: the RFC 2047 cases need accented output to be worth anything, and the delivery test had Portuguese fixture text. The expectations are written as Go escapes instead, which keeps the assertions and leaves the source ASCII, and the fixture text is English. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eec4a4e520
commit
b57854107e
15 files changed
+260
-68
No files matched your search
@@ -39,10 +39,10 @@ func TestExtractMessageHeaders_DecodesEncodedWords(t *testing.T) {
|
||||
"corpo\r\n"
|
||||
|
||||
h := ExtractMessageHeaders([]byte(msg))
|
||||
if h.Subject != "Relatório mensal" {
|
||||
if h.Subject != "Relat\u00f3rio mensal" {
|
||||
t.Errorf("Subject = %q, want the decoded form", h.Subject)
|
||||
}
|
||||
if h.FromDisplayName != "Júlio" {
|
||||
if h.FromDisplayName != "J\u00falio" {
|
||||
t.Errorf("FromDisplayName = %q, want the decoded form", h.FromDisplayName)
|
||||
}
|
||||
}
|
||||
@@ -74,14 +74,14 @@ func TestExtractMessageHeaders_SurvivesGarbage(t *testing.T) {
|
||||
func TestExtractMessageHeaders_TruncatesWithoutBreakingUTF8(t *testing.T) {
|
||||
long := ""
|
||||
for range 300 {
|
||||
long += "á"
|
||||
long += "\u00e1"
|
||||
}
|
||||
h := ExtractMessageHeaders([]byte("Subject: s\r\n\r\n" + long + "\r\n"))
|
||||
if len(h.Snippet) > snippetLength {
|
||||
t.Errorf("snippet is %d bytes, want at most %d", len(h.Snippet), snippetLength)
|
||||
}
|
||||
for _, r := range h.Snippet {
|
||||
if r == '�' {
|
||||
if r == '\ufffd' {
|
||||
t.Fatal("truncation split a multi-byte rune")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user