From 85f41980a5471cb56f90e281bf8679f6d1cc9fdc Mon Sep 17 00:00:00 2001
From: Zhang Huangbin
Date: Tue, 24 Mar 2015 10:23:06 +0800
Subject: [PATCH] * Mention how to verify translated items in
faq/2-translate.iredadmin.md. * A easier/better way (new option '--all') to
compile all Markdown documents.
---
convert.sh | 12 +++++++-----
faq/2-translate.iredadmin.md | 13 +++++++++++++
html/translate.iredadmin.html | 10 ++++++++++
3 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/convert.sh b/convert.sh
index 491fcb55..bf844d0d 100644
--- a/convert.sh
+++ b/convert.sh
@@ -106,13 +106,15 @@ for chapter_dir in ${all_chapter_dirs}; do
fi
# Convert modified file
- echo ${CHANGED_FILES} | grep ${article_file} > /dev/null
- md_changed="$?"
+ if echo ${CHANGED_FILES} | grep ${article_file} > /dev/null; then
+ compile_this_file='YES'
+ fi
- echo ${CHANGED_FILES} | grep $(basename ${CONVERTER}) > /dev/null
- converter_changed="$?"
+ if echo "$@" | grep -q -- '--all'; then
+ compile_all='YES'
+ fi
- if [ X"${md_changed}" == X'0' -o X"${converter_changed}" == X'0' ]; then
+ if [ X"${compile_this_file}" == X'YES' -o X"${compile_all}" == X'YES' ]; then
echo -e "\n* Converting: ${article_file}"
${CMD_CONVERT} ${article_file} ${OUTPUT_DIR} \
output_filename="${article_html_file}" \
diff --git a/faq/2-translate.iredadmin.md b/faq/2-translate.iredadmin.md
index 2239d87c..c6fea331 100644
--- a/faq/2-translate.iredadmin.md
+++ b/faq/2-translate.iredadmin.md
@@ -11,4 +11,17 @@ translated languages under `i18n/` directory. If you are about to translate
it to a new language, you can copy file `i18n/iredadmin.po`, translate it,
and mail translated file to us.
+To verify translated items, you can translate the items first (e.g.
+`i18n/es_ES/LC_MESSAGES/iredadmin.po` for Spainish), then run script to compile
+it:
+
+```
+# cd /path/to/iRedAdmin-Pro/
+# cd i18n/
+# bash translation.sh es_ES # <- Update Spainish language (es_ES)
+```
+
+Restarting Apache or uwsgi (if you're running Nginx) service is required to
+reload new translation.
+
Your help is greatly appreciated.
diff --git a/html/translate.iredadmin.html b/html/translate.iredadmin.html
index f2751ce9..7ce5141b 100644
--- a/html/translate.iredadmin.html
+++ b/html/translate.iredadmin.html
@@ -20,6 +20,16 @@ improper items. Mail the translated file to email address
translated languages under i18n/
directory. If you are about to translate
it to a new language, you can copy file i18n/iredadmin.po
, translate it,
and mail translated file to us.
+To verify translated items, you can translate the items first (e.g.
+i18n/es_ES/LC_MESSAGES/iredadmin.po
for Spainish), then run script to compile
+it:
+# cd /path/to/iRedAdmin-Pro/
+# cd i18n/
+# bash translation.sh es_ES # <- Update Spainish language (es_ES)
+
+
+Restarting Apache or uwsgi (if you're running Nginx) service is required to
+reload new translation.
Your help is greatly appreciated.
Document published under a CC BY-ND 3.0 license. If you found something wrong, please do contact us to fix it.