[Koha-devel] Translation

Kevin Carnes kevin.carnes at ub.lu.se
Thu Jan 25 10:07:28 CET 2024


Hi again Marcel,

The example should be:
<xsl:attribute name="class">contributors</xsl:attribute>

to:
<xsl:attribute name="class"><xsl:value-of select="'contributor'"/></xsl:attribute>

I accidentally copied the wrong line.

Regards,
Kevin
________________________________
Från: Koha-devel <koha-devel-bounces at lists.koha-community.org> för Kevin Carnes via Koha-devel <koha-devel at lists.koha-community.org>
Skickat: den 25 januari 2024 10:00
Till: Koha-devel <koha-devel at lists.koha-community.org>; Marcel de Rooy <M.de.Rooy at rijksmuseum.nl>
Ämne: Re: [Koha-devel] Translation

Hi Marcel,

The link is created using XSLT and the names of the classes are in text nodes which are extracted and can be translated. To prevent this, the names can be specified in an attribute since they are not extracted and won't be translated. You can use a value-of element with the select attribute set to the class name in single quotation marks.

For example, in koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl, you can replace:
<xsl:attribute name="property">contributor</xsl:attribute>

With:
<xsl:attribute name="property"><xsl:value-of select="'contributor'"/></xsl:attribute>

Regards,
Kevin
________________________________
Från: Koha-devel <koha-devel-bounces at lists.koha-community.org> för Marcel de Rooy via Koha-devel <koha-devel at lists.koha-community.org>
Skickat: den 24 januari 2024 13:58
Till: Koha-devel <koha-devel at lists.koha-community.org>
Ämne: [Koha-devel] Translation

Hi,

I came across this link on opac-detail in our Dutch OPAC:

<a href="/cgi-bin/koha/opac-search.pl?q=an:%22152985%22" class="co-auteur"><span resource="#record"><span property="co-auteur" typeof="Persoon"><span property="name">Dalbajewa, Birgit</span></span></span><span class="relatorcode"> [contributor]</span></a>

As you may see, various class names, attribute names etc. are being translated (while they should not have been translated). In the PO file it just says for instance msgstr "contributor", so things get translated.
In the above co-auteur and Persoon should not have been there.

Anyone have an idea how we could prevent such entries from coming into the PO file at the first place?

Thanks,
Marcel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20240125/ef56581c/attachment.htm>


More information about the Koha-devel mailing list