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

Use Portuguese-limited images in pt-BR #6156

Closed
virgilinojuca opened this issue Apr 8, 2019 · 8 comments
Closed

Use Portuguese-limited images in pt-BR #6156

virgilinojuca opened this issue Apr 8, 2019 · 8 comments
Labels
localization Adapting iD across languages, regions, and cultures

Comments

@virgilinojuca
Copy link

In #3776 I mentioned that an unification from Portuguese (Pt:) and Brazilian Portuguese (Pt-br:) languages was carried out in the wiki. In iD, though, there are still two different localizations.

When iD is set to pt-BR and the ℹ️ button is clicked to get more info on a certain tag or key, it correctly retrieves text from the wiki item descriptions in Portuguese. However, they do not retrieve images that are limited to language (P26) Portuguese-language documentation (Q7807); they retrieve the image with no specific qualifier. A good example for testing this is amenity=telephone (Q5027).

On the other hand, if iD is set to pt, it correctly shows the image with the P26:Q7807 qualifier. Can you make the same for pt-BR?

@bhousel bhousel added the localization Adapting iD across languages, regions, and cultures label Apr 8, 2019
@1ec5
Copy link
Collaborator

1ec5 commented Apr 8, 2019

I’m pretty sure the “limited to language” qualifiers were intended as a temporary compatibility shim for the fact that different translations of a tag’s description page had diverged in terms of images, required tags, or other details – but I don’t think it was intended to be a way to promote such differences.

Pay phone designs are specific to geography, regardless of language. (An English speaker mapping in Brazil would benefit as much from seeing the Belo Horizonte pay phone as a Portuguese speaker would.) @nyurik, this sounds like a case for introducing an “in region” qualifier and geographical region items to go along with it.

@nyurik
Copy link
Contributor

nyurik commented Apr 8, 2019

@1ec5 I agree, we ought to start moving to "limited to region" qualifiers. I wonder if we should pre-populate all countries? Or create bigger regions? Or just let users create them as needed?

Regions are tricky because each editor will need to convert object's location to a locale ID - e.g. by downloading all country shapes, and calculating which country a point belongs to, and then looking at the data item's qualifier to determine the right value to use. But at the same time we would often want multiple countries in the same region - e.g. many European countries might share the same image for a road sign, so we wouldn't want to list them all in every data item, but instead have one "Europe's common signs region" thingy :)

I would propose this path:

Data items:

  • create a region includes country code wikibase string property (country code is easier for editors to download than to download each item and convert it to a code)
  • start creating "regions", e.g. for this case:
    • label = Brazil region (should it include other nearby countries?)
    • instance of = geographical region
    • region includes country code = BR
  • create a limited to region wikibase item property and use it on amenity=telephone (Q5027).

iD and other editors

  • create a topojson file with ID == country code (possibly with a few extras that have a complex status)
  • whenever code sees limited to regions property, download that data item(s), download the above topojson (this can pre-cached), convert current map position into a country ID, and check if the "region item" matches calculated country ID.

@1ec5
Copy link
Collaborator

1ec5 commented Apr 8, 2019

Regions are tricky because each editor will need to convert object's location to a locale ID - e.g. by downloading all country shapes, and calculating which country a point belongs to, and then looking at the data item's qualifier to determine the right value to use.

iD already has code that geocodes the current viewport down to a country level using Nominatim.

nominatim.countryCode(center, countryCallback);

@nyurik
Copy link
Contributor

nyurik commented Apr 8, 2019

wonderful, thanks. Any thoughts about the rest of the proposal? Should we move it to Talk:Wiki or Talk:Data Item ?

@1ec5
Copy link
Collaborator

1ec5 commented Apr 9, 2019

Yeah, let’s continue the discussion on this wiki page. As a wiki contributor, I think it would be much less awkward to be able to qualify these images by countries rather than languages.

In the meantime, as a temporary workaround, the item can make two claims with the same image but qualified with different languages (pt versus pt-BR). iD should be able to pick up the right image in both localizations.

@bhousel
Copy link
Member

bhousel commented Apr 23, 2019

In the meantime, as a temporary workaround, the item can make two claims with the same image but qualified with different languages (pt versus pt-BR).

I don't really understand this issue.. Can it be closed by the above (just add 2 properties to the wikibase)

@virgilinojuca
Copy link
Author

In the meantime, as a temporary workaround, the item can make two claims with the same image but qualified with different languages (pt versus pt-BR).

I don't really understand this issue.. Can it be closed by the above (just add 2 properties to the wikibase)

There is no "Brazilian Portuguese-language documentation" data item to use with the P26 property. I don't know how to create a new item nor I know if I should.

@nyurik
Copy link
Contributor

nyurik commented Apr 23, 2019

I just added a new section describing how to set geographical regions. @virgilinojuca if you want to create a new region, simply create a new data item using the special page, set instance-of = Q19531, and set P49 to "BR". See first link for documentation.

Once implemented in iD, it will be able to show the right image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
localization Adapting iD across languages, regions, and cultures
Projects
None yet
Development

No branches or pull requests

4 participants