tibia-client/tools/gen_needed_translations.sh

8 lines
366 B
Bash
Raw Normal View History

2012-07-31 01:52:06 +02:00
#!/bin/bash
echo '-- generated by ./tools/gen_needed_translations.sh'
echo 'Locales.neededTranslations = {'
cat <(find \( -name "*.lua" -o -name "*.otui" \) -exec grep -oE "tr\\('(\\\\'|[^'])*'" {} \;) \
<(find \( -name "*.lua" -o -name "*.otui" \) -exec grep -oE "tr\\(\"(\\\\\"|[^\"])*\"" {} \;) \
| sort | uniq | sed "s/^tr(.\(.*\).$/ \"\1\",/"
echo '}'