translation to another language

1,057 views
Skip to first unread message

Alexey

unread,
Jan 27, 2013, 8:32:04 AM1/27/13
to django...@googlegroups.com
Hi everybody, could you advise me what is the best or recommended way to have django-oscar translated to another language?


Róbert Čerňanský

unread,
Jan 28, 2013, 1:50:17 PM1/28/13
to django...@googlegroups.com
Hi Alexey,

I am assuming that translation to the language you require is not yet
available. In such case you have to do it by yourself. In short, you
can do it with following steps:

1. Generate .po file for your language:

a. In the terminal go to the Oscar installation directory, e.g.:

$ cd lib64/python2.7/site-packages/django_oscar-0.4.2-py2.7.egg/oscar/

b. Run the makemessages command:

$ django-admin.py makemessages --locale=<your language code>

A new file 'django.po' should be created in subdirectory
locale/<your language code>/LC_MESSAGES/

2. Do the translation in the generated 'django.po' file.

In the file you will see lines starting with "msgid" - that's the
original text. Below it is line starting with "msgstr" - that's
where you put the translated text. You may use any text editor or
some helper tool (for example Emacs has special PO Mode for
translating .po files).

3. Compile the po file:

$ django-admin.py compilemessages

A new file 'django.mo' will be created in the same directory as the
.po file.

4. (Re)start server for your web and enjoy translated messages
(assuming that you have appropriate settings of translation-related
variables in settings.py (LANGUAGE_CODE, USE_I18N, USE_L10N and
perhaps also TIME_ZONE and USE_TZ).

If -- before point 1 -- there is already existing .po file and nothing
is translated in it, it is better if you delete it first (in my
experience those files are generated from an older version of Oscar).

For more info read https://docs.djangoproject.com/en/1.4/topics/i18n/.
There are links to other docs as well. You might want to skim through
them. Especially in 'GNU gettext documentation'
(https://www.gnu.org/software/gettext/manual/gettext.html) you can
find everything about .po files and what is behind the scenes (look
for info about handling plurals and about fuzzy entries there).

Not sure if this is the best or recommended way though. But is works
for me. Hope it helps.

Robert


--
Róbert Čerňanský
E-mail: ope...@tightmail.com
Jabber: h...@jabber.sk

David Winterbottom

unread,
Jan 29, 2013, 7:58:01 AM1/29/13
to django-oscar
Róbert - great explanation - thanks!

Alexey - I suppose it depends on whether you want to create a set of Oscar translations that Oscar should ship with (ie something that gets merged into core), or if you simply want your Oscar project to use a custom set of translations.  I've added a recipe for both use-cases:

Feedback welcome



--
https://github.com/tangentlabs/django-oscar
---
You received this message because you are subscribed to the Google Groups "django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-oscar...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.





--
David Winterbottom
Head of Programming

Tangent Labs
84-86 Great Portland Street
London W1W 7NR
England, UK

Janusz Harkot

unread,
Jan 29, 2013, 8:00:09 AM1/29/13
to django...@googlegroups.com
Maybe Oscar should use https://www.transifex.com ? It's free for the open source projects.


Janusz

Alexey

unread,
Jan 29, 2013, 8:13:19 AM1/29/13
to django...@googlegroups.com
Hi guys , thanks a lot for detailed explanation, that was very helpful.

David Winterbottom

unread,
Jan 29, 2013, 8:56:11 AM1/29/13
to django-oscar
I will look into using Transifex soon.  There is a ticket for it already:


On 29 January 2013 13:13, Alexey <vez...@gmail.com> wrote:
Hi guys , thanks a lot for detailed explanation, that was very helpful.

--
https://github.com/tangentlabs/django-oscar
---
You received this message because you are subscribed to the Google Groups "django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-oscar...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Anton Yanchenko

unread,
Jan 29, 2013, 1:13:17 PM1/29/13
to django...@googlegroups.com
If you would need Russian translation (just Alexey sounds like Russian
name) you could see some here:
https://github.com/simplylizz/django-oscar/tree/ru-upstream-master -
work isn't finished, but at least started. :) But note that this
version is slightly differs from upstream, that's why I'll recommend
to get only messages.

Also if you would met a problem with slug generation you could look at
this pretty simple fix:
https://github.com/simplylizz/django-slugify - this would monkeypatch
django's slugify which ignores non-latin symbols while generating
slugs (more details here: https://code.djangoproject.com/ticket/8391).


--
Thanks,
Anton Yanchenko

Alexey

unread,
Jan 30, 2013, 6:16:37 AM1/30/13
to django...@googlegroups.com
Hi Anton, you are right, I need Russian version, thanks a lot for translation.

Dawid Lorenz

unread,
Mar 5, 2013, 7:18:56 AM3/5/13
to django...@googlegroups.com
Hi Janusz,

I can see there's pretty good progress on the Polish translation in Transifex. Is that only you working on that language at the moment?

I'm happy to join the translation team and help out if necessary.

Thanks,
Dawid

Janusz Harkot

unread,
Mar 5, 2013, 7:22:03 AM3/5/13
to django...@googlegroups.com
I was translating this offline, David must have put this on transifex.

As far as I know, there were nobody else, but of course you can join any time!

regards,
Janusz
--

Dawid Lorenz

unread,
Mar 5, 2013, 7:26:51 AM3/5/13
to django...@googlegroups.com
Cool, I haven't used Transifex yet, so need to get my head around this, but once I do, I'll try to contribute something.

Thanks,
d.



--
https://github.com/tangentlabs/django-oscar
---
You received this message because you are subscribed to a topic in the Google Groups "django-oscar" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-oscar/a6LSTaHZYF4/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to django-oscar...@googlegroups.com.



--
http://dawid.lorenz.co * sent from electronic device, I think

Dawid Lorenz

unread,
Mar 13, 2013, 10:55:24 AM3/13/13
to django...@googlegroups.com
I have (nearly) finished up the Polish translation of Oscar in Transifex - pending couple of strings which need to be fixed in the source tree, I think.


Reviews and/or improvements are welcome.

d.

Tomasz Wysocki

unread,
Mar 19, 2013, 1:07:15 PM3/19/13
to django...@googlegroups.com
Hi,

I'm interested in Polish translation (have even created one small commit 7 days ago https://github.com/tangentlabs/django-oscar/commit/a0107cf08338e64877a8d48d4a15e8b8c92e5aaf). I'm building oscar-based project right now, so I will be posting fixes to Polish translations if I will find any problems with my shop.

PS. Are you interested in oscar implementation of some Polish payment provider (like dotpay)? I think there isn't any. We will probably implement some solution for our project.

Dawid Lorenz

unread,
Mar 19, 2013, 1:35:56 PM3/19/13
to django...@googlegroups.com

Hi Tomasz,

If you'd like to contribute Polish translations to Oscar, I'd suggest going through Transifex project for Oscar. I have completed the translation (it was 89% complete already before I picked it up), however there are quite a few translated strings that could be improved. I am planning to go through them at some point before 0.5 release to make sure translation is of good quality for the release.

I was also thinking of getting involved into Polish-specific extensions to Oscar (like dotpay or payu integration), however I don't work on any real ecommerce project here in Poland which uses Oscar just yet.

--
http://dawid.lorenz.co * sent from electronic device, I think

--

Janusz Harkot

unread,
Mar 19, 2013, 1:45:37 PM3/19/13
to django...@googlegroups.com
FYI, I have Przelewy24 aleady in production.

Janusz
You received this message because you are subscribed to the Google Groups "django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-oscar...@googlegroups.com.

Dawid Lorenz

unread,
Mar 19, 2013, 2:29:34 PM3/19/13
to django...@googlegroups.com

Great, are you planning to release it as an open source extension?

--
http://dawid.lorenz.co * sent from electronic device, I think

Janusz Harkot

unread,
Mar 19, 2013, 2:31:40 PM3/19/13
to django...@googlegroups.com
Sure! The only problem I have right now, is that I have some additional changes to choose payment method,
and this module is closely coupled with it.

So there are two possibilities:
- adapt module as standalone extension
- release payment module chooser and then release payment module

I have no clue which to choose, yet :)


Janusz

Tomasz Wysocki

unread,
Mar 21, 2013, 7:28:54 AM3/21/13
to django...@googlegroups.com
I will probably implement eCard (http://www.ecard.pl/).

Tomasz Wysocki
Partner
Pozytywnie.pl Sp. z o.o. z siedzibą w Warszawie, 02-703 przy ul. Bukowińskiej 24A/146, wpisana do rejestru przedsiębiorców Krajowego Rejestru Sądowego, prowadzonego przez Sąd Rejonowy dla miasta stołecznego Warszawy, XIII Wydział Gospodarczy Krajowego Rejestru Sądowego pod numerem KRS 0000355206 o kapitale zakładowym w wysokości 6250,00zł REGON: 142347430 NIP: 5213563801

Wiadomość ta jest przeznaczona jedynie dla osoby lub podmiotu, który jest jej adresatem i może zawierać poufne i/lub uprzywilejowane informacje. Zakazane jest jakiekolwiek przeglądanie, przesyłanie, rozpowszechnianie lub inne wykorzystanie tych informacji lub podjęcie jakichkolwiek działań odnośnie tych informacji przez osoby lub podmioty inne niż zamierzony adresat. Jeżeli Państwo otrzymali przez pomyłkę tę informację prosimy o poinformowanie o tym nadawcy i usunięcie tej wiadomości z wszelkich komputerów. 

Raimon Esteve

unread,
Apr 12, 2013, 3:16:47 AM4/12/13
to django...@googlegroups.com, tom...@pozytywnie.pl
Hello,

How to translate Oscar?

In documentation I read about Rosseta. I think is same to translate po files with PoEdit.

Spanish translations in Pypi or github is poor. Yesterday I find working place in Transifex. I'm waiting to aprove in this group ;)

Also I like to create a new Oscar language: Catalan (ca). Who create it?  @codeinthehole?

Thanks

David Winterbottom

unread,
Apr 12, 2013, 6:10:51 AM4/12/13
to django-oscar, tom...@pozytywnie.pl
On 12 April 2013 08:16, Raimon Esteve <raimon...@gmail.com> wrote:
Hello,

How to translate Oscar?



 

In documentation I read about Rosseta. I think is same to translate po files with PoEdit.

Spanish translations in Pypi or github is poor. Yesterday I find working place in Transifex.

​I'll update the translation doc to suggest using Transifex, as that is the best place.​

 
I'm waiting to aprove in this group ;)

​I've approved you and created the catalan language, for which you are the coordinator:

Cheers!

 

Also I like to create a new Oscar language: Catalan (ca). Who create it?  @codeinthehole?

Thanks

--
https://github.com/tangentlabs/django-oscar
---
You received this message because you are subscribed to the Google Groups "django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-oscar...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-oscar?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Tomasz Wysocki

unread,
Apr 12, 2013, 10:17:28 AM4/12/13
to django...@googlegroups.com
Will you post your implementation in near future? We will have to implement eCard.pl and your implementation can be helpful as point of reference. So even not-fully working implementation can help us.

Thx.

Dawid Lorenz

unread,
Apr 12, 2013, 10:39:36 AM4/12/13
to django...@googlegroups.com
Just a question/note - if you have any Polish-specific Oscar extension(s) (or are aware of any) that are also open sourced, could you please let me know? 

I am looking to create www.oscarcommerce.pl website soon which would more-or-less reflect current general .com website, yet with a bit of Polish twist, including references to existing extensions which could be used by Polish developers working with Oscar.

Thanks in advance!

Dawid

Maik Hoepfel

unread,
Apr 16, 2013, 4:11:04 AM4/16/13
to django...@googlegroups.com, tom...@pozytywnie.pl, david.win...@tangentlabs.co.uk

​I'll update the translation doc to suggest using Transifex, as that is the best place.​

Krystian Cybulski

unread,
Oct 6, 2013, 6:06:45 AM10/6/13
to django...@googlegroups.com, tom...@pozytywnie.pl
Hello Tomasz,

I am interested in developing an ecard.pl payment module for Oscar. You have mentioned that you will be implementing one and I was wondering if you have made any progress and if you would be interested in open-sourcing it and/or collaborating on it. If you have any interest in contributing any of your work to an open-source ecard.pl payment module for Oscar, please let me know.

Kind Regards,
Krystian Cybulski

Krystian Cybulski

unread,
Oct 6, 2013, 6:14:30 AM10/6/13
to django...@googlegroups.com
Hi Janusz,

If you are interested in contributing your code to an open-sourced przelewy24 Oscar payment module, please let me know. I can take whatever code you have an lead the dev effort. Can you provide the code that you have so we can start collaborating?

Best Regards,
Krystian Cybulski


On Tuesday, March 19, 2013 7:31:40 PM UTC+1, Jerzyk wrote:

tom...@pozytywnie.pl

unread,
Oct 11, 2013, 8:51:58 AM10/11/13
to django...@googlegroups.com, tom...@pozytywnie.pl
Reply all
Reply to author
Forward
0 new messages