There are 3 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-cd7df375-5bd7-4854-8ead-59465df45033 XWIKI-21592 Open

Javascript localization module shows doubled single quotes twice instead of processing them using the translation messages rules

 
View issue   ยท   Add comment
 

3 updates

 
cid:jira-generated-image-avatar-667f3485-7322-40e2-9a8d-c97147774a0d Changes by Simon Urli on 27/Nov/25 10:05
 
Version: 17.10.0
Description: Reproduction steps:
  * Import the attached XAR
  * Open the imported page

Expected result:
  * It should display:
{noformat}
0 with 'quotes'

10 with 'quotes'
{noformat}

Obtained result:
  * it displays:
{noformat}
0 with 'quotes'

10 with ''quotes''
{noformat}

--- Previous description ---
For example, for the like UI for XWIKI-18545, we have the following translation (in french):

{noformat}
like.likers.link.zero={0} J''aime
{noformat}

(the doubled single quote is needed because it's a parametrized message and this is the format for such messages).

When used from velocity, it displays as "0 J'aime" (correctly), when fetched from javascript using the xwiki-l10n API added by XWIKI-18973, it shows "0 J''aime" (incorrectly).
Attachment: TestLikeTranslation.WebHome.xar