Opened 17 years ago

Closed 15 years ago

Last modified 13 years ago

#6505 closed (fixed)

make messages should copy the plural rules from the django po files

Reported by: Patrick Lauber <patrick.lauber@…> Owned by: Ramiro Morales
Component: Internationalization Version: dev
Severity: Keywords: plural rule
Cc: patrick.lauber@… Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I think it would make the hole process for newbies much more easier if the plural rule from the django .po file from the same language would be copied over. I just found out about this rule after using django for more than a year. We always thought that the po files where corrupt or something but it actually was the missing plural rule that got a django and gettext exception after they where compiled to .mo files. Only if you didn't translate the plural messages it worked. The exception that gets thrown is not helpfull either but is a gettext problem.

.po-file editors like po-edit, gted, django-rosetta all can't handle files with missing plural rules and plural-messages. They crash or produce corrupt .mo files. And looks like it is a problem of the editor and not that of the .po file

If the auto copy of the plural rule from the django core .po file is to much work, please be sure to mention the problem in the documentation.

Attachments (1)

6505-1.diff (2.6 KB ) - added by Ramiro Morales 15 years ago.
Patch that implements copying the pluiral forms .po file header from the Django one for the same locale if it exists to newly created .po files

Download all attachments as: .zip

Change History (9)

comment:1 by Jarek Zgoda, 17 years ago

Pluralization rules should not be copied from en_US. Each translation team should decide on pluralization rule for its own language. Current rule seems to be fair and consistent with other projects cases.

comment:2 by Patrick Lauber <patrick.lauber@…>, 17 years ago

Pluralization rules should be be copied from the corresponding language file. If you have a german translation it should copy the pluralization rules from the german django po file. Pluralization rules are consistent for a language so they can easily be copied.

comment:3 by Jacob, 17 years ago

Triage Stage: UnreviewedDesign decision needed

comment:4 by Martin Winkler, 15 years ago

I just ran into this problem the other day for a project which has to be translated to slovak. What can I do to help resolve this ticket?

by Ramiro Morales, 15 years ago

Attachment: 6505-1.diff added

Patch that implements copying the pluiral forms .po file header from the Django one for the same locale if it exists to newly created .po files

comment:5 by Ramiro Morales, 15 years ago

Has patch: set
Owner: changed from nobody to Ramiro Morales

comment:6 by Ramiro Morales, 15 years ago

milestone: 1.2

comment:7 by Jannis Leidel, 15 years ago

Resolution: fixed
Status: newclosed

(In [12445]) Fixed #6505 - Copy plural forms from Django translation files for newly created translation files. Thanks to Ramiro Morales for the initial patch.

comment:8 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top