Merge lp:~charlesk/indicator-session/lp-1354058-use-standard-translations-cmake-file into lp:indicator-session/14.10

Proposed by Charles Kerr
Status: Merged
Approved by: Ted Gould
Approved revision: 453
Merged at revision: 453
Proposed branch: lp:~charlesk/indicator-session/lp-1354058-use-standard-translations-cmake-file
Merge into: lp:indicator-session/14.10
Diff against target: 43 lines (+9/-13)
1 file modified
cmake/Translations.cmake (+9/-13)
To merge this branch: bzr merge lp:~charlesk/indicator-session/lp-1354058-use-standard-translations-cmake-file
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+230218@code.launchpad.net

Commit message

Re-use the same Translations.cmake file across indicators

Description of the change

Sync Translations.cmake with the bugfixed version that recently landed in indicator-datetime.

Discussion @ https://code.launchpad.net/~charlesk/indicator-datetime/lp-1354058-include-cpp-files-when-invoking-xgettext/+merge/229976

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

Looks like ths 2014-08-09 build failure came from a gcovr bug introduced in 3.1,<https://github.com/gcovr/gcovr/issues/37> which just landed in utopic. mterry's now backported the fix from 3.2 <https://launchpad.net/ubuntu/+source/gcovr/3.1-1ubuntu1>

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmake/Translations.cmake'
2--- cmake/Translations.cmake 2013-07-02 00:26:11 +0000
3+++ cmake/Translations.cmake 2014-08-09 23:40:11 +0000
4@@ -10,7 +10,7 @@
5 add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT})
6
7 install (FILES ${MO_OUTPUT} DESTINATION
8- ${CMAKE_INSTALL_LOCALEDIR}/LC_MESSAGES
9+ ${CMAKE_INSTALL_LOCALEDIR}/${PO_INPUT_BASE}/LC_MESSAGES
10 RENAME ${NLS_PACKAGE}.mo)
11 endforeach (PO_INPUT ${PO_FILES})
12 endmacro(add_translations_directory)
13@@ -20,22 +20,18 @@
14 add_custom_target (pot COMMENT “Building translation catalog.”)
15 find_program (XGETTEXT_EXECUTABLE xgettext)
16
17-
18- set(C_SOURCE "")
19-
20+ # init this list, which will hold all the sources across all dirs
21+ set(SOURCES "")
22+
23+ # add each directory's sources to the overall sources list
24 foreach(FILES_INPUT ${ARGN})
25- file (GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}/*.c)
26- foreach(C_FILE ${SOURCE_FILES})
27- set(C_SOURCE ${C_SOURCE} ${C_FILE})
28- endforeach()
29- file (GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}/*.vala)
30- foreach(C_FILE ${SOURCE_FILES})
31- set(C_SOURCE ${C_SOURCE} ${C_FILE})
32- endforeach()
33+ set (DIR ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT})
34+ file (GLOB_RECURSE DIR_SOURCES ${DIR}/*.c ${DIR}/*.cc ${DIR}/*.cpp ${DIR}/*.cxx ${DIR}/*.vala)
35+ set (SOURCES ${SOURCES} ${DIR_SOURCES})
36 endforeach()
37
38 add_custom_command (TARGET pot COMMAND
39 ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE} -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot
40- ${VALA_SOURCE} ${C_SOURCE} --keyword="_" --keyword="N_" --from-code=UTF-8
41+ ${SOURCES} --keyword="_" --keyword="N_" --from-code=UTF-8
42 )
43 endmacro()

Subscribers

People subscribed via source and target branches