Skip to content

WEB-572:fix(i18n) localize loan-product import dialog and add transla…#2987

Closed
shubhamkumar9199 wants to merge 1 commit intoopenMF:devfrom
shubhamkumar9199:fix/loan-product-translations
Closed

WEB-572:fix(i18n) localize loan-product import dialog and add transla…#2987
shubhamkumar9199 wants to merge 1 commit intoopenMF:devfrom
shubhamkumar9199:fix/loan-product-translations

Conversation

@shubhamkumar9199
Copy link
Contributor

@shubhamkumar9199 shubhamkumar9199 commented Jan 12, 2026

…tions

This Pr updated templates to use translation keys and added missing translation entries across.

WEB-572
Before:
Screenshot 2026-01-12 160620
After:
image

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

  • New Features

    • Import dialog and Import button now use translation bindings so UI strings are localized.
  • Documentation

    • Added / updated translation strings for the import dialog and file-selection prompt across locales: cs, de, en, es (CL, MX), fr, it, ko, lt, lv, ne, pt, sw.

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

@coderabbitai
Copy link

coderabbitai bot commented Jan 12, 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

Walkthrough

Replaced literal UI text with i18n translation bindings in two loan-product templates and added corresponding translation keys/values across multiple language JSON files; no behavioral, API, or form-structure changes.

Changes

