]> git.koha-community.org Git - koha.git/commit
Bug 25257: Preserve prolog on translated XML files
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Thu, 5 Dec 2019 00:51:16 +0000 (21:51 -0300)
committerJoy Nelson <joy@bywatersolutions.com>
Fri, 8 May 2020 20:33:57 +0000 (20:33 +0000)
commit0d5d14935aa6749ff02ac885e3b3697a3a08f29f
treeac184efbfb87baba8d52b3ebd65675a80e4a0cc4
parentab5c115d088665b41d3ae03b57fb801f1a63aca3
Bug 25257: Preserve prolog on translated XML files

This patch fix the missing xml prolog in translated
files, XML or TT.

Is fixed teaching C4::TTParse not to ignore <?..?> constructs,
then teaching xgettext.pl to ignore those strings. Net result is
that they are copied in the translated file.

To test:
1) Update & install your preferred language,
(cd misc/translator/; perl translate update xx-YY; perl translate install xx-YY )

2) Compare the first lines (head -2) of:
koha-tmpl/opac-tmpl/bootstrap/en/xslt/compact.xsl
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt
koha-tmpl/intranet-tmpl/prog/en/xslt/plainMARC.xsl
and
koha-tmpl/opac-tmpl/bootstrap/xx-YY/xslt/compact.xsl
koha-tmpl/opac-tmpl/bootstrap/xx-YY/modules/opac-opensearch.tt
koha-tmpl/intranet-tmpl/prog/xx-YY/xslt/plainMARC.xsl

Check the missing prolog

3) Install this patch, repeat 1 and 2, now the prolog is present
on translated files.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
C4/TTParser.pm
misc/translator/xgettext.pl