Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#20782 closed enhancement (fixed)

Translator context needed on a Customize.php string

Reported by: xibe's profile xibe Owned by: nacin's profile 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 12 years ago.
My quick-n-dirty hack for a context.
20782.patch (1.2 KB) - added by SergeyBiryukov 12 years ago.
20782.split-example.png (8.8 KB) - added by SergeyBiryukov 12 years ago.

Download all attachments as: .zip

Change History (11)

@xibe
12 years ago

My quick-n-dirty hack for a context.

#1 @xibe
12 years ago

  • Keywords has-patch added

#2 @scribu
12 years ago

  • Milestone changed from Awaiting Review to 3.4

#3 follow-up: @nacin
12 years ago

  • Keywords i18n-change added

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

#4 in reply to: ↑ 3 ; follow-up: @SergeyBiryukov
12 years 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.

#5 in reply to: ↑ 4 @nacin
12 years 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?

#6 @SergeyBiryukov
12 years 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.

#7 @nacin
12 years ago

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

#8 @nacin
12 years 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.