From 7082d7bd6105a2fcbc97c0879c3c1910dcfe9954 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 24 Nov 2026 08:12:52 +0000 Subject: [PATCH] :books: Correct translation asset guidance Document generated locale modules and watcher behavior in the focused translation memory instead of keeping stale UI instructions. AI-assisted-by: gpt-6.1-terra --- .serena/memories/frontend/translations.md | 2 ++ .../memories/frontend/ui-conventions-and-style-system.md | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.serena/memories/frontend/translations.md b/.serena/memories/frontend/translations.md index 40f0508fa2..4c68360e21 100644 --- a/.serena/memories/frontend/translations.md +++ b/.serena/memories/frontend/translations.md @@ -1,6 +1,8 @@ # Frontend translations - `frontend/translations/en.po` defines the keys and English text; `es.po` is a support reference, not the base. Add new keys to both in the same change. Locale conventions: `mem:frontend/translations/ca` and `mem:frontend/translations/ru`. +- Adding a supported locale requires updating both `frontend/src/app/util/i18n.cljs` (`supported-locales`) and `frontend/scripts/_helpers.js` (`langs`). +- `compileTranslations` generates `resources/public/js/translation..js` modules from PO files. The app asset build generates them and the asset watcher regenerates them on translation changes; regeneration does not itself guarantee that the browser reloads an already imported module. Refresh the browser when checking changed text. `pnpm run translations` without a subcommand only shows the toolkit help. ## Keys and catalog sync diff --git a/.serena/memories/frontend/ui-conventions-and-style-system.md b/.serena/memories/frontend/ui-conventions-and-style-system.md index 59390c27e7..95b7e752d5 100644 --- a/.serena/memories/frontend/ui-conventions-and-style-system.md +++ b/.serena/memories/frontend/ui-conventions-and-style-system.md @@ -26,9 +26,7 @@ ## I18n - Translations must be resolved during render or render-time memoization, not at namespace load time. For static option lists, memoize inside render so locale changes still update labels. -- Translation files live in `frontend/translations/*.po`. Translation changes are bundled into `index.html`; refresh the browser after changing translations because there is no hot reload for translation strings. -- Run `pnpm run translations` from `frontend/` after adding/updating translation text. -- Adding a new supported locale requires updates in both `frontend/src/app/util/i18n.cljs` (`supported-locales`) and `frontend/scripts/_helpers.js` (`langs`). +- For catalog edits, locale registration and generated translation assets see `mem:frontend/translations`. ## Performance @@ -54,4 +52,4 @@ - For CLJS app UI, use `mem:frontend/testing`, `mem:frontend/compile-diagnostics`, and live browser/REPL checks when behavior depends on store or canvas state. - For shared UI package changes, run the package build plus Storybook/component tests when relevant. -- For text editor changes, run `frontend/text-editor` tests and refresh/copy WASM artifacts if render-wasm output is involved. \ No newline at end of file +- For text editor changes, run `frontend/text-editor` tests and refresh/copy WASM artifacts if render-wasm output is involved.