Cohort / File(s) Change Summary
Template updates
src/app/products/loan-products/import-loan-product-dialog/import-loan-product-dialog.component.html, src/app/products/loan-products/loan-products.component.html
Replaced literal UI text (dialog title, descriptive paragraph, Import button label) with i18n bindings using the translate pipe; handlers and form structure unchanged.
Translation additions
src/assets/translations/.../*.json (e.g. cs-CS.json, de-DE.json, en-US.json, es-CL.json, es-MX.json, fr-FR.json, it-IT.json, ko-KO.json, lt-LT.json, lv-LV.json, ne-NE.json, pt-PT.json, sw-SW.json)
Added three keys in each file: "Import", "Import Loan Product", and "Select a JSON file containing the loan product definition" with localized values; no other keys removed or modified.

Sequence Diagram(s)

(omitted — changes are localization-only and do not introduce new multi-component control flow)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • IOhacker
  • gkbishnoi07
  • alberto-art3ch
🚥 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 accurately summarizes the main change: localization of the loan-product import dialog and addition of translations across multiple language files.
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.


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

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/assets/translations/it-IT.json (1)

2814-2815: Remove the commented-out translation on line 2814—it breaks JSON parsing.

The file fails to parse as strict JSON due to the // comment on line 2814. The JSON parser explicitly fails with: "Expecting property name enclosed in double quotes" at that line. If the translation loader expects standard JSON (which is typical), this will cause i18n to fail at runtime.

Remove the entire line // "Create Savings Product": "Crea prodotto di risparmio", // Removed duplicate or convert the file to JSONC format with appropriate tooling if comments are required.

🤖 Fix all issues with AI agents
In
@src/app/products/loan-products/import-loan-product-dialog/import-loan-product-dialog.component.html:
- Line 12: The template in import-loan-product-dialog.component.html uses a
non-existent translation key "labels.text.Select a JSON file containing the loan
product definition"; either update the template to reference the actual key used
in your locales (e.g., replace with "labels.Select a JSON file containing the
loan product definition" or the canonical key your project uses) or add a new
nested "text" object under "labels" with the "Select a JSON file containing the
loan product definition" entry to every locale file so all translations remain
consistent; update whichever you choose and run the translation key linter/tests
to verify coverage.

In @src/assets/translations/de-DE.json:
- Line 3274: The translation key is placed directly under "labels" but the
template expects "labels.text.Select a JSON file containing the loan product
definition"; move this entry into a "text" subsection under the existing
"labels" object (or alternatively update the template to use an existing path
such as "labels.tooltips"), ensuring the key used in the template exactly
matches the JSON path "labels.text.Select a JSON file containing the loan
product definition" and remove the duplicate from its current location under
"labels".

In @src/assets/translations/es-MX.json:
- Line 446: The translation for the key "Import Loan Product" is inconsistent
with other entries that use "Crédito"; update its value from "Importar producto
de préstamo" to "Importar producto de crédito" (matching the existing "Producto
de Crédito" phrasing and button terminology) and ensure capitalization and
spacing follow the same style used elsewhere in the file.
- Line 3278: The Spanish translation for the key "Select a JSON file containing
the loan product definition" is inconsistent with existing loan terminology;
change "definición del producto de préstamo" to use "Crédito" to match "Producto
de Crédito" elsewhere—update the value for that key to "Seleccione un archivo
JSON que contenga la definición del Producto de Crédito" (or similar casing
consistent with other entries) so terminology is uniform across the file.
🧹 Nitpick comments (4)
src/assets/translations/es-CL.json (2)

446-446: Consider using "Crédito" instead of "préstamo" for consistency.

At line 1069, "Loan Product" is translated as "Producto de Crédito". For consistency, consider changing this to "Importar producto de Crédito".

Suggested change
-      "Import Loan Product": "Importar producto de préstamo",
+      "Import Loan Product": "Importar producto de Crédito",

3275-3275: Translation is correct; align terminology if updating line 446.

The translation is grammatically correct. If adopting the suggestion at line 446 to use "Crédito" instead of "préstamo", update this line as well for consistency:

Suggested change (if updating line 446)
-      "Select a JSON file containing the loan product definition": "Seleccione un archivo JSON que contenga la definición del producto de préstamo",
+      "Select a JSON file containing the loan product definition": "Seleccione un archivo JSON que contenga la definición del producto de Crédito",
src/assets/translations/it-IT.json (1)

441-447: New button translations look consistent with existing “Importa …” verbs (Line 441, Line 446).
These additions align well with existing entries like “Import Client” → “Importa cliente”.

One small consistency nit: nearby existing entries (“Import Center”, “Import Group”) are currently noun-phrased (“Centro di importazione”, “Gruppo di importazione”), while the rest use the imperative “Importa …”. Consider aligning those for UI consistency.

src/assets/translations/ne-NE.json (1)

441-447: Translation follows existing patterns correctly

The new translations for "Import" and "Import Loan Product" are functionally correct. However, I notice there's an existing inconsistency in how import-related labels are translated:

  • With verb form (गर्नुहोस्): "Import Client", "Import Employees", "Import Loan Product" (new)
  • Without verb form: "Import Center", "Import Group", "Import Offices"

This inconsistency exists in the codebase and wasn't introduced by this PR. The new translation follows the verb form pattern, which is appropriate.

Optional: Consider standardizing all import translations

For consistency, you could standardize all import-related translations to use the same pattern. For example, using the verb form consistently:

-      "Import Center": "आयात केन्द्र",
+      "Import Center": "केन्द्र आयात गर्नुहोस्",
...
-      "Import Group": "आयात समूह",
+      "Import Group": "समूह आयात गर्नुहोस्",
...
-      "Import Offices": "आयात कार्यालयहरू",
+      "Import Offices": "कार्यालयहरू आयात गर्नुहोस्",

This would be a broader refactoring task and can be deferred.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5593359 and 3037bb5.

📒 Files selected for processing (15)
  • src/app/products/loan-products/import-loan-product-dialog/import-loan-product-dialog.component.html
  • src/app/products/loan-products/loan-products.component.html
  • src/assets/translations/cs-CS.json
  • src/assets/translations/de-DE.json
  • src/assets/translations/en-US.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
🧰 Additional context used
📓 Path-based instructions (1)
src/app/**

⚙️ CodeRabbit configuration file

src/app/**: For Angular code: verify component separation, trackBy on *ngFor,
strict type safety, and clean observable patterns.

Files:

  • src/app/products/loan-products/loan-products.component.html
  • src/app/products/loan-products/import-loan-product-dialog/import-loan-product-dialog.component.html
🔇 Additional comments (22)
src/app/products/loan-products/loan-products.component.html (1)

17-20: LGTM!

The translation binding {{ 'labels.buttons.Import' | translate }} follows the established i18n pattern used throughout the file (e.g., line 13 for "Create Loan Product"). The key structure labels.buttons.Import is consistent with the existing translation key hierarchy.

src/assets/translations/lv-LV.json (2)

441-441: LGTM!

The button translations are correctly placed under labels.buttons and follow the existing naming conventions. The Latvian translations ("Importēt" for "Import" and "Importēt aizdevuma produktu" for "Import Loan Product") are consistent with other import-related entries nearby (e.g., "Import Center", "Import Client").

Also applies to: 446-446


3274-3274: LGTM!

The descriptive text translation is correctly placed under labels.text and provides a clear Latvian translation for the loan product import dialog instruction.

src/assets/translations/pt-PT.json (1)

441-441: LGTM!

The Portuguese translations for the loan-product import dialog are correctly implemented:

  • Translation keys are properly placed in their respective sections (labels.buttons and labels.text)
  • Portuguese translations are grammatically accurate
  • Alphabetical ordering is maintained in the buttons section

Also applies to: 446-446, 3273-3273

src/assets/translations/de-DE.json (1)

441-446: LGTM!

The German translations for "Import" and "Import Loan Product" are correctly placed under labels.buttons and the translations are appropriate.

src/app/products/loan-products/import-loan-product-dialog/import-loan-product-dialog.component.html (2)

8-8: LGTM!

The dialog title correctly uses the translation pipe with the appropriate key path labels.buttons.Import Loan Product.


29-29: LGTM!

The import button correctly uses the translation pipe with labels.buttons.Import.

src/assets/translations/ko-KO.json (1)

441-441: LGTM!

The Korean translations for the loan product import dialog are accurate and follow the established patterns in the file:

  • "Import" → "가져오기" is the standard Korean term
  • "Import Loan Product" → "대출 상품 가져오기" correctly compounds the terms
  • The JSON file selection prompt uses appropriate formal Korean ("선택하세요")

These additions align with the i18n updates across the other locale files mentioned in the PR summary.

Also applies to: 446-446, 3274-3274

src/assets/translations/fr-FR.json (2)

441-447: Button translations look good (French is natural/consistent).
"Import": "Importer" and "Import Loan Product": "Importer un produit de prêt" read correctly in the buttons context.


3273-3274: No action required. The translation key is correctly placed under the labels.text namespace in the JSON file, and the Angular template properly references it with labels.text.Select a JSON file containing the loan product definition. The French translation will resolve correctly at runtime without falling back to the raw key.

src/assets/translations/es-MX.json (1)

441-441: LGTM!

The translation "Importar" for "Import" is correct.

src/assets/translations/es-CL.json (1)

441-441: LGTM!

The translation "Import" → "Importar" is correct and follows the existing button naming conventions in this file.

src/assets/translations/sw-SW.json (2)

441-441: LGTM!

The Swahili translations for the import button labels are correct and properly placed in the labels.buttons section. "Ingiza" accurately translates "Import" and "Ingiza Bidhaa ya Mkopo" correctly translates "Import Loan Product".

Also applies to: 446-446


3272-3272: LGTM!

The Swahili translation for the file selection prompt is accurate. "Chagua faili ya JSON iliyo na ufafanuzi wa bidhaa ya mkopo" correctly conveys "Select a JSON file containing the loan product definition" and is appropriately placed in the labels.text section.

src/assets/translations/it-IT.json (1)

3274-3274: Translation keys are correctly matched. All three keys are properly defined in it-IT.json and referenced exactly as they appear in the component templates. No spacing, punctuation, or casing mismatches detected; no runtime translation issues.

src/assets/translations/ne-NE.json (1)

3271-3271: Translation is clear and appropriate

The translation for the loan product import file selection prompt is well-formed and maintains technical terminology (JSON) while providing clear instructions in Nepali.

src/assets/translations/lt-LT.json (1)

441-441: LGTM!

The new Lithuanian translation entries for the loan product import dialog are correctly added:

  • "Import""Importuoti"
  • "Import Loan Product""Importuoti paskolos produktą"
  • "Select a JSON file containing the loan product definition""Pasirinkite JSON failą, kuriame yra paskolos produkto apibrėžimas"

The translations are grammatically appropriate and consistently placed within the existing JSON structure.

Also applies to: 446-446, 3276-3276

src/assets/translations/cs-CS.json (3)

441-441: LGTM!

The Czech translation "Importovat" for "Import" is correct and follows the existing button label patterns in this file.


446-446: LGTM!

The Czech translation "Importovat úvěrový produkt" accurately translates "Import Loan Product" and is consistent with other loan-related translations in the file (e.g., "Nový úvěrový účet" on line 457).


3275-3275: LGTM!

The Czech translation for the file selection description is accurate and grammatically correct. It properly conveys the instruction to select a JSON file containing the loan product definition.

src/assets/translations/en-US.json (2)

442-447: LGTM!

The new translation keys "Import" and "Import Loan Product" are correctly placed in alphabetical order within the labels.buttons section and follow the established naming conventions.


3377-3377: LGTM!

The translation key for the dialog instruction text is correctly formatted and placed within the labels.text section.

"Search by user": "Suche nach Benutzern",
"Section Buttons": "Dieser Abschnitt enthält den Benutzernamen, das Benutzerfoto, die Benutzereinstellungen und die Schaltfläche zum Abmelden.",
"select": "wählen",
"Select a JSON file containing the loan product definition": "Wählen Sie eine JSON-Datei mit der Kreditproduktdefinition aus",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Translation key path mismatch will cause lookup failure.

The template uses 'labels.text.Select a JSON file containing the loan product definition' but this key is placed directly under labels (not under labels.text). The translation will fail to resolve.

Move this key into a text subsection under labels, or use an existing appropriate path like tooltips.

🐛 Proposed fix: Create labels.text section

The key should be nested under labels.text. Either:

  1. Create a new text object inside labels and move this key there
  2. Or update the template to use a different, existing path
  "labels": {
+   "text": {
+     "Select a JSON file containing the loan product definition": "Wählen Sie eine JSON-Datei mit der Kreditproduktdefinition aus"
+   },
    "accounting": {

And remove the key from line 3274.

🤖 Prompt for AI Agents
In @src/assets/translations/de-DE.json at line 3274, The translation key is
placed directly under "labels" but the template expects "labels.text.Select a
JSON file containing the loan product definition"; move this entry into a "text"
subsection under the existing "labels" object (or alternatively update the
template to use an existing path such as "labels.tooltips"), ensuring the key
used in the template exactly matches the JSON path "labels.text.Select a JSON
file containing the loan product definition" and remove the duplicate from its
current location under "labels".

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.

@shubhamkumar9199 there are some comments provided by the bot

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: 1

🤖 Fix all issues with AI agents
In @src/assets/translations/it-IT.json:
- Around line 441-447: Remove the JavaScript-style comment causing the JSON
parse error: delete the commented-out line containing // "Create Savings
Product" (or convert it into a valid JSON entry like "Create Savings Product":
"..." if a translation is needed) so the file src/assets/translations/it-IT.json
is valid JSON and can be loaded; ensure no other // or /* */ comments remain in
the file.
🧹 Nitpick comments (1)
src/assets/translations/it-IT.json (1)

