WordPress.org

Make WordPress Core

#20782 closed enhancement (fixed)

Translator context needed on a Customize.php string

Reported by: xibe Owned by: nacin
Milestone: 3.4 Priority: normal
Severity: trivial Version: 3.4
Component: Themes Keywords: has-patch i18n-change
Focuses: Cc:

Description

In the file /trunk/wp-admin/customize.php, line 72:

<span class="preview-notice"><?php _e('You are previewing'); ?></span>
<strong class="theme-name"><?php echo $wp_customize->theme()->display('Name'); ?></strong>

The line "You are previewing" doesn't convey the fact that it is going to be followed by the theme's name; hence translators might miss a word (I almost did, had I not looked at the code).

I'd suggest either including the name within the string (as %s; better for RTL languages?), or adding a line of context.

Attachments (3)

customize-context.patch (656 bytes) - added by xibe 23 months ago.
My quick-n-dirty hack for a context.
20782.patch (1.2 KB) - added by SergeyBiryukov 23 months ago.
20782.split-example.png (8.8 KB) - added by SergeyBiryukov 23 months ago.

Download all attachments as: .zip

Change History (11)

xibe23 months ago

My quick-n-dirty hack for a context.

comment:1 xibe23 months ago

  • Keywords has-patch added

comment:2 scribu23 months ago

  • Milestone changed from Awaiting Review to 3.4

comment:3 follow-up: nacin23 months ago

  • Keywords i18n-change added

Yes, this should probably be 'You are previewing %s', though that might be difficult given the UI there.

SergeyBiryukov23 months ago

comment:4 in reply to: ↑ 3 ; follow-up: SergeyBiryukov23 months ago

Replying to nacin:

Yes, this should probably be 'You are previewing %s'

Done in 20782.patch. Tested in Firefox 12, Chrome 19, IE 8, Opera 11.64.

comment:5 in reply to: ↑ 4 nacin23 months ago

Replying to SergeyBiryukov:

Replying to nacin:

Yes, this should probably be 'You are previewing %s'

Done in 20782.patch.

The issue is when the string gets split. For example, "You are %s previewing" -- now what?

comment:6 SergeyBiryukov23 months ago

Well, if some language requires to split the string:

  1. Currently there's no way do to that, so the translation wouldn't be flexible.
  2. It looks a bit weird, but doesn't seem too bad (20782.split-example.png). Or, if that's what we're trying to avoid, what would be a better UI solution in this case?

If the language doesn't require splitting the string, this won't be an issue, unless I'm missing something.

comment:7 nacin23 months ago

20782.split-example.png doesn't look bad at all.

comment:8 nacin23 months ago

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

In [20955]:

Theme Customizer: Add the theme name to the 'You are previewing' string in the left pane, using a placeholder. props SergeyBiryukov, xibe. fixes #20782.

Note: See TracTickets for help on using tickets.