MediaWiki has a well evolved and mature translation system that deals with a very large range of languages, and I think it would be worthwhile to check out how they do it there in detail. I believe that there is a better solution than requiring that all strings be retranslated for every new app that you create, it's just not as trivial as the naive solution that Django currently uses.
2014-03-15 19:20 GMT+02:00 Алексей Сидаш <[email protected]>: > Hello > > Yes, Adam Mesha seems to be right. The problem of translation is very > complicated. > I see only one solution, all the text in admin panel should not be > generated dynamically. > I mean, that code like *"Add new {{ model.verbose_name }}"* makes > translation to languages like Russian very difficult, because of > grammatical matching between words in sentenses.(For example, subject(noun) > and predicate(verb) in Russian must have the same grammatical gender and > etc). That's why, words should not be translated in isolation, sentenses > must be "atomical" unit of translation. > No doubdt, we need some consultation from other language speakers, > unfortunately, I speak only Russian and English, but I strongly believe > that "atomicity" of sentenses is the most suitable solution for this case. > It is not too much complicated as pymorphy, but good enough to solve > existing problems. > Rough "plan" is: > > 1. Put all the letters from admin panel into *.po files as message ids. > 2. Including dynamically generated, because every single one should > have own translation. > 3. Second item means, that this files should be generated with shell > command(for example). > 4. If there are no translations yet, framework should fallback to > current solution, or to English(Fallback should be discussed). > > For example, in application directory *django-admin.py translate-admin > *command > creates folder named admin-translations with structure like this: > > admin-translations/ > |____ModelOneLetters.po > |____ModelTwoLetters.po > |____... > > And example of ModelOneLetters.po file is: > > #: Add new item to database letter. > msgid "Add new ModelOne item" > msgstr "Добавить первую модель" > > #: Edit item letter. > > msgid "Edit ModelOne" > > msgstr "Редактировать первую модель" > > ... > > P.S. Feel free to criticize it, especially, if your native language has > translation problems. I believe that this problem's solution cannot be > found without consultation with different language speakers. > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-developers. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/c75be3e4-0280-4ead-9204-76d632c33503%40googlegroups.com<https://groups.google.com/d/msgid/django-developers/c75be3e4-0280-4ead-9204-76d632c33503%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Adam Mesha <[email protected]> Life is either a daring adventure, or nothing. - Helen Keller -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAPFOCZdtPZ%3DEupUrRP0i0QMrcv6yk2m6MqKtpjJgPYp7EDRtOg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
