github tonikelope/megabasterd v8.48
MegaBasterd 8.48

5 hours ago

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 their setText(...) calls (added in the same NetBeans .form as 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 existing import_accounts_file value. No code change; the legacy English-literal -> key inversion path now resolves cleanly.

  • Settings -> SmartProxy: RANDOM / SEQUENTIAL ordering radios. The random_upper / sequential_upper keys already existed in every locale (with full translations like Casuale / Sequenziale, VÉLETLEN / SZEKVENCIÁLIS, etc.), but MiscTools.translateLabels -- the recursive component-tree walker that handles every translated label in the project -- had specific branches only for JLabel, JButton, JCheckBox, JMenuItem, JMenu. JRadioButton is its own widget type and was the only one not enumerated, so the proxy radios were silently skipped. Added an explicit instanceof JRadioButton case that mirrors the JButton/JCheckBox branches; these are the only two JRadioButton instances in the project so no other call site behavior changes.

  • Main window: DEBUG LOG tab title. The tab is built in code (in MainPanel, not in a .form file) so the form-walker never sees it. The addTab(...) call took the hard-coded literal "DEBUG LOG". Routed through I18n.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 a MessageFormat pattern ui.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_version finds a ~/.megabasterdX.Y directory 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 legacy LabelTranslatorSingleton.translate(...) shim works by inverting the English bundle to map literal -> key, but the concatenated string (with the interpolated old_version) was never present in any bundle, so the lookup missed and the message always rendered in English regardless of the active locale. Refactored to I18n.tr("older_version_import_prompt", old_version) with a MessageFormat {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_version previously 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.xml and MainPanel.VERSION.

Don't miss a new megabasterd release

NewReleases is sending notifications on new releases.