Skip to content

[packages] ]feat(i18n): replace quetzal with i18next for translations#1129

Open
madster456 wants to merge 2 commits intodevfrom
i18n-implementation
Open

[packages] ]feat(i18n): replace quetzal with i18next for translations#1129
madster456 wants to merge 2 commits intodevfrom
i18n-implementation

Conversation

@madster456
Copy link
Collaborator

@madster456 madster456 commented Jan 22, 2026

Migrate from quetzal (deprecated) to i18next for internationalization. JSON locale files are now the source of truth and can be directly edited.

Changes:

  • Add i18next dependency
  • Create editable JSON locale files for 13 languages
  • Add generate-i18next-locales script to bundle translations
  • Consolidate translation providers into single TranslationProvider
  • Remove quetzal-based translation-provider-client

The translation API remains backward compatible:

  • useTranslation() returns { t: (str, vars?) => string }
  • StackProvider accepts lang and translationOverrides props
  • Same supported locales: de-DE, en-US, es-419, es-ES, fr-CA, fr-FR, it-IT, ja-JP, ko-KR, pt-BR, pt-PT, zh-CN, zh-TW

To edit translations:

  1. Edit JSON files in packages/template/src/locales/
  2. Run: pnpm run generate-i18next-locales
  3. Run: pnpm run generate-sdks~

Summary by CodeRabbit

  • New Features

    • Added comprehensive multi-language support for 12 locales including German, Spanish (Spain and Latin America), French (France and Canada), Italian, Japanese, Korean, Portuguese (Brazil and Portugal), and Chinese (Simplified and Traditional).
  • Chores

    • Updated translation system architecture and dependency management for improved runtime language support.

✏️ Tip: You can customize this high-level summary in your review settings.

Migrate from quetzal (deprecated) to i18next for internationalization.
JSON locale files are now the source of truth and can be directly edited.

Changes:
- Add i18next dependency
- Create editable JSON locale files for 13 languages
- Add generate-i18next-locales script to bundle translations
- Consolidate translation providers into single TranslationProvider
- Remove quetzal-based translation-provider-client

The translation API remains backward compatible:
- useTranslation() returns { t: (str, vars?) => string }
- StackProvider accepts lang and translationOverrides props
- Same supported locales: de-DE, en-US, es-419, es-ES, fr-CA, fr-FR,
  it-IT, ja-JP, ko-KR, pt-BR, pt-PT, zh-CN, zh-TW

To edit translations:
1. Edit JSON files in packages/template/src/locales/
2. Run: pnpm run generate-i18next-locales
3. Run: pnpm run generate-sdks~
@vercel
Copy link

vercel bot commented Jan 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
stack-backend Ready Ready Preview, Comment Jan 22, 2026 5:34pm
stack-dashboard Ready Ready Preview, Comment Jan 22, 2026 5:34pm
stack-demo Ready Ready Preview, Comment Jan 22, 2026 5:34pm
stack-docs Ready Ready Preview, Comment Jan 22, 2026 5:34pm

@madster456 madster456 changed the title [200~feat(i18n): replace quetzal with i18next for translations [packages] ]feat(i18n): replace quetzal with i18next for translations Jan 22, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

This PR introduces comprehensive internationalization (i18n) support by moving i18next to production dependencies across multiple packages, adding 12 locale JSON files for various languages, implementing a locale generation script, refactoring the translation provider to use i18next with React Context, and updating the translation hook to leverage the new provider architecture.

Changes

