Skip to content

feat(SWE-611): i18n keys + translations for frontend coverage#60

Merged
haim-barad merged 6 commits into
mainfrom
feature/swe-611-i18n-account-overview-seed
Jun 4, 2026
Merged

feat(SWE-611): i18n keys + translations for frontend coverage#60
haim-barad merged 6 commits into
mainfrom
feature/swe-611-i18n-account-overview-seed

Conversation

@haim-barad

@haim-barad haim-barad commented Jun 3, 2026

Copy link
Copy Markdown
Member

User description

Summary

Adds the translation keys (8 supported locales) backing the SWE-611 frontend internationalization in core_api (companion PR #795). en-US is the authored source; other locales are translated. Syncs to Crowdin downstream.

Commits

  • b39da61account.overview.* en-US seed (fixes the SWE-609 raw-key bug at the backend source).
  • c1225d9 — batch 1 keys + translations (all 8 locales).
  • 66303a2 — batch 2 (~650 new keys) + translations.

Locale status (en-US = 2768 leaves)

locale leaves status
en-US 2768 source
en-GB, es-ES, fr, pt-BR, pt-PT 2762 ✅ full parity (−6 = en-US-only account.overview)
it 2677 ⚠️ partial (~85 batch-2 keys missing)
es-MX 2611 ⚠️ partial (~151 batch-2 keys missing)

All files are valid JSON (verified). Writes target the canonical hyphenated locale dirs the backend loader serves (api_helpers.py<language_code>/<namespace>.json); the legacy underscore dirs are untouched/dead.

Known follow-up

es-MX and it are partially translated — the Haiku backfill was interrupted by an account spend limit. The missing keys fall back to en-US in the app (fallbackLng), so users see English rather than raw keys. Backfill is queued (translate en-US keys missing from es-MX/common.json and it/common.json).

Refs SWE-611.

🤖 Generated with Claude Code


CodeAnt-AI Description

Add missing translations for dashboard, rewards, backups, passes, offers, reports, and related admin screens

What Changed

  • Added new translated labels and messages for many screens, including dashboard, rewards, programs, customers, reports, offers, backups, and AI settings
  • Filled in missing text for actions, errors, confirmations, empty states, and headings so supported locales can show localized content instead of fallback or raw keys
  • Added translations for new account overview and gift card flows, plus updated shared labels used across the app

Impact

✅ Fewer raw translation keys
✅ Clearer non-English app screens
✅ Better localized setup and admin flows

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

haim-barad and others added 3 commits June 3, 2026 12:03
Seeds the localization source for the account Overview screen (passTemplates,
passes, passTypeIds, passTypeIdsHelper, appKeys, empty). Backend can now serve
these instead of relying solely on the frontend bundled fallback (see SWE-609).
Translations for the other locales to follow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tch 1)

Adds new common.json keys across all 8 supported locales (en-US source;
en-GB/es-ES/es-MX/fr/it/pt-BR/pt-PT translated) for the frontend strings being
internationalized under SWE-611. Translations generated for merchant-dashboard
UI labels, table headers, gift card and integration screens, etc.

Syncs to Crowdin downstream for bookkeeping.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tch 2)

~650 new common.json keys for the remaining internationalized frontend screens.
en-US source authored; translated into all locales. en-GB/es-ES/fr/pt-BR/pt-PT
at full parity; es-MX and it are partial (Haiku backfill interrupted by spend
limit) — missing keys fall back to en-US via fallbackLng, so no raw keys.

Syncs to Crowdin downstream.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codeant-ai

codeant-ai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files label Jun 3, 2026
@codeant-ai

codeant-ai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

CodeAnt AI finished reviewing your PR.

@greptile-apps

greptile-apps Bot commented Jun 3, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds ~14,700 lines of i18n key/value additions across 8 locale files, covering new namespaces for AI settings, gift card flows, program benefits, reports, and shared admin UI. Six locales (en-US, en-GB, es-ES, fr, pt-BR, pt-PT) reach full parity; it and es-MX are partially translated with missing batch-2 keys falling back to en-US at runtime.

  • New namespaces added: aiSettings, common, admin, appkeys, giftcard, programs, reports, customerInfo, message, programDesign, offerDesign, rules — all seeded in en-US and propagated to the other 7 locales.
  • Typo fixed: integrations.clover.syncSuccessMessage corrected from "You request" → "Your request" in en-US; en-GB includes a matching fix.
  • Partial locales: it (~85 keys) and es-MX (~151 keys) are incomplete due to an interrupted backfill; the fallbackLng safety net means users see English rather than raw keys.

Confidence Score: 5/5

Safe to merge — all changes are additive JSON translation data with no logic, runtime code, or schema changes.

All changes are pure JSON translation data. The only executable concern is whether embedded newlines in the new aiSettings.confirm strings render correctly in the consuming dialog component, but this is a display-quality observation that does not block functionality.

packages/i18n/locales/en-US/common.json — the aiSettings.confirm section embeds raw newlines worth verifying in the consuming dialog component.

Important Files Changed

