Repository navigation
fix: localize Modal Fields settings tab and field manager - #2408
Merged
callumalpass merged 3 commits intoOct 18, 2026
Merged
Conversation
The Modal Fields settings tab (modalFieldsTab.ts) and the field manager component (FieldManagerComponent.ts) used hardcoded English strings, so they displayed in English regardless of the selected language. Wire both through plugin.i18n.translate with new settings.modalFields.* keys and add translations for all supported locales. Co-authored-by: AI assistant (Kimi Code)
Owner
|
Thanks, @whysoslow, for finding and fixing this translation gap, and for including translations and tests! Merged with a few follow-ups: the field-type badges are now localized too, translation-key parity checks cover nested keys, and rendering/native Obsidian regression tests verify translated labels, property keys, and reset cancellation while preserving saved names and identifiers. I also resolved the release-note conflict and added your acknowledgement. Full Jest suite (746 suites, 4,683 tests passed, with existing skips), full lint, typecheck, translation verification, production build, bundle-size budget, and both isolated Obsidian regression tests passed. |
callumalpass
added a commit
that referenced
this pull request
Oct 24, 2026
Keeps the v5 version and native settings. Main's legacy settings-tab changes are ported to src/settings/native: Enter saves task (#2404), the incomplete property-identification warning (#2363), Google "show all-day as free" (2391cd0), and the modal field ID label (#2408). Custom property key validation and Microsoft reconnect were already covered by v5's native settings. Task List movement takes main's #2381 system, which replaces v5's setupCardTouchDrag list reorder; Kanban keeps longPressTouchDrag. Tests and an e2e spec that target the removed legacy tabs are dropped.
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.
Summary
The Modal Fields settings tab and its field manager rendered hardcoded English strings regardless of the UI language. Every other settings tab routes its text through
plugin.i18n.translate, so this tab stood out as untranslated for non-English users (same class of issue as #884).This PR wires
modalFieldsTab.tsandFieldManagerComponent.tsthrough the translation system with a newsettings.modalFields.*key namespace and adds translations for all 8 supported locales.Out of scope, deliberately: default field/group
displayNamevalues (e.g. "Title", "Basic Information") and default status/priority labels are persisted, user-editable data — consistent with howDEFAULT_STATUSES/DEFAULT_PRIORITIESlabels are already treated — so they are not localized here.Changes
src/settings/tabs/modalFieldsTab.ts: replace all hardcoded strings (tab heading/description, split-layout and Tab-focus toggles, sync/reset buttons, reset confirmation dialog, notices, init error) withplugin.i18n.translatecalls.src/settings/components/FieldManagerComponent.ts: same for the invalid-config error, empty-group state, card row labels ("Enabled:", "Show in Creation:", "Show in Edit:", "Group:"), and the field secondary text (ID: {id}/Key: {key}/ "No key set") via interpolation params, matching the existing{count}/{field}convention.src/i18n/resources/{en,de,es,fr,ja,ko,pt,ru,zh}.ts: add the 32 newsettings.modalFields.*keys (including the four field-type badge keys added during review) (English source in sentence case per theobsidianmd/ui/sentence-case-locale-modulelint rule).i18n.manifest.json/i18n.state.json: regenerated vianpm run i18n:sync;npm run i18n:verifyreports 0 missing / 0 stale across all locales.tests/unit/settings/modalFieldsTranslations.test.ts: new test asserting key parity, non-empty values, and interpolation-placeholder parity for all locales.tests/unit/issues/issue-1430-modal-fields-property-id-display.test.ts: mock plugin now providesi18n: createI18nService()(existing test convention) so the real translation path is exercised.docs/releases/unreleased.md: added Fixed entry.Test plan
npm run i18n:verify— all locales 2280/2280 up-to-date, 0 stale.npm run lint:ts— 0 errors, 0 warnings.npx jest tests/unit/settings tests/unit/locales tests/unit/issues/issue-1430-modal-fields-property-id-display.test.ts— 89 passed.npx jest --cirun: no new failures versus a clean-tree baseline (18 suites fail on unmodifiedmainin this Windows environment, e.g. timezone-sensitive recurrence tests; identical before and after this change).Notes for reviewers
de,es,fr,ja,ko,pt,ruwere drafted to match the tone of each existing locale file; native-speaker review welcome.AI assistance disclosure
This change was generated with AI assistance (Kimi Code agent): investigation, implementation, translations, tests, and PR text. Reviewed and verified locally by the PR author per the commands above.
Maintainer follow-up