contrib/locale/push_locale: do not sort source-strings

xgettext and related tools have a -s/--sort-output option, which results in the output being lexicographically sorted. The gettext maintainers recommend against using this option and even started deprecating it in some of their tools (xgettext included):
- with -s, source strings are lexicographically sorted in the .pot/.po files
- without -s, source string are output in the same order they are found in the code
  - this way, translators have to do much fewer context switches when contributing translations

note that the qml part we have already *not* been sorting
This commit is contained in:
SomberNight
2026-02-19 16:25:22 +00:00
parent cf25990973
commit 6c1e085937
+2 -1
View File
@@ -60,7 +60,8 @@ print("Found {} .py files to translate".format(len(files_list)))
# Generate fresh translation template
print('Generating template...')
cmd = ["xgettext", "-s", "--from-code", "UTF-8", "--language", "Python", "--no-wrap", "-f", f"{build_dir}/app.fil", f"--output={build_dir}/messages_gettext.pot"]
# note: do not use xgettext option "--sort-output", as that makes human translators have to context-switch all the time
cmd = ["xgettext", "--from-code", "UTF-8", "--language", "Python", "--no-wrap", "-f", f"{build_dir}/app.fil", f"--output={build_dir}/messages_gettext.pot"]
subprocess.check_output(cmd)
# add QML translations