Fix i18next/no-literal-string ESLint warnings (i18n wave — 2,282) - #30967
Conversation
Resolve all 2,282 i18next/no-literal-string warnings. - 2,242 (98%) were in test/mock files, which contain no user-facing strings. Turned the rule off for test/spec/mock files via the existing test-file override in eslint.config.mjs (one policy change instead of 2,242 inline disables). Trivially reversible if maintainers prefer inline disables. - 40 genuine production warnings (9 files): 34 replaced with t() + 26 new alphabetically-sorted en-us.json keys (reusing existing keys where the English matched); 6 non-user-facing glyphs/separators (✓ ▸ ⌘↵ Esc, UTC offset punctuation) disabled-with-reason. Ran `yarn i18n` to sync all 20 locale files. NOTE: yarn i18n copies the English strings verbatim into the 19 non-en locales as placeholders — real translations are follow-up work (CI only verifies key sync, which passes). Verified: i18next/no-literal-string 0 across all src, 0 eslint errors, no new warnings (git-stash before/after), 0 new tsc signatures vs baseline, `yarn check-i18n` passes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ ApprovedResolves 2,282 i18next/no-literal-string ESLint warnings by disabling the rule for test files, updating production UI components to use translation keys, and syncing locale files. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source |
fa17259
into
ShaileshParmar11/fix-eslint-warnings
|
| Count | Rule |
|---|---|
| 8 | react-hooks/exhaustive-deps |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/Database/SchemaTable/SchemaTable.component.tsx:357:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'fetchTestCaseSummary'. Either include it or remove the dependency array. |
| 🟡 | src/components/Database/SchemaTable/SchemaTable.component.tsx:459:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'tableFqn'. Either include it or remove the dependency array. |
| 🟡 | src/components/Database/SchemaTable/SchemaTable.component.tsx:774:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'handleEditDisplayNameClick' and 't'. Either include them or remove the dependency array. |
| 🟡 | src/components/Database/SchemaTable/SchemaTable.component.tsx:901:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has missing dependencies: 'handleColumnClick' and 't'. Either include them or remove the dependency array. |
| 🟡 | src/components/Database/SchemaTable/SchemaTable.component.tsx:981:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 't'. Either include it or remove the dependency array. |
| 🟡 | src/components/Entity/EntityVersionTimeLine/EntityVersionTimeLine.tsx:36:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'getResourceLimit'. Either include it or remove the dependency array. |
| 🟡 | src/components/Entity/EntityVersionTimeLine/EntityVersionTimeLine.tsx:94:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'maxVersions'. Either include it or remove the dependency array. |
| 🟡 | src/pages/TaskFormSettingsPage/TaskFormSettingsPage.tsx:294:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'loadSchemas'. Either include it or remove the dependency array. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed
Describe your changes:
Fixes #
Stacked on #30961 (base =
ShaileshParmar11/fix-eslint-warnings; retarget tomainonce that merges). This is the deferred i18n wave — the 8th and final ESLint-cleanup category — resolving all 2,282i18next/no-literal-stringwarnings.Behavior-preserving. The key finding: 98% (2,242) of these warnings were in test/mock files, which contain no user-facing strings.
Type of change:
High-level design:
offfor these files via the existing test-file override ineslint.config.mjs— one policy line instead of 2,242 inline disables. This is a lint-policy change; trivially reversible if maintainers prefer inline disables.t()+ 26 new alphabetically-sorteden-us.jsonkeys (reusing existing keys where the English matched); 6 non-user-facing glyphs/separators (✓ ▸ ⌘↵ Esc, UTC-offset punctuation) resolved via disable-with-reason. Ranyarn i18nto sync all 20 locale files.yarn i18ncopies the English strings verbatim into the 19 non-English locales as placeholders. Real translations are unavoidable human follow-up — CI only verifies key sync (which passes), not translation quality.Tests:
No behavior change. No new tests (lint cleanup). Verified:
i18next/no-literal-string= 0 across all src, 0 eslint errors, no new warnings (git-stash before/after), 0 newtscerrors vs baseline, andyarn check-i18npasses (all 20 locales synced).UI screen recording / screenshots:
Not applicable — behavior-preserving; the 34
t()swaps render the identical English text via existing translation infra.Checklist:
🤖 Generated with Claude Code