Skip to:
Content

bbPress.org

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#3139 closed defect (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
Cc:

Description

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 2 years ago.

Download all attachments as: .zip

Change History (6)

@SergeyBiryukov
2 years ago

#1 @SergeyBiryukov
2 years ago

  • Milestone changed from Awaiting Review to 2.6

#2 @johnjamesjacoby
2 years ago

  • Keywords commit added
  • Owner set to johnjamesjacoby

#3 @johnjamesjacoby
2 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
2 years ago

In 6646:

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

See #3139.

#5 @SergeyBiryukov
2 years ago

In 6649:

i18n: Simplify [6645] with translate_nooped_plural().

See #3139.

Note: See TracTickets for help on using tickets.