Uploaded image for project: 'Jalview'
  1. Jalview
  2. JAL-3685

Message templates used with formatMessage don't format correctly when one single quote used

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.11.1.0
    • Fix Version/s: 2.11.1.1
    • Component/s: gui
    • Labels:
    • Environment:
      any

      Description

      MessageManager.formatMessage(template, params)

      uses java.text.MessageFormat.format(template, params) to create a formatted string, inserting the objects in the params array into occurrences of {0}, {1}, etc in the template string.

      Single quote characters in the template string should be represented in the template as two consecutive single quote characters.

      https://docs.oracle.com/javase/8/docs/api/java/text/MessageFormat.html

      Fix by ensuring any message with a {0} in it has single quote characters repeated.

        Attachments

          Activity

            People

            Assignee:
            soares Ben Soares
            Reporter:
            soares Ben Soares
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: