Browse Source

lang: Do not check/build obsolete translation entries

Yuri D'Elia 2 years ago
parent
commit
671cd70af7
2 changed files with 6 additions and 0 deletions
  1. 2 0
      lang/lang-build.py
  2. 4 0
      lang/lang-check.py

+ 2 - 0
lang/lang-build.py

@@ -68,6 +68,8 @@ def main():
     # build a catalog of all translations
     trans_table = {}
     for translation in po:
+        if translation.obsolete:
+            continue
         msgid = translation.msgid
         found = msgid in msgid_data
         if found:

+ 4 - 0
lang/lang-check.py

@@ -121,6 +121,10 @@ def ign_char_last(c):
 def check_translation(entry, msgids, is_pot, no_warning, no_suggest, warn_empty, warn_same, information):
     """Check strings to display definition."""
 
+    # do not check obsolete/deleted entriees
+    if entry.obsolete:
+        return True
+
     # fetch/decode entry for easy access
     meta = entry.comment.split('\n', 1)[0]
     source = entry.msgid