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

Localize walkthrough addresses #3976

Closed
3 tasks done
bhousel opened this issue Apr 21, 2017 · 10 comments
Closed
3 tasks done

Localize walkthrough addresses #3976

bhousel opened this issue Apr 21, 2017 · 10 comments
Labels
walkthrough-help An issue with the walkthrough or help pane

Comments

@bhousel
Copy link
Member

bhousel commented Apr 21, 2017

from @magol #3921 (comment)

  • When I select a node, It do not view the localized street name.
  • The address scheme should be localized to. In Sweden, the attribute "state" has no meaning and the fields is in the wrong ordet.
  • 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.
@bhousel bhousel mentioned this issue Apr 21, 2017
11 tasks
@bhousel
Copy link
Member Author

bhousel commented Apr 21, 2017

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.

@bhousel bhousel added the walkthrough-help An issue with the walkthrough or help pane label Apr 21, 2017
@bhousel
Copy link
Member Author

bhousel commented Apr 21, 2017

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.

@bhousel bhousel added the wip Work in progress label Apr 22, 2017
@althio
Copy link
Contributor

althio commented Apr 22, 2017

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.

@bhousel
Copy link
Member Author

bhousel commented Apr 22, 2017

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...

@bhousel
Copy link
Member Author

bhousel commented Apr 22, 2017

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

@althio
Copy link
Contributor

althio commented Apr 22, 2017

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 😉

@bhousel
Copy link
Member Author

bhousel commented Apr 22, 2017

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.

@bhousel
Copy link
Member Author

bhousel commented Apr 22, 2017

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

@bhousel
Copy link
Member Author

bhousel commented Apr 22, 2017

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

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

screenshot 2017-04-22 12 47 17

@bhousel
Copy link
Member Author

bhousel commented Apr 22, 2017

Just added the instructions to Transifex! closing..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
walkthrough-help An issue with the walkthrough or help pane
Projects
None yet
Development

No branches or pull requests

2 participants