blob: a1527cad26b95d9982c075e98a9ca255cc74fac8 (
plain) (
tree)
|
|
#!/usr/bin/env bash
set -Eeuo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
cd ../
TRANSLATIONS=(pt fr eo)
for f in $(git ls-files | egrep '.(md|slides)$' | grep -v '^vendor/reveal.js$' | grep -v '^templates/'); do
file_lang="$(grep '^lang: ..$' "$f" | awk '{print $2}')"
if [[ "$file_lang" = 'en' ]]; then
for l in "${TRANSLATIONS[@]}"; do
OUT="locale/$l/LC_MESSAGES/${f%.md}.po"
mkdir -p "$(dirname "$OUT")"
md2po "$f" --include-codeblocks --quiet --save --po-filepath "$OUT"
done
fi
done
|