openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.21k stars 914 forks source link

Language switcher on the homepage #1115

Open planemad opened 8 years ago

planemad commented 8 years ago

Got a query from a teacher in India on how to get his students to sign up on localized version of the OSM website.

Currently this does not seem possible and everyone is forced to use the English version till they are logged in and can access the language settings.

How about integrating the jquery universal language selector into the website. This will allow easy switching between any language in the world in a more usable way than having to know your language ISO code.

The uls is available on all Wikimedia sites and has been well optimized for performance.

tomhughes commented 8 years ago

We have long wanted to include a selector, the problem is not the technology to do so, it's finding screen real estate for the selector.

In any case, we use the browser language preferences when users aren't signed in, so I'm not sure why you are seeing such a problem unless you are dealing with poorly configured browsers.

tomhughes commented 8 years ago

That jquery thing certainly looks much more heavyweight than anything I was imagining.

planemad commented 8 years ago

Some of the features in the ULS:

To my knowledge its the most usable language selection list anyone has made till date. It could certainly use some trimming though, but the core works well.

planemad commented 8 years ago

so I'm not sure why you are seeing such a problem unless you are dealing with poorly configured browsers

Yes it is a case of poorly configured browsers. Unfortunately if the only language you know well is an Indic language and are a new computer user, its not very easy to navigate to these settings.

tomhughes commented 8 years ago

I did look at it, but it's quite hard even to figure out which bits of it are source and which bits are the files we would actually need to deploy. I think it's just the src, css and images directories we would need, but it's by no means clear.

I also found it quite hard to use myself, because many of the languages are only shown in their native scripts, which is fine for a native speaker but not very helpful for somebody like me trying to test it ;-)

In any case it's a major project to add it. Aside from working our the exactly how to import it into our vendor tree there needs to be somebody to design a control to trigger it, and space needs to be found for that control in our layout. We would also need to add support for a cookie based language override for non-logged in users and something to use that in preference to the browser derived language as the default when an account is created.

planemad commented 8 years ago

Its great that its on the radar atleast. Such features makes a huge difference when talking with local government officials.

tomhughes commented 8 years ago

I've put up a basic test site at http://locale.apis.dev.openstreetmap.org/ with jquery.uls integrated. Issues include:

simonpoole commented 8 years ago

I've played around with it a bit, IMHO

tomhughes commented 8 years ago

Showing the code was really just for debugging - it's not something I intend to be permanent. Equally showing the full name will use an awful lot of valuable space. Like I say the whole question of how to display the control needs work...

sabas commented 8 years ago

Something like this? (made in the chrome inspector) image

Would need tweaking the responsive bit (three li instead of two). When authenticated the language should be changed from the user profile, so it shouldn't need to be displayed...

planemad commented 8 years ago

@sabas this looks really promising :rocket:

Since screen real estate is important, maybe we can show this on the homepage only if a user is not logged in or has not set a preferred language. Once the language has been set we can resign this to just the user settings page.

tomhughes commented 8 years ago

Issues #132 and #133 relate to this.

ghost commented 5 years ago

Las cuestiones # 132 y # 133 se relacionan con esto.

Browsers do not offer all the languages that osm.org offers...

AntMadeira commented 4 years ago

Hi there. The current problem with languages on the OSM website is this: https://i.imgur.com/cqkIKxM.png

As you can see, there's no way of knowing which languages exist. If a dropdown is technically difficult, how about creating a link or icon with a pop up message listing the available language abbreviations? For example: two years ago, when I registered, I chose "pt" as the logical abbreviation to use in my account, but found out that, for some reason, there were Portuguese and English strings mixed all over the place. A few weeks ago, I discovered by trial and error, that I should have used "pt-pt", since I use European Portuguese. I think this is important for newcomers and newbies, and it would improve greatly their experience with OSM website.

Regards.

tomhughes commented 4 years ago

That sounds like a bug, though probably in how translatewiki map the languages.

