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

How to debug issue with i18n

Nikolai Matveev July 29, 2015

I've faced the issue described here - https://answers.atlassian.com/questions/20241, but the mentioned solution doesn't work for me. Could you please suggest me a way to debug the issue when the call to AJS.I18n.getText returns the key instead of value?

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Nikolai Matveev July 29, 2015
<atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${project.name}" plugins-version="2">
    <plugin-info>
        <description>${project.description}</description>
        <version>${project.version}</version>
        <vendor name="${project.organization.name}" url="${project.organization.url}"/>
        <param name="plugin-icon">images/icon.png</param>
        <param name="plugin-logo">images/logo.png</param>
    </plugin-info>
    <web-resource key="my-web-resource">
        <transformation extension="js">
            <transformer key="jsI18n"/>
        </transformation>
        <dependency>com.atlassian.auiplugin:ajs</dependency>
        <dependency>com.atlassian.auiplugin:dialog2</dependency>
        <resource type="download" name="my-plugin.js" location="/js/my-plugin.js"/>
        <resource type="download" name="my-plugin.js.map" location="/js/my-plugin.js.map"/>
        <context>atl.general</context>
        <context>atl.admin</context>
    </web-resource>
    <resource type="i18n" name="i18n" location="my-plugin" />
</atlassian-plugin>
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.
July 29, 2015

I have the same in at least 3 plugins. Only difference I have <resource type="i18n" tag before <web-resource but I guess it does not matter. Maybe the wrong name for the properties files. For you descriptor you should have my-plugin.properties under src/main/resources folder.

Martin Bayerl March 23, 2016

Hi,

did you resolve your issue, since i have the same problem and i do not know how to check if he even tries to use my properties file.

 

Regards

0 votes
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.
July 29, 2015

Key instead of values usually means that there is no matching ley/value in your property file. Check spelling for the key in the property file and in JavaScript.

Nikolai Matveev July 29, 2015

Checked once again now. Everything is correct. 1) How to check that the function (AJS.I18n.getText) is working for me? 2) How to check the list of available keys?

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.
July 29, 2015

I guess something wrong in your atlassian-plugin.xml. Please post it as a new answer enclosing it into the "code" block.

TAGS
AUG Leaders

Atlassian Community Events