feat(web): wire up missing data-i18n on Export, Tags sort, Auto-Tag, Timeline#695
Merged
feat(web): wire up missing data-i18n on Export, Tags sort, Auto-Tag, Timeline#695
Conversation
…line labels These surfaces had hardcoded English strings in ``index.html`` even though matching translation keys already existed in ``locales/en.json`` and ``locales/ko.json``. As a result, the Korean UI displayed mixed English/Korean labels — Source Filter, Tag Filter, Since (ISO date), Preview, Download JSON, Count↓, A-Z, Max Tags per Chunk, Overwrite existing, Dry run, Today, Last N days, Source filter, Namespace, Limit — all stayed in English. Wire ``data-i18n`` (and ``data-i18n-placeholder`` where relevant) onto the existing labels, options, buttons, and table cells so ``I18N.applyDOM`` can swap them on language change. For two checkbox labels (``Overwrite existing``, ``Dry run``) the text was a bare child of a ``<label>`` housing an ``<input>``; ``data-i18n`` on the label would clobber the checkbox via ``textContent``, so the text is moved into a sibling ``<span>``. No new keys are added — all targets already exist in both locales. Parity test (``test_i18n.py``) still passes. 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
data-i18n(anddata-i18n-placeholderwhere relevant) onto Export filters, Import bundle/result rows, Tags sort buttons, Auto-Tag form/result, and Timeline date-range/filter labels.en.jsonandko.json— this PR adds zero locale entries.Why
These surfaces had hardcoded English in
index.htmldespite matching keys living inlocales/. In Korean mode users saw mixed English/Korean labels (Source Filter,Today,Last 7 days,Count↓,Dry run,Limit, etc.) which made the language toggle feel half-finished.What changed
Source Filter,Tag Filter,Since (ISO date),Namespace,All Namespaces,Preview,Download JSON, three matching placeholdersBundle File (.json), four result-row labels (Total chunks,Imported,Skipped,Failed)Count↓,Count↑,A-Z,Z-ASource Filter,Max Tags per Chunk,Overwrite existing,Dry run, three matching placeholdersTotal chunks,Tagged,SkippedToday,Last 7/30/90/180/365 days,Custom…Source filter,Namespace,Limit,All, source placeholderNotes on checkbox labels
For two checkbox controls (
Overwrite existing,Dry run) the text was a bare child of a<label>that also contained the<input type="checkbox">. Puttingdata-i18non the<label>would have wiped the checkbox out viaapplyDOM'stextContentwrite. Wrapping the text in a sibling<span data-i18n="...">keeps the checkbox intact and follows the pattern already used elsewhere in the file (e.g. the Timeline<label>wrappers).Test plan
uv run pytest packages/memtomem/tests/test_i18n.py -q— 12 passed (parity guard).uv run ruff check packages/memtomem/src && uv run ruff format --check packages/memtomem/srcclean.mm web, toggle to Korean, walk Export/Tags/Timeline sections and confirm all wired-up labels switch to Korean and back to English.🤖 Generated with Claude Code