[TIMOB-16982] TiAPI: textid (and similar) properties not supported on ListView
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Release 3.2.3 |
| Fix Version/s | n/a |
| Components | TiAPI |
| Labels | i18n, listview |
| Reporter | Fokke Zandbergen |
| Assignee | Unknown |
| Created | 2014-05-10T17:57:31.000+0000 |
| Updated | 2018-02-28T20:03:31.000+0000 |
Description
The attached example app is based on the *List View with Custom Item Template* example in the [ListView docs](http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.ListView) to show that
textid and similar properties currently don't seem to work in ListViews.
A fragment of the app.js:
var fruitDataSet = [
{ info: {textid: 'foo'}, es_info: {text: 'Manzana'}, pic: {image: 'apple.png'}},
{ info: {text: 'Banana'}, es_info: {text: 'Banana'}, pic: {image: 'banana.png'}}
];
The i18n/en/strings.xml source:
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="foo">bar</string>
</resources>
The test app also has a red label overlaid on the ListView using the same textid to show that the string does work on a regular label.
Attachments
| File | Date | Size |
|---|---|---|
| textid.zip | 2014-05-10T17:57:31.000+0000 | 2988 |
Moving this ticket to engineering as I can reproduce this issue with the provided test case. Since textid property is neither supported nor documented, I am not sure if it is a bug or improvement request.
It's not document because everything in a ListView template is is just regular Views, so every of those View's properties should be supported. So yes, it's a bug.
Any update on that one?
Workaround found:
or<ListItem info:text="L('foo')" />var fruitDataSet = [ { info: {text: L('foo')}, es_info: {text: 'Manzana'}, pic: {image: 'apple.png'}}, { info: {text: 'Banana'}, es_info: {text: 'Banana'}, pic: {image: 'banana.png'}} ];