3273-3275: Translation is clear; consider moving this string to the same namespace used by the dialog (if it’s a UI label rather than “text” help copy).

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3037bb5 and ce806e7.

📒 Files selected for processing (15)
  • src/app/products/loan-products/import-loan-product-dialog/import-loan-product-dialog.component.html
  • src/app/products/loan-products/loan-products.component.html
  • src/assets/translations/cs-CS.json
  • src/assets/translations/de-DE.json
  • src/assets/translations/en-US.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 as they are similar to previous changes (10)
  • src/assets/translations/pt-PT.json
  • src/assets/translations/de-DE.json
  • src/assets/translations/cs-CS.json
  • src/assets/translations/lv-LV.json
  • src/assets/translations/lt-LT.json
  • src/app/products/loan-products/import-loan-product-dialog/import-loan-product-dialog.component.html
  • src/assets/translations/sw-SW.json
  • src/assets/translations/es-MX.json
  • src/assets/translations/ne-NE.json
  • src/app/products/loan-products/loan-products.component.html
🔇 Additional comments (9)
src/assets/translations/en-US.json (2)

442-442: LGTM!

The new translation keys for the Import button and Import Loan Product dialog title are correctly added within the labels.buttons section, maintaining alphabetical ordering with adjacent entries.

Also applies to: 447-447


