feat(translator): add Urdu as a Translate Text target language (#4721) (#4726)

Add Urdu (ur) to TRANSLATOR_LANGS so it appears in the Translate Text
language list (inline TranslatorPopup and Settings → Translation). The
list is not provider-gated, and Google/Azure/Yandex all translate to
Urdu; Urdu is already in MIGHT_BE_RTL_LANGS so the translated output
renders right-to-left.

Closes #4721

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Huang Xin
2026-06-22 12:17:10 +08:00
committed by GitHub
parent a6d28ffcdf
commit f4bb111267
2 changed files with 5 additions and 0 deletions
@@ -1109,6 +1109,10 @@ describe('services/constants', () => {
expect(TRANSLATOR_LANGS['fi']).toBeDefined();
});
it('TRANSLATOR_LANGS includes Urdu', () => {
expect(TRANSLATOR_LANGS['ur']).toBe('اردو');
});
it('SUPPORTED_LANGS includes zh in addition to TRANSLATED_LANGS entries', () => {
expect(typeof SUPPORTED_LANGS).toBe('object');
expect(SUPPORTED_LANGS['zh']).toBeDefined();
@@ -958,6 +958,7 @@ export const TRANSLATOR_LANGS: Record<string, string> = {
sl: 'Slovenščina',
sk: 'Slovenčina',
fa: 'فارسی',
ur: 'اردو',
};
export const SUPPORTED_LANGS: Record<string, string> = { ...TRANSLATED_LANGS, zh: '中文' };