New issue
Advanced search Search tips

Issue 739376 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug



Sign in to add a comment

Nouveau-Brunswick should canonicalize to NB

Project Member Reported by se...@chromium.org, Jul 5 2017

Issue description

In Payment Request, even if my phone is in French I can't get Nouveau-Brunswick to canonicalize to NB.

Also this test (not commited) doesn't seem to work:

TEST_F(AddressNormalizerTest, FrenchCanadaName) {
 supplier_.LoadRules("CA", *loaded_);
 AddressData address;
 address.language_code = "fr-CA";
 address.region_code = "CA";
 address.administrative_area = "Nouveau-Brunswick";
 normalizer_.Normalize(&address);
 EXPECT_EQ(
     "NB",
     address.administrative_area);
}
 

Comment 1 by se...@chromium.org, Jul 5 2017

Speculation time!

Maybe we only load the rules in the default language if LoadRules("CA"). Maybe we need to say LoadRules("CA--fr")?

OR

I think we may need to set the language_code of the AddressData object. See how it tries to infer what key to use (for loading rules) from the address: 

https://cs.chromium.org/chromium/src/third_party/libaddressinput/src/cpp/src/lookup_key.cc?type=cs&sq=package:chromium&l=86

Comment 2 by se...@chromium.org, Jul 5 2017

Actually, if you start looking from how the supplier load the rules:
https://cs.chromium.org/chromium/src/third_party/libaddressinput/src/cpp/src/preload_supplier.cc?type=cs&sq=package:chromium&l=304

It seems to me that in KeyFromRegionCode, the language code will always have the default value...
Status: Started (was: Assigned)
A decision was made to canonicalize either Nouveau-Brunswick or New Brunswick to NB, regardless of the browser language, or the default language of the region.
Status: Fixed (was: Started)

Sign in to add a comment