summaryrefslogtreecommitdiff
path: root/CMake
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-07 13:37:15 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-10 16:11:00 +0200
commit672aa8d90ee1797d74aa3f8fcedc840f578f1d1b (patch)
tree479ca2253ddb1b0df3879fb7405015480db522e9 /CMake
parentba69ce6d3473debec4b95e02f12670f345c86673 (diff)
downloadapt-672aa8d90ee1797d74aa3f8fcedc840f578f1d1b.tar.gz
CMake: Translations: Pass some additional arguments to commands
This gets rid of the line numbers, adds the plural keyword, and makes msgfmt print statistics, so we know how well translated we are. Gbp-Dch: ignore
Diffstat (limited to 'CMake')
-rw-r--r--CMake/Translations.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMake/Translations.cmake b/CMake/Translations.cmake
index 3a05d80b0..64f5886fb 100644
--- a/CMake/Translations.cmake
+++ b/CMake/Translations.cmake
@@ -28,6 +28,7 @@ function(apt_add_translation_domain domain)
# Create the template for this specific sub-domain
add_custom_command (OUTPUT ${PROJECT_BINARY_DIR}/${domain}.pot
COMMAND xgettext --add-comments --foreign -k_ -kN_
+ --add-location=file --keyword=P_:1,2
-o ${PROJECT_BINARY_DIR}/${domain}.pot ${files}
DEPENDS ${abs_files}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
@@ -43,7 +44,7 @@ function(apt_add_translation_domain domain)
# Command to merge and compile the messages
add_custom_command(OUTPUT ${outdir}/${domain}.mo
COMMAND msgmerge -qo - ${file} ${PROJECT_BINARY_DIR}/${domain}.pot |
- msgfmt -o ${outdir}/${domain}.mo -
+ msgfmt --statistics -o ${outdir}/${domain}.mo -
DEPENDS ${file} ${PROJECT_BINARY_DIR}/${domain}.pot
)