Conversation
Add Malay (language ID 1927) to the SUPPORTED_LANGUAGE_IDS array so users can select Malay as a target language in the AI translation and Copy-to-Team dialogs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
WalkthroughA language ID for Malay ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
View your CI Pipeline Execution ↗ for commit b959b05
☁️ Nx Cloud last updated this comment at |
|
View your CI Pipeline Execution ↗ for commit b959b05
☁️ Nx Cloud last updated this comment at |
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
libs/journeys/ui/src/libs/useJourneyAiTranslateSubscription/supportedLanguages.ts (1)
22-22:⚠️ Potential issue | 🟡 MinorPre-existing duplicate: Serbian appears twice.
Serbian (language ID
'5541') is listed in both the i18n section (line 22) and the "supported by AI model" section (line 46). While this doesn't break functionality, duplicate entries can cause confusion and should be deduplicated.🧹 Suggested cleanup
Since Serbian appears in the i18n section, consider removing the duplicate from the AI model section:
'5545', // Slovak '1112', // Slovenian '23178', // Swahili, Tanzania - '5541', // Serbian '4823' // SwedishAlso applies to: 46-46
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@libs/journeys/ui/src/libs/useJourneyAiTranslateSubscription/supportedLanguages.ts` at line 22, Remove the duplicate Serbian entry ('5541') from the AI model's supported-languages list so it only appears once in the i18n section; locate the two language arrays in supportedLanguages.ts (the i18n list and the AI-model-supported list), find the '5541' entry in the AI model section, and delete that line to deduplicate the lists.
🧹 Nitpick comments (1)
libs/journeys/ui/src/libs/useJourneyAiTranslateSubscription/supportedLanguages.ts (1)
1-1: Consider adding explicit type annotation.The
SUPPORTED_LANGUAGE_IDSarray lacks an explicit type annotation. Adding one would improve clarity and make the intent explicit.📝 Suggested type annotation
-export const SUPPORTED_LANGUAGE_IDS = [ +export const SUPPORTED_LANGUAGE_IDS: readonly string[] = [Using
readonlyprevents accidental mutations and better reflects that this is a constant configuration.As per coding guidelines: "Define a type if possible" for TypeScript files.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@libs/journeys/ui/src/libs/useJourneyAiTranslateSubscription/supportedLanguages.ts` at line 1, The SUPPORTED_LANGUAGE_IDS export lacks an explicit type; add a readonly array type annotation (e.g., ReadonlyArray<string> or readonly string[]) on the SUPPORTED_LANGUAGE_IDS constant to make its intent and immutability explicit and prevent accidental mutation; update the declaration for SUPPORTED_LANGUAGE_IDS accordingly so callers and linters see the intended type.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In
`@libs/journeys/ui/src/libs/useJourneyAiTranslateSubscription/supportedLanguages.ts`:
- Line 22: Remove the duplicate Serbian entry ('5541') from the AI model's
supported-languages list so it only appears once in the i18n section; locate the
two language arrays in supportedLanguages.ts (the i18n list and the
AI-model-supported list), find the '5541' entry in the AI model section, and
delete that line to deduplicate the lists.
---
Nitpick comments:
In
`@libs/journeys/ui/src/libs/useJourneyAiTranslateSubscription/supportedLanguages.ts`:
- Line 1: The SUPPORTED_LANGUAGE_IDS export lacks an explicit type; add a
readonly array type annotation (e.g., ReadonlyArray<string> or readonly
string[]) on the SUPPORTED_LANGUAGE_IDS constant to make its intent and
immutability explicit and prevent accidental mutation; update the declaration
for SUPPORTED_LANGUAGE_IDS accordingly so callers and linters see the intended
type.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 905d31fb-e253-4e55-bcdc-e99d2083cfda
📒 Files selected for processing (1)
libs/journeys/ui/src/libs/useJourneyAiTranslateSubscription/supportedLanguages.ts
Summary
1927, BCP 47ms) toSUPPORTED_LANGUAGE_IDSinsupportedLanguages.tsContext
Resolves NES-1536. Malay was requested as a target language for Journey AI translations. The language already exists in the languages database (ID
1927) and is used elsewhere in the codebase (i18n config, template gallery filter).Changes
libs/journeys/ui/src/libs/useJourneyAiTranslateSubscription/supportedLanguages.ts: Added'1927', // Malayto the "supported by AI model" section, alphabetically between Lithuanian and MyanmarTest plan
useJourneyAiTranslateSubscription.spec.tsx)Post-Deploy Monitoring & Validation
No additional operational monitoring required — this is a static configuration addition to an existing array constant, with no runtime behavior change beyond expanding the language selection list.
🤖 Generated with Claude Code
Summary by CodeRabbit