Skip to content

Commit

Permalink
reduce install to a users locale or if it doesnt exist then default t…
Browse files Browse the repository at this point in the history
…o en_US - issue #327
  • Loading branch information
fossfreedom committed Jul 3, 2014
1 parent 31041fa commit e0e5e5b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
9 changes: 9 additions & 0 deletions po/install_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
default="/usr/share/locale/"
echo "installing languages to $default"
for i in *.po; do
lang=`basename $i .po`
echo "installing $lang"
install -d $default$lang/LC_MESSAGES
msgfmt -c $lang.po -o $default$lang/LC_MESSAGES/coverart_browser.mo
done
19 changes: 13 additions & 6 deletions po/lang.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#!/bin/sh
echo "installing languages to $1"
for i in *.po; do
lang=`basename $i .po`
echo "installing $lang"
install -d $1$lang/LC_MESSAGES
msgfmt -c $lang.po -o $1$lang/LC_MESSAGES/coverart_browser.mo
done
lang=`echo $LANG | cut -d'.' -f 1`

if [ ! -f $lang.po ]; then
lang=`echo $lang | cut -d'_' -f 1`
fi

if [ ! -f $lang.po ]; then
lang="en_US"
fi

echo "installing $lang"
install -d $1$lang/LC_MESSAGES
msgfmt -c $lang.po -o $1$lang/LC_MESSAGES/coverart_browser.mo

0 comments on commit e0e5e5b

Please sign in to comment.