WordPress.org

Make WordPress Core

Opened 9 months ago

Closed 9 months ago

#22008 closed defect (bug) (fixed)

Twenty Twelve - localization of next and previous posts

Reported by: pavelevap Owned by: lancewillett
Priority: normal Milestone: 3.5
Component: Bundled Theme Version: 3.5
Severity: normal Keywords: has-patch
Cc: pavelevap@…

Description

There is no need to translate this (see attached patch)?

<span class=\"meta-nav\">&larr;</span>
<span class=\"meta-nav\">&rarr;</span>

It would make sense only together with %title in one sentence?

Attachments (2)

twenty_twelve_localization.patch (975 bytes) - added by pavelevap 9 months ago.
22008.patch (1.1 KB) - added by SergeyBiryukov 9 months ago.

Download all attachments as: .zip

Change History (9)

comment:1 lancewillett9 months ago

  • Milestone Awaiting Review deleted

Yes, it's needed for RTL languages where the arrows point the other direction.

comment:2 SergeyBiryukov9 months ago

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

comment:3 follow-up: johnbillion9 months ago

Would those links be better off with context and no markup in the localised string? Eg:

previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentytwelve' ) . '</span> %title' );

comment:4 in reply to: ↑ 3 nacin9 months ago

  • Milestone set to 3.5
  • Resolution invalid deleted
  • Status changed from closed to reopened

Replying to johnbillion:

Would those links be better off with context and no markup in the localised string? Eg:

previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentytwelve' ) . '</span> %title' );

When we last had to translate something for previous_post_link() or next_post_link() — in Twenty Ten — we did this.

SergeyBiryukov9 months ago

comment:6 lancewillett9 months ago

  • Keywords has-patch added

22008.patch looks great to me, the other cases in the theme have English words tied to the arrow entities. In this case, it lives by itself so the _x() wrapper with context for translators is a nice improvement.

comment:7 lancewillett9 months ago

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

In [22035]:

Twenty Twelve: better i18n for next and previous post arrow entities in single.php, props SergeyBiryukov. Fixes #22008.

Note: See TracTickets for help on using tickets.