Merge lp:~danilo/ubuntu-keyboard/serbian-layout into lp:ubuntu-keyboard

Proposed by Данило Шеган
Status: Merged
Approved by: Michael Sheldon
Approved revision: 210
Merged at revision: 213
Proposed branch: lp:~danilo/ubuntu-keyboard/serbian-layout
Merge into: lp:ubuntu-keyboard
Diff against target: 606 lines (+500/-0)
14 files modified
debian/control (+9/-0)
debian/ubuntu-keyboard-serbian.install (+1/-0)
plugins/plugins.pro (+1/-0)
plugins/sr/qml/Keyboard_sr.qml (+94/-0)
plugins/sr/qml/Keyboard_sr_email.qml (+95/-0)
plugins/sr/qml/Keyboard_sr_url.qml (+95/-0)
plugins/sr/qml/Keyboard_sr_url_search.qml (+95/-0)
plugins/sr/qml/qml.pro (+20/-0)
plugins/sr/sr.pro (+9/-0)
plugins/sr/src/serbianplugin.h (+25/-0)
plugins/sr/src/serbianplugin.json (+7/-0)
plugins/sr/src/src.pro (+45/-0)
qml/KeyboardContainer.qml (+3/-0)
qml/keys/LanguageMenu.qml (+1/-0)
To merge this branch: bzr merge lp:~danilo/ubuntu-keyboard/serbian-layout
Reviewer Review Type Date Requested Status
Michael Sheldon (community) Approve
PS Jenkins bot continuous-integration Approve
Łukasz Zemczak packaging Approve
Review via email: mp+229876@code.launchpad.net

Commit message

Implement a basic Serbian keyboard layout with diacritics.

This branch implements a basic Serbian keyboard layout in Cyrillic script along with all the diacritics that are in use as extended characters on appropriate vowel keys.

It also introduces the email, URL and URL-search variants even though it'd be rare to use Cyrillic for web domains, though there is a Serbian Cyrillic top-level domain ".срб".

Description of the change

Implement a basic Serbian keyboard.

At this time, I do not implement a better set of symbols layout (other keys should be more easily accessible like the appropriate quotes for Serbian), nor the Serbian Latin branch: all of that should come in follow-up branches, and this one is already a decent start.

I am not sure how to make the space bar key narrower so the "symbols" key shows in full: I've noticed this with the Russian layout as well.

To post a comment you must log in.
200. By Данило Шеган

Merge trunk.

201. By Данило Шеган

Update changelog.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
202. By Данило Шеган

Add accents for the default Serbian layout.

203. By Данило Шеган

Add accented vowels to the rest of the layouts.

204. By Данило Шеган

Merge trunk.

Revision history for this message
Данило Шеган (danilo) wrote :

I've added the accented vowels to the Serbian layout. I am not happy with the current Keyboard_symbols.qml use for Serbian since there are characters that need to be more easily accessible (like appropriate quotes „“, ‘’, »« and dashes —, –), but that means redefining the entire layout (which might not be a bad idea, since we'll need it for the Serbian Latin layout as well).

205. By Данило Шеган

Update changelog.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
206. By Данило Шеган

Drop changelog entry.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Данило Шеган (danilo) wrote :

Here's a test checklist for ubuntu-keyboard (taken from https://wiki.ubuntu.com/Process/Merges/TestPlan/ubuntu-keyboard):

ubuntu-keyboard/serbian-layout testing

 * Install latest (trusty-proposed) image on phone: DONE (utopic-proposed r195)
 * Install freshly build MPs that are needed for landing (installed build-deps & hunspell-sr): DONE
 * Test that you can input characters, numbers and symbols correctly: DONE
 * Test that all keyboard layouts are being displayed correctly in address book app by creating a new contact:
   * English & Serbian: OK
   * All the rest: loaded them, switched between them, typed a few characters, some extended, some normal, worked fine.
 * Ensure that regular layout, number layout, url layout are displayed depending on what field has focus: DONE
 * Test that url layout (with .com key) is displayed when typing in browser url field: DONE (both Serbian and English)
 * Test that you can dismiss the keyboard by swiping down: DONE
 * Test that extended keys (long press) work: DONE
   * Serbian: some of the extended keys which use combining Unicode accents display incorrectly, due to bugs in the Ubuntu font "̑ " accent (works fine in DejaVu Sans, for instance — to get it to be readable in Ubuntu Font, I've added a couple of spaces after it).
 * Test that returning to the Dash will cause keyboard to be hidden: DONE
 * Test that keyboard rotates if the app in focus is rotated: DONE
 * Test the available System Settings (Language and Text) work as expected, including word prediction, auto caps, spell checking and other: DONE for English & Serbian
 * Enable multiple languages from the System Settings, verify that you can switch languages in the keyboard by pressing and holding the globe menu: DONE for all the languages
 * Verify that word prediction and spell checking returns results in the language selected in the globe menu: DONE (for English and Serbian)

The debs that I build (I didn't update the version number) are up at http://people.canonical.com/~danilo/ubuntu/ubuntu-keyboard-serbian/

207. By Данило Шеган

Merge trunk.

Revision history for this message
Данило Шеган (danilo) wrote :

As Michael pointed out, that was the test plan, the checklist is here:

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

* Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)
Yes.

* Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?
Yes, on Nexus 4 (see above).

* Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/<package-name>) on device or emulator?
Yes, see above.

