login about faq

I have been trying to translate the system into my language. I noticed that I can replace the necessary words directly in the .html files. Howerer, I believe that this is not the right way to do this. I need to create a new language pack so I,ll be more than thankful if you could give me some guidance. Thank you.

asked Apr 03 at 04:56

Georgi%20Vasilev's gravatar image

Georgi Vasilev
196158

Into which language are you translating the OSQA?

(May 03 at 10:38) samadhy

Hey Georgi, we use django i18n support. Detailed instructions can be found in http://docs.djangoproject.com/en/1.1/topics/i18n/localization/#topics-i18n-localization. There is just one extra step, currently we use a javascript translation file, located under forum/skins/default/media/js/com.cnprog.i18n.js. However this is about to change, I believe that javascript files are not the proper place to make translations, and soon there will be an update that refactors and simplifies all our javascript as well as some other news, and removes these translations from js. But you can start right now and nothing will be lost.

One other thing that we want to do in the future is to provide a on screen translation method, but that is probably a bit far away yet.

One final advice, if you're on windows, ignore the instructions about gettext on windows in the django instructions, it's a lot of work and not guaranteed to work, you'll probably better using something like cygwin (a unix shell emulator for windows), that will make it easier to install gettext and start translating.

Hope this helps :-)

answered Apr 03 at 13:56

Hern%C3%A2ni%20Cerqueira's gravatar image

Hernâni Cerqueira ♦♦
94121234

When I execute this command: python manage.py makemessages -l es

I get this error: ./forum/settings/basic.py:13: internationalized messages should not contain the `r' escape sequence (repeated several times)

Do you know how can I fix it ?

(Apr 19 at 05:15) Oscar ♦

For me problem is solve by editing basic.py (and other files too) and remove end line.

eg. help_text = _(""" The username for your SMTP connection. """),

is replaced by:

help_text = _("""The username for your SMTP connection."""),

(May 02 at 03:20) ledom

I am getting the following error when trying to execute python manage.py makemessages -l bg -e html:

    Error: errors happened while running xgettext on subscriptions.py
./forum/subscriptions.py:156: warning: 'msgid' format string with unnamed arguments cannot be properly localized:
                                       The translator cannot reorder the arguments.
                                       Please consider using a format string with named arguments,
                                       and a mapping instead of a tuple for the arguments.

Any ideas?

answered Apr 04 at 04:04

Georgi%20Vasilev's gravatar image

Georgi Vasilev
196158

Hey Georgi, yes I know what it is. I'll post a patch here in a while.

(Apr 04 at 14:30) Hernâni Cerqueira ♦♦

I've allready solved this on my repo in the past. BTW you need to translate the javascript files too. In formus/skins/default/media/js/com.cnprog.i18n.js

(Apr 05 at 02:02) Fitoria

Do you by chance remember the solution? I will be translating the .js files, thanks.

(Apr 05 at 04:18) Georgi Vasilev

Patch to fix this problem:

 Error: errors happened while running xgettext on subscriptions.py
./forum/subscriptions.py:156: warning: 'msgid' format string with unnamed arguments cannot be properly localized:
                                       The translator cannot reorder the arguments.
                                       Please consider using a format string with named arguments,
                                       and a mapping instead of a tuple for the arguments.

can be taken here.

answered Apr 06 at 08:34

ekalinin's gravatar image

ekalinin
11624

I have been translating for a while now, however I believe that I am doing something wrong. When I type python manage.py compilemessages bg and then select bg as the language in my local settings, I do not see the translated strings, instead, the default English language still stands.

answered Apr 12 at 05:04

Georgi%20Vasilev's gravatar image

Georgi Vasilev
196158

1

I must admit that I'm not totally comfortable with the translation process, I started a pt translation a while back but is still unfinished, and I remember that I had some issues as well. Maybe I'll retry the process later on, and post here some more detailed instructions.

(Apr 12 at 06:12) Hernâni Cerqueira ♦♦

Hey @Georgi. I had a problem that sounds this way before. Do you have LocaleMiddleware on? If so then turn it off. see http://stackoverflow.com/questions/1230315/cant-switch-language-environment-in-django Cheers!

(Apr 12 at 15:31) Evgeny Fadeev

Same problem for me, with or without LocaleMiddleware active... any other idea?

(May 02 at 03:52) ledom
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×6
×4

Asked: Apr 03 at 04:56

Seen: 619 times

Last updated: Apr 12 at 05:04

powered by OSQA