Remove the autogenerated headers in the gettext files

These change every release as we're importing from Transifex. They're not
required, so strip them out using a small python script.
This commit is contained in:
Richard Hughes 2019-02-01 14:25:02 +00:00
parent 0a26551bf3
commit 7ccba7afba
32 changed files with 51 additions and 93 deletions

View File

@ -11,9 +11,7 @@ Update translations:
ninja-build fwupd-pot
tx push --source
tx pull --all --force --minimum-perc=5
for f in ../po/*.po; do
msgattrib --no-location --translated --no-wrap --sort-output $f --output-file=$f
done
../contrib/fix_translations.py ../po
git add ../po/*.po
2. Commit changes to git:

50
contrib/fix_translations.py Executable file
View File

@ -0,0 +1,50 @@
#!/usr/bin/python3
# SPDX-License-Identifier: LGPL-2.1+
import sys
import os
import subprocess
def _do_msgattrib(fn):
argv = ['msgattrib',
'--no-location',
'--translated',
'--no-wrap',
'--sort-output',
fn,
'--output-file=' + fn]
ret = subprocess.run(argv)
if ret.returncode != 0:
return
def _do_nukeheader(fn):
clean_lines = []
with open(fn) as f:
lines = f.readlines()
for line in lines:
if line.startswith('"POT-Creation-Date:'):
continue
if line.startswith('"PO-Revision-Date:'):
continue
if line.startswith('"Last-Translator:'):
continue
clean_lines.append(line)
with open(fn, 'w') as f:
f.writelines(clean_lines)
def _process_file(fn):
_do_msgattrib(fn)
_do_nukeheader(fn)
if __name__ == '__main__':
if len(sys.argv) == 1:
print('path required')
sys.exit(1)
try:
dirname = sys.argv[1]
for fn in os.listdir(dirname):
if fn.endswith('.po'):
_process_file(os.path.join(dirname, fn))
except NotADirectoryError as _:
print('path required')
sys.exit(2)

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Asturian (http://www.transifex.com/freedesktop/fwupd/language/ast/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -9,9 +9,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-29 15:25+0000\n"
"Last-Translator: Antoni Bella Pérez <antonibella5@yahoo.com>\n"
"Language-Team: Catalan (http://www.transifex.com/freedesktop/fwupd/language/ca/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -10,9 +10,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Czech (http://www.transifex.com/freedesktop/fwupd/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -10,9 +10,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: German (http://www.transifex.com/freedesktop/fwupd/language/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: English (United Kingdom) (http://www.transifex.com/freedesktop/fwupd/language/en_GB/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-06-06 14:54+0100\n"
"PO-Revision-Date: 2018-06-06 14:00+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Basque (http://www.transifex.com/freedesktop/fwupd/language/eu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Finnish (http://www.transifex.com/freedesktop/fwupd/language/fi/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: French (http://www.transifex.com/freedesktop/fwupd/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Friulian (http://www.transifex.com/freedesktop/fwupd/language/fur/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -9,9 +9,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Hebrew (http://www.transifex.com/freedesktop/fwupd/language/he/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Hindi (http://www.transifex.com/freedesktop/fwupd/language/hi/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -10,9 +10,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Croatian (http://www.transifex.com/freedesktop/fwupd/language/hr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -11,9 +11,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-12-16 19:43+0000\n"
"Last-Translator: Balázs Meskó <meskobalazs@gmail.com>\n"
"Language-Team: Hungarian (http://www.transifex.com/freedesktop/fwupd/language/hu/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Indonesian (http://www.transifex.com/freedesktop/fwupd/language/id/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -9,9 +9,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Italian (http://www.transifex.com/freedesktop/fwupd/language/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-01 14:26+0100\n"
"PO-Revision-Date: 2017-09-01 13:27+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Kazakh (http://www.transifex.com/freedesktop/fwupd/language/kk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -9,9 +9,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Korean (http://www.transifex.com/freedesktop/fwupd/language/ko/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-11-07 11:16+0000\n"
"PO-Revision-Date: 2018-10-12 11:10+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Kyrgyz (http://www.transifex.com/freedesktop/fwupd/language/ky/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Dutch (http://www.transifex.com/freedesktop/fwupd/language/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -9,9 +9,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Occitan (post 1500) (http://www.transifex.com/freedesktop/fwupd/language/oc/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Polish (http://www.transifex.com/freedesktop/fwupd/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -12,9 +12,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-12-05 22:10+0000\n"
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>\n"
"Language-Team: Portuguese (Brazil) (http://www.transifex.com/freedesktop/fwupd/language/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -9,9 +9,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Russian (http://www.transifex.com/freedesktop/fwupd/language/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Slovak (http://www.transifex.com/freedesktop/fwupd/language/sk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -10,9 +10,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Serbian (http://www.transifex.com/freedesktop/fwupd/language/sr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -12,9 +12,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Swedish (http://www.transifex.com/freedesktop/fwupd/language/sv/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Turkish (http://www.transifex.com/freedesktop/fwupd/language/tr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Ukrainian (http://www.transifex.com/freedesktop/fwupd/language/uk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -12,9 +12,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Chinese (China) (http://www.transifex.com/freedesktop/fwupd/language/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -8,9 +8,6 @@ msgid ""
msgstr ""
"Project-Id-Version: fwupd\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-30 15:16+0000\n"
"PO-Revision-Date: 2018-11-28 13:44+0000\n"
"Last-Translator: Richard Hughes <richard@hughsie.com>\n"
"Language-Team: Chinese (Taiwan) (http://www.transifex.com/freedesktop/fwupd/language/zh_TW/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"