* If you changed the UI, was the change specified/approved by design?
No UI changes (only additions to existing data structures).

* If you changed UI labels, did you update the pot file?
Added "Serbian" UI label, but can't find the POT file nor instructions on how should it be updated.

* If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?
Asked Michael Sheldon (Elleo) for review.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Packaging-wise all looks alright. So a MOTU +1 from this side :)

review: Approve (packaging)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Couple of small issues I found while testing:

 1) Could you add numbers to the extended keys on the top row so it's consistent with the other keyboard layouts

 2) The domain extended keys go beyond the edges of the screen when in portrait mode on a phone, could you remove the least used domain from that list. I've filed bug 1359743 to remind myself to modify the extended keys pop-over to switch to a multi-line view when it gets too large, once that's implemented we can reintroduce the removed domains.

As soon as those are done I think this branch will be ready to go :)

review: Needs Fixing
208. By Данило Шеган

Add digits as extended symbols on top row to match other layouts. Suggested by Michael Sheldon in review.

209. By Данило Шеган

Move overflowing .срб subdomains to extendedShifted on the UrlKey.

210. By Данило Шеган

Fix the UrlKey for email layout as well.

Revision history for this message
Данило Шеган (danilo) wrote :

Ok, I believe I've addressed both of your points:
 1) Added numbers as the first characters of the extended keys to match the other layouts (if they have accented letters, they are after the numbers)
 2) I've moved a couple of domains that do not fit and are least used according to http://www.rnids.rs/cir/ into extendedShifted: that makes them still be available, yet there is no overflowing problem.

If you want, I can still drop them, but I think this should be satisfactory (it's mostly that I don't know which ones would be best to drop :)).

I've tested by copying .qml files to /usr/share/maliit/plugins/com/ubuntu/lib/sr/ instead of recompiling.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?

 * Yes

Did CI run pass? If not, please explain why.

 * Yes

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?

 * Yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-08-11 12:10:45 +0000
3+++ debian/control 2014-08-21 17:09:44 +0000
4@@ -216,6 +216,15 @@
5 Description: Ubuntu on-screen keyboard data files - Russian
6 Data files for the Ubuntu virtual keyboard - Russian
7
8+Package: ubuntu-keyboard-serbian
9+Architecture: any
10+Depends: ubuntu-keyboard (= ${binary:Version}),
11+ hunspell-sr,
12+ ${misc:Depends},
13+ ${shlibs:Depends},
14+Description: Ubuntu on-screen keyboard data files - Serbian
15+ Data files for the Ubuntu virtual keyboard - Serbian
16+
17 Package: ubuntu-keyboard-spanish
18 Architecture: any
19 Depends: ubuntu-keyboard (= ${binary:Version}),
20
21=== added file 'debian/ubuntu-keyboard-serbian.install'
22--- debian/ubuntu-keyboard-serbian.install 1970-01-01 00:00:00 +0000
23+++ debian/ubuntu-keyboard-serbian.install 2014-08-21 17:09:44 +0000
24@@ -0,0 +1,1 @@
25+usr/share/maliit/plugins/com/ubuntu/lib/sr/
26
27=== modified file 'plugins/plugins.pro'
28--- plugins/plugins.pro 2014-01-21 22:51:18 +0000
29+++ plugins/plugins.pro 2014-08-21 17:09:44 +0000
30@@ -17,6 +17,7 @@
31 pl \
32 pt \
33 ru \
34+ sr \
35 sv \
36 pinyin \
37
38
39=== added directory 'plugins/sr'
40=== added directory 'plugins/sr/qml'
41=== added file 'plugins/sr/qml/Keyboard_sr.qml'
42--- plugins/sr/qml/Keyboard_sr.qml 1970-01-01 00:00:00 +0000
43+++ plugins/sr/qml/Keyboard_sr.qml 2014-08-21 17:09:44 +0000
44@@ -0,0 +1,94 @@
45+/*
46+ * Copyright 2013 Canonical Ltd.
47+ *
48+ * This program is free software; you can redistribute it and/or modify
49+ * it under the terms of the GNU Lesser General Public License as published by
50+ * the Free Software Foundation; version 3.
51+ *
52+ * This program is distributed in the hope that it will be useful,
53+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
54+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
55+ * GNU Lesser General Public License for more details.
56+ *
57+ * You should have received a copy of the GNU Lesser General Public License
58+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
59+ */
60+
61+import QtQuick 2.0
62+import "../../keys"
63+
64+KeyPad {
65+ anchors.fill: parent
66+
67+ content: c1
68+ symbols: "languages/Keyboard_symbols.qml"
69+
70+ Column {
71+ id: c1
72+ anchors.fill: parent
73+
74+ Row {
75+ anchors.horizontalCenter: parent.horizontalCenter;
76+ spacing: 0
77+
78+ CharKey { label: "љ"; shifted: "Љ"; extended: ["1"]; extendedShifted: ["1"]}
79+ CharKey { label: "њ"; shifted: "Њ"; extended: ["2"]; extendedShifted: ["2"] }
80+ CharKey { label: "е"; shifted: "Е"; extended: ["3", "е́", "е̑", "ѐ", "е̏", "е̄", "€"]; extendedShifted: ["3", "Е́", "Е̑", "Ѐ", "Е̏", "Е̄", "€"] }
81+ CharKey { label: "р"; shifted: "Р"; extended: ["4"]; extendedShifted: ["4"] }
82+ CharKey { label: "т"; shifted: "Т"; extended: ["5"]; extendedShifted: ["5"] }
83+ CharKey { label: "з"; shifted: "З"; extended: ["6"]; extendedShifted: ["6"] }
84+ CharKey { label: "у"; shifted: "У"; extended: ["7", "у́", "у̑", "у̀", "у̏", "ӯ"]; extendedShifted: ["7", "У́", "У̑", "У̀", "У̏", "Ӯ"] }
85+ CharKey { label: "и"; shifted: "И"; extended: ["8", "и́", "и̑", "ѝ", "и̏", "ӣ"]; extendedShifted: ["8", "И́", "И̑", "Ѝ", "И̏", "Ӣ"] }
86+ CharKey { label: "о"; shifted: "О"; extended: ["9", "о́", "о̑", "о̀", "о̏", "о̄"]; extendedShifted: ["9", "О́", "О̑", "О̀", "О̏", "О̄"] }
87+ CharKey { label: "п"; shifted: "П"; extended: ["0"]; extendedShifted: ["0"] }
88+ CharKey { label: "ш"; shifted: "Ш"; }
89+ CharKey { label: "ђ"; shifted: "Ђ"; }
90+ }
91+
92+ Row {
93+ anchors.horizontalCenter: parent.horizontalCenter;
94+ spacing: 0
95+
96+ CharKey { label: "а"; shifted: "А"; extended: ["а́", "а̑", "а̀", "а̏", "а̄"]; extendedShifted: ["А́", "А̑", "А̀", "А̏", "А̄"]}
97+ CharKey { label: "с"; shifted: "С"; }
98+ CharKey { label: "д"; shifted: "Д"; }
99+ CharKey { label: "ф"; shifted: "Ф"; }
100+ CharKey { label: "г"; shifted: "Г"; }
101+ CharKey { label: "х"; shifted: "Х"; }
102+ CharKey { label: "ј"; shifted: "Ј"; }
103+ CharKey { label: "к"; shifted: "К"; }
104+ CharKey { label: "л"; shifted: "Л"; }
105+ CharKey { label: "ч"; shifted: "Ч"; }
106+ CharKey { label: "ћ"; shifted: "Ћ"; }
107+ }
108+
109+ Row {
110+ anchors.horizontalCenter: parent.horizontalCenter;
111+ spacing: 0
112+
113+ ShiftKey { }
114+ CharKey { label: ","; shifted: "/"; }
115+ CharKey { label: "џ"; shifted: "Џ"; }
116+ CharKey { label: "ц"; shifted: "Ц"; }
117+ CharKey { label: "в"; shifted: "В"; }
118+ CharKey { label: "б"; shifted: "Б"; }
119+ CharKey { label: "н"; shifted: "Н"; }
120+ CharKey { label: "м"; shifted: "М"; }
121+ CharKey { label: "ж"; shifted: "Ж"; }
122+ CharKey { label: "."; shifted: "."; }
123+ BackspaceKey { }
124+ }
125+
126+ Item {
127+ anchors.left: parent.left
128+ anchors.right: parent.right
129+
130+ height: panel.keyHeight;
131+
132+ SymbolShiftKey { id: symShiftKey; anchors.left: parent.left; }
133+ LanguageKey { id: languageMenuButton; anchors.left: symShiftKey.right; }
134+ SpaceKey { id: spaceKey; anchors.left: languageMenuButton.right; anchors.right: enterKey.left; noMagnifier: true }
135+ ReturnKey { id: enterKey; anchors.right: parent.right }
136+ }
137+ } // column
138+}
139
140=== added file 'plugins/sr/qml/Keyboard_sr_email.qml'
141--- plugins/sr/qml/Keyboard_sr_email.qml 1970-01-01 00:00:00 +0000
142+++ plugins/sr/qml/Keyboard_sr_email.qml 2014-08-21 17:09:44 +0000
143@@ -0,0 +1,95 @@
144+/*
145+ * Copyright 2013 Canonical Ltd.
146+ *
147+ * This program is free software; you can redistribute it and/or modify
148+ * it under the terms of the GNU Lesser General Public License as published by
149+ * the Free Software Foundation; version 3.
150+ *
151+ * This program is distributed in the hope that it will be useful,
152+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
153+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
154+ * GNU Lesser General Public License for more details.
155+ *
156+ * You should have received a copy of the GNU Lesser General Public License
157+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
158+ */
159+
160+import QtQuick 2.0
161+import "../../keys"
162+
163+KeyPad {
164+ anchors.fill: parent
165+
166+ content: c1
167+ symbols: "languages/Keyboard_symbols.qml"
168+
169+ Column {
170+ id: c1
171+ anchors.fill: parent
172+ spacing: 0
173+
174+ Row {
175+ anchors.horizontalCenter: parent.horizontalCenter;
176+ spacing: 0
177+
178+ CharKey { label: "љ"; shifted: "Љ"; extended: ["1"]; extendedShifted: ["1"]}
179+ CharKey { label: "њ"; shifted: "Њ"; extended: ["2"]; extendedShifted: ["2"] }
180+ CharKey { label: "е"; shifted: "Е"; extended: ["3", "е́", "е̑", "ѐ", "е̏", "е̄", "€"]; extendedShifted: ["3", "Е́", "Е̑", "Ѐ", "Е̏", "Е̄", "€"] }
181+ CharKey { label: "р"; shifted: "Р"; extended: ["4"]; extendedShifted: ["4"] }
182+ CharKey { label: "т"; shifted: "Т"; extended: ["5"]; extendedShifted: ["5"] }
183+ CharKey { label: "з"; shifted: "З"; extended: ["6"]; extendedShifted: ["6"] }
184+ CharKey { label: "у"; shifted: "У"; extended: ["7", "у́", "у̑", "у̀", "у̏", "ӯ"]; extendedShifted: ["7", "У́", "У̑", "У̀", "У̏", "Ӯ"] }
185+ CharKey { label: "и"; shifted: "И"; extended: ["8", "и́", "и̑", "ѝ", "и̏", "ӣ"]; extendedShifted: ["8", "И́", "И̑", "Ѝ", "И̏", "Ӣ"] }
186+ CharKey { label: "о"; shifted: "О"; extended: ["9", "о́", "о̑", "о̀", "о̏", "о̄"]; extendedShifted: ["9", "О́", "О̑", "О̀", "О̏", "О̄"] }
187+ CharKey { label: "п"; shifted: "П"; extended: ["0"]; extendedShifted: ["0"] }
188+ CharKey { label: "ш"; shifted: "Ш"; }
189+ CharKey { label: "ђ"; shifted: "Ђ"; }
190+ }
191+
192+ Row {
193+ anchors.horizontalCenter: parent.horizontalCenter;
194+ spacing: 0
195+
196+ CharKey { label: "а"; shifted: "А"; extended: ["а́", "а̑", "а̀", "а̏", "а̄"]; extendedShifted: ["А́", "А̑", "А̀", "А̏", "А̄"]}
197+ CharKey { label: "с"; shifted: "С"; }
198+ CharKey { label: "д"; shifted: "Д"; }
199+ CharKey { label: "ф"; shifted: "Ф"; }
200+ CharKey { label: "г"; shifted: "Г"; }
201+ CharKey { label: "х"; shifted: "Х"; }
202+ CharKey { label: "ј"; shifted: "Ј"; }
203+ CharKey { label: "к"; shifted: "К"; }
204+ CharKey { label: "л"; shifted: "Л"; }
205+ CharKey { label: "ч"; shifted: "Ч"; }
206+ CharKey { label: "ћ"; shifted: "Ћ"; }
207+ }
208+
209+ Row {
210+ anchors.horizontalCenter: parent.horizontalCenter;
211+ spacing: 0
212+
213+ ShiftKey { }
214+ CharKey { label: "@"; shifted: "@"; }
215+ CharKey { label: "џ"; shifted: "Џ"; }
216+ CharKey { label: "ц"; shifted: "Ц"; }
217+ CharKey { label: "в"; shifted: "В"; }
218+ CharKey { label: "б"; shifted: "Б"; }
219+ CharKey { label: "н"; shifted: "Н"; }
220+ CharKey { label: "м"; shifted: "М"; }
221+ CharKey { label: "ж"; shifted: "Ж"; }
222+ CharKey { label: "."; shifted: "."; }
223+ BackspaceKey { }
224+ }
225+
226+ Item {
227+ anchors.left: parent.left
228+ anchors.right: parent.right
229+
230+ height: panel.keyHeight;
231+ SymbolShiftKey { id: symShiftKey; anchors.left: parent.left; }
232+ LanguageKey { id: languageMenuButton; anchors.left: symShiftKey.right; }
233+ SpaceKey { id: spaceKey; anchors.left: languageMenuButton.right; anchors.right: urlKey.left; noMagnifier: true }
234+ UrlKey { id: urlKey; label: ".срб"; extended: [".пр.срб", ".орг.срб", ".од.срб" ]; extendedShifted: [".ак.срб", ".упр.срб", ".обр.срб" ]; anchors.right: enterKey.left; }
235+ ReturnKey { id: enterKey; anchors.right: parent.right }
236+ }
237+ } // column
238+}
239
240=== added file 'plugins/sr/qml/Keyboard_sr_url.qml'
241--- plugins/sr/qml/Keyboard_sr_url.qml 1970-01-01 00:00:00 +0000
242+++ plugins/sr/qml/Keyboard_sr_url.qml 2014-08-21 17:09:44 +0000
243@@ -0,0 +1,95 @@
244+/*
245+ * Copyright 2013 Canonical Ltd.
246+ *
247+ * This program is free software; you can redistribute it and/or modify
248+ * it under the terms of the GNU Lesser General Public License as published by
249+ * the Free Software Foundation; version 3.
250+ *
251+ * This program is distributed in the hope that it will be useful,
252+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
253+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
254+ * GNU Lesser General Public License for more details.
255+ *
256+ * You should have received a copy of the GNU Lesser General Public License
257+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
258+ */
259+
260+import QtQuick 2.0
261+import "../../keys"
262+
263+KeyPad {
264+ anchors.fill: parent
265+
266+ content: c1
267+ symbols: "languages/Keyboard_symbols.qml"
268+
269+ Column {
270+ id: c1
271+ anchors.fill: parent
272+ spacing: 0
273+
274+ Row {
275+ anchors.horizontalCenter: parent.horizontalCenter;
276+ spacing: 0
277+
278+ CharKey { label: "љ"; shifted: "Љ"; extended: ["1"]; extendedShifted: ["1"]}
279+ CharKey { label: "њ"; shifted: "Њ"; extended: ["2"]; extendedShifted: ["2"] }
280+ CharKey { label: "е"; shifted: "Е"; extended: ["3", "е́", "е̑", "ѐ", "е̏", "е̄", "€"]; extendedShifted: ["3", "Е́", "Е̑", "Ѐ", "Е̏", "Е̄", "€"] }
281+ CharKey { label: "р"; shifted: "Р"; extended: ["4"]; extendedShifted: ["4"] }
282+ CharKey { label: "т"; shifted: "Т"; extended: ["5"]; extendedShifted: ["5"] }
283+ CharKey { label: "з"; shifted: "З"; extended: ["6"]; extendedShifted: ["6"] }
284+ CharKey { label: "у"; shifted: "У"; extended: ["7", "у́", "у̑", "у̀", "у̏", "ӯ"]; extendedShifted: ["7", "У́", "У̑", "У̀", "У̏", "Ӯ"] }
285+ CharKey { label: "и"; shifted: "И"; extended: ["8", "и́", "и̑", "ѝ", "и̏", "ӣ"]; extendedShifted: ["8", "И́", "И̑", "Ѝ", "И̏", "Ӣ"] }
286+ CharKey { label: "о"; shifted: "О"; extended: ["9", "о́", "о̑", "о̀", "о̏", "о̄"]; extendedShifted: ["9", "О́", "О̑", "О̀", "О̏", "О̄"] }
287+ CharKey { label: "п"; shifted: "П"; extended: ["0"]; extendedShifted: ["0"] }
288+ CharKey { label: "ш"; shifted: "Ш"; }
289+ CharKey { label: "ђ"; shifted: "Ђ"; }
290+ }
291+
292+ Row {
293+ anchors.horizontalCenter: parent.horizontalCenter;
294+ spacing: 0
295+
296+ CharKey { label: "а"; shifted: "А"; extended: ["а́", "а̑", "а̀", "а̏", "а̄"]; extendedShifted: ["А́", "А̑", "А̀", "А̏", "А̄"]}
297+ CharKey { label: "с"; shifted: "С"; }
298+ CharKey { label: "д"; shifted: "Д"; }
299+ CharKey { label: "ф"; shifted: "Ф"; }
300+ CharKey { label: "г"; shifted: "Г"; }
301+ CharKey { label: "х"; shifted: "Х"; }
302+ CharKey { label: "ј"; shifted: "Ј"; }
303+ CharKey { label: "к"; shifted: "К"; }
304+ CharKey { label: "л"; shifted: "Л"; }
305+ CharKey { label: "ч"; shifted: "Ч"; }
306+ CharKey { label: "ћ"; shifted: "Ћ"; }
307+ }
308+
309+ Row {
310+ anchors.horizontalCenter: parent.horizontalCenter;
311+ spacing: 0
312+
313+ ShiftKey { }
314+ CharKey { label: "/"; shifted: "/"; }
315+ CharKey { label: "џ"; shifted: "Џ"; }
316+ CharKey { label: "ц"; shifted: "Ц"; }
317+ CharKey { label: "в"; shifted: "В"; }
318+ CharKey { label: "б"; shifted: "Б"; }
319+ CharKey { label: "н"; shifted: "Н"; }
320+ CharKey { label: "м"; shifted: "М"; }
321+ CharKey { label: "ж"; shifted: "Ж"; }
322+ CharKey { label: "."; shifted: "."; }
323+ BackspaceKey { }
324+ }
325+
326+ Item {
327+ anchors.left: parent.left
328+ anchors.right: parent.right
329+
330+ height: panel.keyHeight;
331+ SymbolShiftKey { id: symShiftKey; anchors.left: parent.left; }
332+ LanguageKey { id: languageMenuButton; anchors.left: symShiftKey.right; }
333+ SpaceKey { id: spaceKey; anchors.left: languageMenuButton.right; anchors.right: urlKey.left; noMagnifier: true }
334+ UrlKey { id: urlKey; label: ".срб"; extended: [".пр.срб", ".орг.срб", ".од.срб" ]; extendedShifted: [".ак.срб", ".упр.срб", ".обр.срб" ]; anchors.right: enterKey.left; }
335+ ReturnKey { id: enterKey; anchors.right: parent.right }
336+ }
337+ } // column
338+}
339
340=== added file 'plugins/sr/qml/Keyboard_sr_url_search.qml'
341--- plugins/sr/qml/Keyboard_sr_url_search.qml 1970-01-01 00:00:00 +0000
342+++ plugins/sr/qml/Keyboard_sr_url_search.qml 2014-08-21 17:09:44 +0000
343@@ -0,0 +1,95 @@
344+/*
345+ * Copyright 2013 Canonical Ltd.
346+ *
347+ * This program is free software; you can redistribute it and/or modify
348+ * it under the terms of the GNU Lesser General Public License as published by
349+ * the Free Software Foundation; version 3.
350+ *
351+ * This program is distributed in the hope that it will be useful,
352+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
353+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
354+ * GNU Lesser General Public License for more details.
355+ *
356+ * You should have received a copy of the GNU Lesser General Public License
357+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
358+ */
359+
360+import QtQuick 2.0
361+import "../../keys"
362+
363+KeyPad {
364+ anchors.fill: parent
365+
366+ content: c1
367+ symbols: "languages/Keyboard_symbols.qml"
368+
369+ Column {
370+ id: c1
371+ anchors.fill: parent
372+ spacing: 0
373+
374+ Row {
375+ anchors.horizontalCenter: parent.horizontalCenter;
376+ spacing: 0
377+
378+ CharKey { label: "љ"; shifted: "Љ"; extended: ["1"]; extendedShifted: ["1"]}
379+ CharKey { label: "њ"; shifted: "Њ"; extended: ["2"]; extendedShifted: ["2"] }
380+ CharKey { label: "е"; shifted: "Е"; extended: ["3", "е́", "е̑", "ѐ", "е̏", "е̄", "€"]; extendedShifted: ["3", "Е́", "Е̑", "Ѐ", "Е̏", "Е̄", "€"] }
381+ CharKey { label: "р"; shifted: "Р"; extended: ["4"]; extendedShifted: ["4"] }
382+ CharKey { label: "т"; shifted: "Т"; extended: ["5"]; extendedShifted: ["5"] }
383+ CharKey { label: "з"; shifted: "З"; extended: ["6"]; extendedShifted: ["6"] }
384+ CharKey { label: "у"; shifted: "У"; extended: ["7", "у́", "у̑", "у̀", "у̏", "ӯ"]; extendedShifted: ["7", "У́", "У̑", "У̀", "У̏", "Ӯ"] }
385+ CharKey { label: "и"; shifted: "И"; extended: ["8", "и́", "и̑", "ѝ", "и̏", "ӣ"]; extendedShifted: ["8", "И́", "И̑", "Ѝ", "И̏", "Ӣ"] }
386+ CharKey { label: "о"; shifted: "О"; extended: ["9", "о́", "о̑", "о̀", "о̏", "о̄"]; extendedShifted: ["9", "О́", "О̑", "О̀", "О̏", "О̄"] }
387+ CharKey { label: "п"; shifted: "П"; extended: ["0"]; extendedShifted: ["0"] }
388+ CharKey { label: "ш"; shifted: "Ш"; }
389+ CharKey { label: "ђ"; shifted: "Ђ"; }
390+ }
391+
392+ Row {
393+ anchors.horizontalCenter: parent.horizontalCenter;
394+ spacing: 0
395+
396+ CharKey { label: "а"; shifted: "А"; extended: ["а́", "а̑", "а̀", "а̏", "а̄"]; extendedShifted: ["А́", "А̑", "А̀", "А̏", "А̄"]}
397+ CharKey { label: "с"; shifted: "С"; }
398+ CharKey { label: "д"; shifted: "Д"; }
399+ CharKey { label: "ф"; shifted: "Ф"; }
400+ CharKey { label: "г"; shifted: "Г"; }
401+ CharKey { label: "х"; shifted: "Х"; }
402+ CharKey { label: "ј"; shifted: "Ј"; }
403+ CharKey { label: "к"; shifted: "К"; }
404+ CharKey { label: "л"; shifted: "Л"; }
405+ CharKey { label: "ч"; shifted: "Ч"; }
406+ CharKey { label: "ћ"; shifted: "Ћ"; }
407+ }
408+
409+ Row {
410+ anchors.horizontalCenter: parent.horizontalCenter;
411+ spacing: 0
412+
413+ ShiftKey { }
414+ CharKey { label: "/"; shifted: "/"; }
415+ CharKey { label: "џ"; shifted: "Џ"; }
416+ CharKey { label: "ц"; shifted: "Ц"; }
417+ CharKey { label: "в"; shifted: "В"; }
418+ CharKey { label: "б"; shifted: "Б"; }
419+ CharKey { label: "н"; shifted: "Н"; }
420+ CharKey { label: "м"; shifted: "М"; }
421+ CharKey { label: "ж"; shifted: "Ж"; }
422+ CharKey { label: "."; shifted: "."; }
423+ BackspaceKey { }
424+ }
425+
426+ Item {
427+ anchors.left: parent.left
428+ anchors.right: parent.right
429+
430+ height: panel.keyHeight;
431+ SymbolShiftKey { id: symShiftKey; anchors.left: parent.left; }
432+ LanguageKey { id: languageMenuButton; anchors.left: symShiftKey.right; }
433+ SpaceKey { id: spaceKey; anchors.left: languageMenuButton.right; anchors.right: urlKey.left; noMagnifier: true }
434+ UrlKey { id: urlKey; label: ".срб"; extended: [".пр.срб", ".орг.срб", ".од.срб" ]; extendedShifted: [".ак.срб", ".упр.срб", ".обр.срб" ]; anchors.right: enterKey.left; }
435+ ReturnKey { id: enterKey; anchors.right: parent.right }
436+ }
437+ } // column
438+}
439
440=== added file 'plugins/sr/qml/qml.pro'
441--- plugins/sr/qml/qml.pro 1970-01-01 00:00:00 +0000
442+++ plugins/sr/qml/qml.pro 2014-08-21 17:09:44 +0000
443@@ -0,0 +1,20 @@
444+TOP_BUILDDIR = $$OUT_PWD/../../..
445+TOP_SRCDIR = $$PWD/../../..
446+
447+include($${TOP_SRCDIR}/config.pri)
448+
449+TARGET = dummy
450+TEMPLATE = lib
451+
452+lang_sr.path = "$${UBUNTU_KEYBOARD_LIB_DIR}/sr/"
453+lang_sr.files = *.qml *.js
454+
455+INSTALLS += lang_sr
456+
457+# for QtCreator
458+OTHER_FILES += \
459+ Keyboard_sr.qml \
460+ Keyboard_sr_email.qml \
461+ Keyboard_sr_url.qml \
462+ Keyboard_sr_url_search.qml
463+
464
465=== added file 'plugins/sr/sr.pro'
466--- plugins/sr/sr.pro 1970-01-01 00:00:00 +0000
467+++ plugins/sr/sr.pro 2014-08-21 17:09:44 +0000
468@@ -0,0 +1,9 @@
469+CONFIG += ordered
470+TEMPLATE = subdirs
471+SUBDIRS = \
472+ src \
473+ qml
474+
475+QMAKE_EXTRA_TARGETS += check
476+check.target = check
477+check.CONFIG = recursive
478
479=== added directory 'plugins/sr/src'
480=== added file 'plugins/sr/src/database_sr.db'
481Binary files plugins/sr/src/database_sr.db 1970-01-01 00:00:00 +0000 and plugins/sr/src/database_sr.db 2014-08-21 17:09:44 +0000 differ
482=== added file 'plugins/sr/src/free_ebook.txt'
483=== added file 'plugins/sr/src/serbianplugin.h'
484--- plugins/sr/src/serbianplugin.h 1970-01-01 00:00:00 +0000
485+++ plugins/sr/src/serbianplugin.h 2014-08-21 17:09:44 +0000
486@@ -0,0 +1,25 @@
487+#ifndef SERBIANPLUGIN_H
488+#define SERBIANPLUGIN_H
489+
490+#include <QObject>
491+#include "languageplugininterface.h"
492+#include "westernlanguagesplugin.h"
493+
494+class SerbianPlugin : public WesternLanguagesPlugin
495+{
496+ Q_OBJECT
497+ Q_INTERFACES(LanguagePluginInterface)
498+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Examples.SerbianPlugin" FILE "serbianplugin.json")
499+
500+public:
501+ explicit SerbianPlugin(QObject* parent = 0)
502+ : WesternLanguagesPlugin(parent)
503+ {
504+ }
505+
506+ virtual ~SerbianPlugin()
507+ {
508+ }
509+};
510+
511+#endif // SERBIANPLUGIN_H
512
513=== added file 'plugins/sr/src/serbianplugin.json'
514--- plugins/sr/src/serbianplugin.json 1970-01-01 00:00:00 +0000
515+++ plugins/sr/src/serbianplugin.json 2014-08-21 17:09:44 +0000
516@@ -0,0 +1,7 @@
517+{
518+ "IID": "org.qt-project.Qt.Examples.SerbianPlugin",
519+ "MetaData": {
520+ },
521+ "className": "SerbianPlugin",
522+ "debug": true
523+}
524
525=== added file 'plugins/sr/src/src.pro'
526--- plugins/sr/src/src.pro 1970-01-01 00:00:00 +0000
527+++ plugins/sr/src/src.pro 2014-08-21 17:09:44 +0000
528@@ -0,0 +1,45 @@
529+TOP_BUILDDIR = $$OUT_PWD/../../..
530+TOP_SRCDIR = $$PWD/../../..
531+
532+include($${TOP_SRCDIR}/config.pri)
533+
534+TEMPLATE = lib
535+CONFIG += plugin
536+QT += widgets
537+INCLUDEPATH += \
538+ $${TOP_SRCDIR}/src/ \
539+ $${TOP_SRCDIR}/src/lib/ \
540+ $${TOP_SRCDIR}/src/lib/logic/
541+ $${TOP_SRCDIR}/plugins/westernsupport
542+
543+HEADERS = \
544+ serbianplugin.h
545+
546+TARGET = $$qtLibraryTarget(serbianplugin)
547+
548+EXAMPLE_FILES = serbianplugin.json
549+
550+# generate database for presage:
551+PLUGIN_INSTALL_PATH = $${UBUNTU_KEYBOARD_LIB_DIR}/sr/
552+
553+lang_db_sr.path = $$PLUGIN_INSTALL_PATH
554+lang_db_sr.commands += \
555+ rm -f $$PWD/database_sr.db && \
556+ text2ngram -n 1 -l -f sqlite -o $$PWD/database_sr.db $$PWD/free_ebook.txt && \
557+ text2ngram -n 2 -l -f sqlite -o $$PWD/database_sr.db $$PWD/free_ebook.txt && \
558+ text2ngram -n 3 -l -f sqlite -o $$PWD/database_sr.db $$PWD/free_ebook.txt
559+
560+lang_db_sr.files += $$PWD/database_sr.db
561+QMAKE_EXTRA_TARGETS += lang_db_sr
562+
563+target.path = $$PLUGIN_INSTALL_PATH
564+INSTALLS += target lang_db_sr
565+
566+OTHER_FILES += \
567+ serbianplugin.json \
568+ free_ebook.txt
569+
570+LIBS += $${TOP_BUILDDIR}/plugins/plugins/libwesternsupport.a -lpresage -lhunspell
571+
572+INCLUDEPATH += $$PWD/../../westernsupport
573+DEPENDPATH += $$PWD/../../westernsupport
574
575=== added directory 'plugins/sr/tests'
576=== modified file 'qml/KeyboardContainer.qml'
577--- qml/KeyboardContainer.qml 2014-08-08 12:42:52 +0000
578+++ qml/KeyboardContainer.qml 2014-08-21 17:09:44 +0000
579@@ -121,6 +121,7 @@
580 "pl",
581 "pt",
582 "ru",
583+ "sr",
584 "sv",
585 "zh",
586 ];
587@@ -167,6 +168,8 @@
588 return "lib/pt/Keyboard_pt.qml";
589 if (language === "ru")
590 return "lib/ru/Keyboard_ru.qml";
591+ if (language === "sr")
592+ return "lib/sr/Keyboard_sr.qml";
593 if (language === "sv")
594 return "lib/sv/Keyboard_sv.qml";
595 if (language === "zh")
596
597=== modified file 'qml/keys/LanguageMenu.qml'
598--- qml/keys/LanguageMenu.qml 2014-07-16 10:18:40 +0000
599+++ qml/keys/LanguageMenu.qml 2014-08-21 17:09:44 +0000
600@@ -82,6 +82,7 @@
601 if (languageId == "pl") return i18n.tr("Polish");
602 if (languageId == "pt") return i18n.tr("Portuguese");
603 if (languageId == "ru") return i18n.tr("Russian");
604+ if (languageId == "sr") return i18n.tr("Serbian");
605 if (languageId == "sv") return i18n.tr("Swedish");
606 if (languageId == "zh") return i18n.tr("Chinese - Pinyin");
607

Subscribers

People subscribed via source and target branches