From 268d180e3b494df99dfa87b60873abcc5c5c77cc Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Mon, 4 Sep 2017 21:20:10 -0500 Subject: [PATCH] Test for missing language translations at build time This will help fix prevent issues such as https://github.com/hughsie/fwupd/pull/216 happening at release time --- po/test-deps | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/po/test-deps b/po/test-deps index 71b5bce23..b7dd1600d 100755 --- a/po/test-deps +++ b/po/test-deps @@ -20,6 +20,7 @@ """ import sys +import os err = 0 try: @@ -59,5 +60,12 @@ except ImportError: print("Error: missing dependency python cairo (python3-cairo)") err = 1 +with open('po/LINGUAS') as f: + langs = f.read().splitlines() +for root, dirs, files in os.walk('po'): + for file in files: + l = file.split('.po') + if len(l) > 1 and not l[0] in langs: + err = 1 + print("Error: missing translations for %s" % l[0]) sys.exit(err) -