Repository navigation
Conversation
- Translate the keys added for the logs feature and access list inheritance so the Vietnamese UI has full key coverage - Update Vietnamese help docs for access lists, certificates, hosts and streams - Use a 24-hour clock for Vietnamese date and time formatting - Add tests that check Vietnamese key coverage, ICU placeholders and that strings are translated Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
| // Vietnamese 12-hour output marks the period with SA (sáng) / CH (chiều) | ||
| expect(text).not.toMatch(/\b(SA|CH)\b/); |
There was a problem hiding this comment.
Vietnamese clock test can pass incorrectly The existing date-format mock replaces the requested Vietnamese locale with
en-GB. If the new 24-hour setting were removed, a 12-hour result would use an English period marker rather than SA or CH, so this assertion would still pass. Checking the rendered hour would make the test protect the behavior it names.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Good catch. I agree that the current mock replacing the Vietnamese locale with en-GB could allow the test to pass even if the 24-hour setting were removed.
I'll update the test to explicitly assert the rendered hour in 24-hour format, so it verifies the behavior described by the test rather than only relying on the locale output.
Thanks for pointing this out.
| "latestVersion", | ||
| "name", | ||
| ]; | ||
| const usedArgs = (message: string) => argNames.filter((name) => message.includes(`{${name}`)); |
There was a problem hiding this comment.
Placeholder check misses broken arguments This check searches a fixed list of names by prefix. It would count
{countx} as {count}, and it would ignore a new English argument that is not in the list. Broken Vietnamese interpolation could therefore pass the test; comparing complete argument names from the messages would catch both cases.
There was a problem hiding this comment.
Good catch. You're right that checking a fixed list of prefixes could allow invalid placeholders like {countx} to pass, while also missing newly added English arguments.
I'll update the test to compare the complete placeholder names from the source and Vietnamese messages, so it catches both invalid and missing interpolation arguments.
|
Docker Image for build 1 is available on DockerHub: Note Ensure you backup your NPM instance before testing this image! Especially if there are database changes. Warning Changes and additions to DNS Providers require verification by at least 2 members of the community! |
Summary
Completes the Vietnamese (
vi) locale for the currentdevelopbranch.vilocale covers every English key.vito the 24-hour clock list informatDateTime, matchinget.vi.test.ts, which checks key coverage, ICU placeholders, and that strings are actually translated, plus a test for the Vietnamese clock format inUtils.test.tsx.Only files under
frontend/src/locale/are changed.Testing
vitestlocale tests pass (vi.test.ts,Utils.test.tsx,et.test.ts,Router.test.tsx) on the same locale files, run against v2.16.0.tsc+vite buildandbiome lintpass for the frontend.🤖 Generated with Claude Code