Skip to content

Commit 64b3240

Browse files
devGregAclaude
andcommitted
feat(i18n): offer es/ja/de/fr in the language selector
Now that the German, Spanish, French, and Japanese catalogs are translated, add them to LANGUAGES so users can select them. The profile language ChoiceField picks them up automatically. Stored DB values and serialized API values remain English regardless of the selected language. Updates the offered-languages test accordingly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent ba5c414 commit 64b3240

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

dojo/settings/settings.dist.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,14 @@ def generate_url(scheme, double_slashes, user, password, host, port, path, param
331331
# to load the internationalization machinery.
332332
USE_I18N = env("DD_USE_I18N")
333333

334-
# Languages offered in the UI. Only languages with an audited catalog are listed;
335-
# es/ja/de/fr are added once their translations land (their .po files are generated
336-
# for translators). Stored DB values and serialized API values always remain English
337-
# regardless of the selected language; only displayed text changes.
334+
# Languages offered in the UI. Stored DB values and serialized API values always
335+
# remain English regardless of the selected language; only displayed text changes.
338336
LANGUAGES = [
339337
("en", "English"),
338+
("de", "Deutsch"),
339+
("es", "Español"),
340+
("fr", "Français"),
341+
("ja", "日本語"),
340342
("pt-br", "Português (Brasil)"),
341343
("ru", "Русский"),
342344
]

unittests/test_i18n.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,11 @@ def test_language_preference_middleware_runs_after_auth(self):
9393
mw.index("django.contrib.auth.middleware.AuthenticationMiddleware"),
9494
)
9595

96-
def test_only_audited_languages_are_offered(self):
97-
self.assertEqual({code for code, _name in settings.LANGUAGES}, {"en", "pt-br", "ru"})
96+
def test_offered_languages(self):
97+
self.assertEqual(
98+
{code for code, _name in settings.LANGUAGES},
99+
{"en", "de", "es", "fr", "ja", "pt-br", "ru"},
100+
)
98101

99102
def test_locale_paths_point_at_dojo_locale(self):
100103
self.assertTrue(any(str(path).endswith("dojo/locale") for path in settings.LOCALE_PATHS))

0 commit comments

Comments
 (0)