2
* Copyright (C) 2013 Canonical, Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
import Ubuntu.Components 1.1
19
import Ubuntu.Components.ListItems 0.1
20
import Ubuntu.SystemSettings.LanguagePlugin 1.0
21
import Ubuntu.SystemSettings.Wizard.Utils 0.1
22
import "../Components" as LocalComponents
24
LocalComponents.Page {
26
forwardButtonSourceComponent: forwardButton
28
UbuntuLanguagePlugin {
39
anchors.left: parent.left
40
anchors.right: parent.right
42
text: i18n.tr("Welcome to your Ubuntu phone.")
47
anchors.left: parent.left
48
anchors.right: parent.right
50
text: i18n.tr("Let’s get started.")
55
width: units.gu(1) // needed else it will be ignored
60
anchors.left: parent.left
61
anchors.right: parent.right
62
text: listview.currentItem.text
63
onClicked: expanded = !expanded
64
expandedHeight: column.height - combo.y
67
model: plugin.languageNames
68
currentIndex: plugin.currentLanguage
72
listview.currentIndex = index
73
combo.expanded = false
74
i18n.language = plugin.languageCodes[index]
75
i18n.domain = i18n.domain
84
LocalComponents.StackButton {
85
text: i18n.tr("Continue")
87
plugin.currentLanguage = listview.currentIndex
88
System.updateSessionLanguage()