Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #if defined(OS_CHROMEOS) | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/string_util.h" | |
| 10 #endif | |
| 11 | |
| 7 namespace l10n_util { | 12 namespace l10n_util { |
| 8 | 13 |
| 9 // Return true blindly for now. | 14 // Return true blindly for now. |
| 10 bool IsLocaleSupportedByOS(const std::string& locale) { | 15 bool IsLocaleSupportedByOS(const std::string& locale) { |
| 16 #if !defined(OS_CHROMEOS) | |
| 11 return true; | 17 return true; |
| 18 #else | |
| 19 // We don't have translations yet for am, fa and sw. | |
| 20 // We don't have fonts for te and kn, yet. | |
| 21 // TODO(jungshik): Once the above issues are resolved, change this back | |
| 22 // to return true. | |
| 23 static const char* kUnsupportedLocales[] = {"am", "fa", "kn", "sw", "te"}; | |
| 24 static const int kUnsupportedLocalesLen = arraysize(kUnsupportedLocaleLen); | |
| 25 for (int i = 0; i < kUnsupportedLocalesLen; ++i) { | |
|
tony
2011/08/24 22:07:34
Nit: I would just inline arraysize(kUnsupportedLoc
| |
| 26 if (LowerCaseEqualsASCII(locale, kUnsupportedLocales[i])) | |
| 27 return false; | |
| 28 } | |
| 29 return true; | |
| 30 #endif | |
| 12 } | 31 } |
| 13 | 32 |
| 14 } // namespace l10n_util | 33 } // namespace l10n_util |
| OLD | NEW |