Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26612] Problem with Internationalization

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2018-12-18T14:58:24.000+0000
Affected Version/sRelease 7.5.0
Fix Version/sRelease 7.5.1
Componentsn/a
Labelsios, locale, regression
ReporterThomas Weber
AssigneeVijay Singh
Created2018-11-27T18:20:19.000+0000
Updated2018-12-18T20:59:04.000+0000

Description

Ti.Locale.currentLanguage returns wrong language Ti.Locale.currentLocale return correct language Localized strings L("key") are replaced incorrectly (Works fine with SDK 7.4.x) Steps to reproduce: 1. Create strings.xml within folder i18n/de and add _deutsch_ into resources node. Create strings.xml within i18n/en folder and add _english_ into resources node. 2. Set simulator device language and region to "German" 3. Add lines to app.js: console.log(Ti.Locale.currentLanguage); console.log(Ti.Locale. Ti.Locale.currentLocale); 4. Add label with a localized string e. g. L("test") to view *Expected results:* Console: de de-DE Label text: deutsch *Current results*: Console: en de-DE Label text: english

Comments

  1. Vijay Singh 2018-11-28

    This might be issue due to [this PR](https://github.com/appcelerator/titanium_mobile/pull/10227). Need to look in this.
  2. Vijay Singh 2018-11-29

    PR(master)- https://github.com/appcelerator/titanium_mobile/pull/10499 Test Case 1- Test case mentioned TIMOB-13966. Test Case 2- After changing language in device/ simulator it should log proper value, as mentioned in this ticket.
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       
       var btn = Ti.UI.createButton({
           title: 'Trigger'
       });
       
       btn.addEventListener('click', function() {
           Ti.API.info(Ti.Locale.currentLanguage);
           Ti.API.info(Ti.Locale.currentLocale);
       });
       
       win.add(btn);
       win.open();
       
  3. Samir Mohammed 2018-12-07

    Closing ticket. Fix verified in SDK version 8.0.0.v20181207074202. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/10499
  4. Vijay Singh 2018-12-18

    [~lchoudhary] PR (7_5_X) - https://github.com/appcelerator/titanium_mobile/pull/10545
  5. Josh Longton 2018-12-18

    *FR Passed 7_5_X*
  6. Lokesh Choudhary 2018-12-18

    Verified the fix in SDK 7.5.1.v20181218070137. Closing.

JSON Source