Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-3206

Add validation to the translation tool

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 12.2.5
    • Component/s: None
    • Labels:
      None

      Description

      The translation tool need a validation of the translation to prevent people to write something like

      { | }

      which is not legal.

      WARN ExceptionWindowController - OLAT::WARN ^%^ N8-W61898 ^%^ org.olat.core.gui.exception
      
      https://olat.xyz.ch/auth/UserAdminSite/0/ucreate/0 ^%^ Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
      ExceptionWindowController: Throwable occurred, logging the full stacktrace:
      >>>stack of 1.cause::java.lang.IllegalArgumentException: can't parse argument number: |
      -> at java.text.MessageFormat.makeFormat(MessageFormat.java:1429)
         at java.text.MessageFormat.applyPattern(MessageFormat.java:479)
         at java.text.MessageFormat.(MessageFormat.java:362)
         at java.text.MessageFormat.format(MessageFormat.java:840)
         at org.olat.core.util.i18n.I18nManager.getLocalizedString(I18nManager.java:329)
         at org.olat.core.util.i18n.I18nManager.getLocalizedString(I18nManager.java:202)
         at org.olat.core.gui.translator.PackageTranslator.translate(PackageTranslator.java:215)
         at org.olat.core.gui.translator.PackageTranslator.translate(PackageTranslator.java:220)
         at org.olat.core.gui.translator.PackageTranslator.translate(PackageTranslator.java:220)
         at org.olat.core.gui.translator.PackageTranslator.translate(PackageTranslator.java:220)
         at org.olat.core.gui.translator.PackageTranslator.translate(PackageTranslator.java:166)
      >>>stack of 2.cause::java.lang.NumberFormatException: For input string: " | "
      -> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
         at java.lang.Integer.parseInt(Integer.java:569)
         at java.lang.Integer.parseInt(Integer.java:615)
         at java.text.MessageFormat.makeFormat(MessageFormat.java:1427)
         at java.text.MessageFormat.applyPattern(MessageFormat.java:479)
         at java.text.MessageFormat.(MessageFormat.java:362)
         at java.text.MessageFormat.format(MessageFormat.java:840)
         at org.olat.core.util.i18n.I18nManager.getLocalizedString(I18nManager.java:329)
         at org.olat.core.util.i18n.I18nManager.getLocalizedString(I18nManager.java:202)
         at org.olat.core.gui.translator.PackageTranslator.translate(PackageTranslator.java:215)
         at org.olat.core.gui.translator.PackageTranslator.translate(PackageTranslator.java:220)
      

        Attachments

          Activity

            People

            • Assignee:
              srosse Stéphane Rossé
              Reporter:
              srosse Stéphane Rossé
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 40 minutes
                40m