Skip to content

Commit

Permalink
Very rudimentary script to init translation files for new language
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisOelmueller committed Nov 17, 2013
1 parent fecb7fc commit 7410c46
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions development/add_weblate_language.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

if [[ "$#" -ne 1 ]]; then
echo "Usage: $0 locale_code (e.g. fi)"
exit 1
fi

f="po/uh/unknown-horizons.pot"
o="po/uh/${1}.po"
msginit --locale "$1" --input "$f" --no-translator --output-file "$o"
git add "$o"

f="po/uh-server/unknown-horizons-server.pot"
o="po/uh-server/${1}.po"
msginit --locale "$1" --input "$f" --no-translator --output-file "$o"
git add "$o"

mkdir -p "po/scenarios/${1}/"
f="po/scenarios/templates/tutorial.pot"
o="po/scenarios/${1}/tutorial.po"
msginit --locale "$1" --input "$f" --no-translator --output-file "$o"
git add "$o"

git commit -m "Add $1 translation files"

echo "Remember to add the respective horizons.constants LANGUAGENAMES entries!"

0 comments on commit 7410c46

Please sign in to comment.