Skip to content

WEB-468 Incorrect label displayed as label input saving product on create saving product page#2895

Merged
alberto-art3ch merged 1 commit intoopenMF:devfrom
JaySoni1:WEB-468-incorrect-label-displayed-as-label-input-saving-product-on-create-saving-product-page
Dec 13, 2025
Merged

WEB-468 Incorrect label displayed as label input saving product on create saving product page#2895
alberto-art3ch merged 1 commit intoopenMF:devfrom
JaySoni1:WEB-468-incorrect-label-displayed-as-label-input-saving-product-on-create-saving-product-page

Conversation

@JaySoni1
Copy link
Contributor

@JaySoni1 JaySoni1 commented Dec 13, 2025

Changes Made :-

-Fixed incorrect label display on the Create Saving Product page by ensuring the correct translation keys are used and the JSON structure is valid.

WEB-468

Before :-
image

After :-
image

Summary by CodeRabbit

  • Bug Fixes

    • Corrected UI label from "Create Saving Product" to "Create Savings Product" (breadcrumb/title).
  • Translations

    • Added "Create Savings Product" translations across 12 locales (en, de, es-CL, es-MX, fr, it, ko, pt, sw, lt, lv, cs).
    • Czech translations reorganized (data layout/flattening only).
    • Nepali addition was added then removed — no net change.

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

@coderabbitai
Copy link

coderabbitai bot commented Dec 13, 2025

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

Updated a route metadata title from "Create Saving Product" to "Create Savings Product" and added/modified the corresponding translation key across multiple locale JSON files; one locale (cs-CS) had a structural flattening of translation sections. No control flow or exported declarations changed.

Changes

Cohort / File(s) Change Summary
Routing Configuration
src/app/products/products-routing.module.ts
Updated route metadata title for the savings-create route from "Create Saving Product" to "Create Savings Product".
Localization — added/updated key across locales
src/assets/translations/{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, pt-PT.json, sw-SW.json}
Added the translation entry "Create Savings Product" with language-specific values (and in en-US formatting adjusted a trailing comma).
Localization — transient/no-net-change
src/assets/translations/ne-NE.json
A Create Savings Product entry was added then removed within the diff (net: no final change).
Localization — schema/format change
src/assets/translations/cs-CS.json
Flattened nested translation structure by promoting keys from text, titles, and messages to top-level entries and introducing top-level titles/messages (structural reorganization).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Repetitive, low-risk text additions across many files and a single small routing metadata edit.
  • Areas to double-check:
    • src/assets/translations/cs-CS.json — structural/schema change may impact consumers expecting nested keys.
    • Potential duplicate keys across locales (flattened vs existing titles/messages).
    • Verify routing metadata title aligns with breadcrumb/title consumers.

Suggested reviewers

  • IOhacker
  • alberto-art3ch
  • gkbishnoi07

Pre-merge checks and finishing touches

✅ 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 'WEB-468 Incorrect label displayed as label input saving product on create saving product page' directly relates to the core change: fixing incorrect label display by correcting translation keys and restructuring JSON files across multiple locales.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent 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 06f2635 and ac9bf7f.

📒 Files selected for processing (13)
  • src/app/products/products-routing.module.ts (1 hunks)
  • src/assets/translations/cs-CS.json (1 hunks)
  • src/assets/translations/en-US.json (1 hunks)
  • src/assets/translations/es-CL.json (1 hunks)
  • src/assets/translations/es-MX.json (1 hunks)
  • src/assets/translations/fr-FR.json (1 hunks)
  • src/assets/translations/it-IT.json (1 hunks)
  • src/assets/translations/ko-KO.json (1 hunks)
  • src/assets/translations/lt-LT.json (1 hunks)
  • src/assets/translations/lv-LV.json (1 hunks)
  • src/assets/translations/ne-NE.json (1 hunks)
  • src/assets/translations/pt-PT.json (1 hunks)
  • src/assets/translations/sw-SW.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (10)
  • src/app/products/products-routing.module.ts
  • src/assets/translations/en-US.json
  • src/assets/translations/es-CL.json
  • src/assets/translations/ne-NE.json
  • src/assets/translations/pt-PT.json
  • src/assets/translations/lv-LV.json
  • src/assets/translations/cs-CS.json
  • src/assets/translations/fr-FR.json
  • src/assets/translations/es-MX.json
  • src/assets/translations/it-IT.json
🔇 Additional comments (2)
src/assets/translations/lt-LT.json (1)

2748-2749: Looks correct; verify the consuming namespace (text vs heading) matches the UI lookup.
You added "Create Savings Product" under "text", which is consistent with the route-title string update. Just ensure the Create Savings Product page is actually translating from text.Create Savings Product (not another section), otherwise the fix may not show up.

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

2746-2746: All verification checks passed. The JSON file is valid, and there is only a single occurrence of "Create Savings Product" at line 2746 with no duplicate "text" keys remaining in the file. The translation is properly integrated into the main structure with correct syntax.


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

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)

