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

Unified Diff: ui/base/l10n/l10n_util_posix.cc

Issue 7726003: Block {am, fa, sw} and {kn, te} on CrOS. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,29 @@
#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"};
+ for (size_t i = 0; i < arraysize(kUnsupportedLocales); ++i) {
+ if (LowerCaseEqualsASCII(locale, kUnsupportedLocales[i]))
+ return false;
+ }
+ return true;
+#endif
}
} // namespace l10n_util
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698