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

Side by Side Diff: ui/base/l10n/l10n_util.cc

Issue 971653005: Roll ICU to eda9e75b to add the Windows data dll (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mo display name Created 5 years, 9 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 | « DEPS ('k') | ui/base/l10n/l10n_util_unittest.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/base/l10n/l10n_util.h" 5 #include "ui/base/l10n/l10n_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstdlib> 8 #include <cstdlib>
9 #include <iterator> 9 #include <iterator>
10 #include <string> 10 #include <string>
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 // display names to be Chinese (Simplified) and Chinese (Traditional) instead 522 // display names to be Chinese (Simplified) and Chinese (Traditional) instead
523 // of Chinese (China) and Chinese (Taiwan). 523 // of Chinese (China) and Chinese (Taiwan).
524 // Translate uses "tl" (Tagalog) to mean "fil" (Filipino) until Google 524 // Translate uses "tl" (Tagalog) to mean "fil" (Filipino) until Google
525 // translate is changed to understand "fil". Make "tl" alias to "fil". 525 // translate is changed to understand "fil". Make "tl" alias to "fil".
526 if (locale_code == "zh-CN") 526 if (locale_code == "zh-CN")
527 locale_code = "zh-Hans"; 527 locale_code = "zh-Hans";
528 else if (locale_code == "zh-TW") 528 else if (locale_code == "zh-TW")
529 locale_code = "zh-Hant"; 529 locale_code = "zh-Hant";
530 else if (locale_code == "tl") 530 else if (locale_code == "tl")
531 locale_code = "fil"; 531 locale_code = "fil";
532 else if (locale_code == "mo")
533 locale_code = "ro-MD";
532 534
533 base::string16 display_name; 535 base::string16 display_name;
534 #if defined(OS_ANDROID) 536 #if defined(OS_ANDROID)
535 // Use Java API to get locale display name so that we can remove most of 537 // Use Java API to get locale display name so that we can remove most of
536 // the lang data from icu data to reduce binary size, except for zh-Hans and 538 // the lang data from icu data to reduce binary size, except for zh-Hans and
537 // zh-Hant because the current Android Java API doesn't support scripts. 539 // zh-Hant because the current Android Java API doesn't support scripts.
538 // TODO(wangxianzhu): remove the special handling of zh-Hans and zh-Hant once 540 // TODO(wangxianzhu): remove the special handling of zh-Hans and zh-Hant once
539 // Android Java API supports scripts. 541 // Android Java API supports scripts.
540 if (!StartsWithASCII(locale_code, "zh-Han", true)) { 542 if (!StartsWithASCII(locale_code, "zh-Han", true)) {
541 display_name = GetDisplayNameForLocale(locale_code, display_locale); 543 display_name = GetDisplayNameForLocale(locale_code, display_locale);
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 874
873 const char* const* GetAcceptLanguageListForTesting() { 875 const char* const* GetAcceptLanguageListForTesting() {
874 return kAcceptLanguageList; 876 return kAcceptLanguageList;
875 } 877 }
876 878
877 size_t GetAcceptLanguageListSizeForTesting() { 879 size_t GetAcceptLanguageListSizeForTesting() {
878 return arraysize(kAcceptLanguageList); 880 return arraysize(kAcceptLanguageList);
879 } 881 }
880 882
881 } // namespace l10n_util 883 } // namespace l10n_util
OLDNEW
« no previous file with comments | « DEPS ('k') | ui/base/l10n/l10n_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698