Skip to content

fix(i18n): replace hardcoded english strings with translate pipes in …#3319

Open
NotxNoodles wants to merge 3 commits intoopenMF:devfrom
NotxNoodles:fix/hardcoded-strings-receipt
Open

fix(i18n): replace hardcoded english strings with translate pipes in …#3319
NotxNoodles wants to merge 3 commits intoopenMF:devfrom
NotxNoodles:fix/hardcoded-strings-receipt

Conversation

@NotxNoodles
Copy link
Contributor

@NotxNoodles NotxNoodles commented Mar 5, 2026

Description

Replaced 7 hardcoded English strings in the view-reciept.component.html template with translate pipes to fully support internationalization (i18n).

Changes Made:

  • view-reciept.component.html: Replaced the hardcoded "Back" button with the existing labels.buttons.Back key. Replaced the 6 hardcoded error strings in the <ng-template #noData> block with translation keys.
  • en-US.json: Safely added the 7 new translation keys to ensure the error block renders correctly in English:
    • labels.heading.Unable to Load Receipt
    • labels.text.Invalid transaction data
    • labels.text.Missing or incomplete report configuration
    • labels.text.Please contact your system administrator for assistance.
    • labels.text.Report generation service unavailable
    • labels.text.Technical details may be available in the browser console (F12).
    • labels.text.The transaction receipt could not be loaded. This may be due to:

Note: Part of my familiarization with the Angular codebase for GSoC 2026 (MCP AI Assistant).

Related issues and discussion

N/A - Minor i18n cleanup spotted during codebase review.

Screenshots, if any

N/A

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • If you have multiple commits please combine them into one commit by squashing them.
  • Read and understood the contribution guidelines at web-app/.github/CONTRIBUTING.md.

Summary by CodeRabbit

  • Chores
    • Receipt view UI strings replaced with translation keys so buttons, error messages and guidance are localized.
    • Added corresponding translation entries across multiple locales (en-US, cs-CS, de-DE, es-CL, es-MX, fr-FR, it-IT, ko-KO, lt-LT, lv-LV, ne-NE, pt-PT, sw-SW).
    • No functional, control-flow or data-handling changes; only i18n content additions.

@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'pre_merge_checks'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9d6f4449-200a-4280-b63f-8f1a6e7511ae

📥 Commits

Reviewing files that changed from the base of the PR and between 0f328e6 and 17f1e37.

📒 Files selected for processing (12)
  • src/assets/translations/cs-CS.json
  • src/assets/translations/de-DE.json
  • src/assets/translations/es-CL.json
  • src/assets/translations/es-MX.json
  • src/assets/translations/fr-FR.json
  • src/assets/translations/it-IT.json
  • src/assets/translations/ko-KO.json
  • src/assets/translations/lt-LT.json
  • src/assets/translations/lv-LV.json
  • src/assets/translations/ne-NE.json
  • src/assets/translations/pt-PT.json
  • src/assets/translations/sw-SW.json
✅ Files skipped from review due to trivial changes (11)
  • src/assets/translations/lv-LV.json
  • src/assets/translations/es-CL.json
  • src/assets/translations/it-IT.json
  • src/assets/translations/ko-KO.json
  • src/assets/translations/sw-SW.json
  • src/assets/translations/de-DE.json
  • src/assets/translations/pt-PT.json
  • src/assets/translations/fr-FR.json
  • src/assets/translations/lt-LT.json
  • src/assets/translations/ne-NE.json
  • src/assets/translations/cs-CS.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/assets/translations/es-MX.json

Walkthrough

Replaced hard-coded UI strings in the receipt view template with i18n translation keys and added corresponding translation entries across multiple locale JSON files; no control flow or data-handling changes.

Changes

Cohort / File(s) Summary
Receipt View Template
src/app/savings/savings-account-view/transactions/view-reciept/view-reciept.component.html
Replaced hard-coded UI text with translation keys for the back button, NoData heading/paragraph, list items, and informational/console hint texts.
Translation Files (locales)
src/assets/translations/en-US.json, src/assets/translations/cs-CS.json, src/assets/translations/de-DE.json, src/assets/translations/es-CL.json, src/assets/translations/es-MX.json, src/assets/translations/fr-FR.json, src/assets/translations/it-IT.json, src/assets/translations/ko-KO.json, src/assets/translations/lt-LT.json, src/assets/translations/lv-LV.json, src/assets/translations/ne-NE.json, src/assets/translations/pt-PT.json, src/assets/translations/sw-SW.json
Added seven new translation keys per locale (messages related to "Unable to Load Receipt", causes list, contact/system-admin guidance, and console technical details). Mostly additions; no deletions or behavioral changes. Review non-English files for incomplete/placeholder translations.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • IOhacker
  • gkbishnoi07
  • AlejandroED21
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(i18n): replace hardcoded english strings with translate pipes' accurately describes the main change—converting hardcoded UI strings to i18n translation keys across multiple files for internationalization support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Collaborator

