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

Side by Side Diff: app/l10n_util.h

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
« no previous file with comments | « no previous file | app/l10n_util.cc » ('j') | chrome/browser/views/infobars/translate_infobars.cc » ('J')
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // vector based version returns offsets ordered by parameter. For example if 148 // vector based version returns offsets ordered by parameter. For example if
149 // invoked with a and b offsets[0] gives the offset for a and offsets[1] the 149 // invoked with a and b offsets[0] gives the offset for a and offsets[1] the
150 // offset of b regardless of where the parameters end up in the string. 150 // offset of b regardless of where the parameters end up in the string.
151 std::wstring GetStringF(int message_id, 151 std::wstring GetStringF(int message_id,
152 const std::wstring& a, 152 const std::wstring& a,
153 size_t* offset); 153 size_t* offset);
154 std::wstring GetStringF(int message_id, 154 std::wstring GetStringF(int message_id,
155 const std::wstring& a, 155 const std::wstring& a,
156 const std::wstring& b, 156 const std::wstring& b,
157 std::vector<size_t>* offsets); 157 std::vector<size_t>* offsets);
158 string16 GetStringFUTF16(int message_id,
159 const string16& a,
160 const string16& b,
161 std::vector<size_t>* offsets);
158 162
159 // Convenience formatters for a single number. 163 // Convenience formatters for a single number.
160 std::wstring GetStringF(int message_id, int a); 164 std::wstring GetStringF(int message_id, int a);
161 std::wstring GetStringF(int message_id, int64 a); 165 std::wstring GetStringF(int message_id, int64 a);
162 166
163 // Truncates the string to length characters. This breaks the string at 167 // Truncates the string to length characters. This breaks the string at
164 // the first word break before length, adding the horizontal ellipsis 168 // the first word break before length, adding the horizontal ellipsis
165 // character (unicode character 0x2026) to render ... 169 // character (unicode character 0x2026) to render ...
166 // The supplied string is returned if the string has length characters or 170 // The supplied string is returned if the string has length characters or
167 // less. 171 // less.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 const std::vector<std::string>& GetAvailableLocales(); 278 const std::vector<std::string>& GetAvailableLocales();
275 279
276 // Returns a vector of locale codes usable for accept-languages. 280 // Returns a vector of locale codes usable for accept-languages.
277 void GetAcceptLanguagesForLocale(const std::string& display_locale, 281 void GetAcceptLanguagesForLocale(const std::string& display_locale,
278 std::vector<std::string>* locale_codes); 282 std::vector<std::string>* locale_codes);
279 283
280 284
281 } // namespace l10n_util 285 } // namespace l10n_util
282 286
283 #endif // APP_L10N_UTIL_H_ 287 #endif // APP_L10N_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | app/l10n_util.cc » ('j') | chrome/browser/views/infobars/translate_infobars.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698