Merge lp:~paulliu/unity/i18n-po-msgmerge into lp:unity/phablet

Proposed by Ying-Chun Liu
Status: Merged
Approved by: Michał Sawicz
Approved revision: no longer in the source branch.
Merged at revision: 699
Proposed branch: lp:~paulliu/unity/i18n-po-msgmerge
Merge into: lp:unity/phablet
Diff against target: 59 lines (+22/-5)
3 files modified
main.cpp (+1/-3)
paths.h.in (+5/-1)
po/CMakeLists.txt (+16/-1)
To merge this branch: bzr merge lp:~paulliu/unity/i18n-po-msgmerge
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Michał Sawicz Approve
Review via email: mp+165899@code.launchpad.net

Commit message

Don't update(msgmerge) *.po files everytime when build.

Description of the change

Don't update(msgmerge) *.po files everytime when build.

To post a comment you must log in.
Revision history for this message
Michał Sawicz (saviq) wrote :

46 + COMMAND install -D ${_gmoFile} ${CMAKE_CURRENT_BINARY_DIR}/locale/${_lang}/LC_MESSAGES/unity8.mo

50 + INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo DESTINATION ${CMAKE_INSTALL_PREFIX}/share/locale/${_lang}/LC_MESSAGES/ RENAME unity8.mo)

Can we make "unity8" a variable please?

review: Needs Fixing
Revision history for this message
Michał Sawicz (saviq) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'main.cpp'
--- main.cpp 2013-05-24 16:35:19 +0000
+++ main.cpp 2013-05-28 10:40:31 +0000
@@ -83,9 +83,7 @@
83 }83 }
84 }84 }
8585
86 if (!isRunningInstalled()) {86 bindtextdomain("unity8", translationDirectory().toUtf8().data());
87 bindtextdomain("unity8", translationDirectory().toUtf8().data());
88 }
8987
90 QQuickView* view = new QQuickView();88 QQuickView* view = new QQuickView();
91 view->setResizeMode(QQuickView::SizeRootObjectToView);89 view->setResizeMode(QQuickView::SizeRootObjectToView);
9290
=== modified file 'paths.h.in'
--- paths.h.in 2013-05-24 08:00:04 +0000
+++ paths.h.in 2013-05-28 10:40:31 +0000
@@ -28,7 +28,11 @@
28}28}
2929
30inline QString translationDirectory() {30inline QString translationDirectory() {
31 return QString("@CMAKE_INSTALL_PREFIX@/share/locale");31 if (isRunningInstalled()) {
32 return QString("@CMAKE_INSTALL_PREFIX@/share/locale");
33 } else {
34 return QString("@CMAKE_BINARY_DIR@/po/locale");
35 }
32}36}
3337
34inline QString shellAppDirectory() {38inline QString shellAppDirectory() {
3539
=== modified file 'po/CMakeLists.txt'
--- po/CMakeLists.txt 2013-05-24 08:00:04 +0000
+++ po/CMakeLists.txt 2013-05-28 10:40:31 +0000
@@ -9,7 +9,22 @@
9 *.po9 *.po
10)10)
1111
12GETTEXT_CREATE_TRANSLATIONS(${POT_FILE} ALL ${PO_FILES})12SET(MO_FILE unity8.mo)
13
14FOREACH(_file ${PO_FILES})
15 GET_FILENAME_COMPONENT(_lang ${_file} NAME_WE)
16 SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo)
17 ADD_CUSTOM_COMMAND(OUTPUT ${_gmoFile}
18 COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_file}
19 COMMAND install -D ${_gmoFile} ${CMAKE_CURRENT_BINARY_DIR}/locale/${_lang}/LC_MESSAGES/${MO_FILE}
20 WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
21 DEPENDS ${_file}
22 )
23 INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo DESTINATION ${CMAKE_INSTALL_PREFIX}/share/locale/${_lang}/LC_MESSAGES/ RENAME ${MO_FILE})
24 _GETTEXT_GET_UNIQUE_TARGET_NAME( pofiles uniqueTargetName)
25 ADD_CUSTOM_TARGET(${uniqueTargetName} ALL DEPENDS ${_gmoFile})
26ENDFOREACH(_file)
27
13ADD_CUSTOM_COMMAND(OUTPUT ${POT_FILE}28ADD_CUSTOM_COMMAND(OUTPUT ${POT_FILE}
14 COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/update-unity-pot29 COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/update-unity-pot
15)30)

Subscribers

People subscribed via source and target branches