3346-3346: Fix malformed JSON value at line 3346 in src/assets/translations/it-IT.json.

The value for "Journal Entries" is incomplete: "{titolo: Voci di diario" is missing a closing brace } and closing quote ". This breaks JSON parsing.

Expected: "Journal Entries": "{titolo: Voci di diario}",

📜 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 226ed3c and 7371f7b.

📒 Files selected for processing (14)
  • src/app/products/products-routing.module.ts (1 hunks)
  • src/assets/translations/cs-CS.json (1 hunks)
  • src/assets/translations/de-DE.json (1 hunks)
  • src/assets/translations/en-US.json (1 hunks)
  • src/assets/translations/es-CL.json (1 hunks)
  • src/assets/translations/es-MX.json (1 hunks)
  • src/assets/translations/fr-FR.json (1 hunks)
  • src/assets/translations/it-IT.json (1 hunks)
  • src/assets/translations/ko-KO.json (1 hunks)
  • src/assets/translations/lt-LT.json (1 hunks)
  • src/assets/translations/lv-LV.json (1 hunks)
  • src/assets/translations/ne-NE.json (1 hunks)
  • src/assets/translations/pt-PT.json (1 hunks)
  • src/assets/translations/sw-SW.json (1 hunks)
🧰 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/products-routing.module.ts
🪛 Biome (2.1.2)
src/assets/translations/en-US.json

[error] 284-284: The key text was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)

src/assets/translations/sw-SW.json

[error] 283-283: The key text was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)

🔇 Additional comments (10)
src/assets/translations/lt-LT.json (1)

283-285: Translation entry correctly added with valid JSON structure.

The new "Create Savings Product" translation key in labels.text is properly structured, uses correct Lithuanian grammar (infinitive form "Sukurti taupymo produktą" is appropriate for a label), and aligns with the PR objective to fix the label display from singular to plural. The JSON nesting and comma placement (line 285) are correct.

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

283-285: Valid JSON structure and accurate French translation for new label entry.

The new translation entry "Create Savings Product" → "Créer un produit d'épargne" is properly placed within the labels.text object and maintains consistency with similar entries in the file (e.g., "Create loan product", "Create share product"). The French translation is grammatically correct.

However, verify that corresponding changes have been applied to all other language translation files mentioned in the PR context (en-US, es-CL, es-MX, de-DE, it-IT, ko-KO, lt-LT, lv-LV, ne-NE, pt-PT, sw-SW) to ensure consistency across locales.

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

282-286: JSON structure is valid and translation key properly aligned with routing changes.

The addition of the "Create Savings Product" entry under labels.text with the German translation "Sparkonto anlegen" is correctly implemented with valid JSON syntax. The plural form of the key aligns with the routing metadata change mentioned in the PR objectives (singular → plural update).

However, note that the AI summary indicates this translation entry should be added across all supported language files (en-US.json, cs-CS.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). Only this German translation file is provided for review. Ensure all language files have been consistently updated with the same translation key.

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

282-285: Translation entry added correctly with valid JSON structure.

The new "Create Savings Product" translation entry has been properly added under the labels.text object with correct Czech translation ("Vytvořte úsporný produkt"). JSON structure remains valid with proper nesting, quoting, and comma placement.

Note: Verify that corresponding translation entries have been added consistently across all supported language files (en-US, de-DE, es-CL, es-MX, fr-FR, it-IT, ko-KO, lt-LT, lv-LV, ne-NE, pt-PT, sw-SW) as mentioned in the PR scope to ensure uniform label display across the application.

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

282-285: Confirmed: UI reads from labels.text as expected. The component correctly uses labels.text.Create Savings Product (lines 5 and 39 in src/app/products/saving-products/saving-products.component.html). Note that Create Savings Product also exists in labels.inputs (line 904) and labels.buttons (line 2855) namespaces with identical translations; ensure future code changes don't accidentally reference these alternative namespaces to avoid unintended translation source changes.

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

282-285: JSON structure looks valid for the added object.
The inserted text object and trailing commas appear syntactically correct in this context.


282-285: No action needed. The translation key is correctly named and follows the established pattern in the codebase.

The key labels.text.Create Savings Product in es-MX.json is accessed correctly as 'labels.text.Create Savings Product' in templates via the translate pipe. This matches how ngx-translate handles nested object access with dot notation, and is consistent with 20+ other similar keys already in the codebase (e.g., labels.text.Session timed out, labels.text.This option allows you to create new users in your organization, labels.text.Write a note, etc.). The JSON structure and template consumption are both correct.

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

282-285: ✓ Valid JSON structure and appropriate translation addition.

The new translation entry for "Create Savings Product" is correctly added under labels.text with proper JSON formatting. The Korean translation "예금 상품 만들기" is semantically appropriate and aligns with the PR objective to fix label display on the Create Saving Product page (now with plural "Savings").