We seem to have pt, pt-PT and pt-BR which is not really right - it would be better to have pt and pt-BR and I think that is what we originally have but TW has added in pt-PT which has kind of broken things.

AntMadeira commented 4 years ago

That may be right, I don't know, but the issue is that those who register for the first time, have no way of knowing what they should input on that box.

tomhughes commented 4 years ago

Well for most people we pick it automatically from their browser settings - having to configure it normally is a very unusual situation.

AntMadeira commented 4 years ago

Well, if the language is picked up from their browsers, there shouldn't be that box in the first place. But if it's there, it should teach people to used it correctly, rather than guessing. I know several people from Portuguese and Brazilian communities that had the same problem I had these last two years. Something that could be avoided with a simple tooltip info box.

migurski commented 4 years ago

Presumably it would be a drop-down selector choosing among our available options?

tomhughes commented 4 years ago

Well if you read the ticket you would know that is exactly what we are working on, though there's a bit of a question about where to find some space for a control to trigger it.

I even started trying to resurrect and update my previous work on this last night but I haven't quite got it working again yet.

migurski commented 4 years ago

Yup, it looked like there was some disconnect between the comments from five years ago and the ones from this morning. https://www.openstreetmap.org/user/{user}/account has a “Preferred Languages” text box that @AntMadeira calls out as a space for a control.

tomhughes commented 4 years ago

Yes but this is as much as anything about non-logged in users.

AntMadeira commented 4 years ago

Yes but this is as much as anything about non-logged in users.

Sorry, but I don't understand what this means. Can you elaborate? What @migurski said makes sense. The original issue was about a language switcher on the homepage, but what I'm talking about is a language selector or some kind of guide on the user's settings page.

AntMadeira commented 4 years ago

This month, two more new OSM users complained about this. Can someone take a look at this issue, please?

gravitystorm commented 4 years ago

Can someone take a look at this issue, please?

Please be patient. There are 390 other open issues and 43 open pull requests, and very few people working on any of them. If you look at the issues list, many are over 5 years old, and many of them are just as important as this one.

If you want to see something happen more quickly, then the best option is to make a pull request with your proposed solution. We can then review it and help you with that.

Also, please don't conflate multiple separate problems into one issue. This issue is about a language switcher on the homepage for people who don't have an account, whereas you are discussing a different topic, namely providing guidance for people setting their language preferences in their account settings. Mixing different topics together makes it harder to deal with either of them.

AntMadeira commented 4 years ago

Hi, gravitystorm.

I am patient. Almost 3 months without an answer is being patient. No matter how many open issues, people can still answer, discuss and explain things. That's what people do. I'm not a coder, I'm an humble mapper that receives questions about something that should be simple to solve and that causes problems to the Portuguese community.

For last, I did open a topic about the issue. You can find it here: https://github.com/openstreetmap/openstreetmap-website/issues/2581

As you can see, someone brought it to here and closed the issue.

Regards.

royjor2016 commented 7 months ago

it's terrible to see such an important and basic need is ignored for more than a decade.

it's not just the main page. these pages are also affected:

  1. https://community.openstreetmap.org/
  2. https://www.openstreetmap.org/help

how do you expect non registered users to get help then? when the whole website for your help pages is in a foreign incomprehensible language.

royjor2016 commented 7 months ago

sure, maybe you need time to figure out how to add a language selector.

but before you figure that out, can you at least add 1 basic solution? a button/link to force the ui appear in english.

you could maybe do a survey on how many percentage of OSM users actively use the site in english, or do not mind using the english interface. offer a way to switch it to the most highly used language (while you spend maybe another decade sitting on the language selector problem)!

HolgerJeromin commented 7 months ago

@royjor2016 The reason why this is no prio 1 feature is: The default view (without login) is shown in the language the browser requests. So if you are seeing a language you do not understand you should adjust your browser settings.

royjor2016 commented 7 months ago

