File indexing completed on 2024-04-14 14:12:12

0001 #!/bin/bash
0002 
0003 if [ $# -lt 1 ] ; then
0004   echo Usage: convert_translations.sh install_dir
0005   echo
0006   echo The script finds the downloaded translation files \(\*.po\) from the po subdirectory and it converts to
0007   echo mo format what can be loaded on Android directly.
0008   echo
0009   exit 1
0010 fi
0011 
0012 mkdir -p $1/locale
0013 DIRS=$(ls -1 po)
0014 
0015 echo Convert translations...
0016 for dir in $DIRS; do
0017   NEW_DIR=$1/locale/$dir/LC_MESSAGES
0018   mkdir -p $NEW_DIR
0019   echo Convert po/$dir/kstars.po to $NEW_DIR/kstars.mo
0020   msgfmt po/$dir/kstars.po -o $NEW_DIR/kstars.mo
0021 done