Filename Overview
packages/i18n/locales/en-US/common.json Source-of-truth locale adding ~1800 new lines; includes a typo fix and new namespaces. Confirm-dialog strings embed raw \n characters which won't render as visible line breaks in standard HTML.
packages/i18n/locales/en-GB/common.json British English locale at full parity; correctly uses British spellings and matches all en-US structure changes.
packages/i18n/locales/es-ES/common.json Spanish (Spain) locale at full parity; all new keys translated, interpolation variables preserved correctly.
packages/i18n/locales/es-MX/common.json ~151 batch-2 keys missing; fall back to en-US at runtime via fallbackLng, backfill is queued.
packages/i18n/locales/fr/common.json French locale at full parity; structure mirrors en-US, all interpolation variables preserved.
packages/i18n/locales/it/common.json ~85 batch-2 keys missing; falling back to en-US per fallbackLng, backfill queued.
packages/i18n/locales/pt-BR/common.json Brazilian Portuguese locale at full parity; all new keys translated correctly.
packages/i18n/locales/pt-PT/common.json European Portuguese locale at full parity; all new keys translated correctly.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    Request["Translation key requested"]
    Request --> CheckLocale{User locale}
    CheckLocale -->|en-US| enUS["en-US ✅ 2768 leaves"]
    CheckLocale -->|en-GB| enGB["en-GB ✅ 2762 leaves"]
    CheckLocale -->|es-ES| esES["es-ES ✅ 2762 leaves"]
    CheckLocale -->|fr| fr["fr ✅ 2762 leaves"]
    CheckLocale -->|pt-BR| ptBR["pt-BR ✅ 2762 leaves"]
    CheckLocale -->|pt-PT| ptPT["pt-PT ✅ 2762 leaves"]
    CheckLocale -->|it| it["it ⚠️ 2677 leaves"]
    CheckLocale -->|es-MX| esMX["es-MX ⚠️ 2611 leaves"]
    it -->|key missing| fallback["Fallback: en-US"]
    esMX -->|key missing| fallback
    enUS --> Resolved["Key resolved ✅"]
    enGB --> Resolved
    esES --> Resolved
    fr --> Resolved
    ptBR --> Resolved
    ptPT --> Resolved
    fallback --> Resolved
Loading

Fix All in Claude Code

Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
packages/i18n/locales/en-US/common.json:1721-1726
The `aiSettings.confirm` strings embed raw `
` newline characters to compose a multi-line confirmation message. In standard React modal/dialog components, `
` is not treated as a line break in HTML rendering — users will see one continuous run-on string unless the component applies `white-space: pre-wrap` CSS. If the confirmation is shown via native `window.confirm()` the newlines do work, but if it is a custom React dialog the message will be unformatted. Consider splitting into separate keys without embedded newlines, or verify the consuming component handles `
` explicitly.

```suggestion
    "confirm": {
      "heading": "Are you sure you want to change the AI provider?",
      "from": "From: {{displayName}} ({{modelName}})",
      "to": "To: {{displayName}} ({{modelName}})",
      "warning": "This change will affect all AI Advisor users immediately."
    },
```

### Issue 2 of 2
packages/i18n/locales/en-US/common.json:1747-1750
Each `description` value in `aiSettings.help` starts with a leading space before the dash (e.g. `" - Fast and efficient…"`). If the component renders `{name}{description}` the result is `"Qwen3 8B - Fast…"` which looks fine, but if `description` is ever used standalone (tooltip, screen-reader label, etc.) it will begin with an invisible space. Using `": "` as a trailing suffix on `name` or `"– Fast…"` (no leading space) in `description` would be cleaner.

```suggestion
      "qwen3_8b": {
        "name": "Qwen3 8B",
        "description": "Fast and efficient model, great for most queries (default)."
      },
```

Reviews (3): Last reviewed commit: "fix(SWE-611): address Greptile review on..." | Re-trigger Greptile

Comment thread packages/i18n/locales/en-US/common.json Outdated
Comment thread packages/i18n/locales/en-US/common.json Outdated
haim-barad and others added 2 commits June 4, 2026 01:14
Backfill the keys that were missing after the batch-2 Haiku run was interrupted:
- es-MX: +157 keys -> full parity with en-US (2768)
- it: +619 keys -> 0 en-US keys missing (preserves 528 pre-existing it-only keys
  used by other localization-platform consumers; add-only, nothing removed)

Verified: all 8 locales valid JSON; 0 en-US keys missing in any locale.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…}} interpolation)

- Sync all locales to EXACT en-US key parity (all-languages.test.js / es-translations.test.js
  require missingKeys==[] && extraKeys==[]):
  - Remove 528 stale extra keys from `it` (a spurious dashboard.* namespace never present
    in en-US or on main; added in error during batch translation).
  - Add the 6 account.overview keys (translated) to en-GB/es-ES/fr/pt-BR/pt-PT.
  - All 8 locales now at 2768 leaves, 0 missing / 0 extra.
- Greptile P1: fix single-brace {total} -> {{total}} on the 4 reports.*.totalRecords keys
  across en-US + all locales (i18next requires double braces to interpolate).
- Greptile P2: trim trailing whitespace from a totalRecords label value.

Verified: vitest 228 passed / 9 skipped; all locales valid JSON; 0 single-brace placeholders.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@haim-barad

Copy link
Copy Markdown
Member Author

@greptileai review

- Set the 4 unused/duplicate reports.*.totalRecords keys (listMembersOptingIn,
  listMembersOptingOut, membersWithRewards, otherVouchersSent) to the plain
  label (drop the {{total}} placeholder) across all 8 locales. Components use
  *.table.totalRecords and render the count as a separate JSX expression, so
  these keys take no interpolation param; the legit shopify*/eposnow* totalRecords
  keys keep {{total}} untouched.
- Fix en-US/en-GB grammar typo "You request" -> "Your request" (syncQueued,
  syncRequestQueuedMessage).

Verified: vitest 228 passed; all 8 locales at exact en-US parity; valid JSON.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@haim-barad

Copy link
Copy Markdown
Member Author

@greptileai review

@haim-barad haim-barad merged commit 563767e into main Jun 4, 2026
7 checks passed
@haim-barad haim-barad deleted the feature/swe-611-i18n-account-overview-seed branch June 4, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant