[Bug 35933] New: Do not translate text nodes in xsl:attribute and other tags
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35933 Bug ID: 35933 Summary: Do not translate text nodes in xsl:attribute and other tags Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: kevin.carnes@ub.lu.se QA Contact: testopia@bugs.koha-community.org CC: frederic@tamil.fr, jonathan.druart+koha@gmail.com Koha extracts text from text nodes and makes them available for translators to translate. This can cause problems when the text needs to be the same for all languages. For example, when an HTML tag is built using XSLT, the values of its attributes should not be translated. One solution is to put the text in a xsl:value-of element instead of a text node. This patch is a quick test to see if there is a more general solution. When entering certain tags it treats text nodes as CDATA (it's also possible to make it a COMMENT, UNKNOWN, or a new token type). It increments and decrements the status to try and handle nested tags, but it might be necessary to make a more robust solution. Is there interest in developing this solution further? Are there cases where text should be translated in xsl:attribute? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35933 --- Comment #1 from Kevin Carnes <kevin.carnes@ub.lu.se> --- Created attachment 161599 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161599&action=edit Bug 35933: Do not translate text nodes in xsl:attribute and other tags To test: 1. Install another language 2. Notice that MARC21slim2OPACDetail.xsl has translated attributes 3. Apply patch 4. Install the language again 5. Notice that only non-attributes are translated -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35933 Kevin Carnes <kevin.carnes@ub.lu.se> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |In Discussion -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org