aboutsummaryrefslogtreecommitdiff
path: root/subsonic-main/src/test/java/net/sourceforge/subsonic/MissingTranslations.java
diff options
context:
space:
mode:
Diffstat (limited to 'subsonic-main/src/test/java/net/sourceforge/subsonic/MissingTranslations.java')
-rw-r--r--subsonic-main/src/test/java/net/sourceforge/subsonic/MissingTranslations.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/subsonic-main/src/test/java/net/sourceforge/subsonic/MissingTranslations.java b/subsonic-main/src/test/java/net/sourceforge/subsonic/MissingTranslations.java
new file mode 100644
index 00000000..cf3dbc6c
--- /dev/null
+++ b/subsonic-main/src/test/java/net/sourceforge/subsonic/MissingTranslations.java
@@ -0,0 +1,35 @@
+package net.sourceforge.subsonic;
+
+import java.io.*;
+import java.util.*;
+
+public class MissingTranslations {
+
+ public static void main(String[] args) throws IOException {
+ String[] locales = {"da", "de", "es", "pt", "fi", "fr", "is", "it", "ja_JP", "mk", "nl", "no", "pl", "ru", "sl", "sv", "zh_CN", "zh_TW"};
+
+ for (String locale : locales) {
+ diff(locale, "en");
+ }
+ }
+
+ private static void diff(String locale1, String locale2) throws IOException {
+ Properties en = new Properties();
+ en.load(MissingTranslations.class.getResourceAsStream("/net/sourceforge/subsonic/i18n/ResourceBundle_" + locale1 + ".properties"));
+ SortedMap<Object,Object> enSorted = new TreeMap<Object, Object>(en);
+
+ Properties mk = new Properties();
+ mk.load(MissingTranslations.class.getResourceAsStream("/net/sourceforge/subsonic/i18n/ResourceBundle_" + locale2 + ".properties"));
+
+ System.out.println("\nMessages present in locale " + locale1 + " and missing in locale " + locale2 + ":");
+ int count = 0;
+ for (Map.Entry<Object, Object> entry : enSorted.entrySet()) {
+ if (!mk.containsKey(entry.getKey())) {
+ System.out.println(entry.getKey() + " = " + entry.getValue());
+ count++;
+ }
+ }
+
+ System.out.println("\nTotal: " + count);
+ }
+}