]> git.lyx.org Git - features.git/commitdiff
Get rid of pseudo diffs when remerging strings
authorGeorg Baum <baum@lyx.org>
Sat, 4 Jun 2016 17:21:06 +0000 (19:21 +0200)
committerGeorg Baum <baum@lyx.org>
Sat, 4 Jun 2016 17:21:06 +0000 (19:21 +0200)
cmake sorts the input files for lyx_pot.py internally, but autotools use a
shell pattern like *.ui on the command line, so the order may be different
on different machines. It is more robust not to require any sorting from the
caller, so lyx_pot.py sorts now internally.

po/lyx_pot.py

index 500185fdba6a38a5f3c49bf74c4226c117d67dc4..783d13fefbb24ec1be53e226f0d9abce219586a5 100755 (executable)
@@ -651,6 +651,13 @@ if __name__ == '__main__':
 
     input_files += args
 
+    # Ensure a unique sorting of input files and ignore the order in which they
+    # are given on the command line. This is important to avoid huge
+    # pseudo-diffs in the generated .pot file which would then end up in the
+    # .po files as well. We had this situation for years with people using
+    # different build systems to remerge .po files.
+    input_files.sort()
+
     if input_type == 'ui':
         ui_l10n(input_files, output, base)
     elif input_type == 'latexfonts':