[latexila] tex2po helper script to translate the letter template



commit bbda6186343a2f773455a668d684b59f7f92b070
Author: SÃbastien Wilmet <swilmet src gnome org>
Date:   Wed Aug 3 22:02:38 2011 +0200

    tex2po helper script to translate the letter template

 README                   |    4 ++++
 data/templates/tex2po.sh |   17 +++++++++++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/README b/README
index 5fec926..9dee592 100644
--- a/README
+++ b/README
@@ -43,3 +43,7 @@ Here is a summary page about the translation status of LaTeXila:
 If you want to help, see the "How Tos" section of this page:
 
     https://live.gnome.org/TranslationProject
+
+For translating the letter template (which require to translate it in one big
+block), there is a helper script in data/templates/tex2po.sh, so you can write
+the letter in a .tex file, with syntaxic color, etc.
diff --git a/data/templates/tex2po.sh b/data/templates/tex2po.sh
new file mode 100755
index 0000000..c7205b4
--- /dev/null
+++ b/data/templates/tex2po.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# How to execute this script?
+# $ ./tex2po.sh < letter.tex
+
+# Useful for translators, to translate the letter template, located in
+# data/templates/C/letter.xml.
+
+# You can write a normal .tex file for the letter. Then you run this script to
+# "convert" it, so you can include it in the PO file without formatting
+# headache.
+
+# Note that in the PO file, the translation must begin with:
+# msgstr ""
+# "\n"
+
+sed -e 's/\\/\\\\/g' -e 's/^\(.*\)$/"\1\\n"/'



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]