@royjor2016 The reason why this is no prio 1 feature is: The default view (without login) is shown in the language the browser requests. So if you are seeing a language you do not understand you should adjust your browser settings.

my browser is english. my system is english. your website is not. and there's no way to change. your website is broken.

HolgerJeromin commented 7 months ago

your website is broken.

Please stay constructive.

What browser do you use? Chrome has this settings: chrome://settings/languages The Browser-UI language and requested website language can differ! What language do you see on osm.org?

Please try opening the page in incognito-mode

royjor2016 commented 7 months ago

@royjor2016 The reason why this is no prio 1 feature is: The default view (without login) is shown in the language the browser requests. So if you are seeing a language you do not understand you should adjust your browser settings.

here i quote from https://github.com/openstreetmap/openstreetmap-website/issues/133#issuecomment-9386132 from Oct 12, 2012

So if you're an english speaker using an internet cafe in Korea you may find it hard to use the site ;-)

so OSM do not consider this basic need? or do you expect users to mess with devices they dont own when they run into such situations, be it a public computer in the library, internet cafe or your friend's laptop?

royjor2016 commented 7 months ago

your website is broken.

Please stay constructive.

What browser do you use? Chrome has this settings: chrome://settings/languages The Browser-UI language and requested website language can differ! What language do you see on osm.org?

Please try opening the page in incognito-mode

i have set everything to english.

tomhughes commented 7 months ago

Yes we are aware that there are edge cases where it would be useful, but calling it a "basic need" is a bit extreme. In most cases auto selecting based on browser configuration works fine.

HolgerJeromin commented 7 months ago

Please focus. What are we discussing here?

AntMadeira commented 7 months ago

I just want to explain a bit better why this is a problem. OSM relies a great deal on the translation and localization of its texts, presets, core editor, tutorial and help so that newcomers can contact directly with the particularities of each language and/or region. The problem is many people nowadays use browsers in English, be it for professional reasons or simply because they prefer it that way. If OSM language is set automatically to the browser's language, the new mappers don't have a way to change the language and if they use iD or the tutorial, they see it in English and loose all the benefits of having OSM translated in their language.

This is a huge, huge let down for non-English communities and newcomers. Hope this can clarify why this is such an important feature.

systemed commented 7 months ago

while you spend maybe another decade sitting on the language selector problem so OSM do not consider this basic need your website is broken This is a huge, huge let down

Friendly suggestion - you are more likely to encourage unpaid volunteers to devote their spare time to implementing your chosen feature if you phrase your comments in moderate language and without hyperbole or insults.

HolgerJeromin commented 7 months ago

[...] many people nowadays use browsers in English, be it for professional reasons or because they prefer it that way. If OSM language is set automatically to the browser's language, the new mappers [...] loose all the benefits of having OSM translated in their language.

Just a side note: Sorry these two sentences collide in my brain.

When they use iD they have a login and are able to change language for themselves.

natrius commented 7 months ago

@royjor2016

You wrote

my browser is english. my system is english. your website is not. and there's no way to change.

and

when the whole website for your help pages is in a foreign incomprehensible language.

If you set everything in english, then what language does the help-page show? Because if its not english it seems to be a bug and needs a separate isse. You would do good in calming down a bit.

And to the topic of this issue: Yeah, i would like a language picker as well but i never had a problem.

AntMadeira commented 7 months ago

[...] many people nowadays use browsers in English, be it for professional reasons or because they prefer it that way. If OSM language is set automatically to the browser's language, the new mappers [...] loose all the benefits of having OSM translated in their language.

Just a side note: Sorry these two sentences collide in my brain.

When they use iD they have a login and are able to change language for themselves.

Can you explain how?

natrius commented 7 months ago

Top right, user-settings image

AntMadeira commented 7 months ago

Ok, and how do you know how to do that? I mean, how does a newbie know what to input in that field? Please, read: https://github.com/openstreetmap/openstreetmap-website/issues/2581