mirror of https://github.com/GNOME/gimp.git
po-windows-installer: fix double escaped ampersand in XML for the…
… Windows installer localization. There are kind of 2 separate bugs here: - Direct i18n.gettext() to the proper data directory where to find the ITS file. Otherwise `meson compile gimp30-windows-installer-pot` and `meson compile gimp30-windows-installer-update-po` complained about not knowing XML and falling back to C, which is obviously a problem: > /usr/bin/xgettext: warning: file 'build/windows/installer/lang/setup.isl.xml.in' extension 'xml' is unknown; will try C - Set gt:escapeRule to "no" in the ITS file, otherwise the XML entity is kept as-is in the po file (i.e. "&" stays "&" inside the po files), but it's considered as raw text when merged back to XML, i.e. that the '&' is properly converted to a XML entity, so we end up with a double escape "&". Now the po file will have a '&' which will still be converted to XML entity at merge time. This is actually most likely better than asking translators to handle XML entities themselves (with the possibility to make typos and break the XML entity). See https://savannah.gnu.org/bugs/?58643
This commit is contained in:
parent
02739dd6e6
commit
7375116d46
|
@ -3,4 +3,5 @@
|
||||||
xmlns:gt="https://www.gnu.org/s/gettext/ns/its/extensions/1.0">
|
xmlns:gt="https://www.gnu.org/s/gettext/ns/its/extensions/1.0">
|
||||||
<its:translateRule selector="/gimp-ms-installer-config" translate="no"/>
|
<its:translateRule selector="/gimp-ms-installer-config" translate="no"/>
|
||||||
<its:translateRule selector="//value" translate="yes"/>
|
<its:translateRule selector="//value" translate="yes"/>
|
||||||
|
<gt:escapeRule selector="//value" escape="no"/>
|
||||||
</its:rules>
|
</its:rules>
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
po_windows_installer_dir = meson.current_source_dir()
|
po_windows_installer_dir = meson.current_source_dir()
|
||||||
i18n.gettext(gettext_package + '-windows-installer', preset: 'glib', install: false)
|
i18n.gettext(gettext_package + '-windows-installer', preset: 'glib', install: false,
|
||||||
|
data_dirs: meson.source_root() / 'build' / 'windows' / 'installer' / 'lang')
|
||||||
|
|
Loading…
Reference in New Issue