Code

Opened 5 years ago

Closed 4 years ago

#11161 closed (fixed)

Added plural rules for supported languages

Reported by: daniels Owned by: nobody
Component: Internationalization Version: 1.0
Severity: Keywords: plural forms c2py
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: yes
Easy pickings: UI/UX:

Description

Added gettext plural rules in global_settings.conf and code in trans_real to support them.
Use gettext own c2py to translate the rules.

Attachments (1)

django-1.0.2-plural.patch (4.1 KB) - added by daniels 5 years ago.

Download all attachments as: .zip

Change History (11)

Changed 5 years ago by daniels

comment:1 Changed 5 years ago by daniels

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

This ticket is related to tickets #6505 and #9974.

comment:2 Changed 5 years ago by daniels

  • Needs tests set

comment:3 Changed 5 years ago by Alex

  • Triage Stage changed from Unreviewed to Design decision needed

comment:4 Changed 4 years ago by mtredinnick

  • Triage Stage changed from Design decision needed to Accepted

It should pull the rules from Django's own locale file. This doesn't go into global settings, since we already a copy.

comment:5 Changed 4 years ago by mtredinnick

  • Patch needs improvement set

comment:6 Changed 4 years ago by ramiro

  • Component changed from Translations to Internationalization

oops, this is why it has been flying under the radar for one year :(

comment:7 Changed 4 years ago by ramiro

The infrastructure for adding the enhacements proposed in #4030 would help greatly with this.

comment:8 Changed 4 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed

(In [14771]) Fixed #11161 -- Added plural forms to all supported languages. Fixed other errors in the translation files that prevented them to pass the msgfmt check in preparation for the move to Transifex. Refs #14735, too.

comment:9 Changed 4 years ago by ramiro

  • Keywords forms c2py added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening because this ticket is about making these expressions available in our DjangoTranslation class and hence available to Python code, obtaining the information from the contents of the .po files Plural-Forms: headers.

comment:10 Changed 4 years ago by ramiro

  • Resolution set to fixed
  • Status changed from reopened to closed

Re-closing because GNUTranslations (from which our DjangoTranslation inherits) _parse() method already calls c2py() and assigns that value to self.plural. Thanks jezdez for the explanation.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.