Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150024594
D33067.id98790.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D33067.id98790.diff
View Options
diff --git a/tools/translate.sh b/tools/translate.sh
--- a/tools/translate.sh
+++ b/tools/translate.sh
@@ -54,13 +54,16 @@
}
if [ "$1" = "" ] || [ "$2" = "" ]; then
- echo "Need to inform which component and|or language."
- echo "$0 documentation|website pt_BR|es"
+ echo "Need to inform component and language:"
+ echo " $0 documentation es"
+ echo "A third (optional) argument can be informed to translate only a specific document:"
+ echo " $0 documentation pt-br articles/bsdl-gpl"
exit 1
fi
COMPONENT="$1"
LANGUAGE="$2"
+SEARCH_RESTRICT="$3"
# po4a-translate option: -k, --keep
# Minimal threshold for translation percentage to keep (i.e. write)
@@ -79,7 +82,7 @@
exit 1
fi
-for pofile in $(find "$COMPONENT/content/$LANGUAGE/" -name "*.po" ); do
+for pofile in $(find "$COMPONENT/content/$LANGUAGE/$SEARCH_RESTRICT" -name "*.po"); do
name=$(basename -s .po "$pofile")
if [ "$name" = "chapters-order" ]; then
continue
@@ -92,6 +95,19 @@
echo "....."
echo "$pofile"
+ po4a-updatepo \
+ --format asciidoc \
+ --option compat=asciidoctor \
+ --option yfm_keys=title,part,description \
+ --master "$adoc_orig" \
+ --master-charset "UTF-8" \
+ --copyright-holder "The FreeBSD Project" \
+ --package-name "FreeBSD Documentation" \
+ --po "$pofile"
+ if [ -f "${pofile}~" ]; then
+ rm -f "${pofile}~"
+ fi
+
po4a-translate \
--format asciidoc \
--option compat=asciidoctor \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 29, 8:06 PM (3 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30551935
Default Alt Text
D33067.id98790.diff (1 KB)
Attached To
Mode
D33067: tools/translate.sh: Improve usage
Attached
Detach File
Event Timeline
Log In to Comment