From 63c6ca7076bfd3760e3a0c379010e13bfaf6da1a Mon Sep 17 00:00:00 2001 From: Brian (bex) Exelbierd Date: Apr 27 2018 15:50:18 +0000 Subject: v1 of translation scripts --- diff --git a/_l10n/first_time_make_pot.sh b/_l10n/first_time_make_pot.sh new file mode 100755 index 0000000..41e60e1 --- /dev/null +++ b/_l10n/first_time_make_pot.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +dir="modules" # no trailing slash + +for file in $( find -L $dir -name "*.adoc" ); do + basename=`basename -s .adoc $file` + dirname=`dirname $file` + path=`echo ${dirname#$dir/}` + mkdir -p pot/$path + if [ "$dirname" = "$dir" ]; then + potname=$basename.pot + else + potname=$path/$basename.pot + fi + echo po4a-gettextize -f asciidoc -m $file -p pot/$potname --master-charset "UTF-8" -o debug split_attributelist + PERLLIB=~/Repositories/po4a/po4a/lib po4a-gettextize -f asciidoc -m $file -p pot/$potname --master-charset "UTF-8" -o debug split_attributelist +done + +#echo po4a-gettextize -f yaml -o keys=Name -m ../_topic_map.yml -p pot/_topic_map.yml.pot --master-charset "UTF-8" +#PERLLIB=~/Repositories/po4a/po4a/lib po4a-gettextize -f yaml -o keys=Name -m ../_topic_map.yml -p pot/_topic_map.yml.pot --master-charset "UTF-8" diff --git a/_l10n/use_pot.sh b/_l10n/use_pot.sh new file mode 100755 index 0000000..84b1091 --- /dev/null +++ b/_l10n/use_pot.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +lang=$1 +dir="modules" # no trailing slash + +for file in $( find -L $dir -name "*.adoc" ); do + basename=`basename -s .adoc $file` + dirname=`dirname $file` + path=`echo ${dirname#$dir/}` + if [ "$dirname" = "$dir" ]; then + potname=$basename + else + potname=$path/$basename + fi + if [ -e po/$potname.$lang.po ]; then + echo po4a-translate -f asciidoc -m $file -p po/$potname.$lang.po --master-charset "UTF-8" --localized-charset "UTF-8" -l $file -o debug split_attributelist -k 0 + PERLLIB=~/Repositories/po4a/po4a/lib po4a-translate -f asciidoc -m $file -p po/$potname.$lang.po --master-charset "UTF-8" --localized-charset "UTF-8" -l $file -o debug split_attributelist -k 0 + fi +done + +#if [ -e po/_topic_map.yml.$lang.po ]; then +# echo po4a-translate -f yaml -o keys=Name -m ../_topic_map.yml -p po/_topic_map.yml.$lang.po --master-charset "UTF-8" --localized-charset "UTF-8" -l ../_topic_map.yml -k 0 +# PERLLIB=../../po4a/lib po4a-translate -f yaml -o keys=Name -m ../_topic_map.yml -p po/_topic_map.yml.$lang.po --master-charset "UTF-8" --localized-charset "UTF-8" -l ../_topic_map.yml -k 0 +#fi diff --git a/_l10n/zanata.xml b/_l10n/zanata.xml new file mode 100644 index 0000000..e98752d --- /dev/null +++ b/_l10n/zanata.xml @@ -0,0 +1,12 @@ + + + https://fedora.zanata.org/ + fedora-docs-system-adminstration-guide + master + gettext + pot/ + ./po/ + + {path}/{filename}.{locale}.po + +