Tinkerer translation

35 views
Skip to first unread message

Bernhard Grotz

unread,
Feb 22, 2012, 4:41:14 AM2/22/12
to tinkerer-dev

Hi people!

What has to be done to create a new translation / language support for Tinkerer?
Is there already an unicode-support (e.g. for german umlaute as ä,ö,ü), or what
would be necessary to reach this?

Any hints are welcome.

Thanks in advance,

Bernhard

signature.asc

Vlad Riscutia

unread,
Feb 22, 2012, 11:31:56 AM2/22/12
to tinker...@googlegroups.com
Hi,

Latest Tinkerer release already included a Spanish and a Catalan translation. You can look at this changeset to see what was done:  https://bitbucket.org/vladris/tinkerer/changeset/a1db304e098a. We are using Python's gettext module to translate the page elements. Non-English characters should work.

Thank you,
Vlad

Bernhard Grotz

unread,
Feb 23, 2012, 4:50:46 PM2/23/12
to tinker...@googlegroups.com

Hi Vlad,

* Vlad Riscutia <riscut...@gmail.com> [22.02.2012 17:36]:


> Latest Tinkerer release already included a Spanish and a Catalan
> translation. You can look at this changeset to see what was done:
> https://bitbucket.org/vladris/tinkerer/changeset/a1db304e098a. We are using
> Python's gettext module to translate the page elements. Non-English
> characters should work.

thanks for your quick reply.

I tried out gettext (pygettext and msgfmt), and it looks really simple.
Nevertheless there occurs the following error if I try to use german umlaute
inside a msgstr.

WARNING: a Unicode error occurred when rendering the page 2012/02/23/hello_world. Please make sure all config values that contain non-ASCII content are Unicode strings.

Putting an 'u' before the msgstr attribute in the .pot file does not work:
msgfmt raises a syntax error then because it interpretes something like
msgstr u"Schlagwörter" as a unknown tag.

I think tinker itself must handle such non-ascii string content.. do you have
any idea on how to solve this issue?

Both german locale files (.pot and .mo) are attached.


Greetings,

Bernhard

P.S.: Umlaute inside posts and pages are handled well.

tinkerer.mo
tinkerer.pot
signature.asc

Vlad Riscutia

unread,
Feb 23, 2012, 5:27:46 PM2/23/12
to tinker...@googlegroups.com
Thanks for the translation! 

I'm personally not very familiar with gettext but I will try to take a look at this probably during the weekend. What version of Python are you using?

Thank you,
Vlad

Vlad Riscutia

unread,
Feb 27, 2012, 2:47:57 AM2/27/12
to tinker...@googlegroups.com
Bernhard,

I figured out what was going wrong (by default Python 2 strings are not Unicode) and added your translation.

Thank you,
Vlad
Reply all
Reply to author
Forward
0 new messages