]> WPIA git - gigi.git/blobdiff - util-testing/org/cacert/gigi/localisation/TranslationCollector.java
fix: pootle does not like translations in line number 0
[gigi.git] / util-testing / org / cacert / gigi / localisation / TranslationCollector.java
index 2b8ca7e71823e9e4216d0ce6f989f4d16478fdae..25a0e8d5d0292066969d6634f5c90d70ca698804 100644 (file)
@@ -89,6 +89,9 @@ public class TranslationCollector {
        }
 
        public void add(String text, String line) {
+           if(text.contains("\r") || text.contains("\n")){
+               throw new Error("Malformed translation in " + line);
+           }
                TranslationEntry i = translations.get(text);
                if (i == null) {
                        translations.put(text, new TranslationEntry(text, line));
@@ -221,7 +224,7 @@ public class TranslationCollector {
                                add(string,
                                                file.getAbsolutePath().substring(
                                                                base.getAbsolutePath().length() + 1)
-                                                               + ":0");
+                                                               + ":1");
                        }
                }
        }