summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/ui_localizer.h
blob: b4702ad227cf08913ee9a373086f28d97e574e2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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_