Expand my Community achievements bar.

Get ready! An upgraded Experience League Community experience is coming in January.
SOLVED

Unable to export dictionary as XLIFF file if it contains #

Avatar

Level 2

Hello,

 we are using AEM on-prem 6.5.22.

We have a dictionary with following key value pair

  • sample.link = <a href="example.com/categories#section2">click here</a>

 When I use the option "Export selection as XLIFF file" -  the generated xliff file is not correct. It strips off any value after the # 

 

<body>
<trans-unit id="0">
<source xml:lang="en"><![CDATA[rbk.title]]></source>
<target xml:lang="default"><![CDATA[<a href="example.com/categories

 

If I remove the # from value and export the dictionary, I get the correct file.

 

<body>
<trans-unit id="0">
<source xml:lang="en"><![CDATA[rbk.title]]></source>
<target xml:lang="default"><![CDATA[<a href="example.com/categories">click here</a>]]></target>
</trans-unit>
</body>

Is there any OOTB workaround to have # in the dictionary values? or should we try and handle it by overlaying the OOTB behaviour? Or should we not include this kind of values at first place?

 Please advise.

 

Thank you.

1 Accepted Solution

Avatar

Correct answer by
Level 2

Thank you! it was some encoding issue in our custom JS.

I had to use encodeURIComponent(xmlContent) to fix the issue.

View solution in original post

3 Replies

Avatar

Community Advisor

HI @rohitk31991147 ,

You can try to customize your AEM dictionary. 
The Web Editor can be configured to use AEM’s spell checker or the browser’s spell checker. If you choose to work with AEM’s spell checker, then you get the flexibility to define your custom words list. These custom words are then added to the AEM’s dictionary and these words are not flagged (as incorrect) in the Web Editor.

 

Please follow below link for more details on it:

https://experienceleague.adobe.com/en/docs/experience-manager-guides/using/install-guide/cs-ig/web-e...

 

 

-Tarun

Avatar

Level 2

Hi @TarunKumar  Thank you for the suggestion but, This applies only to the spell checker inside the Touch UI Web Editor.

And does not impact my use case (exporting the XLIFF file)

Avatar

Correct answer by
Level 2

Thank you! it was some encoding issue in our custom JS.

I had to use encodeURIComponent(xmlContent) to fix the issue.