cherrymusic icon indicating copy to clipboard operation
cherrymusic copied to clipboard

i18n

Open devsnd opened this issue 12 years ago • 5 comments

We need internationalization support.

devsnd avatar Mar 12 '13 18:03 devsnd

http://docs.python.org/2/library/gettext.html#internationalizing-your-programs-and-modules

We should start by marking all our message strings using the _() function. Afterwards we can run pygettext on it to create *.pot files, which in turn can be easily translated.

devsnd avatar Mar 14 '13 13:03 devsnd

i can help with the spanish translation

tacul avatar Dec 03 '13 17:12 tacul

We're currently testing Python internationalization in the i18n branch, but it only deals with messages in cherrymusicserver/__init__.py so far.

In that branch, I created a :es: language file in res/i18n/po/es.po, which contains the English messages and their translations (currently empty). If you want, you can give it a try, maybe using a tool like poedit for convenience.

We'll eventually cover all messages and merge into devel.

tilboerner avatar Dec 04 '13 12:12 tilboerner

Thats great! Anyway i prefer any text editor :P

Also, I think it would be more convenient to comment the environment of the messages to know exactly what it means.

tacul avatar Dec 04 '13 12:12 tacul

The i18n branch now has a translation generation script. It only works on linux right now and requires python3. We can now easily add translations (by creating a new subfolder for a specific translation which cantains an LC_MESSAGES folder) and update the needed translations from the source code automatically.

the script is in res/i18n/update_translations.py

I've also merged the latest devel into the i18n branch. we might as well merge it into devel already.

todo:

  • [ ] elegant solution for translating the client side (see cherrymusicserver/i18n_client.py)
  • [ ] mark all translatable strings in the source code
  • [ ] invite people to translate CM into their native language
  • [ ] set the default client language to that of the server, but let users choose other translations

devsnd avatar Dec 15 '13 17:12 devsnd