diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-22 14:04:27 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-22 14:04:27 +0000 |
commit | b0a2f0c8a46bafa7e3d47dfc05748d2dc71271eb (patch) | |
tree | 1bde297a35e7f360fec17fb8d1ac598b53f9c4f6 /chrome/browser/cocoa/ui_localizer.h | |
parent | 1d775f6c60b825702fd638503e8e630b49ef7bef (diff) | |
download | chromium_src-b0a2f0c8a46bafa7e3d47dfc05748d2dc71271eb.zip chromium_src-b0a2f0c8a46bafa7e3d47dfc05748d2dc71271eb.tar.gz chromium_src-b0a2f0c8a46bafa7e3d47dfc05748d2dc71271eb.tar.bz2 |
Starting mac l10n:
Added a script to process a xib file and generate a localizer out of the resource constants it finds in the xib.
Update the MainMenu.xib to use a generated localizer.
Kill off the menu_localizer in favor of a generated one.
ui_localizer is a helper so each "localizer" is as small as possible.
Build some menus out of base strings and the product name like windows.
Added the dir generated for the localizers so we can load the header to directly create them (menubar one).
Enable the other 3 languages we were building to help test.
Made the context menu code use the new code for handling window's accelerators and ellipsis.
Added unittest for ui_localizer.
Opened http://crbug.com/17380 to track the problem with the menu titles so I can move on to other parts of the UI for now.
TEST=The main menu will have some items localized now (and more will be localizable in the TC).
BUG=16764
Review URL: http://codereview.chromium.org/155774
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21272 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/ui_localizer.h')
-rw-r--r-- | chrome/browser/cocoa/ui_localizer.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/ui_localizer.h b/chrome/browser/cocoa/ui_localizer.h new file mode 100644 index 0000000..b4702ad --- /dev/null +++ b/chrome/browser/cocoa/ui_localizer.h @@ -0,0 +1,31 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_COCOA_UI_LOCALIZER_H_ +#define CHROME_BROWSER_COCOA_UI_LOCALIZER_H_ + +#include "base/basictypes.h" +#include "base/string16.h" + +@class NSString; + +namespace ui_localizer { + +// Remove the Windows-style accelerator marker and change "..." into an +// ellipsis. Returns the result in an autoreleased NSString. +NSString* FixUpWindowsStyleLabel(const string16& label); + +struct ResourceMap { + const char* const name; + unsigned int label_id; + unsigned int label_arg_id; +}; + +NSString* LocalizedStringForKeyFromMapList(NSString* key, + const ResourceMap* map_list, + size_t map_list_len); + +} // namespace ui_localizer + +#endif // CHROME_BROWSER_COCOA_UI_LOCALIZER_H_ |