[TIMOB-26667] Windows: Ti.Locale.getString should ignore non-string default value
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-01-02T21:37:19.000+0000 |
Affected Version/s | Release 7.5.0 |
Fix Version/s | Release 8.0.0 |
Components | Windows |
Labels | n/a |
Reporter | Kota Iguchi |
Assignee | Kota Iguchi |
Created | 2018-12-19T03:20:38.000+0000 |
Updated | 2019-01-03T12:32:07.000+0000 |
Description
If the supplied "default" value is a non-string, we should now "reject" it and treat it as if no default fallback was given. If no default was given, the original key is returned when no corresponding value is found.
Ti.API.info(Ti.Locale.getString('this_should_not_be_found', null) + '.eql(this_should_not_be_found)');
Ti.API.info(L('this_should_not_be_found', null) + '.eql(this_should_not_be_found)');
Ti.API.info(Ti.Locale.getString('this_should_not_be_found', 123) + '.eql(this_should_not_be_found)');
Ti.API.info(L('this_should_not_be_found', 123) + '.eql(this_should_not_be_found)');
Expected: key should be returned.
https://github.com/appcelerator/titanium_mobile_windows/pull/1337
FR passed.
PR merged.
Closing ticket. Fix verified in SDK version
8.0.0.v20190102142454
Test and other information can be found at: https://github.com/appcelerator/titanium_mobile_windows/pull/1337