@alberto-art3ch alberto-art3ch left a comment

Choose a reason for hiding this comment

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

Please add the translation in the other languages

Copy link
Contributor

@IOhacker IOhacker left a comment

Choose a reason for hiding this comment

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

Pending Jira ticket

Added the 7 new translation keys (introduced for the savings receipt
error block) to all 12 non-English language files. English text is
used as a fallback value until native-language translations are
contributed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link

@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: 2

🧹 Nitpick comments (3)
src/assets/translations/it-IT.json (1)

1304-1304: Prefer Italian values for the new receipt error keys.

The keys are added correctly, but these values are still English in it-IT.json, so Italian users will see mixed-language UI in this flow.

🌐 Suggested localization update
-      "Unable to Load Receipt": "Unable to Load Receipt",
+      "Unable to Load Receipt": "Impossibile caricare la ricevuta",
...
-      "Invalid transaction data": "Invalid transaction data",
+      "Invalid transaction data": "Dati della transazione non validi",
...
-      "Missing or incomplete report configuration": "Missing or incomplete report configuration",
+      "Missing or incomplete report configuration": "Configurazione del report mancante o incompleta",
...
-      "Please contact your system administrator for assistance.": "Please contact your system administrator for assistance.",
+      "Please contact your system administrator for assistance.": "Contatta l'amministratore di sistema per assistenza.",
...
-      "Report generation service unavailable": "Report generation service unavailable",
+      "Report generation service unavailable": "Servizio di generazione report non disponibile",
...
-      "Technical details may be available in the browser console (F12).": "Technical details may be available in the browser console (F12).",
+      "Technical details may be available in the browser console (F12).": "I dettagli tecnici potrebbero essere disponibili nella console del browser (F12).",
...
-      "The transaction receipt could not be loaded. This may be due to:": "The transaction receipt could not be loaded. This may be due to:",
+      "The transaction receipt could not be loaded. This may be due to:": "Impossibile caricare la ricevuta della transazione. Ciò potrebbe essere dovuto a:",

Also applies to: 3331-3331, 3414-3414, 3461-3461, 3489-3489, 3563-3563, 3570-3570

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/assets/translations/it-IT.json` at line 1304, The Italian translation
file contains English values for the new receipt error keys; update the value
for "Unable to Load Receipt" (and the other new receipt-related keys added
around the file) to proper Italian strings so Italian users see a consistent UI;
locate the keys (e.g., "Unable to Load Receipt") in
src/assets/translations/it-IT.json and replace the English phrases with their
Italian equivalents, preserving the JSON key names and escaping/quoting exactly
as the surrounding entries are formatted.
src/assets/translations/de-DE.json (1)

1305-1305: Consider replacing English fallbacks with German translations in de-DE.

Current values are English, so German users will still see English in this receipt error flow. Optional improvement for locale quality.

Also applies to: 3333-3333, 3415-3415, 3462-3462, 3490-3490, 3564-3564, 3571-3571

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/assets/translations/de-DE.json` at line 1305, The de-DE translation
contains English fallback values; replace the value for the JSON key "Unable to
Load Receipt" with an appropriate German translation (e.g., "Beleg konnte nicht
geladen werden.") and update any other entries noted in the review that
currently have English text to their correct German equivalents so the locale
file no longer shows English fallbacks.
src/assets/translations/ko-KO.json (1)

1306-1306: Localize the new receipt strings in ko-KO to avoid mixed-language UX

These entries are currently English in the Korean locale, so Korean users will see mixed UI text. Consider replacing these values with Korean translations (or tracking this as a follow-up localization task).

Suggested ko-KO value updates
-      "Unable to Load Receipt": "Unable to Load Receipt",
+      "Unable to Load Receipt": "영수증을 불러올 수 없습니다",
...
-      "Invalid transaction data": "Invalid transaction data",
+      "Invalid transaction data": "유효하지 않은 거래 데이터",
...
-      "Missing or incomplete report configuration": "Missing or incomplete report configuration",
+      "Missing or incomplete report configuration": "보고서 구성이 누락되었거나 불완전합니다",
...
-      "Please contact your system administrator for assistance.": "Please contact your system administrator for assistance.",
+      "Please contact your system administrator for assistance.": "도움이 필요하면 시스템 관리자에게 문의하세요.",
...
-      "Report generation service unavailable": "Report generation service unavailable",
+      "Report generation service unavailable": "보고서 생성 서비스를 사용할 수 없습니다",
...
-      "Technical details may be available in the browser console (F12).": "Technical details may be available in the browser console (F12).",
+      "Technical details may be available in the browser console (F12).": "기술 세부 정보는 브라우저 콘솔(F12)에서 확인할 수 있습니다.",
...
-      "The transaction receipt could not be loaded. This may be due to:": "The transaction receipt could not be loaded. This may be due to:",
+      "The transaction receipt could not be loaded. This may be due to:": "거래 영수증을 불러올 수 없습니다. 다음 때문일 수 있습니다:"

