Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-15589

Single quotes in a translated message containing parameters disappear.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Major
    • None
    • 10.7
    • Localization
    • None
    • Unknown

    Description

      Steps to reproduce

      • Create a translation bundle with the following translation key and message: 
        translation.key=Parameter: {0}. Sentence with some 'single quotes' and "double quotes".
      • Create a page containing the following Velocity script:
        {{velocity}}
        #set($date = $datetool.format("d MMMM yyyy", $doc.creationDate))
        $services.localization.render('translation.key', [$date])
        {{/velocity}}
        

      Expected result

      The Velocity script should display the following:

      Parameter: 12 September 2018. Sentence with some 'single quotes' and "double quotes".

      Actual result

      The Velocity script outputs a message from which single quotes are missing:

      Parameter: 12 September 2018. Sentence with some single quotes and "double quotes".

      Workaround

      A workaround is to used doubled single quotes for such parameterized messages.

      Attachments

        Activity

          People

            slauriere slauriere
            slauriere slauriere
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: