Skip to content

feat: add Indonesian (id) locale#682

Open
ardha27 wants to merge 1 commit into
666ghj:mainfrom
ardha27:feat/id-locale
Open

feat: add Indonesian (id) locale#682
ardha27 wants to merge 1 commit into
666ghj:mainfrom
ardha27:feat/id-locale

Conversation

@ardha27

@ardha27 ardha27 commented Jun 7, 2026

Copy link
Copy Markdown

What

Adds Bahasa Indonesia as a supported language in MiroFish's i18n registry:

  • locales/id.json — full translation of 629 keys across 17 sections (common, meta, nav, home, main, step1step5, graph, history, api, progress, log, report, console)
  • locales/languages.json — register the id entry with label and llmInstruction

Why

The current i18n registry has 7 languages (zh, en, es, fr, pt, ru, de) but is missing Indonesian despite:

  • Indonesian being the 4th most-spoken language in the world (~270M speakers)
  • MiroFish's apparent target use cases (policy rehearsal, social simulation, economic prediction) being directly relevant to Indonesian ministries and think tanks
  • Real-world usage: a Purbaya/USD-IDR 15,000 simulation in Bahasa Indonesia context is exactly the kind of scenario the framework is built for, and currently has to fall back to English

How to use

After this lands, Indonesian users can switch via:

  • Frontend: language picker in the UI (drops in automatically once the locale file is loaded by import.meta.glob in frontend/src/i18n/index.js)
  • API: Accept-Language: id header on backend calls — the get_locale() route in backend/app/utils/locale.py picks it up automatically
  • LLM behavior: get_language_instruction() will return "Silakan jawab dalam bahasa Indonesia.", anchoring the LLM to respond in Bahasa Indonesia across ontology generation, simulation config, persona profiles, and reports

Translation quality

Generated with deepseek-chat from en.json. Validated against the upstream English file:

  • 629/629 keys preserved (same nesting, same types)
  • 0 values with English stopword ratio > 30% (i.e. no mostly-English text accidentally left in the Indonesian file)
  • Technical terms preserved: MiroFish, API, LLM, PDF, Zep, placeholders like {title} / {conflictCount}

Spot check:

Key English Indonesian
common.confirm Confirm Konfirmasi
common.cancel Cancel Batal
common.retry Retry Coba Lagi
meta.title MiroFish - Predict Anything MiroFish - Prediksi Segalanya
step2.profileModalAge Apparent Age Usia Tampak
step5.chatEmptyAgent Chat with simulated individuals to understand their perspectives Chat dengan individu yang disimulasikan untuk memahami perspektif mereka
report.sectionConflictDowngrade Section {title}: {conflictCount} consecutive conflicts, downgrading to truncate and execute first tool call Bagian {title}: {conflictCount} konflik berturut-turut, menurunkan ke pemotongan dan eksekusi panggilan alat pertama

Files

  • locales/id.json (new, 39,648 bytes, 629 keys)
  • locales/languages.json (modified, +4 lines for id entry)

Risk

Zero. Additive change only — no existing behavior modified. Languages already not selected by users continue to behave identically. The 4-line addition to languages.json follows the exact pattern of the existing 7 entries.

Checklist

  • All 629 keys present and translated
  • No suspicious English text in Indonesian file
  • Technical terms (brand names, placeholders) preserved
  • languages.json registration follows existing pattern
  • Follows upstream's i18n conventions (no code changes required for frontend/backend to pick it up)

Adds Bahasa Indonesia as a supported language:
- locales/id.json: full translation of 629 keys across 17 sections
  (common, meta, nav, home, main, step1-5, graph, history, api,
  progress, log, report, console)
- locales/languages.json: register 'id' entry with label and
  llmInstruction 'Silakan jawab dalam bahasa Indonesia.'

Fills a gap in the existing i18n registry (zh, en, es, fr, pt, ru, de).
Indonesian has ~270M speakers and is widely used in Southeast Asian
academic and policy contexts — a natural fit for the multi-agent
simulation use cases MiroFish targets (e.g. policy rehearsal for
Indonesian ministries, USD/IDR economic scenarios, regional crisis
planning).

Indonesian users can switch via:
- Frontend: language picker in the UI
- API: Accept-Language: id header on backend calls
- LLM calls: get_language_instruction() will return the Indonesian
  instruction, anchoring the LLM to respond in Bahasa Indonesia

Translations preserve technical terms (MiroFish, API, LLM, PDF, Zep)
and placeholder syntax (e.g. 'Bagian {title}: {conflictCount}...')
exactly as the upstream English file does.

Generated with DeepSeek (deepseek-chat); 629/629 keys validated
against en.json structure.
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.

1 participant