feat(i18n): migrate browser key-details framework to i18n (RI-8274) - #6287
feat(i18n): migrate browser key-details framework to i18n (RI-8274)#6287valkirilov wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 03efa32. Configure here.
| <Trans | ||
| i18nKey="browser.keyDetails.ttl.changeConfirm.description" | ||
| values={{ | ||
| name: escapeTrans(`${keyProp}`), |
There was a problem hiding this comment.
Null key name renders as literal "null" string
Low Severity
When keyProp (nameString) is null (e.g. for binary/unprintable key names), escapeTrans(\${keyProp}`)coerces it to the literal string"null", so the confirmation dialog displays **null** as the key name. The old JSX {keyProp}renderednullas empty. The rename dialog inKeyDetailsHeaderNameavoids this with an explicit!isNull(keyProp)guard, but the TTL dialog's guard only checkskeyBuffer`.
Reviewed by Cursor Bugbot for commit 03efa32. Configure here.
Route the key-details header through t() under browser.keyDetails.*, filling en and bg (PR B, commit 1 of 4). - header shell (close), name (tooltip/copy + prod-rename confirm), TTL (placeholder + prod-change confirm), size/length (size, length naming, quant/vector-dim/count), delete aria - formatter dropdown: 14 labels via a ParseKeys-typed config (bg keeps technical format names, translates the descriptive ones) - LENGTH_NAMING_BY_TYPE (constants/keys.ts, consumed only here) → i18n key values + a length.default fallback - rename/change-TTL confirmations use <Trans> with bold interpolation
03efa32 to
57d59b3
Compare
Code Coverage - Frontend unit tests
Test suite run success7878 tests passing in 870 suites. Report generated by 🧪jest coverage report action from 57d59b3 |


Summary
Routes all user-facing strings in the key-details framework layer through
t()with flatbrowser.keyDetails.*keys, filled in bothen.jsonandbg.json(Bulgarian).This is the framework/chrome scope only - per-type value editors (hash/list/set/zset/string/rejson and stream/array/vector-set) follow in PRs C and D.
What's migrated
Header (
key-details-header/*) - close/delete/copy aria, key-name & TTL tooltips, production rename/change-TTL confirm dialogs (<Trans>), size/length/quant/vectorDim/count labels, 14 formatter labels, andLENGTH_NAMING_BY_TYPE.Shared widgets (
key-details/shared/*) - PreviewToggle, CommandPreview, and the three editable widgets (EditableInput/EditablePopover/EditableTextArea): shared production-write confirm trio, edit aria, textarea placeholder, form Cancel/Save.Fallback chrome - NoKeySelected, TextDetailsWrapper (shared close chrome), TooLongKeyNameDetails, UnsupportedTypeDetails (
<Trans>repo link), ModulesTypeDetails (interpolated title +<Trans>Workbench link).key-details-actions/*needs no changes - those components are purely prop-driven and carry no literal strings (their titles come from the per-type editors in PR C/D).Note
Low Risk
Presentation-only i18n wiring with no changes to Redis commands or data mutation logic; minor risk of missing translation keys or regressions in production confirmation copy.
Overview
Internationalizes the browser key-details chrome (header, shared widgets, and fallback panels) by routing user-facing copy through
t()/<Trans>with new flatbrowser.keyDetails.*keys in en and bg.Header — close/delete aria and tooltips; rename and TTL production confirmations with interpolated names; size/length/quant/vector/count labels; value-formatter options now store i18n keys (
ParseKeys) resolved at render time;LENGTH_NAMING_BY_TYPElikewise maps key types tobrowser.keyDetails.length.*keys.Shared —
PreviewToggle,CommandPreview, and editable input/popover/textarea flows use translated preview labels and the shared production-write confirm strings (Cancel/Save, edit aria, placeholder).Fallback views — empty state, text wrapper close chrome, too-long name, unsupported type (repo link via
<Trans>), and module keys (Workbench link +{{moduleName}}title).Per-type value editors are out of scope for this PR;
PreviewToggle.specnow uses inline English expectations instead of removed string constants.Reviewed by Cursor Bugbot for commit 57d59b3. Bugbot is set up for automated code reviews on this repo. Configure here.