3377-3377: LGTM!

The dialog instruction text translation key is correctly added within the labels.text section and maintains alphabetical ordering.

src/assets/translations/ko-KO.json (2)

441-441: LGTM! Translations are accurate.

The translations for "Import" and "Import Loan Product" use "가져오기" which is the correct Korean term for importing files/data in software contexts. This is consistent with existing entries like "Import Client" (line 443) and "Import Employees" (line 444).

Also applies to: 446-446


3274-3274: Translation is accurate and contextually appropriate.

The Korean translation "대출 상품 정의가 포함된 JSON 파일을 선택하세요" correctly conveys the instruction to select a JSON file containing the loan product definition. The formal polite ending "~세요" is appropriate for UI text.

src/assets/translations/es-CL.json (3)

441-441: LGTM!

The translation "Import" → "Importar" is correct and properly placed alphabetically within the buttons section.


446-446: LGTM!

The translation "Import Loan Product" → "Importar producto de Crédito" is accurate and consistent with the existing terminology pattern used throughout this file for loan-related terms (e.g., "producto de Crédito" at lines 1069, 1933).


3275-3275: No duplicate entry is needed—the current state is correct.

The verification confirms only one occurrence of "Select a JSON file containing the loan product definition" exists in es-CL.json (line 3275) and consistently across all locale files (en-US.json, es-MX.json, and 11 others). The AI summary was incorrect; no duplicate entries are present in any locale. The translation itself is correct.

