diff --git a/README.md b/README.md index 12a7516..a0f7834 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ An open source UI for [OpenXLIFF Filters](https://github.com/rmraya/OpenXLIFF). Version | Comment | Release Date :------:|---------|:-----------: +6.2.0 | Improved localization handling | June 2nd, 2023 +6.1.0 | Updated OpenXLIFF Filters to version 3.7.0 | May 16th, 2023 6.0.0 | Added Spanish localization | April 1st, 2023 5.8.0 | Updated OpenXLIFF Filters to version 3.3.0 | February 22nd, 2023 5.7.0 | Updated OpenXLIFF Filters to version 3.1.0 | January 25th, 2023 diff --git a/jars/openxliff.jar b/jars/openxliff.jar index 4e99e26..9b8acbe 100644 Binary files a/jars/openxliff.jar and b/jars/openxliff.jar differ diff --git a/package.json b/package.json index d256902..e78e6c4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "xliffmanager", "productName": "XLIFF Manager", - "version": "6.1.0", + "version": "6.2.0", "description": "XLIFF Manager, a cross-platform open source graphical user interface for OpenXLIFF Filters", "main": "js/app.js", "scripts": { @@ -25,6 +25,6 @@ "url": "https://github.com/rmraya/XLIFFManager.git" }, "devDependencies": { - "electron": "^24.3.0" + "electron": "^25.0.1" } } diff --git a/src/com/maxprograms/server/Messages.java b/src/com/maxprograms/server/Messages.java index 563a89d..aec70a5 100644 --- a/src/com/maxprograms/server/Messages.java +++ b/src/com/maxprograms/server/Messages.java @@ -24,6 +24,7 @@ public class Messages { private static Properties props; private Messages() { + // do not instantiate this class } public static String getString(String key) { @@ -32,6 +33,9 @@ public static String getString(String key) { Locale locale = Locale.getDefault(); String extension = "en".equals(locale.getLanguage()) ? ".properties" : "_" + locale.getLanguage() + ".properties"; + if (Messages.class.getResource("server" + extension) == null) { + extension = ".properties"; + } try (InputStream is = Messages.class.getResourceAsStream("server" + extension)) { try (InputStreamReader reader = new InputStreamReader(is, StandardCharsets.UTF_8)) { props = new Properties(); @@ -40,7 +44,7 @@ public static String getString(String key) { } } return props.getProperty(key, '!' + key + '!'); - } catch (IOException e) { + } catch (IOException | NullPointerException e) { return '!' + key + '!'; } }