Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17205] Android: (Parity) Ti.Locale.getString for not existing entry in i18n xml is showing null/empty on Android

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsparity
ReporterJungwook Son
AssigneeUnknown
Created2014-06-09T17:00:45.000+0000
Updated2018-02-28T20:03:32.000+0000

Description

$.textLabel.text = L("not_existing_key");
For Android, render nothing on screen (null string). For iOS, render 'not_existing_key' (i18n xml name property value itself).

Comments

  1. Shuo Liang 2014-06-10

    Hi, For your case, seems like there is miss match between your code and i18n xml file, as I had tested your code, it works well for me. So would you please try the following suggestion: 1. Double check your xml name property spelling. 2. Replace the your code with
                    var i18nMissingMsg = '<no translation available>';
                    $.textLabel.text = L("not_existing_key", i18nMissingMsg);
            
    Then check the output, if the output is , means there is miss match between your code and i18n xml file. 3. If it still doesn't work well, can you tell me the following question: 3a. Do other Ti.locale translation properties work well? (like define a simple name hello) 3b. The version of your titanium SDK. 3c. Share more related codes for me. Regards, Shuo Liang
  2. Mauro Parra-Miranda 2014-06-24

    Leaving priority to none, Platform will reassign it as needed.
  3. Rene Pot 2016-07-29

    I believe this ticket should be picked up. It is not in line with how iOS handles missing translations in Appcelerator. On iOS the key will be displayed for missing translations, on Android it will display *false*. In terms of Parity, this should be the same for both platforms.

JSON Source