iachat/app/javascript/dashboard/composables/spec
Pranav ded2f2751a
fix: Rendering of translations based on the user's locale (#13211)
Previously, translations were generated and resolved purely based on the
account locale. This caused issues in multi-team, multi-region setups
where agents often work in different languages than the account default.

For example, an account might be set to English, while an agent prefers
Spanish. In this setup:
- Translations were always created using the account locale.
- Agents could not view content in their preferred language.
- This did not scale well for global teams.

There was also an issue with locale resolution during rendering, where
the system would incorrectly default to the account locale even when a
more appropriate locale should have been used.

With this update, During rendering, the system first attempts to use the
agent’s locale. If a translation for that locale does not exist, it
falls back to the account locale.


**How to test:**

- Set agent locale to a specific language (e.g., zh_CN) and account
language to en.
  - Translate a message.
- Verify translated content displays correctly for the agent's selected
locale
  - Do the same for another locale for agent.
- With multiple translations on a message (e.g., zh_CN, es, ml), verify
the UI shows the one matching agent's locale
- Change agent locale and verify the displayed translation updates
accordingly
2026-01-08 18:37:42 -08:00
..
fixtures feat: Rewrite reportMixin to a composable (#10029) 2024-08-27 08:00:05 +05:30
emitter.spec.js chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
index.spec.js chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
useAccount.spec.js feat(v4): Update the design for the contacts list page (#10501) 2024-11-27 20:07:20 -08:00
useAdmin.spec.js feat: Replace alertMixin usage with useAlert (#9793) 2024-07-23 16:41:11 +05:30
useAgentsList.spec.js fix: Translate "None" option in agent assignment dropdown (#11060) 2025-03-11 14:49:27 -07:00
useAI.spec.js chore: fix circleci on vite build (#10214) 2024-10-07 15:27:41 +05:30
useAutomation.spec.js feat: Add automation rule event conversation resolved (#9669) 2025-08-13 12:57:14 +05:30
useConfig.spec.js feat: Rewrite configMixin to a composable (#9921) 2024-08-14 12:56:30 +05:30
useConversationLabels.spec.js feat: Rewrite conversation/labelMixin to a composable (#9936) 2024-08-12 17:41:12 +05:30
useDetectKeyboardLayout.spec.js feat: Rewrite keyboardEventListener mixin to a composable (#9831) 2024-08-05 18:59:47 +05:30
useFileUpload.spec.js feat: allow configuring attachment upload limit (#12835) 2025-11-17 14:03:08 -08:00
useFontSize.spec.js feat: Agent language settings (#11222) 2025-09-09 14:27:36 +05:30
useImageZoom.spec.js chore: Improvements in image attachment viewer (#11040) 2025-03-18 14:01:18 +05:30
useImpersonation.spec.js feat: Prevent saving preferences and status when impersonating (#11164) 2025-05-20 17:34:30 -07:00
useInbox.spec.js feat: TikTok channel (#12741) 2025-12-17 07:54:50 -08:00
useIntegrationHook.spec.js chore: Repalce Hook Mixin with useHook composable [CW-3454] (#9994) 2024-08-22 16:48:02 +05:30
useKeyboardEvents.spec.js refactor: useKeyboardEvents composable (#9959) 2024-08-22 16:40:55 +05:30
useKeyboardNavigableList.spec.js refactor: useKeyboardEvents composable (#9959) 2024-08-22 16:40:55 +05:30
useMacros.spec.js fix: Translate Priority and Messages types in Automations and Macros (#11741) 2025-07-08 12:40:40 +05:30
useReportMetrics.spec.js feat: Rewrite reportMixin to a composable (#10029) 2024-08-27 08:00:05 +05:30
useTranslations.spec.js fix: Rendering of translations based on the user's locale (#13211) 2026-01-08 18:37:42 -08:00
useUISettings.spec.js feat: allow quoted email thread in reply (#12545) 2025-09-30 17:47:09 +05:30