Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#10738 closed defect (bug) (fixed)

Add New strings need a context, so that they can be different for each menu

Reported by: nbachiyski's profile nbachiyski Owned by: nbachiyski's profile nbachiyski
Milestone: 2.9 Priority: low
Severity: normal Version:
Component: I18N Keywords: has-patch
Focuses: Cc:

Description

Currently all Add New strings in the menus are the same string for translation. In many languages they should be translated differently.

The patch adds context to the gettext function calls and adds a new function esc_html_x(), which both supports context and escapes the content.

Attachments (2)

add-new-context.diff (6.3 KB) - added by nbachiyski 15 years ago.
10738_Add-New-Themes_regression.patch (724 bytes) - added by nacin 15 years ago.

Download all attachments as: .zip

Change History (12)

#1 @sirzooro
15 years ago

Have you tried the _e('text|description', 'domain') syntax (read more)? I think it will does the trick.

#2 @scribu
15 years ago

  • Keywords reporter-feedback added

#3 @nbachiyski
15 years ago

  • Keywords reporter-feedback removed

sirzooro, the gettext contexts are something simliar, btu they are native gettext functionality, not a hack like the pipe syntax.

#4 @ryan
15 years ago

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

(In [12231]) Add context to strings. Props nbachiyski. fixes #10738

#5 @nacin
15 years ago

I'm thinking we should restore "Add New Themes." This patch converted it to "Add New." It makes sense in all of the other contexts, as you would be adding new "Users" (the name of the menu). But in this case, you're adding new themes, while the menu is called "Appearance."

#6 @nacin
15 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#7 @ryan
15 years ago

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

#8 follow-up: @dremeda
15 years ago

Well the main nav heading is "Appearance" but when you click it, it drops you to the "Manage Themes" page, which is the first link under the heading, consistent with Plugins & Users.

You're not just adding new themes in this area so I think Apearance is appropriate. You are editing widgets and theme files which are all part of the appearance.

With all that said, I think the one thing that's missing, is the ability to search for a new theme from the "Manage Themes" page. It would be nice to have a search for new theme on that page.

This is also relevant in the plugins area, you can search for existing plugins from the "Manage Plugins" page but you cannot do a quick search for "NEW" plugins.

#9 in reply to: ↑ 8 @nacin
15 years ago

Replying to dremeda:

You're not just adding new themes in this area so I think Apearance is appropriate. You are editing widgets and theme files which are all part of the appearance.

Yes, I agree "Appearance" is appropriate. The question was "Add New" versus "Add New Themes," particularly since there is also "Widgets" in that submenu, but the "Add New" here only applied to themes.

Replying to dremeda:

With all that said, I think the one thing that's missing, is the ability to search for a new theme from the "Manage Themes" page. It would be nice to have a search for new theme on that page.

This is also relevant in the plugins area, you can search for existing plugins from the "Manage Plugins" page but you cannot do a quick search for "NEW" plugins.

Sounds like something for which you should submit a UI ticket. Jane has a few related to the plugins page, from what I recall.

Note: See TracTickets for help on using tickets.