Skip to content

Update gettext messages

Antenore Gatta edited this page May 16, 2018 · 6 revisions

This is a quick, dirty and no brainy procedure to update the po files in Remmina.

Please count till 10 seconds before to copy&paste it in the terminal.

REMMINATOP=~/remmina_devel/Remmina 
cd $REMMINATOP 
find . -name "*.c" | sed 's/^.\///' >| po/POTFILES.in 
find . -name "*.glade" | sed 's/^.\///' >> po/POTFILES.in 
vi po/POTFILES.in #Remove unneded files, i.e. build files 
xgettext --files-from=po/POTFILES.in -k_ -kN_ -ktranslatable --output=po/messages.pot --copyright-holder="2014-2018 Antenore Gatta, Giovanni Panozzo" --package-name="Remmina" --package-version="1.2.0-rcgit-24" --msgid-bugs-address="[email protected]"
cd $REMMINATOP/po 
for i in *.po; do  
msgmerge -N --backup=off --update $i messages.pot 
done 
for i in $REMMINATOP/po/*.po ; do  
TMPF=/tmp/f$$.txt 
sed '/^#~/d' $i > $TMPF 
awk 'BEGIN{bl=0}/^$/{bl++;if(bl==1)print;else next}/^..*$/{bl=0;print}' $TMPF >| $i 
rm $TMPF 
done 
rm *.po~ 
rm messages.pot 

To test remmina in another language you can start it from the command line this way:

LANGUAGE=ru remmina