Chromium Code Reviews| Index: ui/base/l10n/l10n_util_posix.cc |
| =================================================================== |
| --- ui/base/l10n/l10n_util_posix.cc (revision 96223) |
| +++ ui/base/l10n/l10n_util_posix.cc (working copy) |
| @@ -4,11 +4,30 @@ |
| #include <string> |
| +#if defined(OS_CHROMEOS) |
| +#include "base/basictypes.h" |
| +#include "base/string_util.h" |
| +#endif |
| + |
| namespace l10n_util { |
| // Return true blindly for now. |
| bool IsLocaleSupportedByOS(const std::string& locale) { |
| +#if !defined(OS_CHROMEOS) |
| return true; |
| +#else |
| + // We don't have translations yet for am, fa and sw. |
| + // We don't have fonts for te and kn, yet. |
| + // TODO(jungshik): Once the above issues are resolved, change this back |
| + // to return true. |
| + static const char* kUnsupportedLocales[] = {"am", "fa", "kn", "sw", "te"}; |
| + static const int kUnsupportedLocalesLen = arraysize(kUnsupportedLocaleLen); |
| + for (int i = 0; i < kUnsupportedLocalesLen; ++i) { |
|
tony
2011/08/24 22:07:34
Nit: I would just inline arraysize(kUnsupportedLoc
|
| + if (LowerCaseEqualsASCII(locale, kUnsupportedLocales[i])) |
| + return false; |
| + } |
| + return true; |
| +#endif |
| } |
| } // namespace l10n_util |