User:Goelette Cardabela/Sandbox/Add appendix/Translations

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Pot-files .pot[edit | edit source]

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

examples with Installdir=~/Add_appendix
if test -e $Installdir/bin/; then
  xgettext -L shell -o $Installdir/share/locale/ --from-code=UTF-8 $Installdir/bin/; 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 | edit source]

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 | edit source]

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

sudo cp $Installdir/share/locale/es/ /usr/share/locale/es/LC_MESSAGES/

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