Repository: saleor/saleor

Issue:
Rename address fields
![screenshot](https://i.imgur.com/lugvcZp.png)

I think we should rename 'Address' and 'Address' to 'Address 1' and 'Address 2' or, even better, we could change the logic of addresses.

For example, Amazon, we have a field set "Street", then inside it:
- Street and number, P.O. box,
- Apartment, suite, building, floor, etc.

![screenshot](https://i.imgur.com/M7AYMaE.png)

We don't need to use placeholders, event just as labels "Address 1 (Street and number, ...)", "Address 2 (...)".

I get negative feedbacks on this part as being confusing, and get the questions "What is it?" and "What is address 1 and 2?.


Discussion:
We should only display one "Address" label. I like what Amazon and Shopify do in this regard, they display one label and use placeholders to provide hints.
@Pacu2 Can You assign me for this issue?
@patrys, @Pacu2 Can you tell me if this looking good?
<img width="1173" alt="bez nazwy" src="https://user-images.githubusercontent.com/7680353/44152361-a0edf492-a0a5-11e8-8546-491a233e425c.png">

@tomcio1205 Looks good to me

Resolving patch:
diff --git a/saleor/account/i18n.py b/saleor/account/i18n.py
--- a/saleor/account/i18n.py
+++ b/saleor/account/i18n.py
@@ -14,7 +14,6 @@
 COUNTRY_FORMS = {}
 UNKNOWN_COUNTRIES = set()
 
-
 AREA_TYPE_TRANSLATIONS = {
     'area': pgettext_lazy('Address field', 'Area'),
     'county': pgettext_lazy('Address field', 'County'),
@@ -61,9 +60,7 @@ class AddressMetaForm(forms.ModelForm):
     class Meta:
         model = Address
         fields = ['country', 'preview']
-        labels = {
-            'country': pgettext_lazy(
-                'Country', 'Country')}
+        labels = {'country': pgettext_lazy('Country', 'Country')}
 
     def clean(self):
         data = super().clean()
@@ -115,6 +112,11 @@ class Meta:
                 'Country area', 'State or province'),
             'phone': pgettext_lazy(
                 'Phone number', 'Phone number')}
+        placeholders = {
+            'street_address_1': pgettext_lazy(
+                'Address', 'Street address, P.O. box, company name'),
+            'street_address_2': pgettext_lazy(
+                'Address', 'Apartment, suite, unit, building, floor, etc')}
 
     phone = PossiblePhoneNumberFormField(
         widget=PhonePrefixWidget, required=False)
@@ -131,6 +133,8 @@ def __init__(self, *args, **kwargs):
             else:
                 autocomplete = autocomplete_dict[field_name]
             field.widget.attrs['autocomplete'] = autocomplete
+            field.widget.attrs['placeholder'] = field.label if not hasattr(
+                field, 'placeholder') else field.placeholder
 
 
 class CountryAwareAddressForm(AddressForm):
@@ -213,6 +217,10 @@ def update_base_fields(form_class, i18n_rules):
         field = form_class.base_fields[field_name]
         field.label = label_value
 
+    for field_name, placeholder_value in AddressForm.Meta.placeholders.items():
+        field = form_class.base_fields[field_name]
+        field.placeholder = placeholder_value
+
     if i18n_rules.country_area_choices:
         form_class.base_fields['country_area'] = CountryAreaChoiceField(
             choices=i18n_rules.country_area_choices)
@@ -241,7 +249,7 @@ def construct_address_form(country_code, i18n_rules):
     form_kwargs = {
         'Meta': type(str('Meta'), (base_class.Meta, object), {}),
         'formfield_callback': None}
-    class_ = type(base_class)(str(class_name), (base_class,), form_kwargs)
+    class_ = type(base_class)(str(class_name), (base_class, ), form_kwargs)
     update_base_fields(class_, i18n_rules)
     class_.i18n_country_code = country_code
     class_.i18n_fields_order = property(get_form_i18n_lines)


Test patch: