ListElement labels cannot be translated
Bug #1324576 reported by
David Planella
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu UI Toolkit |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I get the following error after adding this snipped to a simple app:
ListModel {
id: temperatureUnit
ListElement { name: "celsiusOption"; label: i18n.tr("Celsius"); }
ListElement { name: "fahrenheitOption"; label: "Fahrenheit"; }
}
ListElement: cannot use script for property value
It seems that i18n.tr() cannot be applied to ListElement labels
description: | updated |
Changed in ubuntu-ui-toolkit: | |
status: | New → Invalid |
To post a comment you must log in.
I think this is a limitation in Qt itself, where ListElements can not use any code, just constant (pre-defined) strings and numbers.