Make WordPress Core

Opened 12 years ago

Last modified 6 years ago

#29299 reviewing defect (bug)

Plural forms not available for some strings

Reported by: pavelevap's profile pavelevap Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Options, Meta APIs Keywords: has-patch 2nd-opinion settings-api
Focuses: administration, ui-copy Cc:

Description

There are several strings which do not allow specific plurals in Settings - Reading.

<?php _e( 'posts' ); ?>

<?php _e( 'items' ); ?>

It looks strange when somebody inserts for example number 4 and our plural form is translated only for number 5.

Best solution would be probably some kind of string "Number of posts on page" (without ending "posts" string). But I am not sure about it...

See: https://core.trac.wordpress.org/browser/trunk/src/wp-admin/options-reading.php#L126

Attachments (2)

29299.diff (1.4 KB) - added by GaryJ 10 years ago.
29299.2.diff (6.8 KB) - added by SergeyBiryukov 10 years ago.

Download all attachments as: .zip

Change History (22)

#1 @johnbillion
12 years ago

Does this also affect the various inline fields on the Discussion Settings screen?

#2 @pavelevap
12 years ago

johnbillion: Yes, good point, I did not notice that.

#3 @SergeyBiryukov
12 years ago

This is closely related to #13673 and #15576.

Per nacin's comment:

We wouldn't customize this based on the number the user has entered. It should be whatever the maximum plural form is, if I had to guess.

I agree that it looks weird though, perhaps we could reconsider this.

#4 @pavelevap
12 years ago

Yes, but this could be easier...

What about "Number of posts to show on page" and remove "posts" string entirely?

And "Number of recent posts to show in RSS" and remove "items" string entirely?

#5 @chriscct7
10 years ago

  • Component changed from I18N to Text Changes
  • Focuses administration added
  • Keywords needs-patch added

@GaryJ
10 years ago

#6 @GaryJ
10 years ago

  • Keywords has-patch added; needs-patch removed

Patch added which amends the strings.

#7 follow-up: @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 4.7
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

Seems consistent with [31696], though I'd like to see if we can address comment:1 as well.

#8 in reply to: ↑ 7 @GaryJ
10 years ago

Replying to SergeyBiryukov:

Seems consistent with [31696], though I'd like to see if we can address comment:1 as well.

Most of the items in Discussions settings are grouped, and have multiple controls i.e. a checkbox and an input field or dropdown.

They are going to need more thought, and they are mutually exclusive to those in Reading settings. A post-commit discussion or a new ticket may be best IMHO.

This ticket was mentioned in Slack in #core by stevenkword. View the logs.


10 years ago

#10 @SergeyBiryukov
10 years ago

29299.2.diff is what I had in mind:

  • Doesn't change the strings, but makes them support proper plural forms.
  • Handles the strings on Discussion Settings screen as well.
  • Adds translator comments.

#11 @SergeyBiryukov
10 years ago

  • Keywords commit added

#12 @pavelevap
10 years ago

I would vote for changing strings, because adding plural forms (from latest patch) will not work immediatelly when somebody change values (before saving them).

#13 @johnbillion
10 years ago

  • Keywords commit removed

The singular and plural forms in 29299.2.diff aren't an improvement because the form won't always be correct when selecting different values.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


10 years ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


9 years ago

#16 @johnbillion
9 years ago

  • Keywords 2nd-opinion added
  • Milestone changed from 4.7 to Future Release

This ticket was mentioned in Slack in #accessibility by sergey. View the logs.


9 years ago

#18 @afercia
9 years ago

  • Keywords settings-api added

#19 @SergeyBiryukov
7 years ago

#46908 was marked as a duplicate.

#20 @garrett-eclipse
6 years ago

  • Component changed from Text Changes to Options, Meta APIs
  • Focuses ui-copy added
Note: See TracTickets for help on using tickets.