Merge lp:~michael-sheldon/ubuntu-keyboard/fix-1389274 into lp:ubuntu-keyboard

Proposed by Michael Sheldon
Status: Merged
Approved by: Bill Filler
Approved revision: 258
Merged at revision: 260
Proposed branch: lp:~michael-sheldon/ubuntu-keyboard/fix-1389274
Merge into: lp:ubuntu-keyboard
Diff against target: 52 lines (+21/-0)
3 files modified
debian/ubuntu-keyboard.install (+1/-0)
po/po.pro (+16/-0)
src/plugin/plugin.cpp (+4/-0)
To merge this branch: bzr merge lp:~michael-sheldon/ubuntu-keyboard/fix-1389274
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ken VanDine Approve
Ubuntu Phablet Team Pending
Review via email: mp+244144@code.launchpad.net

Commit message

Fix building and packaging of translation files

Description of the change

Fix building and packaging of translation files

To post a comment you must log in.
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

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

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/ubuntu-keyboard) on device or emulator?

 * Yes

If you changed the UI, was the change specified/approved by design?

 * No change

If you changed UI labels, did you update the pot file?

 * No change

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?

 * Yes

Revision history for this message
Ken VanDine (ken-vandine) wrote :

Looks good

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/ubuntu-keyboard.install'
2--- debian/ubuntu-keyboard.install 2013-12-11 17:15:49 +0000
3+++ debian/ubuntu-keyboard.install 2014-12-09 14:20:51 +0000
4@@ -1,3 +1,4 @@
5 debian/server.conf etc/xdg/maliit.org/
6 usr/lib/maliit/plugins/libubuntu-keyboard-plugin.so
7 usr/share/maliit/plugins/com/ubuntu/lib/libwesternsupport.a
8+usr/share/locale/*/LC_MESSAGES/ubuntu-keyboard.mo
9
10=== modified file 'po/po.pro'
11--- po/po.pro 2014-08-21 11:49:01 +0000
12+++ po/po.pro 2014-12-09 14:20:51 +0000
13@@ -25,3 +25,19 @@
14 $${SOURCECODE} $${DESKTOPFILETEMP}
15 QMAKE_EXTRA_TARGETS += potfile
16
17+PO_FILES = $$system(ls *.po)
18+
19+install_mo_commands =
20+for(po_file, PO_FILES) {
21+ mo_file = $$replace(po_file,.po,.mo)
22+ !isEmpty(install_mo_commands): install_mo_commands += &&
23+ install_mo_commands += msgfmt $$po_file -o $$mo_file
24+ mo_name = $$replace(po_file,.po,)
25+ mo_targetpath = $(INSTALL_ROOT)/usr/share/locale/$${mo_name}/LC_MESSAGES
26+ mo_target = $${mo_targetpath}/$${PROJECTNAME}.mo
27+ install_mo_commands += && test -d $$mo_targetpath || mkdir -p $$mo_targetpath
28+ install_mo_commands += && cp $$mo_file $$mo_target
29+}
30+
31+install.commands = $$install_mo_commands
32+QMAKE_EXTRA_TARGETS += install
33
34=== modified file 'src/plugin/plugin.cpp'
35--- src/plugin/plugin.cpp 2013-10-31 15:26:07 +0000
36+++ src/plugin/plugin.cpp 2014-12-09 14:20:51 +0000
37@@ -33,11 +33,15 @@
38 #include "inputmethod.h"
39
40 #include <QtQml>
41+#include <libintl.h>
42
43 MaliitKeyboardPlugin::MaliitKeyboardPlugin(QObject *parent)
44 : QObject(parent)
45 , Maliit::Plugins::InputMethodPlugin()
46 {
47+ bindtextdomain("ubuntu-keyboard", NULL);
48+ textdomain("ubuntu-keyboard");
49+
50 qmlRegisterUncreatableType<InputMethod>("UbuntuKeyboard", 1, 0, "InputMethod",
51 QString("InputMethod can't be created in QML"));
52 }

Subscribers

People subscribed via source and target branches