Add Japanese language support#829
Conversation
|
This is my first PR, so please let me know if anything needs to be changed. |
There was a problem hiding this comment.
Pull request overview
Adds Japanese (ja-JP) as a supported UI language and wires it into the client i18n layer.
Changes:
- Added a new Japanese translation file (
ja.ts) with translations for existing i18n keys. - Registered Japanese in the supported language list (
SUPPORTED_LANGUAGES). - Included the new locale in
TranslationContextso it can be selected and loaded.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| client/src/i18n/translations/ja.ts | Adds the Japanese translation dictionary for the client UI. |
| client/src/i18n/supportedLanguages.ts | Registers ja as a selectable supported language with locale ja-JP. |
| client/src/i18n/TranslationContext.tsx | Imports Japanese translations and includes them in the translation map / intl language mapping. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| export function getIntlLanguage(language: string): string { | ||
| if (language === 'br') return 'pt-BR' | ||
| return ['de', 'es', 'fr', 'hu', 'it', 'ru', 'zh', 'zh-TW', 'nl', 'ar', 'cs', 'pl', 'id'].includes(language) ? language : 'en' | ||
| return ['de', 'es', 'fr', 'hu', 'it', 'ru', 'zh', 'zh-TW', 'nl', 'ar', 'cs', 'pl', 'id', 'ja' ].includes(language) ? language : 'en' | ||
| } |
There was a problem hiding this comment.
There’s an extra space before the closing bracket in the language allowlist ('ja' ]). Please remove it (and consider deriving this allowlist from SUPPORTED_LANGUAGES to avoid future drift).
| 'common.date': '日付', | ||
| 'common.rename': '名前を変更', | ||
| 'common.name': '名前', | ||
| 'common.email': 'メールアドレス', | ||
| 'common.password': 'パスワード', | ||
| 'common.saving': '保存中…', |
There was a problem hiding this comment.
ja translations are missing common.discardChanges and common.discard (these keys exist in all other locales and are used in the UI). Add Japanese strings for both so Japanese users don’t see the English fallback.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description
This PR introduces a new ja locale and provides translations for existing i18n keys.
Related Issue or Discussion
Type of Change
Checklist
devdevbranch, notmain