#!/bin/bash

if [ $@ != "" ]; then
    nomeficheiro=$@
    nomepot=`echo $@ | sed -e 's/.sh//'`
else
    nomeficheiro="ScriptBash"
    nomepot="Messages"
fi

echo " "
echo $nomepot
echo " "

# Crear os cartafoles
mkdir -p po -p locale/gl/LC_MESSAGES

# Xerar a plantilla ou ficheiro .pot
xgettext $nomeficheiro -o po/$nomepot.pot --from-code=utf-8

# Xeramos o ficheiro de tradución .po

echo $nomepot.pot
echo " "

# msginit -o po/gl.po -i po/$nomepot.pot
 msginit -l gl_ES --no-translator -o po/gl.po -i po/probaradius.pot
