Id: Localize walkthrough addresses

Created on 21 Apr 2017  路  10Comments  路  Source: openstreetmap/iD

from @magol https://github.com/openstreetmap/iD/pull/3921#issuecomment-296098243

  • [x] When I select a node, It do not view the localized street name.
  • [x] The address scheme should be localized to. In Sweden, the attribute "state" has no meaning and the fields is in the wrong ordet.
  • [x] In addition, I have noted that it is somewhat inconsistent with period in the end of sentence of some instructions.

also:

  • In the beginning of the walkthrough for buildings, it say that the building is clearly a house. But in the description for house on the wiki, it say that a house forming half of a semi-detached pair, or one of a row of terraced houses. And dit house is clearly detached. Maybe I misunderstand.
walkthrough-help

Most helpful comment

Looks like this worked!
addr:state is gone now...

  • [x] I'll add some instructions for translators about how to do this, then close the issue

screenshot 2017-04-22 12 47 17

All 10 comments

In the beginning of the walkthrough for buildings, it say that the building is clearly a house. But in the description for house on the wiki, it say that a house forming half of a semi-detached pair, or one of a row of terraced houses. And dit house is clearly detached. Maybe I misunderstand.

Re: the OSM Wiki for house, I think we should just leave it as is.

The entry for building=house just says:

A single dwelling usually inhabited by a single household, such as a single family or small group of people sharing a kitchen and living space.
Houses forming half of a semi-detached pair, or one of a row of terraced houses, should share at least two nodes with joined neighbours.

The entry for building=detached says:

A free-standing residential building usually housing a single-family.
Known as a single-family home in the United States, a single-detached dwelling in Canada, and a separate house in New Zealand.
If the building shares a wall with another building (forming half of a semi-detached pair, or one of a row of terraced houses) then it should be rather tagged building=house.

So.. my understanding is that building=house can be attached or detached. Also the discussion pages for these wiki entries indicate that some people think that the overly specific house tags should maybe be deprecated.

Even though the building that is being traced in the tutorial could also be tagged as a building=detached, or building=residential, or even building=yes, I don't see a need to make it more complicated than it already is.

I fixed these issues... I'm leaving this open just to make sure that what I did actually worked, which will require Transifex to pick up the new strings tonight and someone to translate some address details.

A few more details about this:

The address scheme should be localized to. In Sweden, the attribute "state" has no meaning and the fields is in the wrong order.

It's not _perfect_ but here is what I did to allow people to control the address field appearance:

  • There is a translation string now intro.graph.countrycode which takes a 2-letter country code, and this will control how the address field looks. I know that languages don't map perfectly to countries, but this is the best we can do for right now.
  • The mapping between country codes to address formats can be found in address-formats.json. For each translation, the translator can pick one country's format that most speakers of the language will find acceptable. You could also set intro.graph.countrycode to something fake, like 'ZZZ' or 'N/A', and the address field will use the default format which is pretty generic.
  • There are translation keys for all the different address parts that might be found in all of these address formats. For example, intro.graph.suburb, has the string "<value for addr:suburb>". If your address format needs a "suburb", you can translate that string with something that sounds reasonable, otherwise you can just translate it as-is and it will be ignored when the walkthrough localizes itself.

Huge thanks also to @1ec5 for helping brainstorm different approaches to this very tricky problem of localizing addresses. I think it's important for our walkthrough town to be fairly complete, and that includes having good example addresses for new mappers to see.

Thanks @bhousel @1ec5 for the nice work of localization in such great details.

What happens in the side panel for tags:

  • dataAddressFormats is perfect for the Address section
  • unwanted tag "addr:state=MI" still appear in the All tags section

A few requests:
I miss the string "<value for addr:state>". I want it to be empty for my lang/country.
All I have is a string "MI", but it does not have the same effect.
It would also be nice to modify "<value for addr:postcode>".
edit: I found the postcode string 49093, but the same scheme "<value for addr:*>" would be nice for all items.

I miss the string "". I want it to be empty for my lang/country.

I just translated the "MI" as "<value for addr:state>" in French. Let's wait a few minutes and check http://preview.ideditor.com/master/ to see if it worked. I think it might...

BTW, this is interesting - Transifex warns you if the number is different? I didn't know about that.
I wonder if we can disable this warning.

screenshot 2017-04-22 10 34 17

I just translated the "MI" as "<value for addr:state>" in French. Let's wait a few minutes and check http://preview.ideditor.com/master/ to see if it worked.

Still no luck for me.

Different numbers warning is midly annoying but bearable :wink:

I just translated the "MI" as "<value for addr:state>" in French. Let's wait a few minutes and check http://preview.ideditor.com/master/ to see if it worked.

Still no luck for me.

Ok, I found why.. Just pushed a fix in 0782ee1
Let's test the preview link again in a few minutes..

My intention is to have the strings in angle brackets just not show up in the address at all.

I found here how to setup the warnings and errors. It won't warn about changing numbers anymore.

Looks like this worked!
addr:state is gone now...

  • [x] I'll add some instructions for translators about how to do this, then close the issue

screenshot 2017-04-22 12 47 17

Just added the instructions to Transifex! closing..

Was this page helpful?
0 / 5 - 0 ratings