Fix .policy file translation failure in Alpine Linux CI image (!107)
In the Alpine Linux 3.16 CI build job, file org.gnome.gparted.policy is not translated with this warning: $ make -j $nproc ... /usr/bin/xgettext: warning: a fallback ITS rule file '/usr/share/gettext-0.21/its/metainfo.its' is used; it may not be in sync with the upstream /usr/bin/xgettext: warning: file 'org.gnome.gparted.policy.in.in' extension 'policy' is unknown; will try C In my Alpine Linux 3.15 VM building GParted fails like this: $ make ... make[2]: Entering directory '/home/alpine/programming/c/gparted' sed -e 's,[@]libexecdir[@],/usr/local/libexec,g' -e 's,[@]bindir[@],/usr/local/bin,g' -e 's,[@]gksuprog[@],pkexec --disable-internal-agent,g' -e 's,[@]enable_xhost_root[@],no,g' < ./org.gnome.gparted.policy.in.in > org.gnome.gparted.policy.in /usr/bin/msgfmt --xml --template org.gnome.gparted.policy.in -d ./po -o org.gnome.gparted.policy /usr/bin/msgfmt: cannot locate ITS rules for org.gnome.gparted.policy.in make[2]: *** [Makefile:1059: org.gnome.gparted.policy] Error 1 make[2]: Leaving directory '/home/alpine/programming/c/gparted' make[1]: *** [Makefile:617: all-recursive] Error 1 make[1]: Leaving directory '/home/alpine/programming/c/gparted' make: *** [Makefile:451: all] Error 2 This is because gettext's msgfmt doesn't have rules for what elements to translate in .policy XML files. Add polkit-dev package to Alpine Linux CI image to provide these files: /usr/share/gettext/its/policy.its /usr/share/gettext/its/policy.loc Now the .policy file is translated successfully: $ make ... make[2]: Entering directory '/home/alpine/programming/c/gparted' /usr/bin/msgfmt --xml --template org.gnome.gparted.policy.in -d ./po -o org.gnome.gparted.policy make[2]: Leaving directory '/home/alpine/programming/c/gparted' Closes !107 - Migrate from intltool to gettext translation
This commit is contained in:
parent
d90be4e36b
commit
57ae8f888b
|
@ -10,7 +10,7 @@ stages:
|
|||
- cat /etc/os-release
|
||||
- apk update
|
||||
- apk add gnome-common yelp-tools automake autoconf glib-dev intltool
|
||||
libtool g++ parted-dev gtkmm3-dev itstool make git
|
||||
libtool g++ parted-dev gtkmm3-dev itstool make git polkit-dev
|
||||
# Extra packages only needed during the test stage.
|
||||
- apk add btrfs-progs btrfs-progs-extra e2fsprogs e2fsprogs-extra exfatprogs
|
||||
dosfstools mtools f2fs-tools jfsutils cryptsetup lvm2 udftools
|
||||
|
|
Loading…
Reference in New Issue