Also applies to: 3331-3331, 3414-3414, 3461-3461, 3490-3490, 3563-3563, 3570-3570

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/assets/translations/ko-KO.json` at line 1306, The Korean locale contains
English receipt strings (e.g. the "Unable to Load Receipt" key) which causes
mixed-language UI; update the value for "Unable to Load Receipt" and the other
receipt-related keys to proper Korean translations, keeping the keys unchanged,
ensuring valid JSON quoting/commas, and run the localization/i18n checks or unit
tests to verify no missing keys or syntax errors after the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/assets/translations/es-CL.json`:
- Line 1305: The es-CL JSON contains seven entries whose values are still in
English (for example the key "Unable to Load Receipt"); update those entries so
the values are proper Chilean Spanish translations (replace "Unable to Load
Receipt" with an appropriate Spanish string and do the same for the other six
English-valued keys), preserving valid JSON syntax (quotes, commas) and keeping
the original keys unchanged; verify each translated value matches tone/format of
surrounding messages and run a quick JSON lint to ensure no syntax errors.

In `@src/assets/translations/es-MX.json`:
- Line 1307: Replace the English fallback strings in the Spanish locale file by
localizing the listed keys (e.g., the "Unable to Load Receipt" key and the other
English entries identified at the comment: the keys at positions corresponding
to lines 3364, 3447, 3494, 3522, 3596, and 3603) with proper Spanish
translations in src/assets/translations/es-MX.json; locate each exact JSON key
(like "Unable to Load Receipt") and update its value to the correct Spanish text
so the es-MX bundle contains only localized strings rather than English
fallbacks.

---

Nitpick comments:
In `@src/assets/translations/de-DE.json`:
- Line 1305: The de-DE translation contains English fallback values; replace the
value for the JSON key "Unable to Load Receipt" with an appropriate German
translation (e.g., "Beleg konnte nicht geladen werden.") and update any other
entries noted in the review that currently have English text to their correct
German equivalents so the locale file no longer shows English fallbacks.

In `@src/assets/translations/it-IT.json`:
- Line 1304: The Italian translation file contains English values for the new
receipt error keys; update the value for "Unable to Load Receipt" (and the other
new receipt-related keys added around the file) to proper Italian strings so
Italian users see a consistent UI; locate the keys (e.g., "Unable to Load
Receipt") in src/assets/translations/it-IT.json and replace the English phrases
with their Italian equivalents, preserving the JSON key names and
escaping/quoting exactly as the surrounding entries are formatted.

In `@src/assets/translations/ko-KO.json`:
- Line 1306: The Korean locale contains English receipt strings (e.g. the
"Unable to Load Receipt" key) which causes mixed-language UI; update the value
for "Unable to Load Receipt" and the other receipt-related keys to proper Korean
translations, keeping the keys unchanged, ensuring valid JSON quoting/commas,
and run the localization/i18n checks or unit tests to verify no missing keys or
syntax errors after the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9ea609a0-4c75-4a5d-a0c0-9e485a55e934

📥 Commits

Reviewing files that changed from the base of the PR and between 3bd0ee2 and 0f328e6.

📒 Files selected for processing (12)
  • src/assets/translations/cs-CS.json
  • src/assets/translations/de-DE.json
  • src/assets/translations/es-CL.json
  • src/assets/translations/es-MX.json
  • src/assets/translations/fr-FR.json
  • src/assets/translations/it-IT.json
  • src/assets/translations/ko-KO.json
  • src/assets/translations/lt-LT.json
  • src/assets/translations/lv-LV.json
  • src/assets/translations/ne-NE.json
  • src/assets/translations/pt-PT.json
  • src/assets/translations/sw-SW.json
✅ Files skipped from review due to trivial changes (7)
  • src/assets/translations/lv-LV.json
  • src/assets/translations/pt-PT.json
  • src/assets/translations/sw-SW.json
  • src/assets/translations/cs-CS.json
  • src/assets/translations/ne-NE.json
  • src/assets/translations/lt-LT.json
  • src/assets/translations/fr-FR.json

Replace English fallback values with proper localized translations
for all 7 receipt error keys across all 12 non-English language files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

3 participants