WordPress.org

Making WordPress.org

Opened 5 years ago

Closed 4 years ago

#665 closed defect (fixed)

Missing plural forms in Rosetta Forums project

Reported by: SergeyBiryukov Owned by:
Milestone: Priority: normal
Component: Translate Site & Plugins Keywords:
Cc:

Change History (13)

#1 follow-up: @SergeyBiryukov
5 years ago

On a related note, this is not a correct usage of plural forms:

Singular: 1 plugin found
Plural: Showing %s-%s of %s plugins

In some languages, the first form is used not just for 1, but also for 21, 31, 41, etc. 1 plugin found only makes sense for 1. For 21, 31, etc., the number should be included in the string, but it's still the first form.

Currently we can't use the single form and are forced to use the Showing %s-%s of %s plugins form in all cases.

It could be fixed with something like this:

if ( $plugin_count > 1 ) {
	$message = sprintf( _n( 'Showing %s-%s of %s plugins', 'Showing %s-%s of %s plugins', $plugin_count ), ... );
} else {
	$message = __( '1 plugin found' );
}

See also https://core.trac.wordpress.org/ticket/28502#comment:5 in Core Trac.

#2 @SergeyBiryukov
5 years ago

  • Description modified (diff)

#3 in reply to: ↑ 1 @SergeyBiryukov
5 years ago

Replying to SergeyBiryukov:

On a related note, this is not a correct usage of plural forms:

Singular: 1 plugin found
Plural: Showing %s-%s of %s plugins

Related: #764.

#4 follow-up: @iandunn
5 years ago

Most of the strings that were missing plural forms were fixed in [dotorg9226], but I skipped stars because the visual layout currently depends on all of the strings being the same length. That'll need a second pass to refactor the layout and then fix the string.

The incorrect usage of _n() should be fixed in [dotorg9228]. potbot should update the template in the next hour.

Let me know if you see any remaining issues.

#5 in reply to: ↑ 4 @mayukojpn
5 years ago

Replying to iandunn:
I'm happy to hear that you are already working for it! I cannot see either [dotorg9226] and any PHP source but I hope it would be what we need :) To translate these pages are very important for us to promote register Theme repository. Thank you so much!

My problem is same as what SergeyBiryukov wrote.
Thank you for seeing #764 and explaining the detail!

#6 @mayukojpn
5 years ago

Ah it already worked! Thank you so much :)

#7 @iandunn
5 years ago

No problem :)

#8 follow-up: @ocean90
5 years ago

@SergeyBiryukov Is there anything left here?

#9 in reply to: ↑ 8 @iandunn
5 years ago

Replying to ocean90:

@SergeyBiryukov Is there anything left here?

I think stars is the only remaining issue; see comment:4 for details.

I'm not sure when I'll have time to circle back to it, but feel free to if you want.

Last edited 5 years ago by iandunn (previous) (diff)

#10 @iandunn
5 years ago

Related #147

#11 @mayukojpn
5 years ago

I'm sorry, I had to comment here but I created #1038

#12 @samuelsidler
4 years ago

Are we still missing "stars"?

#13 @iandunn
4 years ago

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

Looks like @dd32 fixed it in [dotorg10769].

Note: See TracTickets for help on using tickets.