Merge lp:~phablet-team/notes-app/notes-app-desktop-translations into lp:notes-app

Proposed by Ugo Riboni
Status: Rejected
Rejected by: Olivier Tilloy
Proposed branch: lp:~phablet-team/notes-app/notes-app-desktop-translations
Merge into: lp:notes-app
Diff against target: 115 lines (+22/-20)
4 files modified
CMakeLists.txt (+11/-10)
notes-app.desktop.in.in (+4/-3)
po/CMakeLists.txt (+5/-1)
po/com.ubuntu.notes.pot (+2/-6)
To merge this branch: bzr merge lp:~phablet-team/notes-app/notes-app-desktop-translations
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+223233@code.launchpad.net

Commit message

Add translations inside the .desktop file

Description of the change

Add translations inside the .desktop file

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
David Planella (dpm) wrote :

This branch has been superseded by https://code.launchpad.net/~phablet-team/notes-app/inline-desktop-i18n/+merge/235785 - Ugo, could you update its status?

Unmerged revisions

267. By Ugo Riboni

Add translations in the .desktop file

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-05-05 14:47:20 +0000
3+++ CMakeLists.txt 2014-06-16 13:13:22 +0000
4@@ -5,6 +5,9 @@
5 # Find includes in corresponding build directories
6 set(CMAKE_INCLUDE_CURRENT_DIR ON)
7
8+find_program(INTLTOOL_MERGE intltool-merge)
9+find_program(INTLTOOL_EXTRACT intltool-extract)
10+
11 # Instruct CMake to run moc automatically when needed.
12 set(CMAKE_AUTOMOC ON)
13
14@@ -42,6 +45,7 @@
15
16 set(NOTES_APP notes-app)
17 set(AUTOPILOT_DIR notes_app)
18+set(DESKTOP_FILE notes-app.desktop)
19
20 if(NOT CLICK_MODE)
21 set(NOTES_APP_DIR ${CMAKE_INSTALL_DATADIR}/${NOTES_APP})
22@@ -69,15 +73,11 @@
23 DESTINATION ${NOTES_APP_DIR}
24 )
25
26-set(DESKTOP_FILE notes-app.desktop)
27-file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE})
28-file(STRINGS ${DESKTOP_FILE}.in DESKTOP_FILE_CONTENTS)
29-foreach(LINE ${DESKTOP_FILE_CONTENTS})
30- string(REGEX REPLACE "tr\\\(\"(.*)\"\\\)" "\\1" LINE "${LINE}")
31- string(REGEX REPLACE "\@DESKTOP_EXEC\@" "${DESKTOP_EXEC}" LINE "${LINE}")
32- string(REGEX REPLACE "\@DESKTOP_PATH\@" "${DESKTOP_PATH}" LINE "${LINE}")
33- file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE} "${LINE}\n")
34-endforeach(LINE)
35+configure_file(${DESKTOP_FILE}.in.in ${DESKTOP_FILE}.in)
36+add_custom_target(${DESKTOP_FILE} ALL
37+ COMMENT "Merging translations into ${DESKTOP_FILE}"
38+ COMMAND LC_ALL=C ${INTLTOOL_MERGE} -d -u ${CMAKE_SOURCE_DIR}/po ${DESKTOP_FILE}.in ${DESKTOP_FILE} >/dev/null
39+ )
40
41 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE}
42 DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
43@@ -89,7 +89,8 @@
44
45 file(GLOB_RECURSE I18N_SRC_FILES
46 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
47- **.qml **.desktop.in)
48+ **.qml)
49+list(APPEND I18N_SRC_FILES ${DESKTOP_FILE}.in.in)
50 list(SORT I18N_SRC_FILES)
51
52 # for dh_translations to extract the domain
53
54=== renamed file 'notes-app.desktop.in' => 'notes-app.desktop.in.in'
55--- notes-app.desktop.in 2013-10-08 22:42:33 +0000
56+++ notes-app.desktop.in.in 2014-06-16 13:13:22 +0000
57@@ -1,12 +1,13 @@
58 [Desktop Entry]
59 Type=Application
60 Exec=@DESKTOP_EXEC@
61-Name=tr("Notes")
62-GenericName=tr("Notes application for Ubuntu")
63+_Name=Notes
64+_GenericName=Notes application for Ubuntu
65+_Description=Notes application for Ubuntu
66+_Keywords=Notes;Notepad
67 Icon=notepad
68 Terminal=false
69 @DESKTOP_PATH@
70 X-Ubuntu-Touch=true
71 X-Ubuntu-StageHint=SideStage
72-X-Ubuntu-Gettext-Domain=com.ubuntu.notes
73 X-Ubuntu-Single-Instance=true
74
75=== modified file 'po/CMakeLists.txt'
76--- po/CMakeLists.txt 2013-10-08 10:37:42 +0000
77+++ po/CMakeLists.txt 2014-06-16 13:13:22 +0000
78@@ -7,7 +7,11 @@
79 set(POT_FILE ${DOMAIN}.pot)
80 file(GLOB PO_FILES *.po)
81
82-add_custom_target(${POT_FILE}
83+add_custom_target(${POT_FILE} ALL
84+ COMMENT "Generating translation template"
85+ COMMAND ${INTLTOOL_EXTRACT} --update --type=gettext/ini
86+ --srcdir=${CMAKE_SOURCE_DIR} ${DESKTOP_FILE}.in.in
87+
88 COMMAND ${GETTEXT_XGETTEXT_EXECUTABLE} -o ${POT_FILE}
89 -D ${CMAKE_SOURCE_DIR}
90 --from-code=UTF-8
91
92=== modified file 'po/com.ubuntu.notes.pot'
93--- po/com.ubuntu.notes.pot 2013-10-10 09:36:08 +0000
94+++ po/com.ubuntu.notes.pot 2014-06-16 13:13:22 +0000
95@@ -8,7 +8,7 @@
96 msgstr ""
97 "Project-Id-Version: com.ubuntu.notes\n"
98 "Report-Msgid-Bugs-To: \n"
99-"POT-Creation-Date: 2013-10-10 11:34+0200\n"
100+"POT-Creation-Date: 2014-06-16 15:10+0200\n"
101 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
102 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
103 "Language-Team: LANGUAGE <LL@li.org>\n"
104@@ -49,10 +49,6 @@
105 msgid "Trash;Erase Note"
106 msgstr ""
107
108-#: NotesApp.qml:64 notes-app.desktop.in:4
109+#: NotesApp.qml:64
110 msgid "Notes"
111 msgstr ""
112-
113-#: notes-app.desktop.in:5
114-msgid "Notes application for Ubuntu"
115-msgstr ""

Subscribers

People subscribed via source and target branches

to all changes: