" causing issues for the interface translation in responsive webhelp

Post here questions and problems related to editing and publishing DITA content.
Gertone
Posts: 20
Joined: Mon Sep 17, 2007 10:02 am
Location: Flanders

" causing issues for the interface translation in responsive webhelp

Post by Gertone »

All,

I am in the process of localising the user interface of the responsive webhelp
Using v23
following the steps in
https://www.oxygenxml.com/doc/versions/ ... nsive.html
and I had the string files translated in the different languages I need

The italian translation seems to break the search functionality (browser blocked)

After some digging I found
<str name="index.terms.page.title" js="true" php="false">Termini dell&apos;indice</str>
and
<str name="no_results_only_stop_words2" js="true" php="false">... come &quot;di&quot;, &quot;il&quot;, ...</str>

In the English original I found
<str name="no_results_only_stop_words2" js="true" php="false">...such as: &apos;of &apos; , ...</str>

And really, the English original has no &quot; at all (using &apos; all over the place instead)

I was confused that the localize-webhelp-responsive.html has this example
<str name="webhelp.search" js="true" php="false">Polish translation for "Search"</str>
I do realize this is stub information (likely not tested) and assume that " and &quot; should be considered the equivalent.
So I have not tested the " instead of &quot;)

After I removed the &quot; and added the &apos; instead, all issues were gone.

Maybe this is a bug, or an instruction missing from the manual... or maybe I am just missing something?
Any thoughts or suggestion?
Thanks

Geert Bormans
Gertone
Posts: 20
Joined: Mon Sep 17, 2007 10:02 am
Location: Flanders

Re: &quot; causing issues for the interface translation in responsive webhelp

Post by Gertone »

I guess it could be a bug...

In the generated strings.js I see this

Code: Select all

define(function() {var localization = new Array();
localization["index.terms.page.title"]="Index Terms";
localization["toggle.menu"]="Toggle menu";
localization["label.cleditorControls"]="Insert your comment. Press Alt+S to submit your comment or Alt+` to discard it.";
...
having a " inside the " delimited string values might break the string value
if so, I would suggest to either add the warning to the manual or escape the &quot; in creating the array

If possible, I would suggest the latter, a very common procedure is to have an external translator for the string files translation
... and having them to translate an XML file is hard enough without an extra set of rules

Thanks

Geert
radu_pisoi
Posts: 403
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: &quot; causing issues for the interface translation in responsive webhelp

Post by radu_pisoi »

Hi,

Indeed, the quote character should be automatically escaped when generating the localization JS files. I have added an issue to fix this in the next version.

Meanwhile, the workaround is to manually escape quotes in the XML translation files by adding '\' character before:

Code: Select all

<str name="index.terms.page.title" js="true" php="false">Termini dell\&quot;indice</str>
Than you for reporting this issue.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Gertone
Posts: 20
Joined: Mon Sep 17, 2007 10:02 am
Location: Flanders

Re: &quot; causing issues for the interface translation in responsive webhelp

Post by Gertone »

Thanks Radu for looking into this and confirming the unexpected behaviour.
Thanks also for the workaround. I made it work yesterday by using &apos; instead of &quot;
It is nice to have an alternative to that indeed
Post Reply