Nouveau-Brunswick should canonicalize to NB |
|||
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);
}
,
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...
,
Jul 12 2017
,
Jul 13 2017
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.
,
Jul 24 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by se...@chromium.org
, Jul 5 2017Speculation 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