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

Unified Diff: third_party/WebKit/Source/platform/text/PlatformLocale.cpp

Issue 2737263002: Fixed "characters" typo in message validation when input length is 1 (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/text/PlatformLocale.cpp
diff --git a/third_party/WebKit/Source/platform/text/PlatformLocale.cpp b/third_party/WebKit/Source/platform/text/PlatformLocale.cpp
index aa11c99b848b7a3bc0b29017fdf5d5fb6a38ca2b..5def35ba3da8f6e458a7a6c52de607a50fedc191 100644
--- a/third_party/WebKit/Source/platform/text/PlatformLocale.cpp
+++ b/third_party/WebKit/Source/platform/text/PlatformLocale.cpp
@@ -211,7 +211,13 @@ String Locale::validationMessageTooLongText(unsigned valueLength,
String Locale::validationMessageTooShortText(unsigned valueLength,
int minLength) {
- return queryString(WebLocalizedString::ValidationTooShort,
+ if (valueLength == 1) {
+ return queryString(WebLocalizedString::ValidationTooShort,
+ convertToLocalizedNumber(String::number(valueLength)),
+ convertToLocalizedNumber(String::number(minLength)));
+ }
+
+ return queryString(WebLocalizedString::ValidationTooShortPlural,
convertToLocalizedNumber(String::number(valueLength)),
convertToLocalizedNumber(String::number(minLength)));
}

Powered by Google App Engine
This is Rietveld 408576698