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

Issue 208243005: Determine language code and type of format for address. (Closed)

Created:
6 years, 9 months ago by please use gerrit instead
Modified:
6 years, 9 months ago
Reviewers:
Evan Stade
CC:
chromium-reviews, benquan, Dane Wallinga, dyu1, estade+watch_chromium.org, Ilya Sherman, rouslan+autofillwatch_chromium.org
Visibility:
Public.

Description

Determine language code and type of format for address. BuildComponents() in address_ui.h should take the UI language and determine the following two questions. (1) Whether to show UI components based on local or latinized address format. If the UI language does not match the default language for the country, and latinized address format is available, then use the latinized format. All countries with a latinized address format also have the default language specified. (2) Which language code should be used to format the address after the user provides it. If the UI language is one of the languages supported by the country, then use the UI language. If the country lists supported languages, none of which match the UI language, then pick the first supported language. If the country does not have supported languages (e.g. Antarctica), then use the UI language for formatting. If using the latinized format and the UI language is not one of the supported languages, then the formatting language is [country's default language] + "-latn". BUG=354954

Patch Set 1 : #

Total comments: 12

Patch Set 2 : No test_p, remove norm_ prefix. #

Patch Set 3 : Move function to util.h. #

Total comments: 2

Patch Set 4 : Address comments. #

Patch Set 5 : Use default language and formatting rules when UI language code is empty. #

Patch Set 6 : Add ctime include. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+684 lines, -402 lines) Patch
M chrome/browser/ui/autofill/autofill_dialog_i18n_input.cc View 1 2 3 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/ui/autofill/country_combobox_model_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_data.h View 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/include/libaddressinput/address_ui.h View 1 chunk +20 lines, -3 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/libaddressinput.gyp View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/address_data.cc View 1 2 3 4 3 chunks +11 lines, -24 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/address_ui.cc View 1 2 3 4 5 chunks +92 lines, -3 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/address_validator.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/region_data_constants.cc View 24 chunks +298 lines, -55 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/retriever.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/rule.h View 3 chunks +14 lines, -0 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/src/rule.cc View 1 2 3 5 chunks +13 lines, -2 lines 0 comments Download
D third_party/libaddressinput/chromium/cpp/src/time_to_string.h View 1 2 3 1 chunk +0 lines, -30 lines 0 comments Download
D third_party/libaddressinput/chromium/cpp/src/time_to_string.cc View 1 2 3 1 chunk +0 lines, -36 lines 0 comments Download
D third_party/libaddressinput/chromium/cpp/src/util/string_compare.h View 1 2 3 1 chunk +0 lines, -30 lines 0 comments Download
D third_party/libaddressinput/chromium/cpp/src/util/string_compare.cc View 1 2 3 1 chunk +0 lines, -31 lines 0 comments Download
D third_party/libaddressinput/chromium/cpp/src/util/string_split.h View 1 2 3 4 5 1 chunk +0 lines, -34 lines 0 comments Download
D third_party/libaddressinput/chromium/cpp/src/util/string_split.cc View 1 2 3 4 5 1 chunk +0 lines, -37 lines 0 comments Download
A third_party/libaddressinput/chromium/cpp/src/util/string_util.h View 1 2 3 4 5 1 chunk +57 lines, -0 lines 0 comments Download
A third_party/libaddressinput/chromium/cpp/src/util/string_util.cc View 1 2 3 1 chunk +80 lines, -0 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/test/address_data_test.cc View 2 chunks +28 lines, -0 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/test/address_ui_test.cc View 1 2 3 4 3 chunks +51 lines, -2 lines 0 comments Download
M third_party/libaddressinput/chromium/cpp/test/countryinfo_example_addresses_test.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M third_party/libaddressinput/chromium/cpp/test/retriever_test.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
D third_party/libaddressinput/chromium/cpp/test/util/string_split_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -89 lines 0 comments Download
A + third_party/libaddressinput/chromium/cpp/test/util/string_util_test.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/libaddressinput/libaddressinput.gyp View 1 2 3 2 chunks +4 lines, -8 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
please use gerrit instead
Evan: PTAL Patch Set 1.
6 years, 9 months ago (2014-03-21 19:06:36 UTC) #1
Evan Stade
https://codereview.chromium.org/208243005/diff/40001/third_party/libaddressinput/chromium/cpp/src/address_data.cc File third_party/libaddressinput/chromium/cpp/src/address_data.cc (right): https://codereview.chromium.org/208243005/diff/40001/third_party/libaddressinput/chromium/cpp/src/address_data.cc#newcode70 third_party/libaddressinput/chromium/cpp/src/address_data.cc:70: std::string norm_rule_lang = NormalizeLanguageCode(rule.GetLanguage()); nit: I would delete the ...
6 years, 9 months ago (2014-03-21 23:44:53 UTC) #2
please use gerrit instead
Evan: PTAL Patch Set 2 and questions below. https://codereview.chromium.org/208243005/diff/40001/third_party/libaddressinput/chromium/cpp/src/address_data.cc File third_party/libaddressinput/chromium/cpp/src/address_data.cc (right): https://codereview.chromium.org/208243005/diff/40001/third_party/libaddressinput/chromium/cpp/src/address_data.cc#newcode70 third_party/libaddressinput/chromium/cpp/src/address_data.cc:70: std::string ...
6 years, 9 months ago (2014-03-22 01:34:29 UTC) #3
Evan Stade
https://codereview.chromium.org/208243005/diff/40001/third_party/libaddressinput/chromium/cpp/src/normalize_language_code.h File third_party/libaddressinput/chromium/cpp/src/normalize_language_code.h (right): https://codereview.chromium.org/208243005/diff/40001/third_party/libaddressinput/chromium/cpp/src/normalize_language_code.h#newcode26 third_party/libaddressinput/chromium/cpp/src/normalize_language_code.h:26: std::string NormalizeLanguageCode(const std::string& language_code); On 2014/03/22 01:34:30, Rouslan Solomakhin ...
6 years, 9 months ago (2014-03-24 15:46:06 UTC) #4
please use gerrit instead
Evan: PTAL Patch Set 3. https://codereview.chromium.org/208243005/diff/40001/third_party/libaddressinput/chromium/cpp/src/normalize_language_code.h File third_party/libaddressinput/chromium/cpp/src/normalize_language_code.h (right): https://codereview.chromium.org/208243005/diff/40001/third_party/libaddressinput/chromium/cpp/src/normalize_language_code.h#newcode26 third_party/libaddressinput/chromium/cpp/src/normalize_language_code.h:26: std::string NormalizeLanguageCode(const std::string& language_code); ...
6 years, 9 months ago (2014-03-24 18:20:58 UTC) #5
Evan Stade
https://codereview.chromium.org/208243005/diff/40001/third_party/libaddressinput/chromium/cpp/src/address_ui.cc File third_party/libaddressinput/chromium/cpp/src/address_ui.cc (right): https://codereview.chromium.org/208243005/diff/40001/third_party/libaddressinput/chromium/cpp/src/address_ui.cc#newcode81 third_party/libaddressinput/chromium/cpp/src/address_ui.cc:81: const std::string& norm_default_lang, On 2014/03/22 01:34:30, Rouslan Solomakhin wrote: ...
6 years, 9 months ago (2014-03-24 19:04:15 UTC) #6
please use gerrit instead
Evan: PTAL Patch Set 4. https://codereview.chromium.org/208243005/diff/40001/third_party/libaddressinput/chromium/cpp/src/address_ui.cc File third_party/libaddressinput/chromium/cpp/src/address_ui.cc (right): https://codereview.chromium.org/208243005/diff/40001/third_party/libaddressinput/chromium/cpp/src/address_ui.cc#newcode81 third_party/libaddressinput/chromium/cpp/src/address_ui.cc:81: const std::string& norm_default_lang, On ...
6 years, 9 months ago (2014-03-24 22:56:28 UTC) #7
Evan Stade
lgtm
6 years, 9 months ago (2014-03-24 23:00:33 UTC) #8
please use gerrit instead
The CQ bit was checked by rouslan@chromium.org
6 years, 9 months ago (2014-03-24 23:01:42 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rouslan@chromium.org/208243005/190001
6 years, 9 months ago (2014-03-24 23:03:55 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-24 23:19:52 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on mac_chromium_rel
6 years, 9 months ago (2014-03-24 23:19:52 UTC) #12
please use gerrit instead
The CQ bit was checked by rouslan@chromium.org
6 years, 9 months ago (2014-03-24 23:23:03 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rouslan@chromium.org/208243005/190001
6 years, 9 months ago (2014-03-24 23:23:07 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-25 00:31:20 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_rel
6 years, 9 months ago (2014-03-25 00:31:21 UTC) #16
please use gerrit instead
The CQ bit was checked by rouslan@chromium.org
6 years, 9 months ago (2014-03-25 01:48:13 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rouslan@chromium.org/208243005/210001
6 years, 9 months ago (2014-03-25 01:51:55 UTC) #18
commit-bot: I haz the power
Change committed as 259150
6 years, 9 months ago (2014-03-25 04:48:02 UTC) #19
earthdok
On 2014/03/25 04:48:02, I haz the power (commit-bot) wrote: > Change committed as 259150 This ...
6 years, 9 months ago (2014-03-25 14:44:15 UTC) #20
erikchen2
A revert of this CL has been created in https://codereview.chromium.org/211443003/ by erikchen@google.com. The reason for ...
6 years, 9 months ago (2014-03-25 17:10:57 UTC) #21
please use gerrit instead
Patch Set 6 contains the fix for the compile error. Relanding.
6 years, 9 months ago (2014-03-25 17:57:15 UTC) #22
please use gerrit instead
The CQ bit was checked by rouslan@chromium.org
6 years, 9 months ago (2014-03-25 17:57:33 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rouslan@chromium.org/208243005/370001
6 years, 9 months ago (2014-03-25 17:58:11 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-25 19:58:24 UTC) #25
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=287729
6 years, 9 months ago (2014-03-25 19:58:25 UTC) #26
Evan Stade
Common practice is to not reuse the same codereview issue for a re-commit. Instead upload ...
6 years, 9 months ago (2014-03-25 20:01:00 UTC) #27
please use gerrit instead
On 2014/03/25 20:01:00, Evan Stade wrote: > Common practice is to not reuse the same ...
6 years, 9 months ago (2014-03-25 20:54:07 UTC) #28
please use gerrit instead
On 2014/03/25 20:54:07, Rouslan Solomakhin wrote: > On 2014/03/25 20:01:00, Evan Stade wrote: > > ...
6 years, 9 months ago (2014-03-25 20:55:39 UTC) #29
please use gerrit instead
6 years, 9 months ago (2014-03-25 21:05:23 UTC) #30
Relanding with the fix in https://codereview.chromium.org/198923010/.

Powered by Google App Engine
This is Rietveld 408576698