-
Bug
-
Resolution: Fixed
-
Medium
NOTE: This bug report is for JIRA Cloud. Using JIRA Server? See the corresponding bug report.
Steps to reproduce (Scenario A)
- Setup a fresh installation of JIRA
- At the first step of the set up wizard, choose a language pack other than English such as German
- Finish the setup and create issues
- Go to the general configuration page and change the default language to English
- (BUG) The dashboard will still be mixed with both English and German language see screenshot
How to reproduce (Scenario B)
- Start JIRA from a clean instance
- Create two users: One with the default language and one with a different locale than the system default (For example: Japanese or Spanish)
- Make sure that the system default locale is set to English(UK)
- Shutdown Jira and Restart
- Login into jira with the Japanese user
- Go to the dashboard. Make sure that the assigned to me gadget shows no issues assigned
- Login again with the default language user
- (BUG) Go to the dashboard, you will see the "No issues assigned" text in Japanese.
Workaround
- Restart JIRA, or in JIRA Administration "Refresh Client Resources" (System> User Interface > Look and Feel) and make sure that the language of the first user to browse the JIRA dashboard gadgets is the same as the system's default language.
Root Cause Analysis
This is caused by the way JIRA includes web-resources into the gadget's XML specification.
Currently, when JIRA is started all gadget specifications available in gadget plugin modules are retrieved, then we proceed to resolve a number of Atlassian specific directives (see https://developer.atlassian.com/display/GADGETS/Using+Substitution+Variables+and+Directives+in+your+Gadget) and then the transformed xml specification is validated and cached for later use.
At this stage, web resources are included via two of these directives, specifically #requireResource and #includeResources. This happens at GadgetProcessorImpl.processIncludeResources and web resource urls are generated per each included resource. The URl needs to include the locale as part of the resource to fetch, so since this is done at start-up this will be the system default language at that moment.
This is the wrong time to do this as:
- All users will then get the cached transformed copy of the gadget spec xml which will specify inclusion of resources using the default language.
- If the language of the first user to request a gadget is not the system default language (used to resolve the urls to the included resources) any call to AJS.getText() or soy's getText function will be done under the current user's language, which will then cause the included resources for the default language to be cached with i18n strings in the wrong language.
The second problem is more severe as it will affect any part of the UI that makes use of the resources corrupted with the i18n messages in the wrong language.
- is related to
-
JRASERVER-28392 The language translation got mixed up in the dashboard after choosing a default language other than the chosen one from initialization
- Closed
-
JRACLOUD-42361 Mixed up languages are shown in the activity streams gadget issue operations links
- Gathering Impact