blob: 2333865238c21df1b2e8abcdad8feab6622788a1 (
plain) (
tree)
|
|
#!/bin/sh
set -eu
TRANSLATIONS='pt fr eo'
for f in $(git ls-files | grep -E '.(md|slides)$' | grep -v '^vendor/reveal.js$'); 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
|