Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Internationalization issues / i18n not working on SOME machines

Christoph Piotrowski October 12, 2015

Dear all,

I now spent days by reviewing documentations, forums entries and trying different things but still have no clue. sad

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>
  [ ... ]

 

 

 

 

 

 

 

 

 

 

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 25, 2015

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. 

0 votes
Randall Hunt December 25, 2015

Can confirm I'm having similar issues.

TAGS
AUG Leaders

Atlassian Community Events