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

CaseResult.Status initializes display names acc. to locale of first request

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • junit-plugin
    • None

      I recently upgraded a Hudson server to 1.363. Today I noticed that リグレッション is displayed instead of "Regression", and 失敗 instead of "Failed"; e.g.

      http://deadlock.netbeans.org/hudson/job/javacard/65/testReport/org.netbeans.modules.javacard.project/JCProjectTest/testDependencies/

      --%<--
      リグレッション
      org.netbeans.modules.javacard.project.JCProjectTest.testDependencies (from JCProjectTest)
      Failing for the past 3 builds (Since #63 )
      --%<--

      Another server also upgraded to 1.363 does not exhibit this problem. And no other strings in the UI are in Japanese (that I have seen).

      Needless to say, the server's locale is still unset (so defaulting to US/English). It is running Linux.

      hudson.war!/WEB-INF/lib/hudson-core-1.363.jar looks normal to me; in hudson/tasks/junit/ it has Messages.class, Messages.properties, and Messages_ja.properties. "Publish JUnit test result report", apparently from the same properties file, is displayed normally in job/*/configure.

      "OK" is also displayed instead of "Passed". My guess is that the enum CaseResult.Status was initialized during a request made from someone with a browser set to Japanese locale, and then these strings stuck.

          [JENKINS-6824] CaseResult.Status initializes display names acc. to locale of first request

          Alan Harder added a comment -

          r32240 | jglick | 2010-06-22 13:10:59 -0700 (Tue, 22 Jun 2010)
          Changed paths:
          M /trunk/hudson/main/core/src/main/java/hudson/tasks/junit/CaseResult.java
          A /trunk/hudson/main/core/src/test/java/hudson/tasks/junit/CaseResultTest.java

          [FIXED JENKINS-6824] Statically held fields should be of type Localizable rather than String.

          Alan Harder added a comment - r32240 | jglick | 2010-06-22 13:10:59 -0700 (Tue, 22 Jun 2010) Changed paths: M /trunk/hudson/main/core/src/main/java/hudson/tasks/junit/CaseResult.java A /trunk/hudson/main/core/src/test/java/hudson/tasks/junit/CaseResultTest.java [FIXED JENKINS-6824] Statically held fields should be of type Localizable rather than String.

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: