Making WordPress.org

Opened 8 years ago

Closed 8 years ago

#2268 closed defect (bug) (fixed)

Use of plural without ngettext in wporg-forums/functions.php

Reported by: tobifjellner's profile tobifjellner Owned by:
Milestone: Priority: low
Component: Support Forums Keywords:
Cc:

Description

Location: https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/functions.php?marks=268#L268

Current content:
__( 'This post has been held for moderation by our automated system. It will be reviewed within %d hours.', 'wporg-forums' ),

Russian and some other languages have various plural forms depending on what specific number is used. For correct localization the referred row ought to be converted to use ngettext, rather than gettext.

I spotted this as I was translating into Swedish, so this is no issue for me personally. However, I'm not the right person to patch this.

Change History (5)

#1 @tobifjellner
8 years ago

Another place, which really should be corrected is:

https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/header.php?marks=35#L35

printf( ( 'Extend your WordPress experience with %s plugins.', 'wporg-plugins' ), number_format_i18n( wp_count_posts( 'plugin' )->publish ) );

Obviously, in English the total count of available plugins is a sounding plural. But in Russian, you'll jump between three different forms, depending on the last digit:
1566491 is singular
6898424 is "dual"
54218 is plural...
I know this is in a different file (but still inside the same package) as the initially named ticket. But I see no reason to spawn any additional ticket. I've noted several places in the package that actually would need to be changed to ngettext.

Version 1, edited 8 years ago by tobifjellner (previous) (next) (diff)

#2 @dd32
8 years ago

In 4426:

Use _n() on some strings to aid with translation into languages such as Russian.

See #2268

#3 @dd32
8 years ago

  • Keywords needs-patch removed

@tobifjellner Fixed the cases you've mentioned here.

It'd be appreciated if you could list each string (not necessarily the file, although if you have it handy..) affected if there's others.
Generally speaking, ignore the package definition within the theme, each theme is a separate resource and individual tickets would be appreciated per theme - but feel free to drop a bunch here.

(Edit; I think Russian has the same issue with singulars.. I typed that into the commit message absentmindedly!)

Last edited 8 years ago by dd32 (previous) (diff)

#4 @tobifjellner
8 years ago

Great. Within i couple of weeks I'll try to look through the whole project and point out affected strings. (and once I'm there, I actually do have references to the files at hand...)
Thanks
/Tobi

#5 @SergeyBiryukov
8 years ago

  • Component changed from Plugin Directory to Support Forums
  • Resolution set to fixed
  • Status changed from new to closed

Going to close as fixed in [4426], feel free to reopen if there are any other instances where _n() should be added.

Note: See TracTickets for help on using tickets.