[latexila] Add the *.pot files in po/POTFILES.in
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Add the *.pot files in po/POTFILES.in
- Date: Wed, 3 Aug 2011 20:01:37 +0000 (UTC)
commit 67039cedc3bcbde6f2f920d5539b01937eff0513
Author: SÃbastien Wilmet <swilmet src gnome org>
Date: Wed Aug 3 21:20:24 2011 +0200
Add the *.pot files in po/POTFILES.in
For the build tools and the templates, ITS Tool is used with custom .its
files. The solution to integrate these translations with Damned Lies is
to simply add the *.pot files in the POTFILES.in file. The drawback is
to keep the *.pot files in Git, and update them when there is a
modification.
cmake/itstool.cmake | 4 ++--
data/build_tools/CMakeLists.txt | 1 +
data/build_tools/update_build_tools_pot.sh | 8 +-------
data/templates/CMakeLists.txt | 3 ++-
data/templates/update_templates_pot.sh | 8 +-------
help/CMakeLists.txt | 1 +
po/POTFILES.in | 2 ++
7 files changed, 10 insertions(+), 17 deletions(-)
---
diff --git a/cmake/itstool.cmake b/cmake/itstool.cmake
index 3d069c3..6850ae3 100644
--- a/cmake/itstool.cmake
+++ b/cmake/itstool.cmake
@@ -1,4 +1,4 @@
-function (itstool target_name src_dir tmp_dir install_dir)
+function (itstool target_name src_dir tmp_dir install_dir po_dir)
install (DIRECTORY "${src_dir}/C" DESTINATION ${install_dir})
# Get list of XML files
@@ -12,7 +12,7 @@ function (itstool target_name src_dir tmp_dir install_dir)
set (all_new_files)
# Foreach language
- file (GLOB_RECURSE po_files "${src_dir}/*.po")
+ file (GLOB_RECURSE po_files "${po_dir}/*.po")
foreach (po_file ${po_files})
# Get the language name
get_filename_component (lang ${po_file} NAME_WE)
diff --git a/data/build_tools/CMakeLists.txt b/data/build_tools/CMakeLists.txt
index 756c1ef..2971dec 100644
--- a/data/build_tools/CMakeLists.txt
+++ b/data/build_tools/CMakeLists.txt
@@ -3,4 +3,5 @@ itstool (
"${latexila_SOURCE_DIR}/data/build_tools" # src dir
"${latexila_BINARY_DIR}/data/build_tools" # tmp dir
"${DATA_DIR}/build_tools" # install dir
+ "${latexila_SOURCE_DIR}/po" # po dir
)
diff --git a/data/build_tools/update_build_tools_pot.sh b/data/build_tools/update_build_tools_pot.sh
index 1907589..da73718 100755
--- a/data/build_tools/update_build_tools_pot.sh
+++ b/data/build_tools/update_build_tools_pot.sh
@@ -1,9 +1,3 @@
#!/bin/sh
-pot_file="build_tools.pot"
-
-itstool -o $pot_file -i build_tools.its C/build_tools.xml
-
-for po_file in *.po; do
- msgmerge --update --quiet --backup=none $po_file $pot_file
-done
+itstool -o build_tools.pot -i build_tools.its C/build_tools.xml
diff --git a/data/templates/CMakeLists.txt b/data/templates/CMakeLists.txt
index 1078740..951be92 100644
--- a/data/templates/CMakeLists.txt
+++ b/data/templates/CMakeLists.txt
@@ -1,6 +1,7 @@
set (src_dir "${latexila_SOURCE_DIR}/data/templates")
set (tmp_dir "${latexila_BINARY_DIR}/data/templates")
set (install_dir "${DATA_DIR}/templates")
+set (po_dir "${latexila_SOURCE_DIR}/po")
# Get list of XML files
file (GLOB path_files "${src_dir}/C/*")
@@ -38,7 +39,7 @@ set (all_new_files ${lang_files})
# Generate *.tex foreach language
###
-file (GLOB po_files "${src_dir}/*.po")
+file (GLOB_RECURSE po_files "${po_dir}/*.po")
foreach (po_file ${po_files})
# Get the language name
get_filename_component (lang ${po_file} NAME_WE)
diff --git a/data/templates/update_templates_pot.sh b/data/templates/update_templates_pot.sh
index 44d8584..1507c46 100755
--- a/data/templates/update_templates_pot.sh
+++ b/data/templates/update_templates_pot.sh
@@ -1,9 +1,3 @@
#!/bin/sh
-pot_file="templates.pot"
-
-itstool -o $pot_file -i templates.its C/*.xml
-
-for po_file in *.po; do
- msgmerge --update --quiet --backup=none $po_file $pot_file
-done
+itstool -o templates.pot -i templates.its C/*.xml
diff --git a/help/CMakeLists.txt b/help/CMakeLists.txt
index bbe9943..9d917e1 100644
--- a/help/CMakeLists.txt
+++ b/help/CMakeLists.txt
@@ -3,4 +3,5 @@ itstool (
"${latexila_SOURCE_DIR}/help" # src dir
"${latexila_BINARY_DIR}/help" # tmp dir
"${CMAKE_INSTALL_PREFIX}/share/gnome/help/latexila" # install dir
+ "${latexila_SOURCE_DIR}/help" # po dir
)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 353c994..14932b5 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,8 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
[encoding: UTF-8]
+data/build_tools/build_tools.pot
+data/templates/templates.pot
src/application.vala
src/app_settings.vala
src/build_tool_dialog.vala
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]