Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: ui/base/l10n/l10n_util_mac.mm

Issue 6409039: Menu item titles include Windows-style accelerator marker.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/base/l10n/l10n_util_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/l10n/l10n_util_mac.mm
===================================================================
--- ui/base/l10n/l10n_util_mac.mm (revision 72936)
+++ ui/base/l10n/l10n_util_mac.mm (working copy)
@@ -70,7 +70,12 @@
ret.reserve(label_len);
for (size_t i = 0; i < label_len; ++i) {
char16 c = label[i];
- if (c == '&') {
+ if (c == '(' && i + 3 < label_len && label[i + 1] == '&'
+ && label[i + 3] == ')') {
+ // Strip '(&?)' patterns which means Windows-style accelerator in some
+ // non-English locales such as Japanese.
+ i += 3;
+ } else if (c == '&') {
if (i + 1 < label_len && label[i + 1] == '&') {
ret.push_back(c);
++i;
« no previous file with comments | « no previous file | ui/base/l10n/l10n_util_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698