TL;DR
- Fixes #770 -- translation polish + UX wrinkles in the Settings dialog reported against 8.48. Three more strings that bypassed the i18n bundle are now routed through it (
Always reload MEGA folders instead of using cached folder data,Default download directory,Java properties (UTF-8) (*.properties)), the ELC accounts table column headers (Host/User/API-KEY) are localised, the SmartProxy WARNING JLabel now honours\nin translations (Italian had\n\nsince the v8.46 refactor but the label rendered it as a literal), and the external-translation-file picker (#766) opens at the MegaBasterd jar location with a roomier default size. - 3 new bundle keys added to every
messages*.properties:always_reload_mega_folders,default_download_directory,java_properties_utf_8_filter. EN/ES/IT hand-authored; DE/HU/TR/VI/ZH machine-baseline, refinable by native speakers via #397. - Filled in missing ES/DE/VI/ZH translations for the existing
user/api_keybundle keys, which had been carrying English literals -- so the new ELC header routing actually surfaces translated text outside IT/HU/TR. (Skipped the 8.49 release tag; the build that surfaced this gap was never useful in isolation.)
New in 8.50
#770 -- Translation polish in Settings
-
Always reload MEGA folders instead of using cached folder datacheckbox (Downloads tab). The checkbox text was set via.form-generatedinitComponentsbut had no matching key in any bundle, soMiscTools.translateLabelsinverted the English bundle, found no entry, and rendered the literal verbatim in every locale. Fix is a single new keyalways_reload_mega_foldersper bundle; no code change required. -
Default download directoryJFileChooser title (Downloads tab ->Set folderbutton). The dialog title was passed as a raw English literal tosetDialogTitle(...). Wrapped the call site inLabelTranslatorSingleton.getInstance().translate(...)so the newdefault_download_directorybundle key resolves at open time. -
Java properties (UTF-8) (*.properties)file-filter description (Advanced tab ->Browsefor the external-translation file picker shipped in #766). The filter description was a raw English literal in theFileNameExtensionFilterconstructor. Same fix as above -- wrapped in the legacytranslate(...)shim with a newjava_properties_utf_8_filterbundle key per locale. -
ELC accounts table column headers
Host/User/API-KEY(Account tab, bottom table).MiscTools.translateLabelsis the recursive component-tree walker that handles every translated label in the project, but it only enumeratesJLabel,JButton,JCheckBox,JRadioButton,JMenuItem,JMenu(the JRadioButton case was added in 8.48 for #767).JTablecolumn headers live inTableColumnModeland are not visited at all, so the headers shipped in raw English. Added a smalltranslateAccountTableHeaders()helper that walks the ELC table's column model and routes each header throughLabelTranslatorSingleton.translate(...). Called once from the constructor (aftertranslateLabels(this)) and from bothsetModel(...)rebuilds (the master-pass unlock flow and the Delete all accounts flow). The two rebuild branches were also resetting the third header to"API KEY"with a space; aligned them with the form-defined"API-KEY"so the translation lookup succeeds in all three code paths. MEGA columns (Email/Password) are skipped: both terms render verbatim across every active bundle today, and the existingpasswordkey carries a trailing colon used by a different label, so routing"Password"through the inverter would no-op anyway.Sub-fix: the existing
user/api_keybundle keys had been carrying raw English literals ("User","API-KEY") as their values inmessages_es,messages_de,messages_vi, and (forapi_keyonly)messages_zh-- a copy-paste baseline from the original i18n refactor that had no visible consequence until the new header routing started consuming the keys. Filled them in with proper localised text: ESUsuario/Clave API, DEBenutzer/API-Schlüssel, VINgười dùng/Khóa API, ZHAPI 密钥. IT, HU, TR were already complete. -
SmartProxy WARNING JLabel
\nsupport. The Italian translation ofwarning_using_proxies_or_vpn_to_bypass_mega_s_dailyhas had\n\nin it since v8.46 to break the long "WARNING: Using proxies or VPN..." paragraph into two lines, butJLabelonly renders newlines when the text is HTML-wrapped -- so the Italian (and the Chinese, which inherited a\n\n-using value, though its current value is a stale paste from a different key and is a separate cleanup task) rendered the\nas a literal and the label overflowed horizontally off the dialog. Re-emitted the translated WARNING wrapped in<html>...</html>with literal\nconverted to<br>immediately aftertranslateLabels(smart_proxy_settings)runs. Translators in any locale can now add\nto their bundle value to break the WARNING into multiple lines.
#770 -- External-translation-file picker UX
-
Default starting path = MegaBasterd jar directory. When the
ext_lang_path_fieldis empty (no override is currently configured), the JFileChooser opened byext_lang_browse_buttonnow opens at the parent of the running jar viaMiscTools.getCurrentJarParentPath(). Translators typically dropmessages_xx.propertiesnext to the jar, so this saves several scroll/click steps versus the JVM default (user home). Falls back to the JFileChooser default if the jar location cannot be resolved (e.g. running from an unpacked classpath). -
Larger default JFileChooser size. Set
setPreferredSize(900, 600)on the picker so deep directory trees need less scrolling. Same dialog as above (Advanced tab -> external translation file Browse).
i18n
Three new keys added to every messages*.properties bundle: always_reload_mega_folders, default_download_directory, java_properties_utf_8_filter. EN / ES / IT are hand-authored. DE / HU / TR / VI / ZH translated in the same style as the v8.37/v8.48 refactors (intended as a working baseline for native-speaker refinement via #397).
The two new ELC headers (User, API-KEY) and the SmartProxy WARNING reuse the existing keys (user, api_key, warning_using_proxies_or_vpn_to_bypass_mega_s_daily) which were already present in every bundle; only the call sites changed (and the four values noted above were filled in).
Other
- Version bumped to 8.50 in
pom.xmlandMainPanel.VERSION.