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

Side by Side Diff: app/l10n_util_mac.mm

Issue 597042: Translate: Move label parsing logic into common code. (Closed)
Patch Set: Fix indentation. Created 10 years, 10 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <Foundation/Foundation.h> 5 #import <Foundation/Foundation.h>
6 #include "app/l10n_util_mac.h" 6 #include "app/l10n_util_mac.h"
7 #include "base/sys_string_conversions.h" 7 #include "base/sys_string_conversions.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 9
10 namespace { 10 namespace {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 NSString* GetNSStringF(int message_id, 112 NSString* GetNSStringF(int message_id,
113 const string16& a, 113 const string16& a,
114 const string16& b, 114 const string16& b,
115 const string16& c, 115 const string16& c,
116 const string16& d) { 116 const string16& d) {
117 return base::SysUTF16ToNSString(l10n_util::GetStringFUTF16(message_id, 117 return base::SysUTF16ToNSString(l10n_util::GetStringFUTF16(message_id,
118 a, b, c, d)); 118 a, b, c, d));
119 } 119 }
120 120
121 NSString* GetNSStringF(int message_id,
122 const string16& a,
123 const string16& b,
124 std::vector<size_t>* offsets) {
125 return base::SysUTF16ToNSString(l10n_util::GetStringFUTF16(message_id,
126 a, b, offsets));
127 }
128
121 NSString* GetNSStringWithFixup(int message_id) { 129 NSString* GetNSStringWithFixup(int message_id) {
122 return FixUpWindowsStyleLabel(l10n_util::GetStringUTF16(message_id)); 130 return FixUpWindowsStyleLabel(l10n_util::GetStringUTF16(message_id));
123 } 131 }
124 132
125 NSString* GetNSStringFWithFixup(int message_id, 133 NSString* GetNSStringFWithFixup(int message_id,
126 const string16& a) { 134 const string16& a) {
127 return FixUpWindowsStyleLabel(l10n_util::GetStringFUTF16(message_id, 135 return FixUpWindowsStyleLabel(l10n_util::GetStringFUTF16(message_id,
128 a)); 136 a));
129 } 137 }
130 138
(...skipping 16 matching lines...) Expand all
147 const string16& a, 155 const string16& a,
148 const string16& b, 156 const string16& b,
149 const string16& c, 157 const string16& c,
150 const string16& d) { 158 const string16& d) {
151 return FixUpWindowsStyleLabel(l10n_util::GetStringFUTF16(message_id, 159 return FixUpWindowsStyleLabel(l10n_util::GetStringFUTF16(message_id,
152 a, b, c, d)); 160 a, b, c, d));
153 } 161 }
154 162
155 163
156 } // namespace l10n_util 164 } // namespace l10n_util
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698