Merge lp:~dobey/indicator-power/fix-i18n into lp:indicator-power
- fix-i18n
- Merge into trunk.16.10
Proposed by
dobey
Status: | Superseded |
---|---|
Proposed branch: | lp:~dobey/indicator-power/fix-i18n |
Merge into: | lp:indicator-power |
Diff against target: |
522 lines (+258/-165) 10 files modified
.bzrignore (+4/-0) CMakeLists.txt (+9/-20) cmake/GCov.cmake (+0/-51) cmake/Translations.cmake (+0/-37) debian/control (+7/-5) po/CMakeLists.txt (+12/-3) po/POTFILES.in (+0/-4) po/indicator-power.pot (+217/-0) tests/CMakeLists.txt (+9/-7) tests/Makefile.am.strings (+0/-38) |
To merge this branch: | bzr merge lp:~dobey/indicator-power/fix-i18n |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Indicator Applet Developers | Pending | ||
Review via email: mp+316623@code.launchpad.net |
Commit message
Use intltool support from cmake-extras.
Description of the change
To post a comment you must log in.
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file '.bzrignore' | |||
2 | --- .bzrignore 1970-01-01 00:00:00 +0000 | |||
3 | +++ .bzrignore 2017-02-07 20:21:19 +0000 | |||
4 | @@ -0,0 +1,4 @@ | |||
5 | 1 | build/ | ||
6 | 2 | po/Makefile.in.in | ||
7 | 3 | po/POTFILES.in | ||
8 | 4 | |||
9 | 0 | 5 | ||
10 | === modified file 'CMakeLists.txt' | |||
11 | --- CMakeLists.txt 2016-05-16 18:09:57 +0000 | |||
12 | +++ CMakeLists.txt 2017-02-07 20:21:19 +0000 | |||
13 | @@ -13,9 +13,6 @@ | |||
14 | 13 | -DLOW_BATTERY_SOUND="Low battery.ogg" | 13 | -DLOW_BATTERY_SOUND="Low battery.ogg" |
15 | 14 | ) | 14 | ) |
16 | 15 | 15 | ||
17 | 16 | option (enable_tests "Build the package's automatic tests." ON) | ||
18 | 17 | option (enable_lcov "Generate lcov code coverage reports." ON) | ||
19 | 18 | |||
20 | 19 | set(SERVICE_LIB "indicatorpowerservice") | 16 | set(SERVICE_LIB "indicatorpowerservice") |
21 | 20 | set(SERVICE_EXEC "indicator-power-service") | 17 | set(SERVICE_EXEC "indicator-power-service") |
22 | 21 | add_definitions(-DSERVICE_EXEC="${SERVICE_EXEC}") | 18 | add_definitions(-DSERVICE_EXEC="${SERVICE_EXEC}") |
23 | @@ -59,9 +56,6 @@ | |||
24 | 59 | COMMAND bzr export --root=${ARCHIVE_NAME} ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.gz | 56 | COMMAND bzr export --root=${ARCHIVE_NAME} ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.gz |
25 | 60 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) | 57 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) |
26 | 61 | 58 | ||
27 | 62 | add_custom_target (clean-coverage | ||
28 | 63 | COMMAND find ${CMAKE_BINARY_DIR} -name '*.gcda' | xargs rm -f) | ||
29 | 64 | |||
30 | 65 | add_custom_target (cppcheck COMMAND cppcheck --enable=all -q --error-exitcode=2 --inline-suppr | 59 | add_custom_target (cppcheck COMMAND cppcheck --enable=all -q --error-exitcode=2 --inline-suppr |
31 | 66 | ${CMAKE_SOURCE_DIR}/src | 60 | ${CMAKE_SOURCE_DIR}/src |
32 | 67 | ${CMAKE_SOURCE_DIR}/tests) | 61 | ${CMAKE_SOURCE_DIR}/tests) |
33 | @@ -83,22 +77,17 @@ | |||
34 | 83 | include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include) | 77 | include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include) |
35 | 84 | include_directories (${CMAKE_CURRENT_BINARY_DIR}/include) | 78 | include_directories (${CMAKE_CURRENT_BINARY_DIR}/include) |
36 | 85 | 79 | ||
37 | 86 | # testing & coverage | ||
38 | 87 | if (${enable_tests}) | ||
39 | 88 | set (GTEST_SOURCE_DIR /usr/src/gtest/src) | ||
40 | 89 | set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..) | ||
41 | 90 | set (GTEST_LIBS -lpthread) | ||
42 | 91 | enable_testing () | ||
43 | 92 | if (${enable_lcov}) | ||
44 | 93 | include(GCov) | ||
45 | 94 | endif () | ||
46 | 95 | endif () | ||
47 | 96 | |||
48 | 97 | # actually build things | 80 | # actually build things |
49 | 98 | add_subdirectory(src) | 81 | add_subdirectory(src) |
50 | 99 | add_subdirectory(data) | 82 | add_subdirectory(data) |
51 | 100 | add_subdirectory(po) | 83 | add_subdirectory(po) |
52 | 101 | if (${enable_tests}) | ||
53 | 102 | add_subdirectory(tests) | ||
54 | 103 | endif () | ||
55 | 104 | 84 | ||
56 | 85 | # testing & coverage | ||
57 | 86 | enable_testing () | ||
58 | 87 | add_subdirectory(tests) | ||
59 | 88 | find_package(CoverageReport) | ||
60 | 89 | ENABLE_COVERAGE_REPORT( | ||
61 | 90 | TARGETS ${SERVICE_LIB} ${SERVICE_EXEC} | ||
62 | 91 | TESTS ${COVERAGE_TEST_TARGETS} | ||
63 | 92 | FILTER /usr/include ${CMAKE_BINARY_DIR}/* | ||
64 | 93 | ) | ||
65 | 105 | 94 | ||
66 | === removed file 'cmake/GCov.cmake' | |||
67 | --- cmake/GCov.cmake 2014-07-14 04:43:41 +0000 | |||
68 | +++ cmake/GCov.cmake 1970-01-01 00:00:00 +0000 | |||
69 | @@ -1,51 +0,0 @@ | |||
70 | 1 | if (CMAKE_BUILD_TYPE MATCHES coverage) | ||
71 | 2 | set(GCOV_FLAGS "${GCOV_FLAGS} --coverage") | ||
72 | 3 | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCOV_FLAGS}") | ||
73 | 4 | set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${GCOV_FLAGS}") | ||
74 | 5 | set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GCOV_FLAGS}") | ||
75 | 6 | set(GCOV_LIBS ${GCOV_LIBS} gcov) | ||
76 | 7 | |||
77 | 8 | find_program(GCOVR_EXECUTABLE gcovr HINTS ${GCOVR_ROOT} "${GCOVR_ROOT}/bin") | ||
78 | 9 | if (NOT GCOVR_EXECUTABLE) | ||
79 | 10 | message(STATUS "Gcovr binary was not found, can not generate XML coverage info.") | ||
80 | 11 | else () | ||
81 | 12 | message(STATUS "Gcovr found, can generate XML coverage info.") | ||
82 | 13 | add_custom_target (coverage-xml | ||
83 | 14 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
84 | 15 | COMMAND "${GCOVR_EXECUTABLE}" --exclude="test.*" -x -r "${CMAKE_SOURCE_DIR}" | ||
85 | 16 | --object-directory=${CMAKE_BINARY_DIR} -o coverage.xml) | ||
86 | 17 | endif() | ||
87 | 18 | |||
88 | 19 | find_program(LCOV_EXECUTABLE lcov HINTS ${LCOV_ROOT} "${GCOVR_ROOT}/bin") | ||
89 | 20 | find_program(GENHTML_EXECUTABLE genhtml HINTS ${GENHTML_ROOT}) | ||
90 | 21 | if (NOT LCOV_EXECUTABLE) | ||
91 | 22 | message(STATUS "Lcov binary was not found, can not generate HTML coverage info.") | ||
92 | 23 | else () | ||
93 | 24 | if(NOT GENHTML_EXECUTABLE) | ||
94 | 25 | message(STATUS "Genthml binary not found, can not generate HTML coverage info.") | ||
95 | 26 | else() | ||
96 | 27 | message(STATUS "Lcov and genhtml found, can generate HTML coverage info.") | ||
97 | 28 | add_custom_target (coverage-html | ||
98 | 29 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
99 | 30 | COMMAND "${CMAKE_CTEST_COMMAND}" --force-new-ctest-process --verbose | ||
100 | 31 | COMMAND "${LCOV_EXECUTABLE}" --directory ${CMAKE_BINARY_DIR} --capture | ${CMAKE_SOURCE_DIR}/trim-lcov.py > dconf-lcov.info | ||
101 | 32 | COMMAND "${LCOV_EXECUTABLE}" -r dconf-lcov.info /usr/include/\\* -o nosys-lcov.info | ||
102 | 33 | COMMAND LANG=C "${GENHTML_EXECUTABLE}" --prefix ${CMAKE_BINARY_DIR} --output-directory lcov-html --legend --show-details nosys-lcov.info | ||
103 | 34 | COMMAND ${CMAKE_COMMAND} -E echo "" | ||
104 | 35 | COMMAND ${CMAKE_COMMAND} -E echo "file://${CMAKE_BINARY_DIR}/lcov-html/index.html" | ||
105 | 36 | COMMAND ${CMAKE_COMMAND} -E echo "") | ||
106 | 37 | #COMMAND "${LCOV_EXECUTABLE}" --directory ${CMAKE_BINARY_DIR} --capture --output-file coverage.info --no-checksum | ||
107 | 38 | #COMMAND "${GENHTML_EXECUTABLE}" --prefix ${CMAKE_BINARY_DIR} --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info | ||
108 | 39 | #COMMAND ${CMAKE_COMMAND} -E echo "\\#define foo \\\"bar\\\"" | ||
109 | 40 | #) | ||
110 | 41 | endif() | ||
111 | 42 | endif() | ||
112 | 43 | endif() | ||
113 | 44 | |||
114 | 45 | |||
115 | 46 | #$(MAKE) $(AM_MAKEFLAGS) check | ||
116 | 47 | #lcov --directory $(top_builddir) --capture --test-name dconf | $(top_srcdir)/trim-lcov.py > dconf-lcov.info | ||
117 | 48 | #LANG=C genhtml --prefix $(top_builddir) --output-directory lcov-html --legend --show-details dconf-lcov.info | ||
118 | 49 | #@echo | ||
119 | 50 | #@echo " file://$(abs_top_builddir)/lcov-html/index.html" | ||
120 | 51 | #@echo | ||
121 | 52 | 0 | ||
122 | === removed file 'cmake/Translations.cmake' | |||
123 | --- cmake/Translations.cmake 2014-08-09 23:19:02 +0000 | |||
124 | +++ cmake/Translations.cmake 1970-01-01 00:00:00 +0000 | |||
125 | @@ -1,37 +0,0 @@ | |||
126 | 1 | # Translations.cmake, CMake macros written for Marlin, feel free to re-use them | ||
127 | 2 | |||
128 | 3 | macro(add_translations_directory NLS_PACKAGE) | ||
129 | 4 | add_custom_target (i18n ALL) | ||
130 | 5 | find_program (MSGFMT_EXECUTABLE msgfmt) | ||
131 | 6 | file (GLOB PO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.po) | ||
132 | 7 | foreach (PO_INPUT ${PO_FILES}) | ||
133 | 8 | get_filename_component (PO_INPUT_BASE ${PO_INPUT} NAME_WE) | ||
134 | 9 | set (MO_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PO_INPUT_BASE}.mo) | ||
135 | 10 | add_custom_command (TARGET i18n COMMAND ${MSGFMT_EXECUTABLE} -o ${MO_OUTPUT} ${PO_INPUT}) | ||
136 | 11 | |||
137 | 12 | install (FILES ${MO_OUTPUT} DESTINATION | ||
138 | 13 | ${CMAKE_INSTALL_LOCALEDIR}/${PO_INPUT_BASE}/LC_MESSAGES | ||
139 | 14 | RENAME ${NLS_PACKAGE}.mo) | ||
140 | 15 | endforeach (PO_INPUT ${PO_FILES}) | ||
141 | 16 | endmacro(add_translations_directory) | ||
142 | 17 | |||
143 | 18 | |||
144 | 19 | macro(add_translations_catalog NLS_PACKAGE) | ||
145 | 20 | add_custom_target (pot COMMENT “Building translation catalog.”) | ||
146 | 21 | find_program (XGETTEXT_EXECUTABLE xgettext) | ||
147 | 22 | |||
148 | 23 | # init this list, which will hold all the sources across all dirs | ||
149 | 24 | set(SOURCES "") | ||
150 | 25 | |||
151 | 26 | # add each directory's sources to the overall sources list | ||
152 | 27 | foreach(FILES_INPUT ${ARGN}) | ||
153 | 28 | set (DIR ${CMAKE_CURRENT_SOURCE_DIR}/${FILES_INPUT}) | ||
154 | 29 | file (GLOB_RECURSE DIR_SOURCES ${DIR}/*.c ${DIR}/*.cc ${DIR}/*.cpp ${DIR}/*.cxx ${DIR}/*.vala) | ||
155 | 30 | set (SOURCES ${SOURCES} ${DIR_SOURCES}) | ||
156 | 31 | endforeach() | ||
157 | 32 | |||
158 | 33 | add_custom_command (TARGET pot COMMAND | ||
159 | 34 | ${XGETTEXT_EXECUTABLE} -d ${NLS_PACKAGE} -o ${CMAKE_CURRENT_SOURCE_DIR}/${NLS_PACKAGE}.pot | ||
160 | 35 | ${SOURCES} --keyword="_" --keyword="N_" --from-code=UTF-8 | ||
161 | 36 | ) | ||
162 | 37 | endmacro() | ||
163 | 38 | 0 | ||
164 | === modified file 'debian/control' | |||
165 | --- debian/control 2016-07-19 10:25:12 +0000 | |||
166 | +++ debian/control 2017-02-07 20:21:19 +0000 | |||
167 | @@ -3,6 +3,12 @@ | |||
168 | 3 | Priority: optional | 3 | Priority: optional |
169 | 4 | Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com> | 4 | Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
170 | 5 | Build-Depends: cmake, | 5 | Build-Depends: cmake, |
171 | 6 | cmake-extras (>= 0.10), | ||
172 | 7 | debhelper (>= 9), | ||
173 | 8 | dh-translations, | ||
174 | 9 | gcovr, | ||
175 | 10 | intltool, | ||
176 | 11 | lcov, | ||
177 | 6 | libnotify-dev (>= 0.7.6), | 12 | libnotify-dev (>= 0.7.6), |
178 | 7 | libglib2.0-dev (>= 2.36), | 13 | libglib2.0-dev (>= 2.36), |
179 | 8 | libgudev-1.0-dev, | 14 | libgudev-1.0-dev, |
180 | @@ -10,12 +16,8 @@ | |||
181 | 10 | python:any, | 16 | python:any, |
182 | 11 | # for com.ubuntu.touch.AccountsService.Sound.xml | 17 | # for com.ubuntu.touch.AccountsService.Sound.xml |
183 | 12 | accountsservice-ubuntu-schemas, | 18 | accountsservice-ubuntu-schemas, |
184 | 13 | # for packaging | ||
185 | 14 | debhelper (>= 9), | ||
186 | 15 | dh-translations, | ||
187 | 16 | intltool, | ||
188 | 17 | # for tests | 19 | # for tests |
190 | 18 | libgtest-dev, | 20 | googletest | google-mock, |
191 | 19 | python3-dbusmock, | 21 | python3-dbusmock, |
192 | 20 | dbus-test-runner, | 22 | dbus-test-runner, |
193 | 21 | libdbustest1-dev, | 23 | libdbustest1-dev, |
194 | 22 | 24 | ||
195 | === modified file 'po/CMakeLists.txt' | |||
196 | --- po/CMakeLists.txt 2014-07-16 23:29:24 +0000 | |||
197 | +++ po/CMakeLists.txt 2017-02-07 20:21:19 +0000 | |||
198 | @@ -1,3 +1,12 @@ | |||
202 | 1 | include (Translations) | 1 | find_package(Intltool REQUIRED) |
203 | 2 | add_translations_directory ("${GETTEXT_PACKAGE}") | 2 | |
204 | 3 | add_translations_catalog ("${GETTEXT_PACKAGE}" ../src/) | 3 | intltool_update_potfile( |
205 | 4 | KEYWORDS "_" "_:1,2" "N_" "N_:1,2" | ||
206 | 5 | GETTEXT_PACKAGE ${GETTEXT_PACKAGE} | ||
207 | 6 | COPYRIGHT_HOLDER "Canonical Ltd." | ||
208 | 7 | ) | ||
209 | 8 | |||
210 | 9 | intltool_install_translations( | ||
211 | 10 | ALL | ||
212 | 11 | GETTEXT_PACKAGE ${GETTEXT_PACKAGE} | ||
213 | 12 | ) | ||
214 | 4 | 13 | ||
215 | === removed file 'po/POTFILES.in' | |||
216 | --- po/POTFILES.in 2014-10-14 09:00:13 +0000 | |||
217 | +++ po/POTFILES.in 1970-01-01 00:00:00 +0000 | |||
218 | @@ -1,4 +0,0 @@ | |||
219 | 1 | data/com.canonical.indicator.power.gschema.xml.in | ||
220 | 2 | src/device.c | ||
221 | 3 | src/notifier.c | ||
222 | 4 | src/service.c | ||
223 | 5 | 0 | ||
224 | === added file 'po/indicator-power.pot' | |||
225 | --- po/indicator-power.pot 1970-01-01 00:00:00 +0000 | |||
226 | +++ po/indicator-power.pot 2017-02-07 20:21:19 +0000 | |||
227 | @@ -0,0 +1,217 @@ | |||
228 | 1 | # SOME DESCRIPTIVE TITLE. | ||
229 | 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | ||
230 | 3 | # This file is distributed under the same license as the PACKAGE package. | ||
231 | 4 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | ||
232 | 5 | # | ||
233 | 6 | #, fuzzy | ||
234 | 7 | msgid "" | ||
235 | 8 | msgstr "" | ||
236 | 9 | "Project-Id-Version: PACKAGE VERSION\n" | ||
237 | 10 | "Report-Msgid-Bugs-To: \n" | ||
238 | 11 | "POT-Creation-Date: 2017-02-07 15:18-0500\n" | ||
239 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
240 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
241 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" | ||
242 | 15 | "Language: \n" | ||
243 | 16 | "MIME-Version: 1.0\n" | ||
244 | 17 | "Content-Type: text/plain; charset=UTF-8\n" | ||
245 | 18 | "Content-Transfer-Encoding: 8bit\n" | ||
246 | 19 | "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" | ||
247 | 20 | |||
248 | 21 | #. TRANSLATORS: system power cord | ||
249 | 22 | #: ../src/device.c:524 | ||
250 | 23 | msgid "AC Adapter" | ||
251 | 24 | msgstr "" | ||
252 | 25 | |||
253 | 26 | #. TRANSLATORS: laptop primary battery | ||
254 | 27 | #: ../src/device.c:528 ../src/service.c:442 | ||
255 | 28 | msgid "Battery" | ||
256 | 29 | msgstr "" | ||
257 | 30 | |||
258 | 31 | #. TRANSLATORS: battery-backed AC power source | ||
259 | 32 | #: ../src/device.c:532 | ||
260 | 33 | msgid "UPS" | ||
261 | 34 | msgstr "" | ||
262 | 35 | |||
263 | 36 | #. TRANSLATORS: a monitor is a device to measure voltage and current | ||
264 | 37 | #: ../src/device.c:536 | ||
265 | 38 | msgid "Monitor" | ||
266 | 39 | msgstr "" | ||
267 | 40 | |||
268 | 41 | #. TRANSLATORS: wireless mice with internal batteries | ||
269 | 42 | #: ../src/device.c:540 | ||
270 | 43 | msgid "Mouse" | ||
271 | 44 | msgstr "" | ||
272 | 45 | |||
273 | 46 | #. TRANSLATORS: wireless keyboard with internal battery | ||
274 | 47 | #: ../src/device.c:544 | ||
275 | 48 | msgid "Keyboard" | ||
276 | 49 | msgstr "" | ||
277 | 50 | |||
278 | 51 | #. TRANSLATORS: portable device | ||
279 | 52 | #: ../src/device.c:548 | ||
280 | 53 | msgid "PDA" | ||
281 | 54 | msgstr "" | ||
282 | 55 | |||
283 | 56 | #. TRANSLATORS: cell phone (mobile...) | ||
284 | 57 | #: ../src/device.c:552 | ||
285 | 58 | msgid "Cell phone" | ||
286 | 59 | msgstr "" | ||
287 | 60 | |||
288 | 61 | #. TRANSLATORS: media player, mp3 etc | ||
289 | 62 | #: ../src/device.c:556 | ||
290 | 63 | msgid "Media player" | ||
291 | 64 | msgstr "" | ||
292 | 65 | |||
293 | 66 | #. TRANSLATORS: tablet device | ||
294 | 67 | #: ../src/device.c:560 | ||
295 | 68 | msgid "Tablet" | ||
296 | 69 | msgstr "" | ||
297 | 70 | |||
298 | 71 | #. TRANSLATORS: tablet device | ||
299 | 72 | #: ../src/device.c:564 | ||
300 | 73 | msgid "Computer" | ||
301 | 74 | msgstr "" | ||
302 | 75 | |||
303 | 76 | #. TRANSLATORS: unknown device | ||
304 | 77 | #: ../src/device.c:568 | ||
305 | 78 | msgid "Unknown" | ||
306 | 79 | msgstr "" | ||
307 | 80 | |||
308 | 81 | #: ../src/device.c:608 | ||
309 | 82 | #, c-format | ||
310 | 83 | msgid "estimating…" | ||
311 | 84 | msgstr "" | ||
312 | 85 | |||
313 | 86 | #: ../src/device.c:612 | ||
314 | 87 | #, c-format | ||
315 | 88 | msgid "unknown" | ||
316 | 89 | msgstr "" | ||
317 | 90 | |||
318 | 91 | #. TRANSLATORS: H:MM (hours, minutes) to charge the battery. Example: "1:30 to charge" | ||
319 | 92 | #: ../src/device.c:641 | ||
320 | 93 | #, c-format | ||
321 | 94 | msgid "%0d:%02d to charge" | ||
322 | 95 | msgstr "" | ||
323 | 96 | |||
324 | 97 | #. TRANSLATORS: H:MM (hours, minutes) to discharge the battery. Example: "1:30 left" | ||
325 | 98 | #: ../src/device.c:646 | ||
326 | 99 | #, c-format | ||
327 | 100 | msgid "%0d:%02d left" | ||
328 | 101 | msgstr "" | ||
329 | 102 | |||
330 | 103 | #. TRANSLATORS: "X (hour,hours) Y (minute,minutes) to charge" the battery. | ||
331 | 104 | #. Example: "1 hour 10 minutes to charge" | ||
332 | 105 | #: ../src/device.c:681 | ||
333 | 106 | #, c-format | ||
334 | 107 | msgid "%d %s %d %s to charge" | ||
335 | 108 | msgstr "" | ||
336 | 109 | |||
337 | 110 | #: ../src/device.c:682 ../src/device.c:700 | ||
338 | 111 | msgid "hour" | ||
339 | 112 | msgid_plural "hours" | ||
340 | 113 | msgstr[0] "" | ||
341 | 114 | msgstr[1] "" | ||
342 | 115 | |||
343 | 116 | #: ../src/device.c:683 ../src/device.c:690 ../src/device.c:701 | ||
344 | 117 | #: ../src/device.c:708 | ||
345 | 118 | msgid "minute" | ||
346 | 119 | msgid_plural "minutes" | ||
347 | 120 | msgstr[0] "" | ||
348 | 121 | msgstr[1] "" | ||
349 | 122 | |||
350 | 123 | #. TRANSLATORS: "Y (minute,minutes) to charge" the battery. | ||
351 | 124 | #. Example: "59 minutes to charge" | ||
352 | 125 | #: ../src/device.c:689 | ||
353 | 126 | #, c-format | ||
354 | 127 | msgid "%d %s to charge" | ||
355 | 128 | msgstr "" | ||
356 | 129 | |||
357 | 130 | #. TRANSLATORS: "X (hour,hours) Y (minute,minutes) left" until the battery's empty. | ||
358 | 131 | #. Example: "1 hour 10 minutes left" | ||
359 | 132 | #: ../src/device.c:699 | ||
360 | 133 | #, c-format | ||
361 | 134 | msgid "%d %s %d %s left" | ||
362 | 135 | msgstr "" | ||
363 | 136 | |||
364 | 137 | #. TRANSLATORS: "Y (minute,minutes) left" until the battery's empty. | ||
365 | 138 | #. Example: "59 minutes left" | ||
366 | 139 | #: ../src/device.c:707 | ||
367 | 140 | #, c-format | ||
368 | 141 | msgid "%d %s left" | ||
369 | 142 | msgstr "" | ||
370 | 143 | |||
371 | 144 | #. TRANSLATORS: example: "battery (charged)" | ||
372 | 145 | #: ../src/device.c:764 | ||
373 | 146 | #, c-format | ||
374 | 147 | msgid "%s (charged)" | ||
375 | 148 | msgstr "" | ||
376 | 149 | |||
377 | 150 | #. TRANSLATORS: example: "battery (time remaining)" | ||
378 | 151 | #: ../src/device.c:781 | ||
379 | 152 | #, c-format | ||
380 | 153 | msgid "%s (%s)" | ||
381 | 154 | msgstr "" | ||
382 | 155 | |||
383 | 156 | #. TRANSLATORS: after the icon, a time-remaining string + battery %. Example: "(0:59, 33%)" | ||
384 | 157 | #: ../src/device.c:853 | ||
385 | 158 | #, c-format | ||
386 | 159 | msgid "(%s, %.0lf%%)" | ||
387 | 160 | msgstr "" | ||
388 | 161 | |||
389 | 162 | #. TRANSLATORS: after the icon, a time-remaining string Example: "(0:59)" | ||
390 | 163 | #: ../src/device.c:858 | ||
391 | 164 | #, c-format | ||
392 | 165 | msgid "(%s)" | ||
393 | 166 | msgstr "" | ||
394 | 167 | |||
395 | 168 | #. TRANSLATORS: after the icon, a battery %. Example: "(33%)" | ||
396 | 169 | #: ../src/device.c:863 | ||
397 | 170 | #, c-format | ||
398 | 171 | msgid "(%.0lf%%)" | ||
399 | 172 | msgstr "" | ||
400 | 173 | |||
401 | 174 | #: ../src/notifier.c:286 | ||
402 | 175 | msgid "Battery Low" | ||
403 | 176 | msgstr "" | ||
404 | 177 | |||
405 | 178 | #: ../src/notifier.c:287 | ||
406 | 179 | msgid "Battery Critical" | ||
407 | 180 | msgstr "" | ||
408 | 181 | |||
409 | 182 | #: ../src/notifier.c:289 | ||
410 | 183 | #, c-format | ||
411 | 184 | msgid "%.0f%% charge remaining" | ||
412 | 185 | msgstr "" | ||
413 | 186 | |||
414 | 187 | #: ../src/notifier.c:321 | ||
415 | 188 | msgid "OK" | ||
416 | 189 | msgstr "" | ||
417 | 190 | |||
418 | 191 | #: ../src/notifier.c:322 | ||
419 | 192 | msgid "Battery settings" | ||
420 | 193 | msgstr "" | ||
421 | 194 | |||
422 | 195 | #: ../src/service.c:567 | ||
423 | 196 | msgid "Charge level" | ||
424 | 197 | msgstr "" | ||
425 | 198 | |||
426 | 199 | #: ../src/service.c:635 | ||
427 | 200 | msgid "Show Time in Menu Bar" | ||
428 | 201 | msgstr "" | ||
429 | 202 | |||
430 | 203 | #: ../src/service.c:639 | ||
431 | 204 | msgid "Show Percentage in Menu Bar" | ||
432 | 205 | msgstr "" | ||
433 | 206 | |||
434 | 207 | #: ../src/service.c:643 | ||
435 | 208 | msgid "Power Settings…" | ||
436 | 209 | msgstr "" | ||
437 | 210 | |||
438 | 211 | #: ../src/service.c:669 | ||
439 | 212 | msgid "Adjust brightness automatically" | ||
440 | 213 | msgstr "" | ||
441 | 214 | |||
442 | 215 | #: ../src/service.c:675 | ||
443 | 216 | msgid "Battery settings…" | ||
444 | 217 | msgstr "" | ||
445 | 0 | 218 | ||
446 | === modified file 'tests/CMakeLists.txt' | |||
447 | --- tests/CMakeLists.txt 2016-05-16 17:59:03 +0000 | |||
448 | +++ tests/CMakeLists.txt 2017-02-07 20:21:19 +0000 | |||
449 | @@ -1,9 +1,5 @@ | |||
456 | 1 | # build libgtest | 1 | find_package(GMock) |
457 | 2 | add_library (gtest STATIC | 2 | include_directories(${GMOCK_INCLUDE_DIRS}) |
452 | 3 | ${GTEST_SOURCE_DIR}/gtest-all.cc | ||
453 | 4 | ${GTEST_SOURCE_DIR}/gtest_main.cc) | ||
454 | 5 | set_target_properties (gtest PROPERTIES INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${GTEST_INCLUDE_DIR}) | ||
455 | 6 | set_target_properties (gtest PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} -w) | ||
458 | 7 | 3 | ||
459 | 8 | # dbustest | 4 | # dbustest |
460 | 9 | pkg_check_modules(DBUSTEST REQUIRED | 5 | pkg_check_modules(DBUSTEST REQUIRED |
461 | @@ -47,11 +43,17 @@ | |||
462 | 47 | 43 | ||
463 | 48 | function(add_test_by_name name) | 44 | function(add_test_by_name name) |
464 | 49 | set (TEST_NAME ${name}) | 45 | set (TEST_NAME ${name}) |
465 | 46 | set (COVERAGE_TEST_TARGETS ${COVERAGE_TEST_TARGETS} ${TEST_NAME} PARENT_SCOPE) | ||
466 | 50 | add_executable (${TEST_NAME} ${TEST_NAME}.cc gschemas.compiled) | 47 | add_executable (${TEST_NAME} ${TEST_NAME}.cc gschemas.compiled) |
467 | 51 | add_test (${TEST_NAME} ${TEST_NAME}) | 48 | add_test (${TEST_NAME} ${TEST_NAME}) |
468 | 52 | add_dependencies (${TEST_NAME} ${SERVICE_LIB}) | 49 | add_dependencies (${TEST_NAME} ${SERVICE_LIB}) |
470 | 53 | target_link_libraries (${TEST_NAME} ${SERVICE_LIB} gtest ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS}) | 50 | target_link_libraries (${TEST_NAME} ${SERVICE_LIB} ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GMOCK_LIBRARIES}) |
471 | 54 | endfunction() | 51 | endfunction() |
472 | 55 | add_test_by_name(test-notify) | 52 | add_test_by_name(test-notify) |
473 | 56 | add_test(NAME dear-reader-the-next-test-takes-80-seconds COMMAND true) | 53 | add_test(NAME dear-reader-the-next-test-takes-80-seconds COMMAND true) |
474 | 57 | add_test_by_name(test-device) | 54 | add_test_by_name(test-device) |
475 | 55 | |||
476 | 56 | set(COVERAGE_TEST_TARGETS | ||
477 | 57 | ${COVERAGE_TEST_TARGETS} | ||
478 | 58 | PARENT_SCOPE | ||
479 | 59 | ) | ||
480 | 58 | 60 | ||
481 | === removed file 'tests/Makefile.am.strings' | |||
482 | --- tests/Makefile.am.strings 2012-05-24 14:49:30 +0000 | |||
483 | +++ tests/Makefile.am.strings 1970-01-01 00:00:00 +0000 | |||
484 | @@ -1,38 +0,0 @@ | |||
485 | 1 | TESTS += \ | ||
486 | 2 | test-ellipsis \ | ||
487 | 3 | test-space-ellipsis \ | ||
488 | 4 | test-ascii-quotes | ||
489 | 5 | |||
490 | 6 | ##### | ||
491 | 7 | # Tests for there being proper ellipsis instead of three periods in a row | ||
492 | 8 | ##### | ||
493 | 9 | test-ellipsis: $(top_srcdir)/po | ||
494 | 10 | @echo "#!/bin/bash" > $@ | ||
495 | 11 | @echo "(cd $(top_srcdir)/po && make $(GETTEXT_PACKAGE).pot)" >> $@ | ||
496 | 12 | @echo "grep -c -e \"^msgid.*\.\.\.\\\"\" $(top_srcdir)/po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"Ellipsis found in user visible strings\" >&2 && exit 1" >> $@ | ||
497 | 13 | @echo "exit 0" >> $@ | ||
498 | 14 | @chmod +x $@ | ||
499 | 15 | |||
500 | 16 | ##### | ||
501 | 17 | # Tests for there being a space before an ellipsis | ||
502 | 18 | ##### | ||
503 | 19 | test-space-ellipsis: $(top_srcdir)/po | ||
504 | 20 | @echo "#!/bin/bash" > $@ | ||
505 | 21 | @echo "(cd $(top_srcdir)/po && make $(GETTEXT_PACKAGE).pot)" >> $@ | ||
506 | 22 | @echo "grep -c -e \"^msgid.* …\\\"\" $(top_srcdir)/po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"Space before ellipsis found in user visible strings\" >&2 && exit 1" >> $@ | ||
507 | 23 | @echo "exit 0" >> $@ | ||
508 | 24 | @chmod +x $@ | ||
509 | 25 | |||
510 | 26 | ##### | ||
511 | 27 | # Tests for ASCII quote types | ||
512 | 28 | ##### | ||
513 | 29 | test-ascii-quotes: $(top_srcdir)/po | ||
514 | 30 | @echo "#!/bin/bash" > $@ | ||
515 | 31 | @echo "(cd $(top_srcdir)/po && make $(GETTEXT_PACKAGE).pot)" >> $@ | ||
516 | 32 | @echo "grep -c -e \"^msgid \\\".*'.*\\\"\" $(top_srcdir)/po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII apostrophy found in user visible strings\" >&2 && exit 1" >> $@ | ||
517 | 33 | @echo "grep -c -e \"^msgid \\\".*\\\".*\\\"\" $(top_srcdir)/po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII quote found in user visible strings\" >&2 && exit 1" >> $@ | ||
518 | 34 | @echo "grep -c -e \"^msgid \\\".*\\\`.*\\\"\" $(top_srcdir)/po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII backtick found in user visible strings\" >&2 && exit 1" >> $@ | ||
519 | 35 | @echo "exit 0" >> $@ | ||
520 | 36 | @chmod +x $@ | ||
521 | 37 | |||
522 | 38 | CLEANFILES += $(TESTS) |