Location

47 views
Skip to first unread message

Andre Duarte

unread,
Dec 13, 2007, 9:00:06 AM12/13/07
to Satchmo users
I'm planning to make a initial translation to pt_BR and then someone
can improve.
So, what I did:

1- python make-messages.py -l pt_BR
locale/pt_BR/
`-- LC_MESSAGES
`-- django.po

2-I have used poedit to translate some strings from django.po
3-In settings.py I've changed some code.
....LANGUAGE_CODE = 'pt-br'
4-USE_I18N = True
Didn't worked!
So I tried to use a translation to another language.
5-....LANGUAGE_CODE = 'fr' #I've tried to use french translation only
to test
Didn't work too

I don't have experience with this, so, maybe I'm doing something
wrong . Can anyone help me?

Andre Duarte

unread,
Dec 13, 2007, 9:48:59 AM12/13/07
to Satchmo users
Sorry about the title, must be Translation

Bruce Kroeze

unread,
Dec 13, 2007, 11:20:04 AM12/13/07
to satchm...@googlegroups.com
Andre, is that location enabled on your machine?  Ubuntu and Debian do not come with locales set up for many common locales.
Message has been deleted

Andre Duarte

unread,
Dec 13, 2007, 1:18:32 PM12/13/07
to Satchmo users
Other django projects are ok.
So, I was inspecting the code to figure out why translate don't work
with Satchmo and the only diference I found is this
"django.middleware.locale.LocaleMiddleware" , so I removed this and
translations are now working but with django/utils/locale/(my_lang)/
LC_MESSAGES instead satchmo/locale/(my_lang)/LC_MESSAGES

On 13 dez, 14:20, "Bruce Kroeze" <bkro...@gmail.com> wrote:
> Andre, is that location enabled on your machine? Ubuntu and Debian do not
> come with locales set up for many common locales.
How can I inspect this??

Bruce Kroeze

unread,
Dec 13, 2007, 1:19:10 PM12/13/07
to satchm...@googlegroups.com
> Andre, is that location enabled on your machine?  Ubuntu and Debian do not
> come with locales set up for many common locales.
How can I see this?

If ubuntu:

http://mcarlucci.free.fr/dotclear/index.php/Gnu-linux

If debian:

http://people.debian.org/~schultmc/locales.html


Other Linuxes:

Probably similar to Ubuntu

Windows:

I don't know or plan to learn.  :)




Andre Duarte

unread,
Dec 13, 2007, 1:44:14 PM12/13/07
to Satchmo users
Problem solved, Bruce thanks for your pacience!

How?
aptitude install mozilla-firefox-locale-pt-br
My Firefox was in English so, the requests are in "en" not in "pt-br"
and then when LocaleMiddleware get the request and change my
language. :-D

"""
This is a very simple middleware that parses a request
and decides what translation object to install in the current
thread context. This allows pages to be dynamically
translated to the language the user desires (if the language
is available, of course).
"""

Now I' going to work on my translation and soon as possible I'll send
the django.po.

Tk's

Nicola Larosa

unread,
Dec 15, 2007, 11:03:39 AM12/15/07
to satchm...@googlegroups.com
Andre Duarte wrote:
> Problem solved, Bruce thanks for your pacience!
>
> How?
> aptitude install mozilla-firefox-locale-pt-br
> My Firefox was in English so, the requests are in "en" not in "pt-br"
> and then when LocaleMiddleware get the request and change my
> language. :-D

The language Firefox requests during content negotiation does not have
to be the same as the one the user interface shows: you may set it via
Edit -> Preferences -> Advanced -> General -> Languages -> Choose...

For instance, I see the English user interface, but have Italian and
English as chosen languages, in that order of preference.


--
Nicola Larosa - http://www.tekNico.net/

I've been pretty much convinced that we've got to have autoescape,
and it's got to be on by default. It's basically a tradeoff
between annoyance (of having to turn it off when you need it off)
and security, and security has to win that argument.
-- Jacob Kaplan-Moss, Django developer, July 2007

Andre Duarte

unread,
Dec 15, 2007, 7:45:52 PM12/15/07
to Satchmo users
Thanks for the information, it was more easily than I thought. xD

On 15 dez, 14:03, Nicola Larosa <nicola.lar...@gmail.com> wrote:
> Andre Duarte wrote:
> > Problem solved, Bruce thanks for your pacience!
>
> > How?
> > aptitude install mozilla-firefox-locale-pt-br
> > My Firefox was in English so, the requests are in "en" not in "pt-br"
> > and then when LocaleMiddleware get the request and change my
> > language. :-D
>
> The language Firefox requests during content negotiation does not have
> to be the same as the one the user interface shows: you may set it via
> Edit -> Preferences -> Advanced -> General -> Languages -> Choose...
>
> For instance, I see the English user interface, but have Italian and
> English as chosen languages, in that order of preference.
>
> --
> Nicola Larosa -http://www.tekNico.net/

John Shaffer

unread,
Dec 16, 2007, 6:27:59 PM12/16/07
to satchm...@googlegroups.com
You might find the translation documentation helpful:
http://www.satchmoproject.com/trac/wiki/HowToTranslate

IRCzito

unread,
Jan 26, 2008, 5:53:41 PM1/26/08
to Satchmo users
I'm work too in pt_BR translate for Satchmo.
But i can't try out it.

I follow this steps:

1. python make-messages.py -l pt_BR
2. edit locale/pt_BR/LC_MESSAGES/django.po witch poeit
3. execute 'python /usr/lib/python2.5/site-packages/django/bin/compile-
messages.py -l pt-BR' on Satchmo project dir.
4. set LANGUAGE_CODE = 'pt-br' in settings.py
5. uncomment LOCALE_PATHS = "" in local_settings.py

I'm doing something wrong? Or forget something?

Andre Duarte, if you want help with this translation job I made svn
for django.po file
svn co svn://s1.ath.cx/var/svn/satchmo-ptbr

IRCzito

unread,
Jan 27, 2008, 8:30:24 AM1/27/08
to Satchmo users

Sorry, the problem is really the request of the browser.
I can preview my translation on epiphany web browser.

But is there any way to modify the default locale?

Bruce Kroeze

unread,
Jan 27, 2008, 2:00:02 PM1/27/08
to satchm...@googlegroups.com
Change LANGUAGE_CODE in settings.py to whatever you want as default.

Terry Laundos

unread,
Jan 27, 2008, 2:34:29 PM1/27/08
to satchm...@googlegroups.com
I already changed, but in Firefox, and IE it still in English.
Under Ephiphany is OK.
Have any idea of how I can fix it?

2008/1/27, Bruce Kroeze <bkr...@gmail.com>:

Chris Moffitt

unread,
Jan 27, 2008, 8:56:04 PM1/27/08
to satchm...@googlegroups.com
Try this plugin for Firefox - https://addons.mozilla.org/en-US/firefox/addon/1333

I think that's what you're looking for.

-Chris

Terry Laundos

unread,
Jan 28, 2008, 6:48:56 AM1/28/08
to satchm...@googlegroups.com
Tanks Chris Moffitt,
It´s work for Firefox, but for IE don´t.
On IE seens only Django default words appears with translate, and
Satchmo words steel in English after LANGUAGE_CODE = pt_BR
Do you know if have another way to modify the default locale?

2008/1/27, Chris Moffitt <ch...@moffitts.net>:

Bruce Kroeze

unread,
Jan 28, 2008, 11:15:59 AM1/28/08
to satchm...@googlegroups.com
If you don't want to see english at all, you can (temporarily or permanently) remove it from your LANGUAGES setting.
--
Bruce Kroeze
http://solidsitesolutions.com
Dynamic Designs, Optimized
Reply all
Reply to author
Forward
0 new messages