Skip to content

feat: add Indonesian locale#1884

Merged
senamakel merged 3 commits into
tinyhumansai:mainfrom
aqilaziz:codex/indonesian-locale
May 16, 2026
Merged

feat: add Indonesian locale#1884
senamakel merged 3 commits into
tinyhumansai:mainfrom
aqilaziz:codex/indonesian-locale

Conversation

@aqilaziz
Copy link
Copy Markdown
Contributor

@aqilaziz aqilaziz commented May 16, 2026

Summary

  • add Indonesian (id) locale registration and Bahasa Indonesia option in Settings
  • detect id-* and legacy in-* browser locales as Indonesian
  • add Indonesian core UI translations with English fallback coverage tests

Tests

  • pnpm --dir app exec prettier --write src/components/settings/SettingsHome.tsx src/components/settings/tests/SettingsHome.test.tsx src/lib/i18n/I18nContext.tsx src/lib/i18n/types.ts src/lib/i18n/id.ts src/lib/i18n/tests/I18nContext.test.tsx src/store/localeSlice.ts src/store/localeSlice.test.ts
  • pnpm --dir app exec vitest run --config test/vitest.config.ts src/components/settings/tests/SettingsHome.test.tsx src/lib/i18n/tests/I18nContext.test.tsx src/store/localeSlice.test.ts
  • pnpm --dir app exec eslint src/components/settings/SettingsHome.tsx src/components/settings/tests/SettingsHome.test.tsx src/lib/i18n/I18nContext.tsx src/lib/i18n/id.ts src/lib/i18n/tests/I18nContext.test.tsx src/store/localeSlice.ts src/store/localeSlice.test.ts
  • pnpm --dir app compile

Summary by CodeRabbit

  • New Features
    • Added Indonesian language support. Users can now select "Bahasa Indonesia" in the language settings. The application will automatically detect Indonesian browser language preferences and display the interface in Indonesian, with English as fallback for any untranslated content.

Review Change Stack

@aqilaziz aqilaziz requested a review from a team May 16, 2026 00:51
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1220b8c4-e1d8-4457-92d1-3c33dda76c99

📥 Commits

Reviewing files that changed from the base of the PR and between 73c932b and d4487cb.

📒 Files selected for processing (2)
  • app/src/components/LanguageSelect.tsx
  • app/src/components/settings/__tests__/SettingsHome.test.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/components/settings/tests/SettingsHome.test.tsx

📝 Walkthrough

Walkthrough

This PR adds Indonesian language support to the application. The Locale type is expanded to include 'id', a comprehensive Indonesian translation map is created, locale detection is improved to recognize Indonesian browser language codes, the i18n context integrates the translations, and the language selector UI exposes the option to users.

Changes

Indonesian language support

Layer / File(s) Summary
Locale type definition
app/src/lib/i18n/types.ts
The Locale type is expanded to include the 'id' literal alongside 'en' and 'zh-CN'.
Indonesian translation map
app/src/lib/i18n/id.ts
A new module defines the id translation map with 640+ entries covering navigation, settings, onboarding, chat, memory, alerts, rewards, and other feature areas; missing keys fall back to English.
Locale detection
app/src/store/localeSlice.ts, app/src/store/localeSlice.test.ts
detectLocale() normalizes navigator.language once and matches both current (id-ID) and legacy (in-ID) Indonesian codes; tests verify both mappings produce the id locale.
I18n context integration
app/src/lib/i18n/I18nContext.tsx, app/src/lib/i18n/__tests__/I18nContext.test.tsx
I18nContext imports and registers the Indonesian translation map; an integration test confirms the provider returns Indonesian strings for known keys with English fallback for missing keys.
Language selector UI
app/src/components/LanguageSelect.tsx, app/src/components/settings/__tests__/SettingsHome.test.tsx
The language selector adds "Bahasa Indonesia" 🇮🇩 as a selectable option with value id; a test verifies the option appears in the settings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A tongue of islands now finds voice,
Indonesian words bring users choice,
From locale types to UI view,
The translator makes all fresh and new,
With fallback grace when words run thin!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add Indonesian locale' directly and clearly describes the main change: adding support for the Indonesian locale across the application.
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.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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[bot]
coderabbitai Bot previously approved these changes May 16, 2026
@senamakel senamakel self-assigned this May 16, 2026
# Conflicts:
#	app/src/components/settings/SettingsHome.tsx
#	app/src/lib/i18n/I18nContext.tsx
@senamakel senamakel merged commit 6872eb0 into tinyhumansai:main May 16, 2026
23 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