Skip to:
Content

bbPress.org

Opened 5 weeks ago

Last modified 5 weeks ago

#3627 new enhancement

Plural for translation string.

Reported by: iworks's profile iworks Owned by:
Milestone: Awaiting Review Priority: low
Severity: normal Version: trunk
Component: General Keywords: has-patch
Cc:

Description

In pl_PL we need to have singular/plural form of few strings.

https://plugins.trac.wordpress.org/browser/bbpress/trunk/includes/topics/template.php#L3322

Attachments (1)

template.php-L3322.diff (1.1 KB) - added by iworks 5 weeks ago.
adds singular/plural form to translation string

Download all attachments as: .zip

Change History (5)

@iworks
5 weeks ago

adds singular/plural form to translation string

#1 @dd32
5 weeks ago

@iworks Does that string offer enough flexibility, even with that plural form?

For example, consider the case of 2 replies, 1 voice, last updated 1 minute ago verses 1 reply, 1 voice, 5 minutes ago vs 3 replies, 3 voices, 1 minute ago

Or have I completely misunderstood, and the only part of the string that you're actually trying to pluralise in this case is the minutes ago section, as the others are interpolated anyway?

#2 follow-up: @iworks
5 weeks ago

@dd32 did you understand how _n() works? It depend on language settings in pot file.

For Polish there are 3 forms:

  • singular
  • numbers ends with 2, 3 & 4
  • numbers ends with 0, 5-9

Maybe there is a lang with more forms. I have no idea.

And no. I propose to pluralize by main info: $reply_count

But, you are right, to do it well we should split this string to separate parts.

Last edited 5 weeks ago by iworks (previous) (diff)

#3 in reply to: ↑ 2 ; follow-up: @dd32
5 weeks ago

Replying to iworks:

@dd32 did you understand how _n() works? It depend on language settings in pot file.

I understand how pluralisation works.

And no. I propose to pluralize by main info: $reply_count

Okay, so that's my point - What's the point in pluralising it by $reply_count if the other numbers will need a different pluralisation?

#4 in reply to: ↑ 3 @iworks
5 weeks ago

Replying to dd32:

Okay, so that's my point - What's the point in pluralising it by $reply_count if the other numbers will need a different pluralisation?

It will be better than it is now. In Polish it looks very bad.

Note: See TracTickets for help on using tickets.