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

Side by Side Diff: chrome/browser/cocoa/menu_localizer.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "chrome/browser/cocoa/menu_localizer.h"
6
7 #include "app/l10n_util.h"
8 #include "base/sys_string_conversions.h"
9 #include "grit/chromium_strings.h"
10
11 @implementation MenuLocalizer
12
13 // Override to map into our string bundles instead of strings plists.
14 // TODO(pinkerton): This should use a string lookup table to map the string to
15 // a constant.
16 - (NSString *)localizedStringForString:(NSString *)string {
17 if ([string isEqualToString:@"^Quit Chromium"]) {
18 std::wstring quitString = l10n_util::GetString(IDS_EXIT_MAC);
19 return base::SysWideToNSString(quitString);
20 } else if ([string isEqualToString:@"^About Chromium"]) {
21 std::wstring quitString = l10n_util::GetString(IDS_ABOUT_CHROME_TITLE);
22 return base::SysWideToNSString(quitString);
23 } else if ([string isEqualToString:@"^Hide Chromium"]) {
24 std::wstring quitString = l10n_util::GetString(IDS_HIDE_MAC);
25 return base::SysWideToNSString(quitString);
26 } else if ([string isEqualToString:@"^Chromium Help"]) {
27 std::wstring quitString = l10n_util::GetString(IDS_HELP_MAC);
28 return base::SysWideToNSString(quitString);
29 }
30 return [super localizedStringForString:string];
31 }
32
33 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698