| OLD | NEW |
| 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 #include "app/l10n_util.h" | 5 #include "app/l10n_util.h" |
| 6 | 6 |
| 7 #include <cstdlib> | 7 #include <cstdlib> |
| 8 | 8 |
| 9 #include "app/app_paths.h" | 9 #include "app/app_paths.h" |
| 10 #include "app/app_switches.h" | 10 #include "app/app_switches.h" |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 } | 698 } |
| 699 | 699 |
| 700 std::wstring GetStringF(int message_id, | 700 std::wstring GetStringF(int message_id, |
| 701 const std::wstring& a, | 701 const std::wstring& a, |
| 702 const std::wstring& b, | 702 const std::wstring& b, |
| 703 std::vector<size_t>* offsets) { | 703 std::vector<size_t>* offsets) { |
| 704 return UTF16ToWide(GetStringF(message_id, WideToUTF16(a), WideToUTF16(b), | 704 return UTF16ToWide(GetStringF(message_id, WideToUTF16(a), WideToUTF16(b), |
| 705 string16(), string16(), offsets)); | 705 string16(), string16(), offsets)); |
| 706 } | 706 } |
| 707 | 707 |
| 708 string16 GetStringFUTF16(int message_id, |
| 709 const string16& a, |
| 710 const string16& b, |
| 711 std::vector<size_t>* offsets) { |
| 712 return GetStringF(message_id, a, b, string16(), string16(), offsets); |
| 713 } |
| 714 |
| 708 std::wstring GetStringF(int message_id, int a) { | 715 std::wstring GetStringF(int message_id, int a) { |
| 709 return GetStringF(message_id, IntToWString(a)); | 716 return GetStringF(message_id, IntToWString(a)); |
| 710 } | 717 } |
| 711 | 718 |
| 712 std::wstring GetStringF(int message_id, int64 a) { | 719 std::wstring GetStringF(int message_id, int64 a) { |
| 713 return GetStringF(message_id, Int64ToWString(a)); | 720 return GetStringF(message_id, Int64ToWString(a)); |
| 714 } | 721 } |
| 715 | 722 |
| 716 std::wstring TruncateString(const std::wstring& string, size_t length) { | 723 std::wstring TruncateString(const std::wstring& string, size_t length) { |
| 717 if (string.size() <= length) | 724 if (string.size() <= length) |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1037 for (size_t i = 0; i < arraysize(kAcceptLanguageList); ++i) { | 1044 for (size_t i = 0; i < arraysize(kAcceptLanguageList); ++i) { |
| 1038 if (!IsLocaleNameTranslated(kAcceptLanguageList[i], display_locale)) | 1045 if (!IsLocaleNameTranslated(kAcceptLanguageList[i], display_locale)) |
| 1039 // TODO(jungshik) : Put them at the of the list with language codes | 1046 // TODO(jungshik) : Put them at the of the list with language codes |
| 1040 // enclosed by brackets instead of skipping. | 1047 // enclosed by brackets instead of skipping. |
| 1041 continue; | 1048 continue; |
| 1042 locale_codes->push_back(kAcceptLanguageList[i]); | 1049 locale_codes->push_back(kAcceptLanguageList[i]); |
| 1043 } | 1050 } |
| 1044 } | 1051 } |
| 1045 | 1052 |
| 1046 } // namespace l10n_util | 1053 } // namespace l10n_util |
| OLD | NEW |