Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-1670

Bad internationalisation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      Server: Hudson 1.213 on Jetty on Ubuntu.
      Client: Opera 9.27 and Safari 3.1.1 on OS X.

      The mouse-over pop-up that shows the project health mixes Cyrillic characters
      with the expected English text. See attached screenshot.

      It only does this for the top project in the list. The other pop-ups are all
      100% English.

        Attachments

          Activity

          Hide
          dwdyer dwdyer added a comment -

          Created an attachment (id=247)
          Screenshot of messed-up text.

          Show
          dwdyer dwdyer added a comment - Created an attachment (id=247) Screenshot of messed-up text.
          Hide
          mindless Alan Harder added a comment -

          I looked into this one, and found there are 2 problems.

          1) The "localizer" library used by Hudson had a bug where "Localizable" objects
          were translated by default using the system's default locale, instead of the
          locale for this request. I've informed kohsuke of this, and he will fix it.
          This will get the heading part ("Build stability:") translated correctly.

          2) Job.getBuildStabilityHealthReport() actually translates part of the message
          (that goes after the "Build stability:" heading), but the result from this
          method is cached and used for all users.. result: everyone sees the language
          that the first person to view it was using (cached after that). This part of
          the report also needs to use Localizable object, so it will translate later
          based on the locale of the current viewer. I'll make this fix in Job.java, and
          once the fix for #1 is in place it will start working too.

          Show
          mindless Alan Harder added a comment - I looked into this one, and found there are 2 problems. 1) The "localizer" library used by Hudson had a bug where "Localizable" objects were translated by default using the system's default locale, instead of the locale for this request. I've informed kohsuke of this, and he will fix it. This will get the heading part ("Build stability:") translated correctly. 2) Job.getBuildStabilityHealthReport() actually translates part of the message (that goes after the "Build stability:" heading), but the result from this method is cached and used for all users.. result: everyone sees the language that the first person to view it was using (cached after that). This part of the report also needs to use Localizable object, so it will translate later based on the locale of the current viewer. I'll make this fix in Job.java, and once the fix for #1 is in place it will start working too.
          Hide
          mindless Alan Harder added a comment -

          r15320 | mindless | 2009-02-13 15:36:24 -0700 (Fri, 13 Feb 2009) | 8 lines
          Changed paths:
          M /trunk/hudson/main/core/src/main/java/hudson/model/Job.java
          M
          /trunk/hudson/main/core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java

          JENKINS-1670 use Localizables as parameters to another Localizable when creating
          a HealthReport (for both Build Stability and Test Results).
          When already-translated strings are used, these go into the cached health report,
          so all users see language of the person who cached it rather than their own
          language.
          Localizer package needs a fix so that Localizable.toString() defaults to
          LocaleProvider.getLocale() rather than Locale.getDefault().. then these strings
          will translate correctly to the language of the current request.

          When kohsuke fixes item #1 in localizer and updates Hudson to use that new
          version, this issue will be resolved.

          Show
          mindless Alan Harder added a comment - r15320 | mindless | 2009-02-13 15:36:24 -0700 (Fri, 13 Feb 2009) | 8 lines Changed paths: M /trunk/hudson/main/core/src/main/java/hudson/model/Job.java M /trunk/hudson/main/core/src/main/java/hudson/tasks/test/AbstractTestResultAction.java JENKINS-1670 use Localizables as parameters to another Localizable when creating a HealthReport (for both Build Stability and Test Results). When already-translated strings are used, these go into the cached health report, so all users see language of the person who cached it rather than their own language. Localizer package needs a fix so that Localizable.toString() defaults to LocaleProvider.getLocale() rather than Locale.getDefault().. then these strings will translate correctly to the language of the current request. When kohsuke fixes item #1 in localizer and updates Hudson to use that new version, this issue will be resolved.
          Hide
          mindless Alan Harder added a comment -

          r15322 | kohsuke | 2009-02-13 15:57:52 -0700 (Fri, 13 Feb 2009) | 1 line
          Changed paths:
          M /trunk/hudson/main/core/pom.xml

          [FIXED JENKINS-1670] integrated new localizer to complete the change done by mindless

          Show
          mindless Alan Harder added a comment - r15322 | kohsuke | 2009-02-13 15:57:52 -0700 (Fri, 13 Feb 2009) | 1 line Changed paths: M /trunk/hudson/main/core/pom.xml [FIXED JENKINS-1670] integrated new localizer to complete the change done by mindless

            People

            Assignee:
            mindless Alan Harder
            Reporter:
            dwdyer dwdyer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: