Commits

Diego Búrigo Zacarão committed 5107eff

minor: Made sort_id seeing filename case no language_code

Comments (0)

Files changed (1)

transifex/translations/models.py

             'file': self.filename,
             'type': self.content_type,
             'obj': self.object,}
+
     @property
     def sort_id(self):
         if self.language:
             return self.language.name.lower()
+        elif self.language_code:
+            return self.language_code.lower()
         else:
-            return self.language_code.lower()
+            # In case no language was found to the POFile
+            return self.filename.lower()
 
     @property
     def lang_or_code(self):