• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • core
    • None
    • Platform: All, OS: All

      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.

          [JENKINS-1670] Bad internationalisation

          dwdyer added a comment -

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

          dwdyer added a comment - Created an attachment (id=247) Screenshot of messed-up text.

          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.

          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.

          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.

          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.

          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

          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

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

              Created:
              Updated:
              Resolved: