OLD | NEW |
| (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 | |
OLD | NEW |