Skip to content

i18n(vi): complete Vietnamese locale and add vi tests - #5917

Open
nglinh28 wants to merge 1 commit into
NginxProxyManager:developfrom
nglinh28:feat/vietnamese-locale-update
Open

nglinh28 wants to merge 1 commit into
NginxProxyManager:developfrom
nglinh28:feat/vietnamese-locale-update

Conversation

@nglinh28

@nglinh28 nglinh28 commented Oct 3, 2026

Copy link
Copy Markdown

Summary

Completes the Vietnamese (vi) locale for the current develop branch.

  • Translates the keys that were added without a Vietnamese translation (logs viewer, access list inheritance, and a few related labels), so the vi locale covers every English key.
  • Updates the Vietnamese help documents for access lists, certificates, proxy hosts, redirection hosts, dead hosts and streams.
  • Adds vi to the 24-hour clock list in formatDateTime, matching et.
  • Adds vi.test.ts, which checks key coverage, ICU placeholders, and that strings are actually translated, plus a test for the Vietnamese clock format in Utils.test.tsx.

Only files under frontend/src/locale/ are changed.

Testing

  • vitest locale 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 build and biome lint pass for the frontend.

🤖 Generated with Claude Code

- 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>
@greptile-apps

greptile-apps Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

[Low risk] Adds Vietnamese locale strings and help documentation.

The PR appears safe to merge, though the new tests should be strengthened to protect the intended locale behavior.

Findings

  1. P2 Vietnamese clock test can pass incorrectly ▶
  2. P2 Placeholder check misses broken arguments ▶

Summary

The PR fills gaps in the Vietnamese UI locale, revises six Vietnamese help documents, selects a 24-hour clock for Vietnamese dates, and adds locale tests. The two findings concern tests that can pass without detecting the regressions they are intended to catch.

Reviews (1) · Last reviewed commit: "i18n(vi): complete Vietnamese locale and..."

Comment on lines +121 to +122
// Vietnamese 12-hour output marks the period with SA (sáng) / CH (chiều)
expect(text).not.toMatch(/\b(SA|CH)\b/);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}`));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@nginxproxymanagerci

Copy link
Copy Markdown

Docker Image for build 1 is available on DockerHub:

nginxproxymanager/nginx-proxy-manager-dev:pr-5917

Note

Ensure you backup your NPM instance before testing this image! Especially if there are database changes.
This is a different docker image namespace than the official image.

Warning

Changes and additions to DNS Providers require verification by at least 2 members of the community!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant