Skip to content

WEB-1007: Add i18n support for Mifos Copilot across all 13 locales#3671

Merged
IOhacker merged 1 commit into
openMF:devfrom
shubhamkumar9199:feature/WEB-1007-copilot-i18n
Jun 21, 2026
Merged

WEB-1007: Add i18n support for Mifos Copilot across all 13 locales#3671
IOhacker merged 1 commit into
openMF:devfrom
shubhamkumar9199:feature/WEB-1007-copilot-i18n

Conversation

@shubhamkumar9199

@shubhamkumar9199 shubhamkumar9199 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Migrate every user-facing string in the Copilot UI from hardcoded English to @ngx-translate/core. Introduce a dedicated copilot.* translation namespace (46 keys) and add real translations for all 13 supported locales (en-US, es-MX, es-CL, fr-FR, de-DE, it-IT, pt-PT, ko-KO, lt-LT, lv-LV, ne-NE, sw-SW, cs-CS).

Refactor copilot-header, copilot-panel, chat-area, action-card, input-bar, quick-chips and recent-chats to use the translate pipe and TranslateService. The time-of-day greeting and suggestion prompts use translation keys resolved at send time, the action-card badge uses a composed cardType key, and accessibility labels (aria-label, title, placeholder) are bound translations. Remove the now-unused displayName input.

Verification

  • All 46 keys present and consistent across every locale (full parity check).
  • Every copilot.* key referenced in the components resolves to a real string.
  • JSON valid, UTF-8 BOM preserved, trailing newline kept, prettier clean for all 13 files.
  • ESLint clean on both TypeScript and HTML templates.
  • ng build passes with zero errors.

WEB-1007

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
    • Added full internationalization for the Copilot AI assistant UI, including chat welcome/empty states, header and panel labels, input placeholders and controls, quick prompts, recent chats, and action-card badge/confirmation text.
    • Localized content is now available across 13 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, and sw-SW.

@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Review Change Stack

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: "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: 230c2e5b-04c8-424b-b147-223289c71113

📥 Commits

Reviewing files that changed from the base of the PR and between 73366f5 and cc77248.

📒 Files selected for processing (27)
  • src/app/copilot/components/action-card/action-card.component.html
  • src/app/copilot/components/action-card/action-card.component.ts
  • src/app/copilot/components/chat-area/chat-area.component.html
  • src/app/copilot/components/chat-area/chat-area.component.ts
  • src/app/copilot/components/copilot-header/copilot-header.component.html
  • src/app/copilot/components/copilot-header/copilot-header.component.ts
  • src/app/copilot/components/copilot-panel/copilot-panel.component.html
  • src/app/copilot/components/copilot-panel/copilot-panel.component.ts
  • src/app/copilot/components/input-bar/input-bar.component.html
  • src/app/copilot/components/input-bar/input-bar.component.ts
  • src/app/copilot/components/quick-chips/quick-chips.component.html
  • src/app/copilot/components/quick-chips/quick-chips.component.ts
  • src/app/copilot/components/recent-chats/recent-chats.component.html
  • src/app/copilot/components/recent-chats/recent-chats.component.ts
  • 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 due to trivial changes (9)
  • src/app/copilot/components/chat-area/chat-area.component.html
  • src/assets/translations/it-IT.json
  • src/assets/translations/es-MX.json
  • src/assets/translations/ko-KO.json
  • src/app/copilot/components/action-card/action-card.component.ts
  • src/assets/translations/pt-PT.json
  • src/assets/translations/fr-FR.json
  • src/assets/translations/en-US.json
  • src/assets/translations/cs-CS.json
🚧 Files skipped from review as they are similar to previous changes (17)
  • src/app/copilot/components/action-card/action-card.component.html
  • src/app/copilot/components/quick-chips/quick-chips.component.html
  • src/app/copilot/components/copilot-header/copilot-header.component.ts
  • src/app/copilot/components/copilot-header/copilot-header.component.html
  • src/app/copilot/components/recent-chats/recent-chats.component.html
  • src/app/copilot/components/chat-area/chat-area.component.ts
  • src/assets/translations/sw-SW.json
  • src/assets/translations/ne-NE.json
  • src/app/copilot/components/input-bar/input-bar.component.ts
  • src/assets/translations/lt-LT.json
  • src/assets/translations/es-CL.json
  • src/assets/translations/lv-LV.json
  • src/app/copilot/components/quick-chips/quick-chips.component.ts
  • src/app/copilot/components/copilot-panel/copilot-panel.component.ts
  • src/assets/translations/de-DE.json
  • src/app/copilot/components/copilot-panel/copilot-panel.component.html
  • src/app/copilot/components/recent-chats/recent-chats.component.ts

Walkthrough

All hardcoded English strings in the Copilot feature's Angular components are replaced with ngx-translate pipe bindings and TranslateService.instant() calls. TranslateModule is added to six standalone components. ChatAreaComponent loses its displayName input. A copilot translation block is added to 15 locale JSON files.

Changes

Copilot i18n Migration

Layer / File(s) Summary
Translation key definitions
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
Adds a new top-level copilot translation object to the canonical en-US file and replicates the same key structure in 14 additional locale files, covering brand, session/chat controls, greetings, suggestions, input controls, disclaimer, navigation, help/capabilities, card types, and confirmation text.
TranslateModule wiring in all Copilot components
src/app/copilot/components/action-card/action-card.component.ts, src/app/copilot/components/chat-area/chat-area.component.ts, src/app/copilot/components/copilot-header/copilot-header.component.ts, src/app/copilot/components/input-bar/input-bar.component.ts, src/app/copilot/components/quick-chips/quick-chips.component.ts, src/app/copilot/components/recent-chats/recent-chats.component.ts, src/app/copilot/components/copilot-panel/copilot-panel.component.ts
Adds TranslateModule to the imports array of six standalone components. CopilotPanelComponent additionally injects TranslateService for runtime translation.
Panel logic: translation keys for greetings, suggestions, and prompt dispatch
src/app/copilot/components/copilot-panel/copilot-panel.component.ts
emptySuggestions values and greetingTime return values are changed from English strings to copilot.* translation keys. sendSuggestedPrompt now calls translate.instant() on the key before forwarding the resolved text to sendMessage.
displayName input removal
src/app/copilot/components/chat-area/chat-area.component.ts, src/app/copilot/components/copilot-panel/copilot-panel.component.html
Removes the @Input() displayName property from ChatAreaComponent and removes the [displayName] binding from the mifosx-chat-area element in the panel template.
Template i18n: translate pipe bindings across all Copilot templates
src/app/copilot/components/action-card/action-card.component.html, src/app/copilot/components/chat-area/chat-area.component.html, src/app/copilot/components/copilot-header/copilot-header.component.html, src/app/copilot/components/copilot-panel/copilot-panel.component.html, src/app/copilot/components/input-bar/input-bar.component.html, src/app/copilot/components/quick-chips/quick-chips.component.html, src/app/copilot/components/recent-chats/recent-chats.component.html
Replaces all remaining hardcoded English strings in templates with `

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • openMF/web-app#3648: Introduced the Copilot feature components (action-card, chat-area, copilot-panel, etc.) with the hardcoded English strings that this PR replaces with translation keys.

Suggested reviewers

  • adamsaghy
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes the main change: introducing i18n support for Mifos Copilot across 13 locales, which is precisely what the changeset implements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/assets/translations/lv-LV.json`:
- Around line 4868-4871: In the lv-LV.json file, the keys
copilot.nav.preferences and copilot.preferencesHeading currently have English
values ("Preferences") instead of Latvian translations. Locate these two keys in
the translation object (around the helpCenter entry which is already translated)
and replace their English values with appropriate Latvian translations to
maintain consistency with the rest of the translated UI labels in this locale
file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a0a8e2d4-2350-4752-bcd6-b54047cbffd9

📥 Commits

Reviewing files that changed from the base of the PR and between c3f1305 and 73366f5.

📒 Files selected for processing (27)
  • src/app/copilot/components/action-card/action-card.component.html
  • src/app/copilot/components/action-card/action-card.component.ts
  • src/app/copilot/components/chat-area/chat-area.component.html
  • src/app/copilot/components/chat-area/chat-area.component.ts
  • src/app/copilot/components/copilot-header/copilot-header.component.html
  • src/app/copilot/components/copilot-header/copilot-header.component.ts
  • src/app/copilot/components/copilot-panel/copilot-panel.component.html
  • src/app/copilot/components/copilot-panel/copilot-panel.component.ts
  • src/app/copilot/components/input-bar/input-bar.component.html
  • src/app/copilot/components/input-bar/input-bar.component.ts
  • src/app/copilot/components/quick-chips/quick-chips.component.html
  • src/app/copilot/components/quick-chips/quick-chips.component.ts
  • src/app/copilot/components/recent-chats/recent-chats.component.html
  • src/app/copilot/components/recent-chats/recent-chats.component.ts
  • 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

Comment thread src/assets/translations/lv-LV.json Outdated
Migrate every user-facing string in the Copilot UI from hardcoded English
to @ngx-translate/core. Introduce a dedicated copilot.* translation
namespace (46 keys) and add real translations for all 13 supported locales
(en-US, es-MX, es-CL, fr-FR, de-DE, it-IT, pt-PT, ko-KO, lt-LT, lv-LV,
ne-NE, sw-SW, cs-CS).

Refactor copilot-header, copilot-panel, chat-area, action-card, input-bar,
quick-chips and recent-chats to use the translate pipe and TranslateService.
The time-of-day greeting and suggestion prompts use translation keys
resolved at send time, the action-card badge uses a composed cardType key,
and accessibility labels (aria-label, title, placeholder) are bound
translations. Remove the now-unused displayName input.
@shubhamkumar9199 shubhamkumar9199 force-pushed the feature/WEB-1007-copilot-i18n branch from 73366f5 to cc77248 Compare June 20, 2026 22:27
@IOhacker IOhacker merged commit 44ce10c into openMF:dev Jun 21, 2026
5 checks passed
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