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:
19
translations/tools/create_mo.sh
Executable file
19
translations/tools/create_mo.sh
Executable 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
|
||||
Reference in New Issue
Block a user