TL;DR
- Fixes #767 -- untranslated strings in non-English locales. Five UI elements that bypassed the i18n bundle are now routed through it: the EXPORT ACCOUNTS (FILE) / EXPORT ELC (FILE) buttons in Settings -> Account, the RANDOM / SEQUENTIAL SmartProxy ordering radios, the DEBUG LOG tab in the main window, the JVM-RAM used: ... status-bar line, and the "older configuration version detected" popup that runs on first launch after an upgrade.
- 5 new bundle keys added to every
messages*.properties:export_accounts_file,export_elc_file,ui.tab.debug_log,ui.statusbar.jvm_ram,older_version_import_prompt. EN/ES/IT hand-authored; DE/HU/TR/VI/ZH translated in the same style as the v8.37 refactor, refinable by native speakers via #397.
New in 8.48
#767 -- Untranslated strings fix
-
Settings -> Account:
EXPORT ACCOUNTS (FILE)/EXPORT ELC (FILE)buttons. The JButtons already had English literals in theirsetText(...)calls (added in the same NetBeans.formas the sibling Import accounts (file) button), but there were no matching keys in the bundles -- so the form-walker (MiscTools.translateLabels) inverted the English bundle, found no entry, and rendered the literal verbatim. Fix is two new keys per locale (export_accounts_file,export_elc_file) mirroring the existingimport_accounts_filevalue. No code change; the legacy English-literal -> key inversion path now resolves cleanly. -
Settings -> SmartProxy:
RANDOM/SEQUENTIALordering radios. Therandom_upper/sequential_upperkeys already existed in every locale (with full translations like Casuale / Sequenziale, VÉLETLEN / SZEKVENCIÁLIS, etc.), butMiscTools.translateLabels-- the recursive component-tree walker that handles every translated label in the project -- had specific branches only forJLabel,JButton,JCheckBox,JMenuItem,JMenu.JRadioButtonis its own widget type and was the only one not enumerated, so the proxy radios were silently skipped. Added an explicitinstanceof JRadioButtoncase that mirrors the JButton/JCheckBox branches; these are the only twoJRadioButtoninstances in the project so no other call site behavior changes. -
Main window:
DEBUG LOGtab title. The tab is built in code (inMainPanel, not in a.formfile) so the form-walker never sees it. TheaddTab(...)call took the hard-coded literal"DEBUG LOG". Routed throughI18n.tr("ui.tab.debug_log")with a new key per locale (FEHLERPROTOKOLL / HIBANAPLÓ / HATA AYIKLAMA GÜNLÜĞÜ / 调试日志 / NHẬT KÝ GỠ LỖI / kept as DEBUG LOG in EN/ES/IT where the term is widely used as-is). -
Status bar:
JVM-RAM used: X.X MB / Y.Y GB. The string was concatenated in Java with the literal"JVM-RAM used: "glued to the formatted byte values. Replaced with aMessageFormatpatternui.statusbar.jvm_ram=JVM-RAM used: {0} / {1}(per locale: utilizzata / en uso / belegt / Használt / Kullanılan / 已用 / đã dùng). The unit format and ordering are preserved across all locales -- only the surrounding label changes. -
Older-version-detected popup. Triggered when
_check_old_versionfinds a~/.megabasterdX.Ydirectory whose version is older than the current one. The popup text was built by string concatenation:translate("An older version (" + old_version + ") of MegaBasterd has been detected.\n... WARNING: ..."). The legacyLabelTranslatorSingleton.translate(...)shim works by inverting the English bundle to map literal -> key, but the concatenated string (with the interpolatedold_version) was never present in any bundle, so the lookup missed and the message always rendered in English regardless of the active locale. Refactored toI18n.tr("older_version_import_prompt", old_version)with aMessageFormat{0}placeholder; the pattern lives in every locale bundle and the version is substituted at format time.
i18n
Five new keys added to every messages*.properties bundle: export_accounts_file, export_elc_file, ui.tab.debug_log, ui.statusbar.jvm_ram, older_version_import_prompt. EN / ES / IT are hand-authored. DE / HU / TR / VI / ZH translated in the same style as the v8.37 refactor (intended as a working baseline for native-speaker refinement via #397).
Implementation note for translators: the Turkish older_version_import_prompt value uses a doubled apostrophe (MegaBasterd''ın) because the entry is consumed by MessageFormat (it has a {0} placeholder) and MessageFormat treats single quotes as escape characters -- '' is the literal-apostrophe spelling. The other Turkish strings that contain apostrophes are not MessageFormat patterns and don't need to be doubled.
Other
_check_old_versionpreviously also used the legacy shim for the Restart required / MegaBasterd will restart second popup. Those already work correctly because the matching keys (restart_required,megabasterd_will_restart) exist in every locale with the English literal as the value, so the shim's inversion hits them. No change required there; left as-is.- Version bumped to 8.48 in
pom.xmlandMainPanel.VERSION.