Skip to content

[ESLint 7/10] Fix i18next/no-literal-string warnings - #31031

Open
ShaileshParmar11 wants to merge 1 commit into
ShaileshParmar11/eslint-06-duplicate-stringfrom
ShaileshParmar11/eslint-08-i18n
Open

[ESLint 7/10] Fix i18next/no-literal-string warnings#31031
ShaileshParmar11 wants to merge 1 commit into
ShaileshParmar11/eslint-06-duplicate-stringfrom
ShaileshParmar11/eslint-08-i18n

Conversation

@ShaileshParmar11

Copy link
Copy Markdown
Contributor

Fixes #30985. Part of epic #30977.

Stacked PR 7 of 10 — base branch ShaileshParmar11/eslint-06-duplicate-string. Review after the previous PR in the stack. The diff here contains only the i18next/no-literal-string changes.

⚠️ Stacked, not independent — this PR merges after #the one below it in the stack; GitHub auto-retargets the base to main as each lands. See epic #30977 for the full approach and reviewer caveats.

Behavior-preserving lint cleanup. Verified: target rule(s) → 0, no new warnings (git-stash ESLint before/after), 0 new tsc signatures vs baseline.

🤖 Generated with Claude Code


Reviewer notes — the i18n approach

98% (2,242) of the i18next/no-literal-string warnings were in test/spec/mock files, which contain no user-facing strings. Rather than 2,242 inline disables, the rule is turned off for test/spec/mock files via the existing test-file override in eslint.config.mjs — one config line (trivially reversible). The 40 genuine production strings are properly internationalised with t() + 26 new alphabetically-sorted en-us.json keys; yarn i18n then synced all 20 locale files. ⚠️ The 26 keys land as English placeholders in the 19 non-English locales — real translation is unavoidable human follow-up (CI only verifies key sync, which passes).

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 12:18
@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

Disables i18next/no-literal-string for test files and wraps 40 genuine production strings with internationalization keys. 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

@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), 12 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), 12 warning(s) across 4 changed file(s).

Count Rule
8 react-hooks/exhaustive-deps
3 sonarjs/cyclomatic-complexity
1 sonarjs/expression-complexity
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/components/ServiceAgents/components/RunHistoryDrawer.component.tsx:149:4 sonarjs/cyclomatic-complexity {"message":"Function has a complexity of 12 which is greater than 10 authorized.","cost":2,"secondaryLocations":[{"line":149,"column":3,"endLine":149,"endColumn
🟡 src/pages/TaskFormSettingsPage/TaskFormSettingsPage.tsx:121:61 sonarjs/cyclomatic-complexity {"message":"Function has a complexity of 12 which is greater than 10 authorized.","cost":2,"secondaryLocations":[{"line":121,"column":60,"endLine":121,"endColum
🟡 src/pages/TaskFormSettingsPage/TaskFormSettingsPage.tsx:176:33 sonarjs/cyclomatic-complexity {"message":"Function has a complexity of 12 which is greater than 10 authorized.","cost":2,"secondaryLocations":[{"line":176,"column":32,"endLine":176,"endColum
🟡 src/pages/TaskFormSettingsPage/TaskFormSettingsPage.tsx:292:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'loadSchemas'. Either include it or remove the dependency array.
🟡 src/pages/TaskFormSettingsPage/TaskFormSettingsPage.tsx:474:5 sonarjs/expression-complexity Reduce the number of conditional operators (4) used in the expression (maximum allowed 3).

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 660e26da25fb123f7506dc3fe7458b2b3d1b5fc1 in Playwright run 31005031561, attempt 1.

✅ 610 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 55m 18s

⏱️ Max setup 3m 9s · max shard execution 17m 38s · max shard-job elapsed before upload 21m 17s · reporting 5s

🌐 210.55 requests/attempt · 2.75 app boots/UI scenario · 4.25% common-shard skew

Optimization targets still in progress:

  • Browser traffic was 210.55 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.75 per UI scenario (1763 boots / 640 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 137 0 0 0 0 0
✅ Shard chromium-02 126 0 0 0 0 0
✅ Shard chromium-03 136 0 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 14 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard ingestion-01 32 0 0 0 0 0
✅ Shard ingestion-02 29 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 10 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

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