]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
gnulib-tool.py: Fix sorting of the LINGUAS file.
authorCollin Funk <collin.funk1@gmail.com>
Thu, 11 Apr 2024 10:46:46 +0000 (12:46 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 11 Apr 2024 10:47:14 +0000 (12:47 +0200)
* pygnulib/GLImport.py (GLImport.execute): Sort the list of locales
before writing them into the LINGUAS file.

ChangeLog
pygnulib/GLImport.py

index 4504a32681591afc901e37c02eb05582a497fc94..91abe0f6e68e4c76e332b85b5bc5d7ff27a7f348 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-04-11  Collin Funk  <collin.funk1@gmail.com>
+
+       gnulib-tool.py: Fix sorting of the LINGUAS file.
+       * pygnulib/GLImport.py (GLImport.execute): Sort the list of locales
+       before writing them into the LINGUAS file.
+
 2024-04-10  Bruno Haible  <bruno@clisp.org>
 
        gnulib-tool.sh: Handle .gitignore files that do not end in a newline.
index fdca884a08de39b8a46d8bbd481dbdf6380f4e6b..46beb7e2a6deb9b944a528b61563ef73951fd995 100644 (file)
@@ -1199,9 +1199,9 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
             if not self.config['dryrun']:
                 tmpfile = self.assistant.tmpfilename(basename)
                 data = '# Set of available languages.\n'
-                files = [ constants.subend('.po', '', file)
-                          for file in os.listdir(joinpath(destdir, pobase))
-                          if file.endswith('.po') ]
+                files = sorted([ constants.subend('.po', '', file)
+                                 for file in os.listdir(joinpath(destdir, pobase))
+                                 if file.endswith('.po') ])
                 data += lines_to_multiline(files)
                 with codecs.open(tmpfile, 'wb', 'UTF-8') as file:
                     file.write(data)