src/assets/translations/fr-FR.json (2)

441-447: Good FR translations for new/updated import button labels.

“Import” → “Importer” and “Import Loan Product” → “Importer un produit de prêt” read naturally and fit the existing imperative style in labels.buttons.


3273-3273: Translation reads well; JSON is valid with no duplicate keys.

Verified that fr-FR.json parses correctly and contains no duplicate keys.

…tions

fix key path

Remove the commented-out line
@shubhamkumar9199 shubhamkumar9199 force-pushed the fix/loan-product-translations branch from ce806e7 to 6873a6a Compare January 12, 2026 13:47
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: 3

🤖 Fix all issues with AI agents
In
@src/app/products/loan-products/import-loan-product-dialog/import-loan-product-dialog.component.html:
- Line 12: Update the translation key used in the template interpolation:
replace the string 'labels.Select a JSON file containing the loan product
definition' with the correct nested key under labels.text (e.g.,
'labels.text.Select a JSON file containing the loan product definition') in the
template expression "{{ ... | translate }}" so it matches the JSON structure;
adjust any similar keys in this component if present.

In @src/assets/translations/en-US.json:
- Line 3377: The template import-loan-product-dialog.component.html is using the
wrong translation key path: replace the current key 'labels.Select a JSON file
containing the loan product definition' with 'labels.text.Select a JSON file
containing the loan product definition' in that template so it matches the
translation JSON entry "Select a JSON file containing the loan product
definition" under labels.text; update the interpolation/bind (e.g., translate
pipe or i18n attribute) in import-loan-product-dialog.component.html to use the
corrected key.

In @src/assets/translations/fr-FR.json:
- Line 3273: The translation entry "Select a JSON file containing the loan
product definition" is nested under labels.text but the UI uses labels.Select a
JSON file containing the loan product definition (no text segment), causing a
key mismatch; fix by moving this JSON entry from under labels.text up into the
labels object (or alternatively update the template to reference
labels.text.Select a JSON file containing the loan product definition) so the
key path matches the template.
🧹 Nitpick comments (2)
src/assets/translations/lt-LT.json (1)

441-447: Consider aligning “Import …” wording style across buttons (verb vs noun).

New entries look correct, but note nearby "Import Center": "Importo centras" uses a noun phrase while "Import": "Importuoti" / "Import Loan Product": "Importuoti paskolos produktą" use verb phrasing—worth aligning for UI consistency if desired.

src/assets/translations/en-US.json (1)

442-447: Button labels look good; consider more specific key naming if reuse grows.

Adding labels.buttons.Import and labels.buttons.Import Loan Product is fine. Only watch that the generic Import key doesn’t get reused in contexts where wording should differ (e.g., “Import…” vs “Import file” vs “Import from…”).

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ce806e7 and 6873a6a.

