Fix i18n of header labels
[quandoparte] / application / resources / harmattan / qml / PageHeader.js
1 function setDisplayIndex(index) {
2     console.log("Selection changed to: " + index)
3     if (optionList === undefined || optionList.count === 0 ||
4             optionList.get(index) === undefined) {
5         header.text = " "
6     } else {
7         header.text = optionList.get(index).name
8         console.log("Selection text is: " + header.text)
9     }
10 }
11
12 function init()
13 {
14     console.log("option length " + header.options.length)
15     for (var i = 0; i < header.options.length; ++i) {
16         console.log("option " + header.options[i])
17         optionList.append({name: header.options[i]})
18         Private.setDisplayIndex(selectedIndex)
19     }
20 }