Merge pull request #234 from hide-me/develop

"Ignore" feature for translations
This commit is contained in:
trendschau 2020-11-03 20:27:13 +01:00 committed by GitHub
commit da1f3aa96d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -1,4 +1,4 @@
# Italian (Italiano)
# Italian (Italiano) pls ignore autoupdates
# Author: Severo Iuliano (https://github.com/iusvar)
ACCOUNT: Utenza
ACTIVE: Attivo

View file

@ -24,6 +24,8 @@ if __name__ == '__main__':
key = [t.split(': ', 1)[0] for t in data]
for i in lang_codes[1:]: # all lang codes except en, because en used like template
any_header = f_open(i).split('\n')
if 'ignore' in any_header[0].lower(): # first string in file may contain ignore keyword
continue
any_data = any_header[2:]
any_header = any_header[:2]
any_key = [t.split(': ', 1)[0] for t in any_data]