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

Preferred Language "de-DE" (in Openstreetmap.org/My Settings/Preferred Languages) is not recognised as German while "de" is #2528

Closed
manfredbrandl opened this issue Feb 12, 2015 · 15 comments

Comments

@manfredbrandl
Copy link
Contributor

User Interface is german in the first line und Englisch in der zweiten Zeile.
image
.
Chromium Version 37.0.2062.120 Built on Debian 7.6, running on Debian 7.8 (281580) (64-bit)
Iceweasel Version 31.4.0, running on Debian 7.8 (281580) (64-bit)
Safari on iOS 8.1.3

@manfredbrandl manfredbrandl changed the title Mixing Languages German and English User Interface mixes languages German and English in menu Feb 13, 2015
@TheFive
Copy link

TheFive commented Feb 14, 2015

Same for Me.
Chrome 40.0.2214.111 (64-bit) on Mac OS-X 10.9.5.
Safari Version 7.1.3 (9537.85.12.18) on Mac OS-X too.

@donovaly
Copy link

I have the same problem with Firefox 35.0.1 on Windows 7.

@ImreSamu
Copy link

If I set Openstreetmap.org . "My Settings" / "Einstellungen" .

  • "Preferred Languages" / "Bevorzugte Sprachen:" to "de-DE"

THEN I get similar result.
But with "Preferred Languages" = "de" is OK.

Can you provide

maybe related to this #723

2 language file exists:

@TheFive
Copy link

TheFive commented Feb 15, 2015

My browser language is "DE".
My OpenStreetMap preferred Languages is "de-DE,de,en-US,en" (don't ask my why :-))

@TheFive
Copy link

TheFive commented Feb 15, 2015

switching to the preferred language "de" will work for ID.
I do not know, if they are some implications of this change to other OSM App. (I do not know the difference between DE-DE and DE, either)

@manfredbrandl
Copy link
Contributor Author

My OSM-Language-Settings were "de-DE,de,en-US,en", After changing to "de,de-DE,en-US,en" iD shows the German menu. My browser language code is "en-US".

@manfredbrandl manfredbrandl changed the title User Interface mixes languages German and English in menu Preferred Language "de-DE" (in Openstreetmap.org/My Settings/Preferred Languages) is not recognised as German while "de" is Feb 17, 2015
@bhousel
Copy link
Member

bhousel commented Feb 24, 2015

It looks like the last time I ran make translations it pulled down an empty
de-DE.json file (and others) from Transifex.

The quick fix is to just remove the empty files.. The better fix is maybe: if detecting a culture code (e.g. de-DE), also load in the language code (de), and use it as a fallback in the t() function.

@jfirebaugh thoughts?

@jfirebaugh
Copy link
Member

Ideally we would follow the user's preferred fallback order, e.g. de-DE,de,en-US,en, but we might have to balance that with not making too many requests for individual files.

@bhousel
Copy link
Member

bhousel commented Feb 24, 2015

The rails site is only sending us the first one from the list...
(though we could change that)

@tomhughes
Copy link
Member

It is probably better for you to be consistent with what we do for the web site code though - we select the primary locale by matching against the user's list but once we have done that we don't do any fallback along that list. We do however fallback from de-DE to de.

Falling back along the user's language list could give really weird results if they have listed a number of unrelated languages that they happen to speak.

So basically we choose a language, and set it in I18n.locale and then relay on I18n::Backend::Fallbacks to do the fallbacks, which just falls back to parent locales basically (one exception is that we add a mapping from no to nb to cope with Norwegian weirdness) and then eventually to english.

@tomhughes
Copy link
Member

For now I have removed all the empty locales from iD in the web site repository, namely:

  • vendor/assets/iD/iD/locales/de-DE.json
  • vendor/assets/iD/iD/locales/en-DE.json
  • vendor/assets/iD/iD/locales/gan.json
  • vendor/assets/iD/iD/locales/hi-IN.json
  • vendor/assets/iD/iD/locales/km.json
  • vendor/assets/iD/iD/locales/km-KH.json
  • vendor/assets/iD/iD/locales/nn.json
  • vendor/assets/iD/iD/locales/ru-RU.json
  • vendor/assets/iD/iD/locales/sq-AL.json
  • vendor/assets/iD/iD/locales/sq.json
  • vendor/assets/iD/iD/locales/sr-RS.json
  • vendor/assets/iD/iD/locales/zh-CN.GB2312.json

@jfirebaugh
Copy link
Member

I've removed de-DE, en-DE, km-KH, ru-RU, sq-AL, sr-RS, and zh-CN.GB2312 on Transifex -- those were probably a misunderstanding. Keeping the empty language code ones, someone might actually want to start translating those. We might want to drop empty translations in the processing script on the iD side though.

@manfredbrandl
Copy link
Contributor Author

Now the behavior is as expected on www.openstreetmap.org. Just tested for de-DE. Who does close this issue?

@bhousel
Copy link
Member

bhousel commented Mar 18, 2015

Now the behavior is as expected on www.openstreetmap.org. Just tested for de-DE. Who does close this issue?

The issue can stay open, because removing the empty translation files is not a permanent fix. (It may pop up again next time we release).

@ImreSamu
Copy link

ImreSamu commented May 4, 2015

I have created a simple statisctics from changesets for iD Editor - locale :

https://gist.github.com/ImreSamu/aebfa8316b32941e562a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants