ListElement labels cannot be translated

Bug #1324576 reported by David Planella
10
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: temperatureUnitsSelectorModel
    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

David Planella (dpm)
description: updated
Revision history for this message
Michael Spencer (ibelieve) wrote :

I think this is a limitation in Qt itself, where ListElements can not use any code, just constant (pre-defined) strings and numbers.

Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.