Skip to content

feat(journeys): add Malay to Journey AI translation language list#8971

Merged
jianwei1 merged 1 commit intomainfrom
jianweichong/nes-1536-add-malay-to-journey-language-translation-list
Apr 8, 2026
Merged

feat(journeys): add Malay to Journey AI translation language list#8971
jianwei1 merged 1 commit intomainfrom
jianweichong/nes-1536-add-malay-to-journey-language-translation-list

Conversation

@jianwei1
Copy link
Copy Markdown
Contributor

@jianwei1 jianwei1 commented Apr 7, 2026

Summary

  • Adds Malay (language ID 1927, BCP 47 ms) to SUPPORTED_LANGUAGE_IDS in supportedLanguages.ts
  • Malay will now appear as a selectable target language in both the AI Translation dialog and Copy-to-Team dialog

Context

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', // Malay to the "supported by AI model" section, alphabetically between Lithuanian and Myanmar

Test plan

  • Existing tests pass (useJourneyAiTranslateSubscription.spec.tsx)
  • Open TranslateJourneyDialog → verify Malay appears in the language dropdown
  • Open CopyToTeamDialog → verify Malay appears in the language dropdown

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

  • New Features
    • Added Malay language support to the AI-powered translation feature

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>
@jianwei1 jianwei1 self-assigned this Apr 7, 2026
@linear
Copy link
Copy Markdown

linear Bot commented Apr 7, 2026

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 7, 2026

Walkthrough

A language ID for Malay ('1927') has been added to the SUPPORTED_LANGUAGE_IDS array in the journey AI translation subscription configuration, expanding the set of supported languages.

Changes

Cohort / File(s) Summary
Supported Languages
libs/journeys/ui/src/libs/useJourneyAiTranslateSubscription/supportedLanguages.ts
Added Malay language ID ('1927') to the SUPPORTED_LANGUAGE_IDS array.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 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 PR title clearly and specifically summarizes the main change: adding Malay support to the Journey AI translation language list, which matches the actual changeset.
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.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jianweichong/nes-1536-add-malay-to-journey-language-translation-list

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.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 7, 2026

View your CI Pipeline Execution ↗ for commit b959b05

Command Status Duration Result
nx run journeys-admin-e2e:e2e ✅ Succeeded 34s View ↗
nx run journeys-e2e:e2e ✅ Succeeded 27s View ↗
nx run watch-e2e:e2e ✅ Succeeded 27s View ↗
nx run resources-e2e:e2e ✅ Succeeded 25s View ↗
nx run videos-admin-e2e:e2e ✅ Succeeded 4s View ↗
nx run-many --target=vercel-alias --projects=jo... ✅ Succeeded 2s View ↗
nx run-many --target=upload-sourcemaps --projec... ✅ Succeeded 9s View ↗
nx run-many --target=deploy --projects=journeys... ✅ Succeeded 2m 45s View ↗
Additional runs (12) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2026-04-08 00:06:32 UTC

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 7, 2026

View your CI Pipeline Execution ↗ for commit b959b05

Command Status Duration Result
nx run-many --target=vercel-alias --projects=jo... ✅ Succeeded 2s View ↗
nx run-many --target=upload-sourcemaps --projec... ✅ Succeeded 4s View ↗
nx run-many --target=deploy --projects=journeys ✅ Succeeded 1m 12s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-08 00:01:18 UTC

@jianwei1 jianwei1 requested a review from csiyang April 7, 2026 23:58
@github-actions github-actions Bot temporarily deployed to Preview - resources April 7, 2026 23:58 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys-admin April 7, 2026 23:58 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - videos-admin April 7, 2026 23:58 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - watch April 7, 2026 23:58 Inactive
@github-actions github-actions Bot temporarily deployed to Preview - journeys April 7, 2026 23:58 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys ✅ Ready journeys preview Wed Apr 8 12:01:09 NZST 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
videos-admin ✅ Ready videos-admin preview Wed Apr 8 12:01:45 NZST 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
watch ✅ Ready watch preview Wed Apr 8 12:02:01 NZST 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
resources ✅ Ready resources preview Wed Apr 8 12:02:12 NZST 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

The latest updates on your projects.

Name Status Preview Updated (UTC)
journeys-admin ✅ Ready journeys-admin preview Wed Apr 8 12:02:54 NZST 2026

Copy link
Copy Markdown
Contributor

@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.

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 | 🟡 Minor

Pre-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' // Swedish

Also 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_IDS array 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 readonly prevents 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

📥 Commits

Reviewing files that changed from the base of the PR and between a848756 and b959b05.

📒 Files selected for processing (1)
  • libs/journeys/ui/src/libs/useJourneyAiTranslateSubscription/supportedLanguages.ts

@jianwei1 jianwei1 added this pull request to the merge queue Apr 8, 2026
Merged via the queue into main with commit 84ed150 Apr 8, 2026
31 of 33 checks passed
@jianwei1 jianwei1 deleted the jianweichong/nes-1536-add-malay-to-journey-language-translation-list branch April 8, 2026 01:40
tanflem pushed a commit that referenced this pull request Apr 13, 2026
)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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