Translations
Get the update to date sources
- download the current subversion version
svn co svn://svn.freevo.org/freevo/branches/rel-1-9 freevo-1.9 svn co svn://svn.freevo.org/freevo/branches/rel-1 freevo-1.x
Either, this is most up-to-date
from the freevo directory run python setup.py i18n.
translate the messages in [language-code]/LC_MESSAGES/freevo.po. Remove #fuzzy comments in the translation when you checked them. Also remove old translations not needed anymore from the end of the file.
to test your translations run [freevo-dir]/autogen.sh then start freevo like this: "LANG=[language-code] freevo"
when you're done, generate a tar file with the new po file tar jcf freevo-[language-code].tar.bz2 i18n/[language-code]/LC_MESSAGES/freevo.po/ and attach the translation to the Submit New Feature Request.
Or, this is simpler
translate the messages in [language-code]/LC_MESSAGES/freevo.po. Remove #fuzzy comments in the translation when you checked them. Also remove old translations not needed anymore from the end of the file.
to test your translations run [freevo-dir]/autogen.sh then start freevo like this: "LANG=[language-code] freevo"
when you're done, generate a subversion diff file svn diff i18n/[language-code]/LC_MESSAGES/freevo.po > [language-code].patch and attach the translation to the Submit New Feature Request.
It is rather important to say what the language code is and for which branch the translation is been done against. It is not always obvious
Notes
The [language-code] is either a two character code for the language or a five character code for the language and country, eg en and en_GB
poedit makes the translations easier by providing a GUI editing tool.
Pay particular attention to the python-format strings, if these are incorrectly translated Freevo will crash.
After an update there may be fuzzy comments, these mean that during the update process 'gettext' has found similar messages which are more than likely incorrect.
#: plugins/idlebar/diskfree.py:87 #, python-format msgid "%iGB" msgstr ""
The contents of msgstr can be blank in which case the string is not translated. If msgid has a %s, %d, %i etc then this must match so this translation
#: plugins/idlebar/diskfree.py:87 #, python-format msgid "%iGB" msgstr "GBytes"
would crash freevo.
You can test the translations from the command line by doing this for a Swedish translations:
LANGUAGE=sv_SE gettext -d freevo -s Title
or
export LC_ALL=sv_SE export TEXTDOMAIN=freevo gettext -s "Description"
If you want to run the commands by hand then you can do this too. The freevo.po file is the source and the freevo.mo file is the compiled version of the freevo.po version. The basic command is msgfmt -o freevo.mo freevo.po
From the freevo source directory you need to run:
msgfmt -o i18n/sv/LC_MESSAGES/freevo.mo i18n/sv/LC_MESSAGES/freevo.po cp -p i18n/sv/LC_MESSAGES/freevo.mo i18n/sv/LC_MESSAGES/freevo.po /usr/share/locale/sv/LC_MESSAGES