Skip to content

Add Bengali (bn) locale: UI strings translated - #15

Merged
MilkteaTW1 merged 1 commit into
MilkteaTW1:mainfrom
rahul05ranjan:locale-bengali
Oct 23, 2026
Merged

MilkteaTW1 merged 1 commit into
MilkteaTW1:mainfrom
rahul05ranjan:locale-bengali

Conversation

@rahul05ranjan

Copy link
Copy Markdown
Contributor

Fixes #11

Adds a Bengali locale: piscout/static/locales/bn.json, locale file only — no code changed.

What's translated

  • All 167 UI strings (ui.exact 56, ui.sub 98, ui.rx 13) — every visible screen (device list, connect, flash, re-image, terminal/remote desktop, health check, update prompts).
  • backend is intentionally left empty so those messages fall back to English (the guide's recommended "partial file" shape); a later PR can translate them.
  • installer section skipped (optional per the guide).
  • rx entries keep pattern byte-identical to en.json; only replace is written. $1-style captures and the {{2}} recursion are preserved.

How I verified

  • python tools/i18n_check.py → bn.json: 167/300 translated, 0 error(s) (placeholder/pattern checks all pass).
  • Ran the real frontend translation engine (piscout/static/i18n.js) under Node with window.PISCOUT_LOCALES loaded from the actual locales directory and piscout_lang = bn, i.e. exactly what a Bengali browser does:
    • exact matches: 裝置 → ডিভাইস, SSH 未開 → SSH বন্ধ;
    • sub matches: 正在掃描區網… → নেটওয়ার্ক স্ক্যান হচ্ছে…, the file-drop hint, the update notice;
    • rx captures: scan line → · 12 টি ডিভাইস পাওয়া গেছে, এর মধ্যে 3 টি রাস্পবেরি পাই…, uptime → 2 দিন 5 ঘণ্টা 40 মিনিট, batch confirm → 4 টি ডিভাইসে «রিবুট» চালাবেন? — the {{2}} recursion even re-translated the captured action name 重新開機 through the exact table (রিবুট), so the engine round-trips my rules end to end.
  • One parity note, recorded rather than fixed (per the guide: no app-code changes in a locale PR): the wipe-confirm line 確定清除磁碟 3 並燒錄 comes out as 確定清除ডিস্ক 3 並燒錄 because the unanchored 磁碟 (\d+) rx rule fires before the anchored wipe rule — English shows the same artifact (確定清除Disk 3 並燒錄), verified by running the engine with en. The bn file behaves identically to en here; fixing the rule order in i18n.js would be a separate small code change if you want it.
  • Bengali numerals: I kept Latin digits for counts that come from $1 captures (device counts, disk numbers) since they mirror the live data, and used Bengali digits only in fixed prose (১০–৩০ মিনিট).
  • Not run: the GUI preview (PISCOUT_DEMO=1 python run_gui.py) — my dev host is headless, so I could not eyeball Devanagari/Bengali text fitting in buttons. The i18n checker and the real translation engine were the verification path; if any label clips on screen, tell me and I'll shorten that string.

File: piscout/static/locales/bn.json only.

Fixes MilkteaTW1#11

Co-authored-by: rahul05ranjan <11793455+rahul05ranjan@users.noreply.github.com>
Signed-off-by: Rahul Ranjan <rahulsingh.ranjan06@gmail.com>
@MilkteaTW1
MilkteaTW1 merged commit 10b7c16 into MilkteaTW1:main Oct 23, 2026
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.

Help wanted: add your language (no code needed)

2 participants