WordPress.org

Making WordPress.org

Opened 2 years ago

Closed 2 years ago

#2216 closed defect (fixed)

Incorrect plural forms on WordPress.org

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

Description

I've noticed a couple of incorrect declensions in some parts of WordPress.org.

  1. On https://ru.wordpress.org/plugins/comment-images-reloaded/, Last Update string uses an incorrect form:
    Обновление: 5 месяца назад
    
    Should be:
    Обновление: 5 месяцев назад
    
    The %s month string is properly translated in GlotPress.
  1. On https://ru.wordpress.org/wp-admin/edit.php, the "67 items" string uses an incorrect form:
    67 элемента
    
    Should be:
    67 элементов
    
    The %s items string is properly translated in GlotPress.

I've checked the admin-ru_RU.po file on https://ru.wordpress.org/, and the Plural-Forms header looks correct and matches the one recommended by GNU.org for Russian:

Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n

In both examples above, the 2nd form (for 2—4 items) is used instead of the 3rd form (for 5+ or 0 items).

Could not reproduce on a local install, so it appears to be specific to WordPress.org. Any ideas?

Change History (8)

#1 @SergeyBiryukov
2 years ago

  • Summary changed from Incorrect plural forums on WordPress.org to Incorrect plural forms on WordPress.org

#2 in reply to: ↑ description ; follow-up: @ocean90
2 years ago

  • Owner set to ocean90
  • Status changed from new to accepted

Any ideas?

Yep: https://github.com/GlotPress/GlotPress-WP/issues/594

Needs an update of GlotPress which I'll do this week.

#3 in reply to: ↑ 2 ; follow-up: @SergeyBiryukov
2 years ago

Replying to ocean90:

Needs an update of GlotPress which I'll do this week.

Thanks!

Seems like all currently generated plugin/theme language packs are also missing Plural-Forms header? Any chance to regenerate all the affected language packs once the issue is resolved? Otherwise, there would be a lot of subtle translation issues that would be hard to track down later.

#4 in reply to: ↑ 3 ; follow-up: @ocean90
2 years ago

  • Component changed from General to Translate Site & Plugins

Replying to SergeyBiryukov:

Seems like all currently generated plugin/theme language packs are also missing Plural-Forms header?

If that would be the case we'd already have hundreds of reports for that. 😉 The mo files for language packs are generated with msgfmt.

#5 in reply to: ↑ 4 @SergeyBiryukov
2 years ago

Replying to ocean90:

The mo files for language packs are generated with msgfmt.

Gotcha, so only WordPress.org is affected? OK then :)

#6 @ocean90
2 years ago

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

#7 @SergeyBiryukov
2 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Point 2 from the ticket description appears to be fixed, but point 1 is not, I still see the incorrect form ("6 месяца назад") on https://ru.wordpress.org/plugins/comment-images-reloaded/.

Is it just a cache issue, or some language packs were not regenerated yet?

#8 @ocean90
2 years ago

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

Should be good now.

Note: See TracTickets for help on using tickets.