contrib/locale/push_locale: do not sort source-strings
What changed, and why it matters
This commit removes a sorting option from a script that prepares translation files. It changes how translation source strings are ordered to make life easier for human translators. There is no security relevance.
No security action needed. This is a routine developer-experience improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch removes the -s/--sort-output flag from the xgettext invocation in contrib/locale/push_locale.py. The resulting .pot/.po files will now list source strings in the order they appear in the codebase rather than lexicographically. This is a workflow/usability change for translators and has no effect on application behavior, attack surface, or generated binaries.
Changed components
contrib/locale/push_locale.pyInspect captured patch +2 / −1
diff --git a/contrib/locale/push_locale.py b/contrib/locale/push_locale.py
index b54c3a0..aeb038f 100755
--- a/contrib/locale/push_locale.py
+++ b/contrib/locale/push_locale.py
@@ -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
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.