📒 Files selected for processing (15)
  • src/app/products/loan-products/import-loan-product-dialog/import-loan-product-dialog.component.html
  • src/app/products/loan-products/loan-products.component.html
  • src/assets/translations/cs-CS.json
  • src/assets/translations/de-DE.json
  • src/assets/translations/en-US.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 as they are similar to previous changes (9)
  • src/assets/translations/pt-PT.json
  • src/assets/translations/es-MX.json
  • src/assets/translations/ko-KO.json
  • src/assets/translations/sw-SW.json
  • src/assets/translations/cs-CS.json
  • src/assets/translations/lv-LV.json
  • src/assets/translations/de-DE.json
  • src/assets/translations/es-CL.json
  • src/assets/translations/it-IT.json
🧰 Additional context used
📓 Path-based instructions (1)
src/app/**

⚙️ CodeRabbit configuration file

src/app/**: For Angular code: verify component separation, trackBy on *ngFor,
strict type safety, and clean observable patterns.

Files:

  • src/app/products/loan-products/import-loan-product-dialog/import-loan-product-dialog.component.html
  • src/app/products/loan-products/loan-products.component.html
🔇 Additional comments (5)
src/assets/translations/ne-NE.json (1)

441-446: LGTM!

The new translation entries are correctly placed within the JSON structure, follow the existing naming conventions, and are consistent with the other locale files updated in this PR.

Also applies to: 3271-3271

src/app/products/loan-products/loan-products.component.html (1)

17-20: LGTM!

The translation binding follows the established pattern used throughout this file (e.g., line 13 for "Create Loan Product"). The translation key labels.buttons.Import correctly matches the key added to the translation files.

src/assets/translations/fr-FR.json (1)

441-447: Good additions for the Import actions (button/label i18n).

src/app/products/loan-products/import-loan-product-dialog/import-loan-product-dialog.component.html (1)

8-8: Nice i18n cleanup: title + primary action now use translation keys.

Also applies to: 29-30

src/assets/translations/lt-LT.json (1)

3276-3276: Translation looks good and matches the source meaning.

<mat-dialog-content>
<form [formGroup]="importLoanProductForm">
<p>Select a JSON file containing the loan product definition.</p>
<p>{{ 'labels.Select a JSON file containing the loan product definition' | translate }}</p>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Correct the description translation key to match JSON structure.
Given the fr-FR entry is under labels.text, Line 12 likely needs labels.text.… (otherwise you’ll see the raw key).

Proposed fix
-    <p>{{ 'labels.Select a JSON file containing the loan product definition' | translate }}</p>
+    <p>{{ 'labels.text.Select a JSON file containing the loan product definition' | translate }}</p>
📝 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
<p>{{ 'labels.Select a JSON file containing the loan product definition' | translate }}</p>
<p>{{ 'labels.text.Select a JSON file containing the loan product definition' | translate }}</p>
🤖 Prompt for AI Agents
In
@src/app/products/loan-products/import-loan-product-dialog/import-loan-product-dialog.component.html
at line 12, Update the translation key used in the template interpolation:
replace the string 'labels.Select a JSON file containing the loan product
definition' with the correct nested key under labels.text (e.g.,
'labels.text.Select a JSON file containing the loan product definition') in the
template expression "{{ ... | translate }}" so it matches the JSON structure;
adjust any similar keys in this component if present.

"Search bar to filter fixed deposit products.": "Search bar to filter fixed deposit products.",
"Search by user": "Search by user",
"Section Buttons": "This section contains user name, user photograph, user settings and sign out button.",
"Select a JSON file containing the loan product definition": "Select a JSON file containing the loan product definition",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Expect: template(s) reference the exact full key path(s) that exist in JSON.
rg -n --hidden --glob '!**/node_modules/**' --fixed-string \
  "labels.buttons.Import" \
  "labels.buttons.Import Loan Product" \
  "labels.text.Select a JSON file containing the loan product definition" \
  "Select a JSON file containing the loan product definition"

Repository: openMF/web-app

Length of output: 505


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Expect: template(s) reference the exact full key path(s) that exist in JSON.
rg -n --hidden --glob '!**/node_modules/**' --fixed-strings \
  "labels.buttons.Import" \
  "labels.buttons.Import Loan Product" \
  "labels.text.Select a JSON file containing the loan product definition" \
  "Select a JSON file containing the loan product definition"

Repository: openMF/web-app

Length of output: 340


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Searching for labels.text.Select reference ==="
rg -n --hidden "labels\.text\.Select a JSON file containing the loan product definition" || echo "Not found"

echo ""
echo "=== Searching for labels.buttons.Import references ==="
rg -n --hidden "labels\.buttons\.Import" || echo "Not found"

echo ""
echo "=== Searching for the unqualified string ==="
rg -n --hidden "Select a JSON file containing the loan product definition" || echo "Not found"

Repository: openMF/web-app

Length of output: 3787


🏁 Script executed:

#!/bin/bash
# Check the structure around line 3377 in en-US.json
sed -n '3370,3385p' src/assets/translations/en-US.json

Repository: openMF/web-app

Length of output: 1216


🏁 Script executed:

#!/bin/bash
# Get broader context to see the full structure
sed -n '3350,3380p' src/assets/translations/en-US.json

Repository: openMF/web-app

Length of output: 2417


🏁 Script executed:

#!/bin/bash
# Find which object these keys belong to by looking earlier in the file
head -n 3380 src/assets/translations/en-US.json | tail -n 100 | head -n 40

Repository: openMF/web-app

Length of output: 2348


🏁 Script executed:

#!/bin/bash
# Find the parent structure by searching for "labels" key and understanding the nesting
rg -n '"labels"' src/assets/translations/en-US.json | head -5

Repository: openMF/web-app

Length of output: 75


🏁 Script executed:

#!/bin/bash
# Check the structure inside labels object
sed -n '287,320p' src/assets/translations/en-US.json

Repository: openMF/web-app

Length of output: 1228


🏁 Script executed:

#!/bin/bash
# Search for which sub-object contains the "Select a JSON file" key
# by looking for nearby object boundaries
sed -n '3300,3380p' src/assets/translations/en-US.json | grep -B50 "Select a JSON file"

Repository: openMF/web-app

Length of output: 4289


🏁 Script executed:

#!/bin/bash
# Search for where "text" object starts/ends in labels
rg -n '"text"' src/assets/translations/en-US.json

Repository: openMF/web-app

Length of output: 76


🏁 Script executed:

#!/bin/bash
# Check the structure: where does "text" start and what comes after it?
# Also check what object the key at line 3377 belongs to
sed -n '2790,2810p' src/assets/translations/en-US.json
echo "---"
sed -n '3375,3385p' src/assets/translations/en-US.json

Repository: openMF/web-app

Length of output: 2642


Fix the template to use the correct translation key path.

The template in src/app/products/loan-products/import-loan-product-dialog/import-loan-product-dialog.component.html (line 12) currently references 'labels.Select a JSON file containing the loan product definition', but the key is located under labels.text in the translation file. Update the reference to 'labels.text.Select a JSON file containing the loan product definition' to prevent a missing-translation fallback at runtime.

🤖 Prompt for AI Agents
In @src/assets/translations/en-US.json at line 3377, The template
import-loan-product-dialog.component.html is using the wrong translation key
path: replace the current key 'labels.Select a JSON file containing the loan
product definition' with 'labels.text.Select a JSON file containing the loan
product definition' in that template so it matches the translation JSON entry
"Select a JSON file containing the loan product definition" under labels.text;
update the interpolation/bind (e.g., translate pipe or i18n attribute) in
import-loan-product-dialog.component.html to use the corrected key.

"Search by user": "Recherche par l'utilisateur",
"Section Buttons": "Cette section contient le nom d'utilisateur, la photo de l'utilisateur, les paramètres utilisateur et le bouton de déconnexion.",
"select": "sélectionner",
"Select a JSON file containing the loan product definition": "Sélectionnez un fichier JSON contenant la définition du produit de prêt",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Fix likely translation key path mismatch (labels.text vs labels).
Line 3273 appears under labels.text, but the dialog template references labels.Select a JSON file… (no text segment), which will likely render the raw key at runtime. Consider aligning by either moving this entry directly under labels, or updating the template to labels.text.Select a JSON file….

🤖 Prompt for AI Agents
In @src/assets/translations/fr-FR.json at line 3273, The translation entry
"Select a JSON file containing the loan product definition" is nested under
labels.text but the UI uses labels.Select a JSON file containing the loan
product definition (no text segment), causing a key mismatch; fix by moving this
JSON entry from under labels.text up into the labels object (or alternatively
update the template to reference labels.text.Select a JSON file containing the
loan product definition) so the key path matches the template.

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.

2 participants