From 6bc36669bf0f10383c7bd5708bad075aacf45e31 Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Sun, 20 Jul 2025 19:35:00 +0000 Subject: [PATCH] add lang dir to codegen and sort langs --- dev/code-generation/gen_ts_locales.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dev/code-generation/gen_ts_locales.py b/dev/code-generation/gen_ts_locales.py index 7e16ab59f..e16554592 100644 --- a/dev/code-generation/gen_ts_locales.py +++ b/dev/code-generation/gen_ts_locales.py @@ -179,9 +179,15 @@ def inject_nuxt_values(): all_langs = [] for match in locales_dir.glob("*.json"): - lang_string = f'{{ code: "{match.stem}", file: "{match.name.replace(".json", ".ts")}" }},' + match_data = LOCALE_DATA.get(match.stem) + match_dir = match_data.dir if match_data else "ltr" + + lang_string = f'{{ code: "{match.stem}", file: "{match.name.replace(".json", ".ts")}", dir: "{match_dir}" }},' all_langs.append(lang_string) + all_langs.sort() + all_date_locales.sort() + log.debug(f"injecting locales into nuxt config -> {nuxt_config}") inject_inline(nuxt_config, CodeKeys.nuxt_local_messages, all_langs) inject_inline(i18n_config, CodeKeys.nuxt_local_dates, all_date_locales)