SVGHMI: i18n: prevent creating messages.pot if no translation svghmi
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Sun, 14 Feb 2021 05:29:51 +0100
branchsvghmi
changeset 3140 cae53fe54cf2
parent 3139 1f5ca646ce6e
child 3141 6d4c1e6560ac
SVGHMI: i18n: prevent creating messages.pot if no translation
svghmi/svghmi.py
--- a/svghmi/svghmi.py	Sun Feb 14 05:22:30 2021 +0100
+++ b/svghmi/svghmi.py	Sun Feb 14 05:29:51 2021 +0100
@@ -532,6 +532,9 @@
     def GetTranslations(self, _context, msgs):
         messages = EtreeToMessages(msgs)
 
+        if len(messages) == 0:
+            return
+
         SaveCatalog(self._getPOTpath(), messages)
 
         translations = ReadTranslations(self.CTNPath())