Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further country specific customization of address fields #2254

Closed
hlaw opened this issue Jun 15, 2014 · 6 comments
Closed

Further country specific customization of address fields #2254

hlaw opened this issue Jun 15, 2014 · 6 comments
Labels
field An issue with a field in the user interface

Comments

@hlaw
Copy link
Contributor

hlaw commented Jun 15, 2014

In relation to #2252, using translation to incorporate country-specific placeholder to provide tagging info may work in the case when a language is closely tied to a single country, but not possible in general. Now that we have a vehicle to tailor the address presets per country, I think it would be useful to generalize the address-formats.json file a bit to allow further country specific customization - such as:

  • placeholders to including country specific tips
  • tool tips if necessary for further details (rather than enlarging the fields for placeholders)
  • OR a link to the country specific page for address format
  • (relative) width of the fields (currently hardcoded)
  • whether a field should be a combo box returning names of nearby features,
  • and if so,
    • what to search for (presently also hardcoded, e.g. addr:city will look for place=city/town/village)
    • probably extent of area to look for place=* nodes (if using Nominatim)

Something like (just for example):

{"countryCodes": ["vi"],
 "link" : [{"vi" : "Vi:Key:addr"}] ,
 "format":[[{"field":"housename", 
                  "placeholder":"Housename",
                  "width" : 1,
                  "combo" : false}] ,
           [{"field":"street", 
                  "placeholder":"Alley/street",
                  "width" : 2,
                  "combo" : true,
                  "matchtags" : ["highway"],
                  "values"  : ["name:vi", "name"]},
            {"field":"city", 
                  "placeholder":"City/Province",
                  "width" : 1,
                  "combo" : true,
                  "matchtags" : ["place=city", "place=province"],
                  "values"  : ["ref", "name:vi", "name"],
                  "Nominatim" : 10}], 
            ...
           ]
}
@1ec5
Copy link
Collaborator

1ec5 commented Jun 15, 2014

That’s a good point. I considered translating the placeholders more literally, but doing so would’ve persisted the confusion that I described in #2252. One consequence of the language being closely associated with one country is that foreign administrative structures are typically mapped to the same terminology used in Vietnam. But this proposal would be much more useful for English, which tends to use country-specific terminology.

Note that placeholders would still have to be defined outside of address-formats.json, so that they can be localized in Transifex.

@1ec5
Copy link
Collaborator

1ec5 commented Oct 16, 2014

Country-specific field names would also be useful for turning “Postcode” into the more recognizable “ZIP Code” for U.S. addresses.

@1ec5
Copy link
Collaborator

1ec5 commented Jan 4, 2017

(Cross-posting from #3639 (comment), since that’s a closed PR with little visibility.)

The Japanese address format added in #3712 is a perfect example of why we need the ability to translate the placeholders on a per-country basis. In Vietnamese, addr:county must be translated as “huyện” for Japan. But the same tag is also used in many other countries for administrative units that would be translated as “quận”, “hạt”, or “xứ”, where “huyện” would refer to a distinct administrative unit somewhere else in the hierarchy.

@bhousel
Copy link
Member

bhousel commented Jan 4, 2017

(Cross-posting my response 😆 )

Oh yeah I should have updated this ticket, but after looking at #3712, I do understand why this is important. addr:quarter and addr:province just look really out of place in a Japanese address.

@MKuranowski
Copy link
Contributor

(Also a cross-post)

The whole Japanese address system is complicated. To show this I've made this graph:

addr:province                PREFECTURE
                            /          \
addr:county                /        DISTRICT
                          /         /     \
addr:city               CITY     TOWN   VILLAGE
                           |       |    /
addr:suburb               WARD     |___/  
                             \    /
                              \__/
                               |
                              /\
                             /  \ 
addr:quarter            MACHI   OUAZA
                         |         |
                         |         |
addr:neighbourhood     CHOUME      AZA
                             \____/
                               |
                               /\
                              /  \
addr:block_number        BLOCK    \
                          |        \
                          |         \
addr:housenumber      HOUSE NO.    LOT NO. + sometimes LOT NO. EXTENSION

It has the common English translations of all fields. As you see the addr:quarter and addr:neighbourhood have completly different purposes than in other countries. The addr:province, addr:county addr:suburb have different names. And please note that Choume, Block and House No./Lot No. are all numeric, so a 123 placeholder for House No. is completly misleading.

That's why the country-specific placeholders are needed in Japan.

@bhousel
Copy link
Member

bhousel commented Mar 1, 2017

I think this was done in #3643

@bhousel bhousel closed this as completed Mar 1, 2017
@bhousel bhousel removed the wip Work in progress label Mar 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
field An issue with a field in the user interface
Projects
None yet
Development

No branches or pull requests

5 participants