[TIME-150] Localization strings are not replaced

Issue #150 resolved
Andriy Zhdanov created an issue

All Gadget Texts are displayed as MSG_gadget.xxx and not as the desired text. Functionality is ok.

By htietgens/Henning Tietgens on Fri, 15 Apr 2011 08:34:50 -0700

Comments (14)

  1. Andriy Zhdanov reporter

    Added JIRA 4.3.1 and version 2.1 as I am seeing this same issue with those.

    By david.hergert on Thu, 21 Apr 2011 08:16:19 -0700

  2. Andriy Zhdanov reporter

    We do use SSL, but not in this Test instance. Thanks for the link though, we've added our certs to our cert store so hopefully we won't have issues in production.

    But the gadgets load data correctly, its just the gadget portlet title names and labels aren't rendering. The screenshots above are how our Test instance looks.

    By david.hergert on Thu, 21 Apr 2011 11:22:52 -0700

  3. Andriy Zhdanov reporter

    We have exactly the same problem - the localized label keys are not replaced by corresponding values, but the data in the gadgets is displayed (therefore it's not a problem with faulty SSL configuration). This affects both Jira 4.1.2 with plugin ver 2.0 and Jira 4.3 with plugin ver 2.1.

    We have removed all language jar files from Jira installation except for language_default.jar form jira-home-dir/atlassian-jira/WEB-INF/lib/ because of our own custom developments. The default language is then determined by the server locale and is currently set to United States. Could there be a connection here somehow?

    By parmaley on Wed, 27 Apr 2011 08:17:16 -0700

  4. Andriy Zhdanov reporter

    We installed JIRA 4.3.1 in Test, but ended up going with 4.3.2 in Production and the labels render correctly.

    By david.hergert on Thu, 28 Apr 2011 08:41:38 -0700

  5. Andriy Zhdanov reporter

    I'm having the same problem with JIRA 4.4, my timesheet report doesn't render though in addition to the localisation keys.

    By ksymeon on Wed, 24 Aug 2011 02:16:10 -0700

  6. Andriy Zhdanov reporter

    More information on my problem. I managed to get a vanilla install on WinXP on HSQLDB working, my restore from XML worked. I then tried again on my server a Win 2008 R2 64-bit VM, first with an Oracle connection and then with an HSQLDB, and both times the localisation strings are wrong and the timesheet report doesn't seem to come back. Hope this helps.

    By ksymeon on Thu, 25 Aug 2011 07:16:56 -0700

  7. Andriy Zhdanov reporter

    Hi Andrew, a bit more info. I think it's the 64-bit version of Windows probably causing this. To replicate the problem this is what to do:

    Get a vanilla standalone installation.
    Unzip.
    Config with local HSQLDB.
    Start, add license, login and setup your plugin.
    Go to dashboard, create new dashboard.
    Add Gadget. Scroll to the bottom and voila the three gadgets have __MSG_gadget.xxx instead of localised strings.

    All of the above on MS Windows Server 2008 R2. Do the same in XP and it works.

    By ksymeon on Thu, 25 Aug 2011 09:55:59 -0700

  8. Andriy Zhdanov reporter

    I understand, but I don't have such environment to check this. Unfortunately, it's also a mystery for me how localization works in gadgets, apparently there are some loop back requests which or something else is some how forbidden (like firewall) on windows server, you may want to try to investigate it with Firefox + Firebub (or Chrome), and see which requests browser sends, or even worse, capture network traffic for jira, and see what is failing, then investigate why. Sorry, that's all so far I can help.
    Thank you.

    By azhdanov on Thu, 25 Aug 2011 10:25:16 -0700

  9. Andriy Zhdanov reporter

    Hi Andrew, I appreciate your attention to our problem. I have found something in the forums that you might find interesting, it might mean more to you than it does to me:

    http://forums.atlassian.com/message.jspa?messageID=257361156

    Your gadget.xml contains the <Locale messages=".."/> line which this guy is removing and the ALL_ALL.xml is getting replaced by a properties file. Could it be that the latest versions of jira behave somewhat differently?

    I would like to raise this with Atlassian, in case there's a backwards compatibility issue with plugins like yours, but I need to do a bit more investigation.

    By ksymeon on Fri, 26 Aug 2011 02:36:34 -0700

  10. Andriy Zhdanov reporter

    Hi Kostas,

    I've just added ALL.properties, unfortunately I decided not to remove ALL_ALL.xml and referencing it from gadget.xml, because it does not work for me that way, and you can see similar comment here: http://confluence.atlassian.com/display/DEVNET/Plugin+Gadget+Tutorial+-+Writing+a+Gadget+that+Displays+the+Days+Left+in+a+Version?focusedCommentId=229836274#comment-229836274

    Please try updated plugin jar and let me know.

    Committed revision 163385

    Thank you.

    By azhdanov on Mon, 29 Aug 2011 09:53:33 -0700

  11. Andriy Zhdanov reporter

    Hi Andrew, thanks for the update. After I wrote my comment, I managed to hack my way into this. On top of the change you made, I've had to change the *gadget.xml files to include the directive:

    gadget.xml:
    #supportedLocales("gadget.common,gadget.pref,gadget.timesheet")

    group-timesheet-gadget.xml:
    #supportedLocales("gadget.common,gadget.pref,gadget.group")

    project-pivot-gadget.xml:
    #supportedLocales("gadget.common,gadget.pref,gadget.project")

    and removed the <Locale ../> from the <ModulePrefs ...> element.

    In the atlassian-plugin.xml:
    <!-- KSYMEON changes: commented out
    <resource type="download" name="i18n/ALL_ALL.xml" location="i18n/ALL_ALL.xml">
    <param name="content-type" value="text/xml; charset=UTF-8"/>
    </resource>
    -->
    <resource type="i18n" name="i18n-gadget" location="i18n/ALL" />
    <!-- end of KSYMEON changes -->

    Hope this helps. I suggest if it works with your setup that you remove the ALL_ALL.xml altogether, maybe you'd like to move up a version to 2.3?

    Cheers

    By ksymeon on Tue, 30 Aug 2011 05:54:31 -0700

  12. Andriy Zhdanov reporter

    Wow, that works, thanks a lot for your help, Kostas!

    Sebastien, could you please try again 2.1?

    //Committed revisions 163396 and 163397.

    By azhdanov on Tue, 30 Aug 2011 08:08:53 -0700

  13. Log in to comment