feat(web): complete i18n coverage for showConfirm/showToast strings#281
Merged
feat(web): complete i18n coverage for showConfirm/showToast strings#281
Conversation
…loses #29) Completes the i18n coverage pass begun in commit 0c65e74. Before this PR the web UI still had hardcoded English in six modules (app.js was split in the interim, so the work moved across several files): - app.js — 4 showConfirm + 12 showToast + 1 bulk-delete msg + showConfirm default confirmText - settings-maintenance.js — 3 showConfirm (merge A/B, expire) + 2 toasts (expired, imported) - settings-namespaces.js — 2 toasts (rename, save query) - settings-config.js — 4 toasts (rejected fields, applied count, reindex partial/complete) - settings-hooks-watchdog.js — 2 showConfirm (replace, sync) + 4 toasts (request failed, unexpected response, warnings, sync failed) - context-gateway.js — 5 toasts (save/delete/sync/import/create failed) + detection-complete + name-required 46 new keys added to both en.json and ko.json under common.*, confirm.*, and toast.*, matching the existing naming convention. All interpolations use the {param} syntax already supported by i18n.js's t() helper. Tests: adds four regression guards in tests/test_i18n.py — no template-literal toast args, no English-capitalized literal toast args, no hardcoded English in showConfirm titles, and a structural check that the #29 keys exist in both locales. Existing locale parity + placeholder tests continue to pass (key count now 516 per locale, up from 499). Co-Authored-By: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
showConfirm/showToastcall sites throught(), completing the i18n coverage pass begun in commit 0c65e74.en.jsonandko.jsonundercommon.*,confirm.*, andtoast.*, matching the existing naming convention.showToast(\...`)template literals, capitalized English string-literal toasts, and hardcodedtitle:values insideshowConfirm({})` blocks — the exact pattern web: i18n coverage for remaining hardcoded showConfirm/showToast strings #29 cleared.Closes #29.
Scope
The issue referenced
app.jsline numbers that shifted after the JS module split (see memofeedback_js_module_split.md), so strings originally inapp.jsare now spread across several modules. This PR covers the full current location map:showConfirmsites fixedshowToastsites fixedapp.jsconfirmTextmsg)settings-maintenance.jssettings-namespaces.jssettings-config.jssettings-hooks-watchdog.jscontext-gateway.jsAll interpolation uses the existing
{param}syntax supported byi18n.js'st(key, params)helper — no change to the i18n runtime.Test plan
uv run pytest packages/memtomem/tests/test_i18n.py— 11 pass (7 existing + 4 new regression guards)uv run pytest packages/memtomem/tests -m "not ollama"— 1747 pass, 0 regressionuv run ruff check && uv run ruff format --check— greennode --checkon each of the six JS files — all parse cleanlyFollow-up
The existing
settings.ctx.sync_success,settings.ctx.import_success,settings.hooks.sync_successcall sites already route throught()with an English fallback and are unchanged here; the fallback only activates if the key is missing.🤖 Generated with Claude Code