mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-27 09:46:25 +00:00
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
This commit is contained in:
parent
19ff7b9571
commit
268d180e3b
10
po/test-deps
10
po/test-deps
@ -20,6 +20,7 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
err = 0
|
err = 0
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -59,5 +60,12 @@ except ImportError:
|
|||||||
print("Error: missing dependency python cairo (python3-cairo)")
|
print("Error: missing dependency python cairo (python3-cairo)")
|
||||||
err = 1
|
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)
|
sys.exit(err)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user