Key observations:

  • JSON syntax is valid: proper indentation, quote usage, and comma placement
  • Translation key matches the routing module update (singular → plural correction)
  • Nested structure under labels.text is consistent with the file's organization
  • No duplicate keys or conflicts detected
src/assets/translations/es-CL.json (1)

282-286: Confirm the key is expected under labels.text (duplication with labels.heading).
The JSON edit looks valid, but this string key already exists under other sections in this file; please confirm the consuming UI looks up labels.text.Create Savings Product specifically (and not labels.heading.*) to avoid redundant/inconsistent translations.

src/app/products/products-routing.module.ts (1)

219-226: Route title rename verified—change is complete and consistent across routing, templates, and all translation files.

The old key "Create Saving Product" has been completely removed from the codebase. The new key "Create Savings Product" is properly integrated in the route metadata (line 222), component templates, and all 13 supported language translation files. No migration work remains.

@JaySoni1 JaySoni1 force-pushed the WEB-468-incorrect-label-displayed-as-label-input-saving-product-on-create-saving-product-page branch from 7371f7b to 06f2635 Compare December 13, 2025 21:36
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

♻️ Duplicate comments (2)
src/assets/translations/pt-PT.json (1)

2748-2748: Unresolved duplicate translation for "Create Savings Product"—multiple Portuguese values conflict.

The new translation at Line 2748 ("Criar produto de poupança") duplicates the English key "Create Savings Product" that already exists at Line 2853 in the same labels.text namespace with a different Portuguese value ("Criar produto salvador"). This inconsistency will cause unpredictable rendering depending on which key is accessed by the UI.

Additionally, a third occurrence exists at Line 901 under labels.heading with yet another Portuguese string.

Recommended action: Consolidate to a single canonical Portuguese translation:

  1. Decide which Portuguese value is correct: "Criar produto de poupança" or "Criar produto salvador"?
  2. Remove or consolidate the duplicate entries so only ONE key path under labels.text contains the translation.
  3. Update the routing module and any UI code to consistently reference the chosen canonical key path.
src/assets/translations/it-IT.json (1)

2746-2750: Unify "Create Savings Product" Italian translation across namespaces to avoid inconsistent UI copy.
You now have at least 3 different Italian strings for the same key (e.g., "heading" at Line 901, "text" at Line 2748, and "text" again at Line 2853). Pick one correct phrase (and capitalization) and make all occurrences match, or ensure only one canonical key is referenced.

Also applies to: 901-902, 2851-2854

📜 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 7371f7b and 06f2635.

📒 Files selected for processing (13)
  • src/app/products/products-routing.module.ts (1 hunks)
  • src/assets/translations/cs-CS.json (1 hunks)
  • src/assets/translations/en-US.json (1 hunks)
  • src/assets/translations/es-CL.json (1 hunks)
  • src/assets/translations/es-MX.json (1 hunks)
  • src/assets/translations/fr-FR.json (1 hunks)
  • src/assets/translations/it-IT.json (1 hunks)
  • src/assets/translations/ko-KO.json (1 hunks)
  • src/assets/translations/lt-LT.json (1 hunks)
  • src/assets/translations/lv-LV.json (1 hunks)
  • src/assets/translations/ne-NE.json (1 hunks)
  • src/assets/translations/pt-PT.json (1 hunks)
  • src/assets/translations/sw-SW.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
  • src/assets/translations/fr-FR.json
  • src/assets/translations/lt-LT.json
  • src/app/products/products-routing.module.ts
  • src/assets/translations/en-US.json
  • src/assets/translations/es-MX.json
  • src/assets/translations/lv-LV.json
🧰 Additional context used
🪛 Biome (2.1.2)
src/assets/translations/cs-CS.json

[error] 2871-2871: The key Create Savings Product was already declared.

This where a duplicated key was declared again.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)

src/assets/translations/sw-SW.json

[error] 2747-2747: The key Create Savings Product was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)

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

2748-2748: ✓ LGTM — Translation addition is correct and well-placed.

The new translation key "Create Savings Product": "Crear producto de ahorro" is grammatically accurate for Spanish (Chile) and follows the naming conventions used throughout the file. The entry is properly positioned within the labels.text section and uses correct JSON syntax with appropriate comma placement. This aligns with the PR objective to fix the incorrect label display by providing the correct translation key.

@JaySoni1 JaySoni1 force-pushed the WEB-468-incorrect-label-displayed-as-label-input-saving-product-on-create-saving-product-page branch from 06f2635 to ac9bf7f Compare December 13, 2025 21:45
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.

LGTM

@alberto-art3ch alberto-art3ch merged commit 4c00e58 into openMF:dev Dec 13, 2025
3 checks passed
@JaySoni1
Copy link
Contributor Author

@alberto-art3ch Thank You for the review

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.

LGTM

@JaySoni1
Copy link
Contributor Author

@IOhacker Thank You for the review

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