Hack added to work around dots in param names in bundle.properties
authorAlex Kirhenshtein <alk@netxms.org>
Sat, 1 Jun 2013 21:03:00 +0000 (21:03 +0000)
committerAlex Kirhenshtein <alk@netxms.org>
Sat, 1 Jun 2013 21:03:00 +0000 (21:03 +0000)
tools/sync_message_files.py

index 8c0bfb6..81d5c41 100755 (executable)
@@ -24,10 +24,12 @@ def processDirectory(directory, prefix):
     for locale in locales:
         translationFileName = os.path.join(directory, "%s_%s.properties" % (prefix, locale, ))
         translation = readPropertyFile(translationFileName)
-        filteredTranslation = {}
-        for e in translation.iteritems():
-            filteredTranslation[e[0].replace('.', '_')] = e[1]
-        translation = filteredTranslation
+        # hack
+        if prefix == 'messages':
+            filteredTranslation = {}
+            for e in translation.iteritems():
+                filteredTranslation[e[0].replace('.', '_')] = e[1]
+            translation = filteredTranslation
         for k in set(translation.keys()) - set(source.keys()):
             del translation[k]
         translation = dict(source.items() + translation.items())