Commits

Ivo Hinkelmann  committed ed90f92

txtl10n: #i113008# #i113125# skip on empty string

  • Participants
  • Parent commits 223d842

Comments (0)

Files changed (1)

File l10ntools/scripts/tool/xtxex.py

         # escape all returns
         lines = [line.replace('\n', "\\n") for line in lines]
         line = ''.join(lines)
-        sdf_entity = self.prepare_sdf_line(inputfile);
-        sdf_entity.text = line
-        return str(sdf_entity)
-    
+        test = str(line)
+        if len(test.strip()):
+            sdf_entity = self.prepare_sdf_line(inputfile);
+            sdf_entity.text = line
+            return str(sdf_entity)
+        else:
+            return ""
+
     def prepare_sdf_line(self, inputfile="", lang=""):
         if lang == "":
             lang = self._source_language