Repository navigation
Add Bengali (bn) locale: UI strings translated - #15
Merged
Merged
Conversation
Fixes MilkteaTW1#11 Co-authored-by: rahul05ranjan <11793455+rahul05ranjan@users.noreply.github.com> Signed-off-by: Rahul Ranjan <rahulsingh.ranjan06@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11
Adds a Bengali locale:
piscout/static/locales/bn.json, locale file only — no code changed.What's translated
ui.exact56,ui.sub98,ui.rx13) — every visible screen (device list, connect, flash, re-image, terminal/remote desktop, health check, update prompts).backendis intentionally left empty so those messages fall back to English (the guide's recommended "partial file" shape); a later PR can translate them.installersection skipped (optional per the guide).rxentries keeppatternbyte-identical toen.json; onlyreplaceis 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).piscout/static/i18n.js) under Node withwindow.PISCOUT_LOCALESloaded from the actual locales directory andpiscout_lang = bn, i.e. exactly what a Bengali browser does:裝置→ডিভাইস,SSH 未開→SSH বন্ধ;正在掃描區網…→নেটওয়ার্ক স্ক্যান হচ্ছে…, the file-drop hint, the update notice;· 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.確定清除磁碟 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 withen. The bn file behaves identically to en here; fixing the rule order ini18n.jswould be a separate small code change if you want it.$1captures (device counts, disk numbers) since they mirror the live data, and used Bengali digits only in fixed prose (১০–৩০ মিনিট).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.jsononly.