github tonikelope/megabasterd v8.47
MegaBasterd 8.47

7 hours ago

TL;DR

  • Implements #766 -- translators can now load an external .properties file from disk and have its entries override the embedded translation bundle, with no rebuild. Settings -> Advanced now exposes a new "External translation file:" row (path field + Browse + Clear) right under the Language combo. Changes take effect on restart, exactly like the existing language switch.
  • i18n: 5 new bundle keys (browse_dots, clear, external_translation_file, external_translation_file_tooltip, select_translation_file) in every locale. EN/ES/IT are hand-authored; DE/HU/TR/VI/ZH are translation-tool seeds, refinable via #397.
  • Includes bovirus' Italian bundle polish from PR #761 (rebased on top, no conflicts in the user-facing strings).

New in 8.47

#766 -- External translation file override

  • I18n.setExternalLanguageFile(Path) adds a second ResourceBundle above the locale bundle. When an override is loaded, I18n.tr(key) consults it first; missing keys cascade to the active locale bundle, then to the English root, then return the key itself. The override survives setLocale() calls -- a translator can switch UI languages without dropping their work-in-progress override. null, a non-existing path, or any IOException collapse to "no override" with a WARNING log so the app never breaks on a typo'd path. Volatile field + synchronized setter; safe to call from any thread.

  • MainPanel.loadUserSettings reads external_language_file from the SQLite settings store at startup. Empty / whitespace-only values are treated as "no override". The file is reloaded on every restart, so editing the .properties file -> restarting is the iteration loop.

  • SettingsDialog.jPanel2 gets a new control row under the Language combo. Label + read-only JTextField showing the absolute path, "Browse..." button (opens a JFileChooser filtered to *.properties, pre-selects the current value if the file still exists), and "Clear" to drop the override entirely. Hooked into the same restart-required check that already covers font/language/zoom/dark-mode, so saving with a changed override path shows the existing "MegaBasterd will restart" dialog.

  • How a translator uses it. Edit messages_<locale>.properties (e.g. messages_it.properties) in a local checkout or download a single .properties file from the repo, point the Settings field at it, restart MegaBasterd. Whatever's in the file replaces the same key inside the embedded bundle of the currently-selected UI language. Entries can be a full bundle copy or just the handful of keys being iterated on -- everything else falls through to the embedded translation. The file is UTF-8 (no \uXXXX escaping needed).

  • LabelTranslatorSingleton.translate("English literal") keeps working transparently. The legacy shim already inverts the English bundle to map "English literal" -> key and then calls I18n.tr(key), so the form-walker (MiscTools.translateLabels) and ~2,140 historical call sites pick up the override "for free" -- no edits required at the NetBeans form level.

i18n

Five new keys in every bundle: browse_dots, clear, external_translation_file, external_translation_file_tooltip, select_translation_file. EN/ES/IT are hand-authored; DE/HU/TR/VI/ZH are translation-tool seeds in the same style as the v8.37 refactor (intended as a working baseline for native-speaker refinement via #397).

Other

  • PR #761 (@bovirus): Italian bundle rewording pass. Title-case normalization, "link" -> "collegamento", a handful of wording polishes throughout. Rebased on top of the #766 work; the only overlap (clear_finished) kept the new wording.
  • Version bumped to 8.47 in pom.xml and MainPanel.VERSION.

Don't miss a new megabasterd release

NewReleases is sending notifications on new releases.