1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-06 23:06:34 +01:00

Add localization system (gettext)

This commit is contained in:
Ansa89
2015-05-25 16:38:52 +02:00
parent d0a7ca17d2
commit 51a1c660b4
36 changed files with 5546 additions and 437 deletions

19
translations/tools/create_mo.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
cd $(dirname $0)
loc="$1"
while [ -z "$1" -a -z "$loc" ]; do
echo -n "Insert locale (for example \"en\"): "
read loc
done
cd ..
if [ ! -e "$loc.po" ]; then
echo "File \"$loc.po\" not found"
echo "The translation file must exist"
exit 1
else
msgfmt -c -o $loc.mo $loc.po
fi