fix(i18n): replace hardcoded english strings with translate pipes in …#3319
fix(i18n): replace hardcoded english strings with translate pipes in …#3319NotxNoodles wants to merge 3 commits intoopenMF:devfrom
Conversation
|
Note
|
| 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.
Comment @coderabbitai help to get the list of available commands and usage tips.
alberto-art3ch
left a comment
There was a problem hiding this comment.
Please add the translation in the other languages
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>
There was a problem hiding this comment.
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 inde-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 inko-KOto avoid mixed-language UXThese 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
📒 Files selected for processing (12)
src/assets/translations/cs-CS.jsonsrc/assets/translations/de-DE.jsonsrc/assets/translations/es-CL.jsonsrc/assets/translations/es-MX.jsonsrc/assets/translations/fr-FR.jsonsrc/assets/translations/it-IT.jsonsrc/assets/translations/ko-KO.jsonsrc/assets/translations/lt-LT.jsonsrc/assets/translations/lv-LV.jsonsrc/assets/translations/ne-NE.jsonsrc/assets/translations/pt-PT.jsonsrc/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>
Description
Replaced 7 hardcoded English strings in the
view-reciept.component.htmltemplate withtranslatepipes to fully support internationalization (i18n).Changes Made:
view-reciept.component.html: Replaced the hardcoded "Back" button with the existinglabels.buttons.Backkey. 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 Receiptlabels.text.Invalid transaction datalabels.text.Missing or incomplete report configurationlabels.text.Please contact your system administrator for assistance.labels.text.Report generation service unavailablelabels.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!
web-app/.github/CONTRIBUTING.md.Summary by CodeRabbit