2013-10-01 21:52:09 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# The name of catalog we create (without the.pot extension), sourced from the scripty scripts
|
|
|
|
FILENAME="kdeconnect-android"
|
|
|
|
|
|
|
|
function export_pot_file # First parameter will be the path of the pot file we have to create, includes $FILENAME
|
|
|
|
{
|
|
|
|
potfile=$1
|
|
|
|
mkdir outdir
|
2013-10-14 16:10:58 +02:00
|
|
|
a2po export --android src/main/res/ --gettext outdir
|
2013-10-01 21:52:09 +02:00
|
|
|
mv outdir/template.pot $potfile
|
|
|
|
rm -rf outdir
|
|
|
|
}
|
|
|
|
|
|
|
|
function import_po_files # First parameter will be a path that will contain several .po files with the format LANG.po
|
|
|
|
{
|
|
|
|
podir=$1
|
2013-10-14 16:10:58 +02:00
|
|
|
a2po import --android src/main/res/ --gettext $podir
|
2013-10-01 21:52:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|