Skip to content

Fix i18next/no-literal-string ESLint warnings (i18n wave — 2,282) - #30967

Merged
ShaileshParmar11 merged 1 commit into
ShaileshParmar11/fix-eslint-warningsfrom
ShaileshParmar11/fix-eslint-i18n
Aug 5, 2026
Merged

Fix i18next/no-literal-string ESLint warnings (i18n wave — 2,282)#30967
ShaileshParmar11 merged 1 commit into
ShaileshParmar11/fix-eslint-warningsfrom
ShaileshParmar11/fix-eslint-i18n

Conversation

@ShaileshParmar11

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #

Stacked on #30961 (base = ShaileshParmar11/fix-eslint-warnings; retarget to main once that merges). This is the deferred i18n wave — the 8th and final ESLint-cleanup category — resolving all 2,282 i18next/no-literal-string warnings.

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:

  • Improvement

High-level design:

  • Test/spec/mock files (2,242 warnings): the i18n literal-string rule doesn't apply to them (no users). Turned it off for these files via the existing test-file override in eslint.config.mjs — one policy line instead of 2,242 inline disables. This is a lint-policy change; trivially reversible if maintainers prefer inline disables.
  • Production (40 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) resolved via disable-with-reason. Ran yarn i18n to sync all 20 locale files.

⚠️ Translation follow-up: yarn i18n copies 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 new tsc errors vs baseline, and yarn check-i18n passes (all 20 locales synced).

  • Backend/Ingestion/Playwright: Not applicable (frontend-only, no functional change).

UI screen recording / screenshots:

Not applicable — behavior-preserving; the 34 t() swaps render the identical English text via existing translation infra.

Checklist:

  • I have read the CONTRIBUTING document.
  • PR linked to a GitHub issue.
  • Commented on hard-to-understand areas (every disable carries a reason; the config change is commented).

🤖 Generated with Claude Code

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>
@ShaileshParmar11
ShaileshParmar11 requested a review from a team as a code owner August 5, 2026 04:47
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Aug 5, 2026
@gitar-bot

gitar-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Resolves 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.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source

@ShaileshParmar11
ShaileshParmar11 merged commit fa17259 into ShaileshParmar11/fix-eslint-warnings Aug 5, 2026
64 of 67 checks passed
@ShaileshParmar11
ShaileshParmar11 deleted the ShaileshParmar11/fix-eslint-i18n branch August 5, 2026 04:48
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 8 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 8 warning(s) across 3 changed file(s).

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant