feat(i18n): localize shared UI components + init i18n in tests - #128
Merged
Conversation
P2 of the i18n sweep — the reusable components whose button/empty-state copy
was still hardcoded English:
- DatePicker (Clear/Today/Done), MultiSelect (Done), UndoSnackbar (Undo),
Reasoning (header), SwipeableRow + BatchActionBar (Edit/Delete),
QueryBuilder (Clear/Add filter), SaveViewDialog (title/name/visibility/
private/shared/save), FileField (Gallery/Camera/File/uploading/upload-failed/
attached-file).
- New keys: common.{clear,today,undo}, ai.reasoning, fields.{gallery,camera,
file,uploading,uploadFailed,attachedFile}, and a new `views` namespace;
reuses common.{edit,delete,done,saving} and filter.addFilter where they fit.
jest.setup now initializes ~/lib/i18n so components rendered in isolation get
real strings from t() instead of raw keys (previously each test relied on its
import chain happening to pull i18n in). All three locales at full key parity;
tsc + lint clean, full suite 1337 passing.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
i18n P2 — shared components
The reusable components whose button / empty-state copy was still hardcoded English.
Components wired
Keys
New:
common.{clear,today,undo},ai.reasoning,fields.{gallery,camera,file,uploading,uploadFailed,attachedFile}, and a newviewsnamespace. Reusescommon.{edit,delete,done,saving}andfilter.addFilterwhere they fit.Test infra
jest.setupnow initializes~/lib/i18n, so components rendered in isolation get real strings fromt()instead of raw keys — previously each test relied on its import chain happening to pull in i18n (which broke the Reasoning + batch snapshot tests once those components started usingt()).All three locales at full key parity; tsc + lint clean, full suite 1337 passing.
🤖 Generated with Claude Code