Skip to content

feat(i18n): add Indonesian (id) locale - #249

Open
salmanabdurrahman wants to merge 1 commit into
oblien:mainfrom
salmanabdurrahman:feat/i18n-indonesian
Open

feat(i18n): add Indonesian (id) locale#249
salmanabdurrahman wants to merge 1 commit into
oblien:mainfrom
salmanabdurrahman:feat/i18n-indonesian

Conversation

@salmanabdurrahman

Copy link
Copy Markdown

Summary

Introduces a comprehensive Indonesian (id) locale for the dashboard. English remains the source of truth, and the id locale achieves full key parity-sharing the exact same files, keys, and placeholders as en—alongside a localized README.

Motivation

Fulfills the Localization guidelines outlined in CONTRIBUTING.md by providing Indonesian language support, which was previously unavailable in the dashboard.

Related Issue

None - This PR strictly follows the CONTRIBUTING.md Localization guide (introduces a new locale without altering existing behavior).

Changes

apps/dashboard

  • Added Dictionaries: Created src/i18n/locales/id/*.json (22 namespaces) maintaining complete parity with en.
  • Standardized Terminology: Applied consistent translations (e.g., Install → "Instal", Recommended → "Direkomendasikan") while preserving intentional context-specific splits (e.g., action Open → "Buka" vs. state Open → "Terbuka").
  • Registered Locale: Wired id into src/i18n/index.ts and exposed "Bahasa Indonesia" across the dashboard and onboarding language selectors.

docs

  • Created Documentation: Added docs/i18n/README.id.md utilizing the standard condensed localized template.
  • Updated Badges: Embedded the Bahasa Indonesia badge in the root README.md and across all localized READMEs.

Scope: Strictly limited to i18n dictionaries and README updates (35 files).

Verification

$ cd apps/dashboard

# 1) Locale Parity
# `id` never appears in the drift lists → fully translated (0 missing / 0 extra).
# The 5161 total is pre-existing drift from OTHER locales (script exits 1).
$ node scripts/check-i18n.mjs --full
i18n drift vs "en" - missing: 5161, extra: 14
...
Missing keys by locale:
  es     831
  ja     831
  pt     831
  zh     831
  de     824
  ar     615
  fr     249
  tr     149
# (Note: no `id` row = 0 missing for id)

# 2) Parity Test
# The extra-keys check passes. The missing-ratchet fails ONLY on
# migration/settings (pre-existing in other locales, unrelated to id).
$ bunx vitest run src/i18n/i18n-parity.test.ts
 ❯ src/i18n/i18n-parity.test.ts (2 tests | 1 failed)
     ✓ introduces no NEW stale (extra) locale keys beyond the baseline
   migration: 1237 missing (baseline 1199)
   settings:  576 missing (baseline 564)
 Test Files  1 failed (1)
      Tests  1 failed | 1 passed (2)

# 3) Dashboard Boot Test
$ bun dev:dashboard
 ▲ Next.js 16.1.6
 - Local: http://localhost:3001
 ✓ Ready in 1621ms
 # Dashboard successfully boots and renders in Bahasa Indonesia.

Note on Pre-existing CI Failure:
The parity test fails on migration/settings. This is not caused by this PR. It is a pre-existing translation drift already on main (also noted in #247) resulting from other locales missing recently added en keys. The new id locale is fully translated and adds 0 drift to those counts. To strictly adhere to the one-change-per-PR principle, I opted not to bundle the baseline bump here.

Checklist

  • One change per PR - one bug, or one agreed feature, with nothing unrelated bundled in
  • The diff is scoped - no reformatting or lint fixes on lines I wasn't otherwise changing
  • A test fails without this change and passes with it (or I explained above why there isn't one)
    (Note: No new test required; covered by the existing i18n-parity infra where id sits at 0 drift)
  • bun run test, bun run --cwd <workspace> lint, and bun format all pass locally
    (Note: Pre-existing i18n-parity failure is unrelated - see Verification; skipped repo-wide bun format to avoid modifying unrelated files)
  • I understand every line of this diff and can explain it in review

Add complete id dashboard dictionaries (22 namespaces, full parity with en, consistent terminology), register locale in i18n/index.ts + dashboard/onboarding language selectors, and add docs/i18n/README.id.md with language badges across all READMEs.
Copilot AI review requested due to automatic review settings July 26, 2026 22:07

Copilot AI 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.

Pull request overview

Adds Indonesian (id) localization support for the dashboard and documentation, extending the existing i18n registry/loader and exposing the new locale in language selectors. This fits the codebase’s existing “English as base + lazy-loaded locale namespaces” approach in apps/dashboard/src/i18n.

Changes:

  • Added full apps/dashboard/src/i18n/locales/id/*.json namespace set and registered id in the i18n locale list.
  • Exposed “Bahasa Indonesia” in onboarding and dashboard settings language selectors.
  • Added an Indonesian localized README and updated language badges across existing READMEs to link to it.

Reviewed changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated no comments.

Show a summary per file
File Description
README.md Adds Bahasa Indonesia badge linking to the new localized README.
docs/i18n/README.id.md Adds Indonesian localized README content.
docs/i18n/README.{ar,de,es,fr,ja,pt,tr,zh}.md Adds link/badge entry for the new Indonesian README.
apps/dashboard/src/i18n/index.ts Registers id in locales; existing lazy loader will pick up the new namespace files.
apps/dashboard/src/app/(onboarding)/onboarding/page.tsx Adds id to onboarding language display/code maps.
apps/dashboard/src/app/(dashboard)/settings/_components/LanguageSetting.tsx Adds id to settings language display/code maps.
apps/dashboard/src/i18n/locales/id/*.json Adds Indonesian translations for all i18n namespaces.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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