Skip to content

feat: add Vietnamese language support and update language switcher - #178

Merged
Ralex91 merged 5 commits into
Ralex91:devfrom
phamdohung161:main
Oct 4, 2026
Merged

Ralex91 merged 5 commits into
Ralex91:devfrom
phamdohung161:main

Conversation

@phamdohung161

Copy link
Copy Markdown
Contributor

Summary

  • Add full Vietnamese locale under packages/web/src/locales/vi/ (common, game, errors, manager, quizz)
  • Register vi in LanguageSwitcher
  • Add language.vi label to all existing common.json locales (en/de/es/fr/it/ja/vi)

Context

Razzia already supports multiple languages via i18next + locale JSON. This MR adds Vietnamese so users can select VI in the language switcher without changing i18n bootstrap (locales are loaded via glob).

@phamdohung161

Copy link
Copy Markdown
Contributor Author

Hi @Ralex91, After adding the vi locale, two small fixes came up while testing the Vietnamese UI / long strings:

  1. Rank translation key (Result.tsx)
    The fallback for ranks outside the top 3 used the wrong namespace (rank.other), so the translation did not resolve. Updated to game:rank.other to match the game namespace.
  2. Text wrapping (AnswerButton.tsx, Room.tsx)
    Replaced break-all with break-word for answer text and room URLs to avoid mid-word / awkward breaks on long strings.

@Ralex91
Ralex91 changed the base branch from main to dev September 8, 2026 12:58
@Ralex91

Ralex91 commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Hi,
Thanks a lot for your contribution!

Since then, I've added and modified several translation keys.
If you have some time to update them, I'd really appreciate it, especially since you know this language well and the result will be much more accurate than if I did it myself. 🙏

# Conflicts:
#	packages/web/src/features/game/components/AnswerButton.tsx
#	packages/web/src/features/game/components/states/Result.tsx
@Ralex91

Ralex91 commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Hi,
I merged the latest dev into your branch to resolve the conflicts, and pushed it directly to your fork's main.

While at it, I also:

  • added the Vietnamese translations for all the keys added since you opened the PR (question categories, estimation questions, media library, game settings, API errors…)
  • replaced the old rank.* keys with rank_ordinal_other, since ranks are now localized with ordinals
  • reverted the break-word class changes, dev already handles text wrapping

Also, heads-up: your fork's main now contains dev, so it will diverge from upstream main. For future contributions, it's best to start from a fresh branch based on the latest dev and main

Thanks for the contribution!

@Ralex91
Ralex91 merged commit 878e5e9 into Ralex91:dev Oct 4, 2026
1 check passed
This was referenced Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants