Dear all,
I now spent days by reviewing documentations, forums entries and trying different things but still have no clue.
Issue:
I write a plugin and included internationalization/localization. It runs fine with all kind of JIRA version (5.x to 7.0) and in my JIRA SDK running on windows7. But I receive feedback from some users who install my plugin on their JIRA servers, that only placeholders (e.g. "__MSG.gadget.title__" in gadget title bar) is shown.
So only on some servers the localization does not work.
First of all, I would like to know, which way for i18n is recommended: using a .properties file or using a xml files with message bundles?
Second: can you pls. have a look to the following extracts of my setup and judge if this is correct?
If yes, what else could I investigate to understand this issue?
Kind regards
Chris
atlassian-plugin.xml:
[ ... ] <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="download" name="i18n/de_ALL.xml" location="i18n/de_ALL.xml" ><param name="content-type" value="text/xml; charset=UTF-8" /> </resource> [ ... ]
gadget.xml:
<Module> <ModulePrefs title = "__MSG_pc2d.gadget.title__" directory_title = "__MSG_pc2d.gadget.title__" description = "__MSG_pc2d.gadget.description__" [ ... ] #oauth #supportedLocales("pc2d.gadget,gadget.common") [ ... ] <Locale messages="__ATLASSIAN_BASE_URL__/download/resources/eu.mirrorlake.plugins.pc2d/i18n/ALL_ALL.xml" /> <Locale lang="de" country="ALL" messages="__ATLASSIAN_BASE_URL__/download/resources/eu.mirrorlake.plugins.pc2d/i18n/de_ALL.xml" /> </ModulePrefs>
de_ALL.xml is located in: /resources/i18n/de_ALL.xml
<messagebundle> <msg name="pc2d.gadget.title" >mirrorlake plan chart 2d plugin</msg> <msg name="pc2d.gadget.description" >Erzeugt ein Linien- oder Balkendiagramm zur Visualisierung von Fälligkeits- und Abschlussdaten.</msg> <msg name="pc2d.gadget.locale">de</msg> [ ... ]
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>eu.mirrorlake.plugins</groupId> <artifactId>pc2d</artifactId> <version>1.5.0.7-p</version> [ ... ]
Community moderators have prevented the ability to post new answers.
Hi Mirrorlake,
I had similar probelm with AJS.i18n.getText("some.key"). It appeared that 'AJS.i18n.getText("some.key")' should be in one line. Otherwise the framework fails to replace AJS.i18n.getText entries into appropriate messages. My code formatter was wrapping this to multi lines and it took me a while to find why replacing is not happening.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.