blob: 1148b60b1dac181255219e9df13b7811ad2100c7 (
plain) (
tree)
|
|
#!/bin/sh -eu
for f in $(git ls-files | grep -E '.(md|slides)$' | grep -v '^vendor/reveal.js$'); do
l="$(grep '^lang: ..$' "$f" | awk '{print $2}')"
if [ "$l" != 'en' ]; then
ref="$(grep '^ref: ' "$f" | awk '{print $2}')"
# shellcheck disable=2046
FROM=$(find $(find . -name '*.md' -exec grep -l "^ref: $ref$" {} \;) -exec grep -l '^lang: en$' {} \;)
po2md "$FROM" --pofiles "locale/$l/LC_MESSAGES/${FROM%.md}.po" --quiet --save "$f"
fi
done
|