User:Goelette Cardabela/Sandbox/Add appendix/Translations

Pot-files .pot

edit

pot-files are product by xgettext with sources in bin directory

examples with Installdir=~/Add_appendix
if test -e $Installdir/bin/header.inc; then
  xgettext -L shell -o $Installdir/share/locale/header.inc.pot --from-code=UTF-8 $Installdir/bin/header.inc; fi
if test -e $Installdir/bin/annex; then
  xgettext -L shell -o $Installdir/share/locale/annex.pot --from-code=UTF-8 $Installdir/bin/annex; fi

Files .po

edit

Translations of Spanish .po files are copied like this, for example:

cp $Installdir/share/locale/annex.pot $Installdir/share/locale/es/annex.po

Files .mo

edit

After translation with po-editor the final file annex.mo is copied to /usr/share/locale/es/LC_MESSAGES/annex.mo

sudo cp $Installdir/share/locale/es/annex.mo /usr/share/locale/es/LC_MESSAGES/annex.mo

when executing 'annex' the mesages are automatically translated into spanish