Merge lp:~lukas-kde/unity8/chineseInputOSK into lp:unity8

Proposed by Lukáš Tinkl
Status: Merged
Approved by: Lukáš Tinkl
Approved revision: 2442
Merged at revision: 2477
Proposed branch: lp:~lukas-kde/unity8/chineseInputOSK
Merge into: lp:unity8
Diff against target: 61 lines (+20/-6)
2 files modified
qml/Wizard/Pages/10-welcome.qml (+17/-4)
tests/mocks/Ubuntu/SystemSettings/LanguagePlugin/MockLanguagePlugin.qml (+3/-2)
To merge this branch: bzr merge lp:~lukas-kde/unity8/chineseInputOSK
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Michael Terry Approve
Unity Team Pending
Review via email: mp+296564@code.launchpad.net

Commit message

Select correct Chinese input method for OSK in the wizard

Description of the change

Select correct Chinese input method for OSK in the wizard

Fixes lp:1588633

* Are there any related MPs required for this MP to build/function as expected? Please list.

No

* Did you perform an exploratory manual test run of your code change and any related functionality?

Yes

* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

N/A

* If you changed the UI, has there been a design review?

N/A

To post a comment you must log in.
Revision history for this message
Michael Terry (mterry) wrote :

LGTM. Watched Lukas play with it on his phone.

Minor nit in mock that Hongkong should be "Hong Kong", but I'm not blocking on that.

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2442
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1411/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/1877
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/957
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/957
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/957
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/1903
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1840
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1840
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1840
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1831/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1831
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1831/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1411/rebuild

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Wizard/Pages/10-welcome.qml'
2--- qml/Wizard/Pages/10-welcome.qml 2016-03-29 03:47:39 +0000
3+++ qml/Wizard/Pages/10-welcome.qml 2016-06-06 15:16:25 +0000
4@@ -61,6 +61,21 @@
5 }
6 }
7
8+ function applyOSKSettings(locale) {
9+ var language = locale.split("_")[0].split(".")[0];
10+ var oskLanguage = language;
11+
12+ if (language === "zh") { // special case for Chinese, select either simplified or traditional
13+ if (locale.substr(0, 5) === "zh_CN" || locale.substr(0,5) === "zh_SG") {
14+ oskLanguage = "zh-hans"; // Chinese Simplified
15+ } else {
16+ oskLanguage = "zh-hant"; // Chinese Traditional
17+ }
18+ }
19+
20+ oskPlugin.setCurrentLayout(oskLanguage);
21+ }
22+
23 // splash screen (this has to be on the first page)
24 Image {
25 id: splashImage
26@@ -158,9 +173,8 @@
27 onClicked: {
28 if (plugin.currentLanguage !== languagesListView.currentIndex) {
29 var locale = plugin.languageCodes[languagesListView.currentIndex];
30- var language = locale.split("_")[0].split(".")[0];
31 plugin.currentLanguage = languagesListView.currentIndex;
32- oskPlugin.setCurrentLayout(language);
33+ applyOSKSettings(locale);
34 System.updateSessionLocale(locale);
35 }
36 i18n.language = plugin.languageCodes[plugin.currentLanguage]; // re-notify of change after above call (for qlocale change)
37@@ -169,8 +183,7 @@
38 (root.simManager0.present && root.simManager0.ready) || (root.simManager1.present && root.simManager1.ready) ||
39 root.seenSIMPage) { // go to next page
40 pageStack.next();
41- }
42- else {
43+ } else {
44 pageStack.load(Qt.resolvedUrl("sim.qml")); // show the SIM page
45 }
46 }
47
48=== modified file 'tests/mocks/Ubuntu/SystemSettings/LanguagePlugin/MockLanguagePlugin.qml'
49--- tests/mocks/Ubuntu/SystemSettings/LanguagePlugin/MockLanguagePlugin.qml 2016-03-29 03:47:39 +0000
50+++ tests/mocks/Ubuntu/SystemSettings/LanguagePlugin/MockLanguagePlugin.qml 2016-06-06 15:16:25 +0000
51@@ -17,7 +17,8 @@
52 import QtQuick 2.4
53
54 Item {
55- property var languageNames: ["English (United States)", "French (France)", "Spanish (Spain)"]
56- property var languageCodes: ["en_US", "fr_FR", "es_ES"]
57+ property var languageNames: ["English (United States)", "French (France)", "Spanish (Spain)", "Spanish (Mexico)",
58+ "German (Switzerland)", "Czech (Czechia)", "Chinese (Hongkong)", "Chinese (Singapore)", "Chinese (China)"]
59+ property var languageCodes: ["en_US", "fr_FR", "es_ES", "es_MX", "de_CH", "cs_CZ", "zh_HK", "zh_SG", "zh_CN"]
60 property int currentLanguage: 0
61 }

Subscribers

People subscribed via source and target branches