Skip to:

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#3139 closed defect (bug) (fixed)

bbp_get_time_since() does not support plural forms

Reported by: SergeyBiryukov Owned by: johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: Locale - i18n/l10n Keywords: has-patch commit


bbp_get_time_since() only supports one singular and one plural form, which is typical for English, but doesn't work for languages with more than one plural form, e.g. Russian and other Slavic languages.

This can be resolved by using _n_noop() to register the strings in advance and _n() to actually translate them.

Attachments (1)

3139.patch (2.7 KB) - added by SergeyBiryukov 4 years ago.

Download all attachments as: .zip

Change History (6)

4 years ago

#1 @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 2.6

#2 @johnjamesjacoby
4 years ago

  • Keywords commit added
  • Owner set to johnjamesjacoby

#3 @johnjamesjacoby
4 years ago

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

In 6645:

i18n: Improvements to bbp_get_time_since().

Use _n_noop() to register year/month/week/day/hour/minute/second strings in advance and _n() to actually translate them.

Fixes #3139. Props SergeyBiryukov.

#4 @SergeyBiryukov
4 years ago

In 6646:

i18n: Fix typo in text domain used for _n() in bbp_get_time_since().

See #3139.

#5 @SergeyBiryukov
4 years ago

In 6649:

i18n: Simplify [6645] with translate_nooped_plural().

See #3139.

Note: See TracTickets for help on using tickets.