aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2022-09-27 08:47:32 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2022-09-27 22:04:45 +0300
commitc8d5f93cb0b7ebc30aec637a9aeadbe5bc9934d6 (patch)
treef4cad6640b08291fdaaae1df5102b3aad1c2f4b2
parent195aae6a8413790210e081149a8f8b9ba494b94e (diff)
downloadmeson-c8d5f93cb0b7ebc30aec637a9aeadbe5bc9934d6.zip
meson-c8d5f93cb0b7ebc30aec637a9aeadbe5bc9934d6.tar.gz
meson-c8d5f93cb0b7ebc30aec637a9aeadbe5bc9934d6.tar.bz2
gnome/yelp: fix `xml:lang` attributes
itstool detects a language code from the mo file’s basename, so when https://github.com/mesonbuild/meson/commit/26c1869a142a952ffa23fe566a255b259304a39b changed the file name to be prefixed with project name, values like “my-project-xx” ended up in the `xml:lang` attribute of the generated page files, instead of the expected IETF BCP 47 language tag. Let’s fix it by passing a locale code to itstool explicitly.
-rw-r--r--mesonbuild/modules/gnome.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 037d2fa..499d279 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -1357,7 +1357,7 @@ class GnomeModule(ExtensionModule):
l_subdir,
state.subproject,
state.environment,
- [itstool, '-m', os.path.join(l_subdir, gmo_file), '-o', '@OUTDIR@', '@INPUT@'],
+ [itstool, '-m', os.path.join(l_subdir, gmo_file), '--lang', l, '-o', '@OUTDIR@', '@INPUT@'],
sources_files,
sources,
extra_depends=[gmotarget],