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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_common.cc

Issue 25620002: [rac] Use i18n address inputs with --enable-autofill-address-i18n flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/autofill/autofill_dialog_common.h" 5 #include "chrome/browser/ui/autofill/autofill_dialog_common.h"
6 6
7 #include "components/autofill/core/browser/autofill_field.h" 7 #include "components/autofill/core/browser/autofill_field.h"
8 #include "components/autofill/core/browser/autofill_type.h" 8 #include "components/autofill/core/browser/autofill_type.h"
9 #include "grit/chromium_strings.h" 9 #include "grit/chromium_strings.h"
10 #include "grit/component_strings.h" 10 #include "grit/component_strings.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 }; 82 };
83 83
84 const DetailInput kBillingInputs[] = { 84 const DetailInput kBillingInputs[] = {
85 { 3, NAME_BILLING_FULL, IDS_AUTOFILL_DIALOG_PLACEHOLDER_CARDHOLDER_NAME }, 85 { 3, NAME_BILLING_FULL, IDS_AUTOFILL_DIALOG_PLACEHOLDER_CARDHOLDER_NAME },
86 { 4, ADDRESS_BILLING_LINE1, 86 { 4, ADDRESS_BILLING_LINE1,
87 IDS_AUTOFILL_DIALOG_PLACEHOLDER_ADDRESS_LINE_1 }, 87 IDS_AUTOFILL_DIALOG_PLACEHOLDER_ADDRESS_LINE_1 },
88 { 5, ADDRESS_BILLING_LINE2, 88 { 5, ADDRESS_BILLING_LINE2,
89 IDS_AUTOFILL_DIALOG_PLACEHOLDER_ADDRESS_LINE_2 }, 89 IDS_AUTOFILL_DIALOG_PLACEHOLDER_ADDRESS_LINE_2 },
90 { 6, ADDRESS_BILLING_CITY, 90 { 6, ADDRESS_BILLING_CITY,
91 IDS_AUTOFILL_DIALOG_PLACEHOLDER_LOCALITY }, 91 IDS_AUTOFILL_DIALOG_PLACEHOLDER_LOCALITY },
92 // TODO(estade): state placeholder should depend on locale.
93 { 7, ADDRESS_BILLING_STATE, IDS_AUTOFILL_FIELD_LABEL_STATE }, 92 { 7, ADDRESS_BILLING_STATE, IDS_AUTOFILL_FIELD_LABEL_STATE },
94 { 7, ADDRESS_BILLING_ZIP, 93 { 7, ADDRESS_BILLING_ZIP,
95 IDS_AUTOFILL_DIALOG_PLACEHOLDER_POSTAL_CODE }, 94 IDS_AUTOFILL_DIALOG_PLACEHOLDER_POSTAL_CODE },
96 // We don't allow the user to change the country: http://crbug.com/247518
97 { -1, ADDRESS_BILLING_COUNTRY, 0 },
98 { 9, PHONE_BILLING_WHOLE_NUMBER, 95 { 9, PHONE_BILLING_WHOLE_NUMBER,
99 IDS_AUTOFILL_DIALOG_PLACEHOLDER_PHONE_NUMBER }, 96 IDS_AUTOFILL_DIALOG_PLACEHOLDER_PHONE_NUMBER },
100 }; 97 };
101 98
102 const DetailInput kEmailInputs[] = { 99 const DetailInput kEmailInputs[] = {
103 { 10, EMAIL_ADDRESS, IDS_AUTOFILL_DIALOG_PLACEHOLDER_EMAIL }, 100 { 10, EMAIL_ADDRESS, IDS_AUTOFILL_DIALOG_PLACEHOLDER_EMAIL },
104 }; 101 };
105 102
106 const DetailInput kShippingInputs[] = { 103 const DetailInput kShippingInputs[] = {
107 { 11, NAME_FULL, IDS_AUTOFILL_DIALOG_PLACEHOLDER_ADDRESSEE_NAME }, 104 { 11, NAME_FULL, IDS_AUTOFILL_DIALOG_PLACEHOLDER_ADDRESSEE_NAME },
108 { 12, ADDRESS_HOME_LINE1, IDS_AUTOFILL_DIALOG_PLACEHOLDER_ADDRESS_LINE_1 }, 105 { 12, ADDRESS_HOME_LINE1, IDS_AUTOFILL_DIALOG_PLACEHOLDER_ADDRESS_LINE_1 },
109 { 13, ADDRESS_HOME_LINE2, IDS_AUTOFILL_DIALOG_PLACEHOLDER_ADDRESS_LINE_2 }, 106 { 13, ADDRESS_HOME_LINE2, IDS_AUTOFILL_DIALOG_PLACEHOLDER_ADDRESS_LINE_2 },
110 { 14, ADDRESS_HOME_CITY, IDS_AUTOFILL_DIALOG_PLACEHOLDER_LOCALITY }, 107 { 14, ADDRESS_HOME_CITY, IDS_AUTOFILL_DIALOG_PLACEHOLDER_LOCALITY },
111 { 15, ADDRESS_HOME_STATE, IDS_AUTOFILL_FIELD_LABEL_STATE }, 108 { 15, ADDRESS_HOME_STATE, IDS_AUTOFILL_FIELD_LABEL_STATE },
112 { 15, ADDRESS_HOME_ZIP, IDS_AUTOFILL_DIALOG_PLACEHOLDER_POSTAL_CODE }, 109 { 15, ADDRESS_HOME_ZIP, IDS_AUTOFILL_DIALOG_PLACEHOLDER_POSTAL_CODE },
113 { -1, ADDRESS_HOME_COUNTRY, 0 },
114 { 17, PHONE_HOME_WHOLE_NUMBER, 110 { 17, PHONE_HOME_WHOLE_NUMBER,
115 IDS_AUTOFILL_DIALOG_PLACEHOLDER_PHONE_NUMBER }, 111 IDS_AUTOFILL_DIALOG_PLACEHOLDER_PHONE_NUMBER },
116 }; 112 };
117 113
118 switch (dialog_section) { 114 switch (dialog_section) {
119 case SECTION_CC: 115 case SECTION_CC:
120 BuildInputs(kCCInputs, arraysize(kCCInputs), inputs); 116 BuildInputs(kCCInputs, arraysize(kCCInputs), inputs);
121 break; 117 break;
122 118
123 case SECTION_BILLING: 119 case SECTION_BILLING:
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 case SECTION_CC: 167 case SECTION_CC:
172 return AutofillMetrics::DIALOG_UI_CC_SELECTED_SUGGESTION_CHANGED; 168 return AutofillMetrics::DIALOG_UI_CC_SELECTED_SUGGESTION_CHANGED;
173 } 169 }
174 170
175 NOTREACHED(); 171 NOTREACHED();
176 return AutofillMetrics::NUM_DIALOG_UI_EVENTS; 172 return AutofillMetrics::NUM_DIALOG_UI_EVENTS;
177 } 173 }
178 174
179 } // namespace common 175 } // namespace common
180 } // namespace autofill 176 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698