Sort translations in desktop file

Desktop file generation is non-deterministic - translation positions may vary
across builds. This makes the build non-reproducible.

The cause is the use of glob() which collects qm file paths in a random order,
depending on the filesystem. To ensure the translations are written in a fixed
order the list returned by glob() must be sorted.
This commit is contained in:
Antoine Belvire 2019-10-12 14:24:40 +02:00 committed by Nyall Dawson
parent da818dd706
commit 33d0c3d654

View File

@ -57,7 +57,7 @@ except AttributeError:
app = QCoreApplication(argvb)
for qm in glob(sys.argv[1] + "/output/i18n/qgis_*.qm"):
for qm in sorted(glob(sys.argv[1] + "/output/i18n/qgis_*.qm")):
translator = QTranslator()
translator.load(qm)