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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu_mac.mm

Issue 155774: Starting mac l10n:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
Index: chrome/browser/tab_contents/render_view_context_menu_mac.mm
===================================================================
--- chrome/browser/tab_contents/render_view_context_menu_mac.mm (revision 21206)
+++ chrome/browser/tab_contents/render_view_context_menu_mac.mm (working copy)
@@ -7,6 +7,7 @@
#include "app/l10n_util.h"
#include "base/compiler_specific.h"
#include "base/sys_string_conversions.h"
+#import "chrome/browser/cocoa/ui_localizer.h"
#include "chrome/browser/profile.h"
#include "grit/generated_resources.h"
#include "base/scoped_nsobject.h"
@@ -70,12 +71,8 @@
// and middle-truncate?
NSString* RenderViewContextMenuMac::PrepareLabelForDisplay(
const string16& label) {
- // Strip out any "&"'s that are windows accelerators and we don't use.
- NSMutableString* title =
- [NSMutableString stringWithString:base::SysUTF16ToNSString(label)];
+ NSString* title = ui_localizer::FixUpWindowsStyleLabel(label);
DCHECK(title);
- NSRange range = NSMakeRange(0, [title length]);
- [title replaceOccurrencesOfString:@"&" withString:@"" options:0 range:range];
return title ? title : @"";
}

Powered by Google App Engine
This is Rietveld 408576698