Cohort / File(s) Summary
Dependency Migration
packages/js/package.json, packages/react/package.json, packages/stack/package.json
Moved i18next (^23.14.0) from devDependencies to dependencies, making it a runtime requirement across packages
Template Package Configuration
packages/template/package.json, packages/template/package-template.json
Added i18next to dependencies, introduced new generate-i18next-locales script for locale file generation
Locale Generation Script
packages/template/scripts/generate-i18next-locales.ts
New TypeScript script that reads locale JSON files, aggregates translations, and generates an inlined index.ts exporting supportedLocales, SupportedLocale, and locales objects with error handling and logging
Locale Resource Files
packages/template/src/locales/*.json (en-US, de-DE, es-419, es-ES, fr-CA, fr-FR, it-IT, ja-JP, ko-KR, pt-BR, pt-PT, zh-CN, zh-TW)
Added 12 comprehensive locale JSON files containing translated UI strings across authentication, account management, payments, team management, and general UI actions
Translation Provider Refactoring
packages/template/src/providers/translation-provider.tsx
Replaced quetzal-based translation with i18next-powered provider; added TranslationContext, useTranslationContext hook, and per-provider i18n instances with merged translations and fallback English resources
Legacy Provider Removal
packages/template/src/providers/translation-provider-client.tsx
Removed TranslationContext declaration and TranslationProviderClient component, consolidating to single provider approach
Translation Hook Update
packages/template/src/lib/translations.tsx
Refactored useTranslation() to use useTranslationContext() hook instead of direct context access; updated to delegate translation lookups to context.i18n.t()

Sequence Diagram(s)

sequenceDiagram
    participant App as Application
    participant TP as TranslationProvider
    participant i18n as i18next Instance
    participant TC as TranslationContext
    participant useTC as useTranslationContext Hook
    participant Hook as useTranslation Hook

    App->>TP: Render with lang, translationOverrides
    TP->>TP: Derive effectiveLocale from lang + supportedLocales
    TP->>TP: Merge base locale + overrides
    TP->>i18n: Create i18n instance with merged resources
    TP->>i18n: Initialize synchronously
    TP->>TC: Provide { i18n, locale } via context
    
    Hook->>useTC: Call useTranslationContext()
    useTC->>TC: Access TranslationContext
    TC-->>useTC: Return { i18n, locale }
    useTC-->>Hook: Expose context value
    
    Hook->>i18n: Call context.i18n.t(key)
    i18n-->>Hook: Return translated string
    Hook-->>App: Provide t function for UI rendering
    
    Note over TP,i18n: On lang/translationOverrides change
    TP->>TP: Update effectiveLocale
    TP->>i18n: Update resource bundles
    TP->>i18n: Change language
    i18n-->>App: Re-render with new translations
Loading

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

Possibly Related PRs

Suggested Reviewers

  • Developing-Gamer
  • N2D4

Poem

🐰 A translator's tale...

With i18next bundled in tight,
Twelve new locales shine so bright!
Contexts and hooks dance in the flow,
From en to ja, the languages grow!
🌍✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: migrating from quetzal to i18next for translations across packages. It directly reflects the primary objective of the changeset.
Description check ✅ Passed The description is comprehensive and well-structured, explaining the migration, specific changes made, backward compatibility assurances, and clear instructions for editing translations. All essential information is provided.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 22, 2026

Greptile Summary

This PR migrates the internationalization system from quetzal (deprecated) to i18next. JSON locale files are now the editable source of truth for all 13 supported languages (305 translation keys each).

Key Changes:

  • Added i18next (v23.14.0) dependency and removed quetzal-based translation system
  • Created 13 editable JSON locale files in packages/template/src/locales/
  • Added generate-i18next-locales script to bundle JSON files into TypeScript for bundler compatibility
  • Consolidated translation-provider-client.tsx into single TranslationProvider component
  • API remains backward compatible: useTranslation() returns { t: (str, vars?) => string }

Issues Found:

  • Prototype pollution risk in translation-provider.tsx where translationOverrides is spread into plain objects (lines 46-49, 82-85)

Translation Editing Workflow:

  1. Edit JSON files in packages/template/src/locales/
  2. Run pnpm run generate-i18next-locales to regenerate index.ts
  3. Run pnpm run generate-sdks to propagate changes

Confidence Score: 3/5

  • This PR is functionally sound but has a prototype pollution vulnerability that should be addressed before merging.
  • The migration from quetzal to i18next is well-executed with proper backward compatibility maintained. All 13 locale files have consistent 305 keys, the generation script is robust, and the API surface remains unchanged. However, the prototype pollution vulnerability in the translation provider (spreading user-controlled translationOverrides into plain objects) violates the repository's security guidelines and could potentially be exploited if malicious translation overrides are provided.
  • Pay close attention to packages/template/src/providers/translation-provider.tsx due to prototype pollution risk

Important Files Changed

Filename Overview
packages/template/src/providers/translation-provider.tsx Replaced quetzal with i18next. Potential prototype pollution risk with translationOverrides spreading into plain object.
packages/template/src/lib/translations.tsx Updated useTranslation hook to use i18next API instead of quetzal, backward compatible interface maintained.
packages/template/scripts/generate-i18next-locales.ts Script to generate index.ts from JSON locale files, inlines translations for bundler compatibility.
packages/template/package.json Added i18next dependency (v23.14.0), added generate-i18next-locales script, kept quetzal in devDependencies.

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant JSON as locale/*.json
    participant Script as generate-i18next-locales.ts
    participant Index as locales/index.ts
    participant SP as StackProvider
    participant TP as TranslationProvider
    participant i18n as i18next instance
    participant Comp as Component
    participant Hook as useTranslation()

    Note over Dev,JSON: Translation Editing Flow
    Dev->>JSON: Edit translation keys
    Dev->>Script: Run pnpm run generate-i18next-locales
    Script->>JSON: Read all JSON files
    Script->>Index: Generate TypeScript with inlined translations
    
    Note over SP,Hook: Runtime Translation Flow
    SP->>TP: Pass lang & translationOverrides props
    TP->>Index: Import locales[lang]
    TP->>TP: Merge baseTranslations with translationOverrides
    TP->>i18n: Create i18next instance with resources
    TP->>i18n: Initialize with merged translations
    TP->>Comp: Provide TranslationContext
    Comp->>Hook: Call useTranslation()
    Hook->>i18n: Access i18n.t() function
    Hook->>Comp: Return t(key, vars)
    Comp->>i18n: Call t("Hello, {name}!", {name: "World"})
    i18n->>Comp: Return "Hello, World!"
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

23 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +46 to +49
const translations = {
...baseTranslations,
...translationOverrides,
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Spreading translationOverrides into a plain object could allow prototype pollution if user provides keys like __proto__ or constructor.

Suggested change
const translations = {
...baseTranslations,
...translationOverrides,
};
// Merge with overrides using Map to prevent prototype pollution
const translations = new Map(Object.entries(baseTranslations));
if (translationOverrides) {
for (const [key, value] of Object.entries(translationOverrides)) {
translations.set(key, value);
}
}

Context Used: Rule from dashboard - Use Map<A, B> instead of plain objects when using dynamic keys to avoid prototype pollution vulnerab... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/template/src/providers/translation-provider.tsx
Line: 46:49

Comment:
**logic:** Spreading `translationOverrides` into a plain object could allow prototype pollution if user provides keys like `__proto__` or `constructor`.

```suggestion
    // Merge with overrides using Map to prevent prototype pollution
    const translations = new Map(Object.entries(baseTranslations));
    if (translationOverrides) {
      for (const [key, value] of Object.entries(translationOverrides)) {
        translations.set(key, value);
      }
    }
```

**Context Used:** Rule from `dashboard` - Use Map<A, B> instead of plain objects when using dynamic keys to avoid prototype pollution vulnerab... ([source](https://app.greptile.com/review/custom-context?memory=cd0e08f7-0df2-43c8-8c71-97091bba4120))

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +82 to +85
const translations = {
...baseTranslations,
...translationOverrides,
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Same prototype pollution risk as lines 46-49 with spreading translationOverrides into plain object.

Context Used: Rule from dashboard - Use Map<A, B> instead of plain objects when using dynamic keys to avoid prototype pollution vulnerab... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/template/src/providers/translation-provider.tsx
Line: 82:85

Comment:
**logic:** Same prototype pollution risk as lines 46-49 with spreading `translationOverrides` into plain object.

**Context Used:** Rule from `dashboard` - Use Map<A, B> instead of plain objects when using dynamic keys to avoid prototype pollution vulnerab... ([source](https://app.greptile.com/review/custom-context?memory=cd0e08f7-0df2-43c8-8c71-97091bba4120))

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

🤖 Fix all issues with AI agents
In `@packages/template/src/locales/de-DE.json`:
- Line 14: Replace the remaining English values in
packages/template/src/locales/de-DE.json with German translations for the keys
found at the indicated locations (e.g., the "Amount" key and the other keys at
lines 55, 119, 211, 272, 292); update each value to the correct German string
(e.g., "Amount" -> "Betrag") preserving the JSON key names and punctuation, run
a quick JSON validation, and ensure capitalization/terminology is consistent
with other de-DE entries.

In `@packages/template/src/locales/en-US.json`:
- Line 300: Fix the typo in the locale key and value by renaming the translation
key "You email has been verified!" to "Your email has been verified!" in
en-US.json and update the value to match; then propagate this new key name
across all other locale files and any code references (e.g., components or hooks
that call the translation key) so they use the corrected "Your email has been
verified!" key.

In `@packages/template/src/locales/es-419.json`:
- Line 14: Update the Spanish locale entries that are still in English by
replacing the values for the keys "Amount", "Date", "Invoice", "Unavailable",
and "View" with appropriate Spanish translations (e.g., "Monto" or "Cantidad"
for "Amount", "Fecha" for "Date", "Factura" for "Invoice", "No disponible" for
"Unavailable", and "Ver" for "View") in the es-419 JSON so the keys remain the
same but their values are translated.

In `@packages/template/src/locales/es-ES.json`:
- Line 14: The JSON keys "Amount", "Date", "Invoice", "Unavailable", and "View"
currently have English values; update their values in es-ES.json to Spanish to
match es-419.json — set "Amount" -> "Cantidad", "Date" -> "Fecha", "Invoice" ->
"Factura", "Unavailable" -> "No disponible", and "View" -> "Ver" so the
translations are consistent across locales.

In `@packages/template/src/locales/fr-CA.json`:
- Line 14: Several entries in the fr-CA locale JSON still have English values;
update the JSON values for the key "Amount" and the other entries flagged at
lines 119, 272, and 292 so they are translated to French Canadian (keep the JSON
keys unchanged and preserve existing punctuation/escape sequences). Locate the
"Amount" key and the three other keys that currently map to English strings,
replace their English values with the correct fr-CA translations (e.g.,
"Montant" for "Amount" or the appropriate localized phrases), and ensure the
file remains valid JSON (no trailing commas, correct quoting).

In `@packages/template/src/locales/fr-FR.json`:
- Line 14: Several entries in fr-FR locale are still English (e.g., the "Amount"
key and three other entries at lines referenced in the review); update those
JSON values to French translations or explicitly point them to the en-US
fallback. Locate the "Amount" key in fr-FR.json and replace its value with the
correct French string (and do the same for the entries currently English at the
other two referenced positions), ensuring valid JSON and consistent key names;
if you intentionally want to fallback, replace the value with a clear reference
to use en-US (or remove/merge with the existing en-US import) so the UI won’t
show mixed-language text.

In `@packages/template/src/locales/it-IT.json`:
- Line 14: Update the untranslated Italian locale entries by replacing the
English values for the specified keys with Italian equivalents: change the
"Amount" value to "Importo", "Date" to "Data", "Invoice" to "Fattura",
"Unavailable" to "Non disponibile", and "View" to "Visualizza" in the it-IT
JSON; ensure you update the keys "Amount", "Date", "Invoice", "Unavailable", and
"View" consistently (same pattern exists across other locale files) and keep
JSON formatting and commas intact.

In `@packages/template/src/locales/ja-JP.json`:
- Line 14: Several localization values in ja-JP.json are still English (e.g.,
the "Amount" key) and must be localized; open the ja-JP.json locale file and
replace the English string values for the untranslated keys (the entries that
remain in English on the noted lines) with proper Japanese translations,
ensuring each key (such as "Amount" and the other untranslated keys) has a
Japanese value and that JSON formatting and quoting are preserved.

In `@packages/template/src/locales/ko-KR.json`:
- Line 14: Several localization entries in locales/ko-KR.json are still in
English; replace the English values for the keys "Amount", "Date", "Invoice",
"Review past invoices and receipts.", "Unavailable", and "View" with their
proper Korean translations (or add a brief comment if keeping them intentionally
in English). Locate these keys in the JSON (e.g., the entries named "Amount",
"Date", "Invoice", the sentence "Review past invoices and receipts.",
"Unavailable", and "View") and update their string values to the correct Korean
text, ensuring valid JSON string quoting and preserving surrounding commas and
whitespace.

In `@packages/template/src/locales/pt-BR.json`:
- Line 14: Replace the English placeholder values in the pt-BR locale JSON for
the specified keys: update the "Amount" key value to "Valor", the "Date" key
value to "Data", the "Invoice" key value to "Fatura", the "Unavailable" key
value to "Indisponível", and the "View" key value to "Visualizar" so that
"Amount", "Date", "Invoice", "Unavailable", and "View" in
packages/template/src/locales/pt-BR.json have their correct Brazilian Portuguese
translations.

In `@packages/template/src/locales/pt-PT.json`:
- Line 14: Several pt-PT locale entries are still in English; update the JSON
values for the listed keys to European Portuguese: change "Amount" ->
"Montante", "Date" -> "Data", "Invoice" -> "Fatura", "Review past invoices and
receipts." -> "Rever faturas e recibos anteriores.", "Unavailable" ->
"Indisponível", and "View" -> "Ver"; locate these keys in the pt-PT locale file
(keys: "Amount", "Date", "Invoice", "Review past invoices and receipts.",
"Unavailable", "View") and replace their values accordingly, ensuring proper
JSON quoting and comma placement.

In `@packages/template/src/locales/zh-CN.json`:
- Line 14: Replace the untranslated English values in the zh-CN JSON locale:
change the value for the "Amount" key to "金额", for "Date" to "日期", for "Invoice"
to "发票" (to match "Invoices"), for "Unavailable" to "不可用", and for "View" to
"查看"; locate these keys ("Amount", "Date", "Invoice", "Unavailable", "View") in
the zh-CN.json and update their string values accordingly, keeping JSON
formatting intact and ensuring no duplicate keys are introduced.
- Line 300: Fix the typo in the translation key by renaming the source key "You
email has been verified!" to "Your email has been verified!" across all locale
files (e.g., in packages/template/src/locales/zh-CN.json) and ensure
corresponding entries in other locale files and any references in code (template
lookup keys) are updated to the corrected key so translations remain consistent.

In `@packages/template/src/locales/zh-TW.json`:
- Line 14: Replace the English placeholder values in the zh-TW locale JSON with
their Traditional Chinese translations: update the "Amount" key value to "金額",
"Date" to "日期", "Invoice" to "發票", "Unavailable" to "不可用", and "View" to "檢視" in
the locales/zh-TW.json file (look for the exact keys "Amount", "Date",
"Invoice", "Unavailable", "View" to locate the entries) and ensure the JSON
remains valid after edits.
♻️ Duplicate comments (1)
packages/react/package.json (1)

95-95: Same leftover dependency as noted in packages/stack/package.json.

The @quetzallabs/i18n should be removed from the template if no longer needed.

🧹 Nitpick comments (7)
packages/template/src/locales/zh-CN.json (2)

233-233: Minor inconsistency in placeholder spacing.

The spacing around {provider} is inconsistent between similar strings:

  • Line 233: "使用{provider}登录" (no spaces)
  • Line 239: "用 {provider} 注册" (with spaces)

This is a minor style nit, but consider standardizing for consistency.

Also applies to: 239-239


216-216: Translation appears redundant.

"Secret API Key": "密钥 API 密钥" reads awkwardly as "密钥" (secret/key) is repeated, resulting in something like "secret key API secret key."

Consider a cleaner translation:

Suggested fix
-  "Secret API Key": "密钥 API 密钥",
+  "Secret API Key": "私密 API 密钥",
packages/stack/package.json (1)

102-102: Consider removing the deprecated @quetzallabs/i18n dependency.

The @quetzallabs/i18n package remains in devDependencies but the PR description states quetzal is being replaced. If this dependency is no longer needed, it should be removed from packages/template/package-template.json (since this file is auto-generated).

packages/template/package-template.json (1)

79-80: Wire locale generation into codegen to prevent stale bundles

The generate-i18next-locales script should be integrated into the codegen pipeline (alongside css and quetzal generation) to ensure locales are automatically regenerated during builds and CI checks. Currently it's standalone, which risks developers accidentally shipping stale locale files.

Regarding i18next v23.14.0: the project's Node.js minimum (>= 20.0.0) already exceeds the package's requirement (>= 14.0.0), so there are no compatibility concerns.

packages/template/scripts/generate-i18next-locales.ts (2)

38-43: Add error handling for malformed JSON files.

If a JSON file contains invalid syntax, JSON.parse will throw a generic error without indicating which file caused the issue. Wrapping this in a try-catch with the filename would improve debugging experience.

♻️ Suggested improvement
   for (const file of jsonFiles) {
     const localeName = file.replace('.json', '');
     const content = fs.readFileSync(path.join(localesDir, file), 'utf-8');
-    localeData[localeName] = JSON.parse(content);
+    try {
+      localeData[localeName] = JSON.parse(content);
+    } catch (err) {
+      throw new Error(`Failed to parse ${file}: ${err instanceof Error ? err.message : String(err)}`);
+    }
     console.log(`Read ${file} (${Object.keys(localeData[localeName]).length} keys)`);
   }

75-78: Consider using runAsynchronously for consistency with coding guidelines.

The coding guidelines discourage .catch(console.error) patterns. While this is a CLI script entry point where catch-all is commonly acceptable, using runAsynchronously would maintain consistency with the codebase patterns.

♻️ Alternative using runAsynchronously
+import { runAsynchronously } from "@stackframe/stack-shared/dist/utils/promises";
+
-main().catch(err => {
-  console.error(err);
-  process.exit(1);
-});
+runAsynchronously(main());

Note: This depends on how runAsynchronously handles errors in CLI contexts. If it doesn't call process.exit(1) on failure, the current approach may be more appropriate for build scripts that need to signal failure to CI systems.

packages/template/src/providers/translation-provider.tsx (1)

8-11: Use interface instead of type for object shapes.

Per coding guidelines, prefer interface for defining object shapes in TypeScript.

♻️ Suggested change
-export type TranslationContextValue = {
+export interface TranslationContextValue {
   i18n: I18nInstance,
   locale: SupportedLocale,
-};
+}

"Add new passkey": "Neue Passkey hinzufügen",
"Add your email address": "E-Mail-Adresse hinzufügen",
"Already have an account?": "Haben Sie bereits ein Konto?",
"Amount": "Amount",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Translate remaining English strings in de-DE

Line 14, Line 55, Line 119, Line 211, Line 272, and Line 292 are still English. Please localize to avoid a mixed-language UI.

Also applies to: 55-55, 119-119, 211-211, 272-272, 292-292

🤖 Prompt for AI Agents
In `@packages/template/src/locales/de-DE.json` at line 14, Replace the remaining
English values in packages/template/src/locales/de-DE.json with German
translations for the keys found at the indicated locations (e.g., the "Amount"
key and the other keys at lines 55, 119, 211, 272, 292); update each value to
the correct German string (e.g., "Amount" -> "Betrag") preserving the JSON key
names and punctuation, run a quick JSON validation, and ensure
capitalization/terminology is consistent with other de-DE entries.

"You are not currently signed in.": "You are not currently signed in.",
"You can not remove your last sign-in email": "You can not remove your last sign-in email",
"You cannot revoke your current session": "You cannot revoke your current session",
"You email has been verified!": "You email has been verified!",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Typo: "You email" should be "Your email".

This typo in the source locale will appear in the UI. The key itself contains the typo, which means other locale files reference this same typo as their key.

Proposed fix
-  "You email has been verified!": "You email has been verified!",
+  "Your email has been verified!": "Your email has been verified!",

Note: This key change will also need to be propagated to all other locale files and any code referencing this translation key.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"You email has been verified!": "You email has been verified!",
"Your email has been verified!": "Your email has been verified!",
🤖 Prompt for AI Agents
In `@packages/template/src/locales/en-US.json` at line 300, Fix the typo in the
locale key and value by renaming the translation key "You email has been
verified!" to "Your email has been verified!" in en-US.json and update the value
to match; then propagate this new key name across all other locale files and any
code references (e.g., components or hooks that call the translation key) so
they use the corrected "Your email has been verified!" key.

"Add new passkey": "Agregar nueva clave de acceso",
"Add your email address": "Agrega tu correo electrónico",
"Already have an account?": "¿Ya tienes una cuenta?",
"Amount": "Amount",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Several strings remain untranslated.

The following keys have English values instead of Spanish translations:

  • Line 14: "Amount" → Consider "Monto" or "Cantidad"
  • Line 55: "Date" → Consider "Fecha"
  • Line 119: "Invoice" → Consider "Factura"
  • Line 272: "Unavailable" → Consider "No disponible"
  • Line 292: "View" → Consider "Ver"

Also applies to: 55-55, 119-119, 272-272, 292-292

🤖 Prompt for AI Agents
In `@packages/template/src/locales/es-419.json` at line 14, Update the Spanish
locale entries that are still in English by replacing the values for the keys
"Amount", "Date", "Invoice", "Unavailable", and "View" with appropriate Spanish
translations (e.g., "Monto" or "Cantidad" for "Amount", "Fecha" for "Date",
"Factura" for "Invoice", "No disponible" for "Unavailable", and "Ver" for
"View") in the es-419 JSON so the keys remain the same but their values are
translated.

"Add new passkey": "Añadir nueva clave de acceso",
"Add your email address": "Añade tu dirección de correo electrónico",
"Already have an account?": "¿Ya tienes una cuenta?",
"Amount": "Amount",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Several strings remain untranslated (same as es-419).

For consistency with es-419.json, the same keys need Spanish translations:

  • Line 14: "Amount"
  • Line 55: "Date"
  • Line 119: "Invoice"
  • Line 272: "Unavailable"
  • Line 292: "View"

Also applies to: 55-55, 119-119, 272-272, 292-292

🤖 Prompt for AI Agents
In `@packages/template/src/locales/es-ES.json` at line 14, The JSON keys "Amount",
"Date", "Invoice", "Unavailable", and "View" currently have English values;
update their values in es-ES.json to Spanish to match es-419.json — set "Amount"
-> "Cantidad", "Date" -> "Fecha", "Invoice" -> "Factura", "Unavailable" -> "No
disponible", and "View" -> "Ver" so the translations are consistent across
locales.

"Add new passkey": "Ajouter une nouvelle clé d'accès",
"Add your email address": "Ajoutez votre adresse courriel",
"Already have an account?": "Vous avez déjà un compte?",
"Amount": "Amount",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Translate remaining English strings in fr-CA

Line 14, Line 119, Line 272, and Line 292 still map to English values. Please translate to avoid mixed-language UI.

Also applies to: 119-119, 272-272, 292-292

🤖 Prompt for AI Agents
In `@packages/template/src/locales/fr-CA.json` at line 14, Several entries in the
fr-CA locale JSON still have English values; update the JSON values for the key
"Amount" and the other entries flagged at lines 119, 272, and 292 so they are
translated to French Canadian (keep the JSON keys unchanged and preserve
existing punctuation/escape sequences). Locate the "Amount" key and the three
other keys that currently map to English strings, replace their English values
with the correct fr-CA translations (e.g., "Montant" for "Amount" or the
appropriate localized phrases), and ensure the file remains valid JSON (no
trailing commas, correct quoting).

"Add new passkey": "Adicionar nova chave de acesso",
"Add your email address": "Adicione seu endereço de email",
"Already have an account?": "Já tem uma conta?",
"Amount": "Amount",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Missing translations for pt-BR locale.

Several keys retain English values instead of Brazilian Portuguese translations:

  • Line 14: "Amount": "Amount" → should be "Valor"
  • Line 55: "Date": "Date" → should be "Data"
  • Line 119: "Invoice": "Invoice" → should be "Fatura"
  • Line 272: "Unavailable": "Unavailable" → should be "Indisponível"
  • Line 292: "View": "View" → should be "Visualizar"

Also applies to: 55-55, 119-119, 272-272, 292-292

🤖 Prompt for AI Agents
In `@packages/template/src/locales/pt-BR.json` at line 14, Replace the English
placeholder values in the pt-BR locale JSON for the specified keys: update the
"Amount" key value to "Valor", the "Date" key value to "Data", the "Invoice" key
value to "Fatura", the "Unavailable" key value to "Indisponível", and the "View"
key value to "Visualizar" so that "Amount", "Date", "Invoice", "Unavailable",
and "View" in packages/template/src/locales/pt-BR.json have their correct
Brazilian Portuguese translations.

"Add new passkey": "Adicionar nova chave de acesso",
"Add your email address": "Adicione o seu endereço de email",
"Already have an account?": "Já tem uma conta?",
"Amount": "Amount",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Missing translations for pt-PT locale.

Several keys retain English values instead of European Portuguese translations:

  • Line 14: "Amount": "Amount" → should be "Montante"
  • Line 55: "Date": "Date" → should be "Data"
  • Line 119: "Invoice": "Invoice" → should be "Fatura"
  • Line 211: "Review past invoices and receipts." → should be "Rever faturas e recibos anteriores."
  • Line 272: "Unavailable": "Unavailable" → should be "Indisponível"
  • Line 292: "View": "View" → should be "Ver"

Note: Line 211 appears to be translated in pt-BR but not in pt-PT.

Also applies to: 55-55, 119-119, 211-211, 272-272, 292-292

🤖 Prompt for AI Agents
In `@packages/template/src/locales/pt-PT.json` at line 14, Several pt-PT locale
entries are still in English; update the JSON values for the listed keys to
European Portuguese: change "Amount" -> "Montante", "Date" -> "Data", "Invoice"
-> "Fatura", "Review past invoices and receipts." -> "Rever faturas e recibos
anteriores.", "Unavailable" -> "Indisponível", and "View" -> "Ver"; locate these
keys in the pt-PT locale file (keys: "Amount", "Date", "Invoice", "Review past
invoices and receipts.", "Unavailable", "View") and replace their values
accordingly, ensuring proper JSON quoting and comma placement.

"Add new passkey": "添加新密钥",
"Add your email address": "添加您的邮箱地址",
"Already have an account?": "已有账户?",
"Amount": "Amount",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Several strings are left untranslated.

The following keys have English values instead of Chinese translations:

  • Line 14: "Amount": "Amount" → should be "金额"
  • Line 55: "Date": "Date" → should be "日期"
  • Line 119: "Invoice": "Invoice" → should be "发票" (matching "Invoices" on line 120)
  • Line 272: "Unavailable": "Unavailable" → should be "不可用"
  • Line 292: "View": "View" → should be "查看"
Suggested fix
-  "Amount": "Amount",
+  "Amount": "金额",
-  "Date": "Date",
+  "Date": "日期",
-  "Invoice": "Invoice",
+  "Invoice": "发票",
-  "Unavailable": "Unavailable",
+  "Unavailable": "不可用",
-  "View": "View",
+  "View": "查看",

Also applies to: 55-55, 119-119, 272-272, 292-292

🤖 Prompt for AI Agents
In `@packages/template/src/locales/zh-CN.json` at line 14, Replace the
untranslated English values in the zh-CN JSON locale: change the value for the
"Amount" key to "金额", for "Date" to "日期", for "Invoice" to "发票" (to match
"Invoices"), for "Unavailable" to "不可用", and for "View" to "查看"; locate these
keys ("Amount", "Date", "Invoice", "Unavailable", "View") in the zh-CN.json and
update their string values accordingly, keeping JSON formatting intact and
ensuring no duplicate keys are introduced.

"You are not currently signed in.": "您当前未登录。",
"You can not remove your last sign-in email": "你不能删除最后一个用于登录的电子邮箱",
"You cannot revoke your current session": "你不能撤销当前会话",
"You email has been verified!": "您的邮箱已验证!",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Source key contains a typo.

The key "You email has been verified!" should be "Your email has been verified!". The Chinese translation correctly uses "您的邮箱" (your email), but the source key typo should be fixed across all locale files.

🤖 Prompt for AI Agents
In `@packages/template/src/locales/zh-CN.json` at line 300, Fix the typo in the
translation key by renaming the source key "You email has been verified!" to
"Your email has been verified!" across all locale files (e.g., in
packages/template/src/locales/zh-CN.json) and ensure corresponding entries in
other locale files and any references in code (template lookup keys) are updated
to the corrected key so translations remain consistent.

"Add new passkey": "新增通行金鑰",
"Add your email address": "新增您的電子郵件地址",
"Already have an account?": "已經有帳號了嗎?",
"Amount": "Amount",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Missing translations for zh-TW locale.

Several keys retain English values instead of Traditional Chinese translations:

  • Line 14: "Amount": "Amount" → should be "金額"
  • Line 55: "Date": "Date" → should be "日期"
  • Line 119: "Invoice": "Invoice" → should be "發票"
  • Line 272: "Unavailable": "Unavailable" → should be "不可用"
  • Line 292: "View": "View" → should be "檢視"

Also applies to: 55-55, 119-119, 272-272, 292-292

🤖 Prompt for AI Agents
In `@packages/template/src/locales/zh-TW.json` at line 14, Replace the English
placeholder values in the zh-TW locale JSON with their Traditional Chinese
translations: update the "Amount" key value to "金額", "Date" to "日期", "Invoice"
to "發票", "Unavailable" to "不可用", and "View" to "檢視" in the locales/zh-TW.json
file (look for the exact keys "Amount", "Date", "Invoice", "Unavailable", "View"
to locate the entries) and ensure the JSON remains valid after edits.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant