aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrouslan@chromium.org <rouslan@chromium.org@38ededc0-08b8-5190-f2ac-b31f878777ad>2014-05-28 16:33:26 +0000
committerrouslan@chromium.org <rouslan@chromium.org@38ededc0-08b8-5190-f2ac-b31f878777ad>2014-05-28 16:33:26 +0000
commit91de79c2a6ae5ca94594a503020ee1f08c1e559f (patch)
tree6c23d5443319d6237d32e7a7ca38dab427811141
parentfbd21ab9cc016956bb4f0bb51180036bde0faeb1 (diff)
downloadsrc-91de79c2a6ae5ca94594a503020ee1f08c1e559f.tar.gz
Remove extra whitespace from messages.
This patch removes the extra whitespace from English strings. After this patch lands, Chrome can pull in the strings and start the translation process. R=lararennie@google.com, roubert@google.com Review URL: https://codereview.appspot.com/92660044 git-svn-id: http://libaddressinput.googlecode.com/svn/trunk@254 38ededc0-08b8-5190-f2ac-b31f878777ad
-rw-r--r--cpp/res/messages.grdp46
-rw-r--r--cpp/test/localization_test.cc155
2 files changed, 95 insertions, 106 deletions
diff --git a/cpp/res/messages.grdp b/cpp/res/messages.grdp
index 6fb764f..1e1bcf2 100644
--- a/cpp/res/messages.grdp
+++ b/cpp/res/messages.grdp
@@ -123,18 +123,14 @@ limitations under the License.
field and the user has not filled it out, providing an example
postal code and a link to this country's postal service that a user
can use to look up their postal code.">
- You must provide a postal code, for example
- <ph name="EXAMPLE">$1<ex>90291</ex></ph>.
- Don't know your postal code? Find it out
- <ph name="BEGIN_LINK">$2</ph>here<ph name="END_LINK">$3</ph>.
+ You must provide a postal code, for example <ph name="EXAMPLE">$1<ex>90291</ex></ph>. Don't know your postal code? Find it out <ph name="BEGIN_LINK">$2</ph>here<ph name="END_LINK">$3</ph>.
</message>
<message
name="IDS_LIBADDRESSINPUT_MISSING_REQUIRED_POSTAL_CODE_EXAMPLE"
desc="Error message shown with the postal code field when it is a required
field and the user has not filled it out, providing an example
postal code.">
- You must provide a postal code, for example
- <ph name="EXAMPLE">$1<ex>90291</ex></ph>.
+ You must provide a postal code, for example <ph name="EXAMPLE">$1<ex>90291</ex></ph>.
</message>
<message
name="IDS_LIBADDRESSINPUT_MISSING_REQUIRED_ZIP_CODE_EXAMPLE_AND_URL"
@@ -143,26 +139,21 @@ limitations under the License.
code and a link to this country's postal service that a user can use
to look up their ZIP code. This is specifically for countries using
ZIP codes instead of Postal codes, such as America.">
- You must provide a ZIP code, for example
- <ph name="EXAMPLE">$1<ex>90291</ex></ph>.
- Don't know your ZIP code? Find it out
- <ph name="BEGIN_LINK">$2</ph>here<ph name="END_LINK">$3</ph>.
+ You must provide a ZIP code, for example <ph name="EXAMPLE">$1<ex>90291</ex></ph>. Don't know your ZIP code? Find it out <ph name="BEGIN_LINK">$2</ph>here<ph name="END_LINK">$3</ph>.
</message>
<message
name="IDS_LIBADDRESSINPUT_MISSING_REQUIRED_ZIP_CODE_EXAMPLE"
desc="Error message shown with the ZIP code field when it is a required
field and the user has not filled it out, providing an example ZIP
code.">
- You must provide a ZIP code, for example
- <ph name="EXAMPLE">$1<ex>90291</ex></ph>.
+ You must provide a ZIP code, for example <ph name="EXAMPLE">$1<ex>90291</ex></ph>.
</message>
<message
name="IDS_LIBADDRESSINPUT_UNKNOWN_VALUE"
desc="Occurs when the user fills out the wrong value for an address field.
For example, this would be shown when putting 'Cupertino' in United
States' State field.">
- <ph name="FIELD_VALUE">$1<ex>Cupertino</ex></ph>
- is not recognized as a known value for this field.
+ <ph name="FIELD_VALUE">$1<ex>Cupertino</ex></ph> is not recognized as a known value for this field.
</message>
<message
name="IDS_LIBADDRESSINPUT_UNRECOGNIZED_FORMAT_POSTAL_CODE_EXAMPLE_AND_URL"
@@ -172,10 +163,7 @@ limitations under the License.
digits long. Provides an example postal code and a link to this
country's postal service that a user can use to look up their postal
code.">
- This postal code format is not recognized. Example of a valid postal code:
- <ph name="EXAMPLE">$1<ex>90291</ex></ph>.
- Don't know your postal code? Find it out
- <ph name="BEGIN_LINK">$2</ph>here<ph name="END_LINK">$3</ph>.
+ This postal code format is not recognized. Example of a valid postal code: <ph name="EXAMPLE">$1<ex>90291</ex></ph>. Don't know your postal code? Find it out <ph name="BEGIN_LINK">$2</ph>here<ph name="END_LINK">$3</ph>.
</message>
<message
name="IDS_LIBADDRESSINPUT_UNRECOGNIZED_FORMAT_POSTAL_CODE_EXAMPLE"
@@ -183,8 +171,7 @@ limitations under the License.
to the country's postal code format. For example, this would be
shown when using '80' as a Swiss postal code, which is normally 4
digits long. Provides an example postal code.">
- This postal code format is not recognized. Example of a valid postal code:
- <ph name="EXAMPLE">$1<ex>90291</ex></ph>.
+ This postal code format is not recognized. Example of a valid postal code: <ph name="EXAMPLE">$1<ex>90291</ex></ph>.
</message>
<message
name="IDS_LIBADDRESSINPUT_UNRECOGNIZED_FORMAT_POSTAL_CODE"
@@ -201,10 +188,7 @@ limitations under the License.
using '901' as a ZIP code for the United States. Provides an example
ZIP code and a link to this country's postal service that a user can
use to look up their ZIP code.">
- This ZIP code format is not recognized. Example of a valid ZIP code:
- <ph name="EXAMPLE">$1<ex>90291</ex></ph>.
- Don't know your ZIP code? Find it out
- <ph name="BEGIN_LINK">$2</ph>here<ph name="END_LINK">$3</ph>.
+ This ZIP code format is not recognized. Example of a valid ZIP code: <ph name="EXAMPLE">$1<ex>90291</ex></ph>. Don't know your ZIP code? Find it out <ph name="BEGIN_LINK">$2</ph>here<ph name="END_LINK">$3</ph>.
</message>
<message
name="IDS_LIBADDRESSINPUT_UNRECOGNIZED_FORMAT_ZIP_CODE_EXAMPLE"
@@ -212,8 +196,7 @@ limitations under the License.
the country's ZIP code format. For example, this would be shown when
using '901' as a ZIP code for the United States. Provides an example
ZIP code.">
- This ZIP code format is not recognized. Example of a valid ZIP code:
- <ph name="EXAMPLE">$1<ex>90291</ex></ph>.
+ This ZIP code format is not recognized. Example of a valid ZIP code: <ph name="EXAMPLE">$1<ex>90291</ex></ph>.
</message>
<message
name="IDS_LIBADDRESSINPUT_UNRECOGNIZED_FORMAT_ZIP"
@@ -228,9 +211,7 @@ limitations under the License.
location. For example, this would be shown when using Z3Z 2Y7 for
Alberta, Canada. Provides a link to this country's postal service
that a user can use to look up their postal code.">
- This postal code does not appear to match the rest of this address.
- Don't know your postal code? Find it out
- <ph name="BEGIN_LINK">$1</ph>here<ph name="END_LINK">$2</ph>.
+ This postal code does not appear to match the rest of this address. Don't know your postal code? Find it out <ph name="BEGIN_LINK">$1</ph>here<ph name="END_LINK">$2</ph>.
</message>
<message
name="IDS_LIBADDRESSINPUT_MISMATCHING_VALUE_POSTAL_CODE"
@@ -245,9 +226,7 @@ limitations under the License.
location. For example, this would be shown when using 10001 for
Arizona state. Provides a link to this country's postal service that
a user can use to look up their ZIP code.">
- This ZIP code does not appear to match the rest of this address.
- Don't know your ZIP code? Find it out
- <ph name="BEGIN_LINK">$1</ph>here<ph name="END_LINK">$2</ph>.
+ This ZIP code does not appear to match the rest of this address. Don't know your ZIP code? Find it out <ph name="BEGIN_LINK">$1</ph>here<ph name="END_LINK">$2</ph>.
</message>
<message
name="IDS_LIBADDRESSINPUT_MISMATCHING_VALUE_ZIP"
@@ -260,7 +239,6 @@ limitations under the License.
name="IDS_LIBADDRESSINPUT_PO_BOX_FORBIDDEN_VALUE"
desc="Occurs when the user fills out a P.O. box as part of a physical
address.">
- This address line appears to contain a post office box. Please use a street
- or building address.
+ This address line appears to contain a post office box. Please use a street or building address.
</message>
</grit-part>
diff --git a/cpp/test/localization_test.cc b/cpp/test/localization_test.cc
index e4d866c..d1c4a9d 100644
--- a/cpp/test/localization_test.cc
+++ b/cpp/test/localization_test.cc
@@ -67,6 +67,17 @@ TEST_P(LocalizationTest, DefaultStringIsNotEmpty) {
EXPECT_FALSE(localization_.GetString(GetParam()).empty());
}
+// Verifies that the messages do not have newlines.
+TEST_P(LocalizationTest, NoNewline) {
+ EXPECT_EQ(std::string::npos, localization_.GetString(GetParam()).find('\n'));
+}
+
+// Verifies that the messages do not have double spaces.
+TEST_P(LocalizationTest, NoDoubleSpace) {
+ EXPECT_EQ(std::string::npos,
+ localization_.GetString(GetParam()).find(std::string(2U, ' ')));
+}
+
// Verifies that the default string is English.
TEST_P(LocalizationTest, DefaultStringIsEnglish) {
std::string default_string = localization_.GetString(GetParam());
@@ -128,15 +139,15 @@ TEST(LocalizationGetErrorMessageTest, MissingRequiredPostalCode) {
Localization localization;
AddressData address;
address.region_code = "CH";
- EXPECT_EQ(std::string("You must provide a postal code, for example\n") +
- " 2544,1211,1556,3030.\n" +
- " Don't know your postal code? Find it out\n" +
- " <a href=\"http://www.post.ch/db/owa/pv_plz_pack/pr_main\">" +
+ EXPECT_EQ(std::string("You must provide a postal code, for example") +
+ " 2544,1211,1556,3030." +
+ " Don't know your postal code? Find it out" +
+ " <a href=\"http://www.post.ch/db/owa/pv_plz_pack/pr_main\">" +
"here</a>.",
localization.GetErrorMessage(address, POSTAL_CODE,
MISSING_REQUIRED_FIELD, true, true));
- EXPECT_EQ(std::string("You must provide a postal code, for example\n") +
- " 2544,1211,1556,3030.",
+ EXPECT_EQ(std::string("You must provide a postal code, for example") +
+ " 2544,1211,1556,3030.",
localization.GetErrorMessage(address, POSTAL_CODE,
MISSING_REQUIRED_FIELD, true, false));
EXPECT_EQ("You can't leave this empty.",
@@ -151,15 +162,15 @@ TEST(LocalizationGetErrorMessageTest, MissingRequiredZipCode) {
Localization localization;
AddressData address;
address.region_code = "US";
- EXPECT_EQ(std::string("You must provide a ZIP code, for example\n") +
- " 95014,22162-1010.\n" +
- " Don't know your ZIP code? Find it out\n" +
- " <a href=\"https://tools.usps.com/go/ZipLookupAction!" +
+ EXPECT_EQ(std::string("You must provide a ZIP code, for example") +
+ " 95014,22162-1010." +
+ " Don't know your ZIP code? Find it out" +
+ " <a href=\"https://tools.usps.com/go/ZipLookupAction!" +
"input.action\">here</a>.",
localization.GetErrorMessage(address, POSTAL_CODE,
MISSING_REQUIRED_FIELD, true, true));
- EXPECT_EQ(std::string("You must provide a ZIP code, for example\n") +
- " 95014,22162-1010.",
+ EXPECT_EQ(std::string("You must provide a ZIP code, for example") +
+ " 95014,22162-1010.",
localization.GetErrorMessage(address, POSTAL_CODE,
MISSING_REQUIRED_FIELD, true, false));
EXPECT_EQ("You can't leave this empty.",
@@ -212,115 +223,115 @@ TEST(LocalizationGetErrorMessageTest, UnknownValueOtherFields) {
address_line.push_back("bad address line 2");
address.address_line = address_line;
address.recipient = "bad recipient";
- EXPECT_EQ(std::string("US\n ") +
+ EXPECT_EQ(std::string("US ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, COUNTRY, UNKNOWN_VALUE, true, true));
- EXPECT_EQ(std::string("US\n ") +
+ EXPECT_EQ(std::string("US ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, COUNTRY, UNKNOWN_VALUE, true, false));
- EXPECT_EQ(std::string("US\n ") +
+ EXPECT_EQ(std::string("US ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, COUNTRY, UNKNOWN_VALUE, false, false));
- EXPECT_EQ(std::string("US\n ") +
+ EXPECT_EQ(std::string("US ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, COUNTRY, UNKNOWN_VALUE, false, true));
- EXPECT_EQ(std::string("bad admin area\n ") +
+ EXPECT_EQ(std::string("bad admin area ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, ADMIN_AREA, UNKNOWN_VALUE, true, true));
- EXPECT_EQ(std::string("bad admin area\n ") +
+ EXPECT_EQ(std::string("bad admin area ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, ADMIN_AREA, UNKNOWN_VALUE, true, false));
- EXPECT_EQ(std::string("bad admin area\n ") +
+ EXPECT_EQ(std::string("bad admin area ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, ADMIN_AREA, UNKNOWN_VALUE, false, false));
- EXPECT_EQ(std::string("bad admin area\n ") +
+ EXPECT_EQ(std::string("bad admin area ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, ADMIN_AREA, UNKNOWN_VALUE, false, true));
- EXPECT_EQ(std::string("bad locality\n ") +
+ EXPECT_EQ(std::string("bad locality ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, LOCALITY, UNKNOWN_VALUE, true, true));
- EXPECT_EQ(std::string("bad locality\n ") +
+ EXPECT_EQ(std::string("bad locality ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, LOCALITY, UNKNOWN_VALUE, true, false));
- EXPECT_EQ(std::string("bad locality\n ") +
+ EXPECT_EQ(std::string("bad locality ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, LOCALITY, UNKNOWN_VALUE, false, false));
- EXPECT_EQ(std::string("bad locality\n ") +
+ EXPECT_EQ(std::string("bad locality ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, LOCALITY, UNKNOWN_VALUE, false, true));
- EXPECT_EQ(std::string("bad dependent locality\n ") +
+ EXPECT_EQ(std::string("bad dependent locality ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, DEPENDENT_LOCALITY, UNKNOWN_VALUE, true, true));
- EXPECT_EQ(std::string("bad dependent locality\n ") +
+ EXPECT_EQ(std::string("bad dependent locality ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, DEPENDENT_LOCALITY, UNKNOWN_VALUE, true, false));
- EXPECT_EQ(std::string("bad dependent locality\n ") +
+ EXPECT_EQ(std::string("bad dependent locality ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, DEPENDENT_LOCALITY, UNKNOWN_VALUE, false, false));
- EXPECT_EQ(std::string("bad dependent locality\n ") +
+ EXPECT_EQ(std::string("bad dependent locality ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, DEPENDENT_LOCALITY, UNKNOWN_VALUE, false, true));
- EXPECT_EQ(std::string("bad sorting code\n ") +
+ EXPECT_EQ(std::string("bad sorting code ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, SORTING_CODE, UNKNOWN_VALUE, true, true));
- EXPECT_EQ(std::string("bad sorting code\n ") +
+ EXPECT_EQ(std::string("bad sorting code ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, SORTING_CODE, UNKNOWN_VALUE, true, false));
- EXPECT_EQ(std::string("bad sorting code\n ") +
+ EXPECT_EQ(std::string("bad sorting code ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, SORTING_CODE, UNKNOWN_VALUE, false, false));
- EXPECT_EQ(std::string("bad sorting code\n ") +
+ EXPECT_EQ(std::string("bad sorting code ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, SORTING_CODE, UNKNOWN_VALUE, false, true));
- EXPECT_EQ(std::string("bad address line 1\n ") +
+ EXPECT_EQ(std::string("bad address line 1 ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, STREET_ADDRESS, UNKNOWN_VALUE, true, true));
- EXPECT_EQ(std::string("bad address line 1\n ") +
+ EXPECT_EQ(std::string("bad address line 1 ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, STREET_ADDRESS, UNKNOWN_VALUE, true, false));
- EXPECT_EQ(std::string("bad address line 1\n ") +
+ EXPECT_EQ(std::string("bad address line 1 ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, STREET_ADDRESS, UNKNOWN_VALUE, false, false));
- EXPECT_EQ(std::string("bad address line 1\n ") +
+ EXPECT_EQ(std::string("bad address line 1 ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, STREET_ADDRESS, UNKNOWN_VALUE, false, true));
- EXPECT_EQ(std::string("bad recipient\n ") +
+ EXPECT_EQ(std::string("bad recipient ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, RECIPIENT, UNKNOWN_VALUE, true, true));
- EXPECT_EQ(std::string("bad recipient\n ") +
+ EXPECT_EQ(std::string("bad recipient ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, RECIPIENT, UNKNOWN_VALUE, true, false));
- EXPECT_EQ(std::string("bad recipient\n ") +
+ EXPECT_EQ(std::string("bad recipient ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, RECIPIENT, UNKNOWN_VALUE, false, false));
- EXPECT_EQ(std::string("bad recipient\n ") +
+ EXPECT_EQ(std::string("bad recipient ") +
"is not recognized as a known value for this field.",
localization.GetErrorMessage(
address, RECIPIENT, UNKNOWN_VALUE, false, true));
@@ -331,16 +342,16 @@ TEST(LocalizationGetErrorMessageTest, InvalidFormatPostalCode) {
AddressData address;
address.region_code = "CH";
EXPECT_EQ(std::string("This postal code format is not recognized. Example ") +
- "of a valid postal code:\n" +
- " 2544,1211,1556,3030.\n" +
- " Don't know your postal code? Find it out\n" +
- " <a href=\"http://www.post.ch/db/owa/pv_plz_pack/pr_main\">" +
+ "of a valid postal code:" +
+ " 2544,1211,1556,3030." +
+ " Don't know your postal code? Find it out" +
+ " <a href=\"http://www.post.ch/db/owa/pv_plz_pack/pr_main\">" +
"here</a>.",
localization.GetErrorMessage(address, POSTAL_CODE,
INVALID_FORMAT, true, true));
EXPECT_EQ(std::string("This postal code format is not recognized. Example ") +
- "of a valid postal code:\n" +
- " 2544,1211,1556,3030.",
+ "of a valid postal code:" +
+ " 2544,1211,1556,3030.",
localization.GetErrorMessage(address, POSTAL_CODE,
INVALID_FORMAT, true, false));
EXPECT_EQ("This postal code format is not recognized.",
@@ -356,16 +367,16 @@ TEST(LocalizationGetErrorMessageTest, InvalidFormatZipCode) {
AddressData address;
address.region_code = "US";
EXPECT_EQ(std::string("This ZIP code format is not recognized. Example of ") +
- "a valid ZIP code:\n" +
- " 95014,22162-1010.\n" +
- " Don't know your ZIP code? Find it out\n" +
- " <a href=\"https://tools.usps.com/go/ZipLookupAction!" +
+ "a valid ZIP code:" +
+ " 95014,22162-1010." +
+ " Don't know your ZIP code? Find it out" +
+ " <a href=\"https://tools.usps.com/go/ZipLookupAction!" +
"input.action\">here</a>.",
localization.GetErrorMessage(address, POSTAL_CODE,
INVALID_FORMAT, true, true));
EXPECT_EQ(std::string("This ZIP code format is not recognized. Example of ") +
- "a valid ZIP code:\n" +
- " 95014,22162-1010.",
+ "a valid ZIP code:" +
+ " 95014,22162-1010.",
localization.GetErrorMessage(address, POSTAL_CODE,
INVALID_FORMAT, true, false));
EXPECT_EQ("This ZIP code format is not recognized.",
@@ -381,9 +392,9 @@ TEST(LocalizationGetErrorMessageTest, MismatchingValuePostalCode) {
AddressData address;
address.region_code = "CH";
EXPECT_EQ(std::string("This postal code does not appear to match the rest ") +
- "of this address.\n" +
- " Don't know your postal code? Find it out\n" +
- " <a href=\"http://www.post.ch/db/owa/pv_plz_pack/pr_main\">" +
+ "of this address." +
+ " Don't know your postal code? Find it out" +
+ " <a href=\"http://www.post.ch/db/owa/pv_plz_pack/pr_main\">" +
"here</a>.",
localization.GetErrorMessage(address, POSTAL_CODE,
MISMATCHING_VALUE, true, true));
@@ -396,9 +407,9 @@ TEST(LocalizationGetErrorMessageTest, MismatchingValuePostalCode) {
localization.GetErrorMessage(address, POSTAL_CODE,
MISMATCHING_VALUE, false, false));
EXPECT_EQ(std::string("This postal code does not appear to match the rest ") +
- "of this address.\n" +
- " Don't know your postal code? Find it out\n" +
- " <a href=\"http://www.post.ch/db/owa/pv_plz_pack/pr_main\">" +
+ "of this address." +
+ " Don't know your postal code? Find it out" +
+ " <a href=\"http://www.post.ch/db/owa/pv_plz_pack/pr_main\">" +
"here</a>.",
localization.GetErrorMessage(address, POSTAL_CODE,
MISMATCHING_VALUE, false, true));
@@ -409,9 +420,9 @@ TEST(LocalizationGetErrorMessageTest, MismatchingValueZipCode) {
AddressData address;
address.region_code = "US";
EXPECT_EQ(std::string("This ZIP code does not appear to match the rest of ") +
- "this address.\n" +
- " Don't know your ZIP code? Find it out\n" +
- " <a href=\"https://tools.usps.com/go/ZipLookupAction!" +
+ "this address." +
+ " Don't know your ZIP code? Find it out" +
+ " <a href=\"https://tools.usps.com/go/ZipLookupAction!" +
"input.action\">here</a>.",
localization.GetErrorMessage(address, POSTAL_CODE,
MISMATCHING_VALUE, true, true));
@@ -424,9 +435,9 @@ TEST(LocalizationGetErrorMessageTest, MismatchingValueZipCode) {
localization.GetErrorMessage(address, POSTAL_CODE,
MISMATCHING_VALUE, false, false));
EXPECT_EQ(std::string("This ZIP code does not appear to match the rest of ") +
- "this address.\n" +
- " Don't know your ZIP code? Find it out\n" +
- " <a href=\"https://tools.usps.com/go/ZipLookupAction!" +
+ "this address." +
+ " Don't know your ZIP code? Find it out" +
+ " <a href=\"https://tools.usps.com/go/ZipLookupAction!" +
"input.action\">here</a>.",
localization.GetErrorMessage(address, POSTAL_CODE,
MISMATCHING_VALUE, false, true));
@@ -447,23 +458,23 @@ TEST(LocalizationGetErrorMessageTest, UsesPOBoxOtherFields) {
for (std::vector<AddressField>::iterator it = other_fields.begin();
it != other_fields.end(); it++) {
EXPECT_EQ(std::string("This address line appears to contain a post ") +
- "office box. Please use a street\n" +
- " or building address.",
+ "office box. Please use a street" +
+ " or building address.",
localization.GetErrorMessage(
address, *it, USES_P_O_BOX, true, true));
EXPECT_EQ(std::string("This address line appears to contain a post ") +
- "office box. Please use a street\n" +
- " or building address.",
+ "office box. Please use a street" +
+ " or building address.",
localization.GetErrorMessage(
address, *it, USES_P_O_BOX, true, false));
EXPECT_EQ(std::string("This address line appears to contain a post ") +
- "office box. Please use a street\n" +
- " or building address.",
+ "office box. Please use a street" +
+ " or building address.",
localization.GetErrorMessage(
address, *it, USES_P_O_BOX, false, false));
EXPECT_EQ(std::string("This address line appears to contain a post ") +
- "office box. Please use a street\n" +
- " or building address.",
+ "office box. Please use a street" +
+ " or building address.",
localization.GetErrorMessage(
address, *it, USES_P_O_BOX, false, true));
}