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

Side by Side Diff: app/l10n_util.h

Issue 2602003: Refactored the translate infobars. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Synced Created 10 years, 6 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
« no previous file with comments | « no previous file | app/l10n_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // This file contains utility functions for dealing with localized 5 // This file contains utility functions for dealing with localized
6 // content. 6 // content.
7 7
8 #ifndef APP_L10N_UTIL_H_ 8 #ifndef APP_L10N_UTIL_H_
9 #define APP_L10N_UTIL_H_ 9 #define APP_L10N_UTIL_H_
10 10
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // invoked with a and b offsets[0] gives the offset for a and offsets[1] the 142 // invoked with a and b offsets[0] gives the offset for a and offsets[1] the
143 // offset of b regardless of where the parameters end up in the string. 143 // offset of b regardless of where the parameters end up in the string.
144 std::wstring GetStringF(int message_id, 144 std::wstring GetStringF(int message_id,
145 const std::wstring& a, 145 const std::wstring& a,
146 size_t* offset); 146 size_t* offset);
147 std::wstring GetStringF(int message_id, 147 std::wstring GetStringF(int message_id,
148 const std::wstring& a, 148 const std::wstring& a,
149 const std::wstring& b, 149 const std::wstring& b,
150 std::vector<size_t>* offsets); 150 std::vector<size_t>* offsets);
151 string16 GetStringFUTF16(int message_id, 151 string16 GetStringFUTF16(int message_id,
152 const string16& a,
153 size_t* offset);
154 string16 GetStringFUTF16(int message_id,
152 const string16& a, 155 const string16& a,
153 const string16& b, 156 const string16& b,
154 std::vector<size_t>* offsets); 157 std::vector<size_t>* offsets);
155 158
156 // Convenience formatters for a single number. 159 // Convenience formatters for a single number.
157 std::wstring GetStringF(int message_id, int a); 160 std::wstring GetStringF(int message_id, int a);
158 std::wstring GetStringF(int message_id, int64 a); 161 std::wstring GetStringF(int message_id, int64 a);
159 162
160 // Truncates the string to length characters. This breaks the string at 163 // Truncates the string to length characters. This breaks the string at
161 // the first word break before length, adding the horizontal ellipsis 164 // the first word break before length, adding the horizontal ellipsis
(...skipping 25 matching lines...) Expand all
187 const std::vector<std::string>& GetAvailableLocales(); 190 const std::vector<std::string>& GetAvailableLocales();
188 191
189 // Returns a vector of locale codes usable for accept-languages. 192 // Returns a vector of locale codes usable for accept-languages.
190 void GetAcceptLanguagesForLocale(const std::string& display_locale, 193 void GetAcceptLanguagesForLocale(const std::string& display_locale,
191 std::vector<std::string>* locale_codes); 194 std::vector<std::string>* locale_codes);
192 195
193 196
194 } // namespace l10n_util 197 } // namespace l10n_util
195 198
196 #endif // APP_L10N_UTIL_H_ 199 #endif // APP_L10N_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | app/l10n_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698