Make WordPress Core

Opened 14 years ago

Closed 10 years ago

Last modified 10 years ago

#15576 closed defect (bug) (fixed)

Proper l10n of items per page in the screen options

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: ocean90's profile ocean90
Milestone: 4.2 Priority: normal
Severity: normal Version: 3.1
Component: I18N Keywords: has-patch commit
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Sites, Users, Comments, Media items and Plugins have their own translation context on the screen options tab, e.g. “sites per page (screen options)”.

To use the right grammatical case, Posts, Pages, Categories and Tags should have that context too.

Attachments (7)

15576.patch (2.4 KB) - added by SergeyBiryukov 14 years ago.
15576.2.patch (2.3 KB) - added by SergeyBiryukov 13 years ago.
15576.3.patch (4.0 KB) - added by SergeyBiryukov 13 years ago.
15576.4.patch (1.1 KB) - added by SergeyBiryukov 12 years ago.
15576.5.patch (1.1 KB) - added by SergeyBiryukov 12 years ago.
15576.6.patch (6.3 KB) - added by SergeyBiryukov 12 years ago.
15576.7.patch (6.2 KB) - added by DrewAPicture 11 years ago.
Refresh.

Download all attachments as: .zip

Change History (32)

#1 @zeo
14 years ago

Related #13673

#2 @dd32
14 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

#3 @SergeyBiryukov
14 years ago

  • Keywords 3.2-early has-patch added; needs-patch removed

#4 @SergeyBiryukov
13 years ago

  • Keywords 3.3-early added; 3.2-early removed

Refreshed for 3.3.

#5 @SergeyBiryukov
13 years ago

  • Milestone changed from Future Release to 3.3

#6 in reply to: ↑ description @SergeyBiryukov
13 years ago

Also, for proper translation all of these strings should support single and plural forms.

That part won't be implemented, according to nacin's comment on #13673.

The context, however, is still needed, so this is what the patch does.

#7 follow-up: @nacin
13 years ago

  • Keywords 3.3-early removed
  • Milestone changed from 3.3 to Awaiting Review

15576.2.patch isn't very backwards compatible. per_page should be implemented like menu_name was -- if it isn't set, it goes forward with the existing "name" argument, rather than defaulting to "Posts"/"Pages".

#8 @nacin
13 years ago

  • Milestone changed from Awaiting Review to Future Release

#9 in reply to: ↑ 7 @SergeyBiryukov
13 years ago

Replying to nacin:

per_page should be implemented like menu_name was -- if it isn't set, it goes forward with the existing "name" argument, rather than defaulting to "Posts"/"Pages".

Thanks, done in 15576.3.patch.

#10 @SergeyBiryukov
12 years ago

  • Milestone changed from Future Release to 3.5

#11 @SergeyBiryukov
12 years ago

As an alternative, we could replace "Posts"/"Pages" with "items" string (15576.4.patch), which we already have in options-reading.php:
http://core.trac.wordpress.org/browser/tags/3.4.1/wp-admin/options-reading.php#L111

The use case is essentially the same, so the context might not be needed. 15576.5.patch adds it just in case (and uses the uppercased word for consistency with other screens).

With 15576.6.patch, we could remove 9 strings by making the same change on the other screens (for consistency as well).

#12 @nacin
12 years ago

  • Milestone changed from 3.5 to Future Release

Moving to "items" across the board is a decent idea. We can talk about it in 3.6.

#13 @SergeyBiryukov
12 years ago

  • Description modified (diff)

To summarize, "20 Записи" (20 Posts) isn't a valid expression in Russian.

It should be "20 записей", but it's currently impossible to use the proper translation due to the lack of context. I imagine Czech (according to pavelevap's comments on #13673) and other languages with declensions have the same problem here.

Introducing a new post type label just for screen options seems like an overkill, hence the "Items" suggestion.

Last edited 12 years ago by SergeyBiryukov (previous) (diff)

#14 @SergeyBiryukov
12 years ago

  • Milestone changed from Future Release to 3.6

@DrewAPicture
11 years ago

Refresh.

#15 @DrewAPicture
11 years ago

15576.7.patch refreshes .6

Standardizing to 'Items' was a nice idea, great to remove some strings.

#16 @SergeyBiryukov
11 years ago

  • Keywords commit added

#17 @alex-ye
11 years ago

  • Cc nashwan.doaqan@… added

#18 follow-up: @ryan
11 years ago

I'd like translators to weigh in on whether they can work with having one string and context for all of these. Perhaps there are some langs without a convenient generic term like Items that covers all of these cases.

#19 @SergeyBiryukov
11 years ago

  • Cc pavelevap added

#20 in reply to: ↑ 18 @SergeyBiryukov
11 years ago

Replying to ryan:

Perhaps there are some langs without a convenient generic term like Items that covers all of these cases.

If 15576.7.patch is too drastic, we could go with 15576.5.patch to just fix the lack of context for Posts/Pages/Categories/Tags.

15576.7.patch, however, seems more consistent, since the use case in all the instances is the same.

#21 @pavelevap
11 years ago

I also really like the idea of one generic term, but:

1) There are some different plural forms, for example in Czech there are "4 položky" and "5 položek". There is no problem for default 20 items, but I am not sure about other languages...

2) It would be very helpfull for translators to manipulate with order, something like "% Items", so we could do for example "Number of Items: %". This is without problems in most languages, because we can use some internal localization "hacks".

And what about to change the string "Items" to "Number of Items:" or "Number of Items per page:" and move it before number selection? It would be more explanatory, there is enough space, etc. And also much better for translators, because there are not problems with different plurals.

#22 @nacin
11 years ago

  • Milestone changed from 3.6 to Future Release

No consensus yet, and is a UI change. Punting.

#24 @ocean90
10 years ago

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

In 31696:

Screen Options: Improve items per page option label.

Previously the label just said "Posts", "Pages", or "Comments". This was bad in terms of accessibility and internationalization because of missing context.
This change adds a default label "Number of items per page:" to WP_Screen->render_per_page_options() and removes all the existing one-word labels.

props afercia.
fixes #31349, #15576.

#25 @ocean90
10 years ago

  • Milestone changed from Future Release to 4.2
Note: See TracTickets for help on using tickets.