Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

"Saved at" column displays the text "long" for non-English #2801

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 7 comments
Closed

"Saved at" column displays the text "long" for non-English #2801

openstreetmap-trac opened this issue Jul 23, 2021 · 7 comments

Comments

@openstreetmap-trac
Copy link

Reporter: hansfn
[Submitted to the original trac issue database at 10.11am, Thursday, 18th March 2010]

If your browser has for example Norwegian as preferred language, the "Saved at" column in the "History" tab displays the text "long" instead of the actual date.

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 10.34am, Thursday, 18th March 2010]

Then go to Translatewiki and add/change the relevant translation. We don't make changes to non-English translations directly, they all have to come via Translatewiki.

@openstreetmap-trac
Copy link
Author

Author: hansfn
[Added to the original trac issue at 11.23am, Thursday, 18th March 2010]

The text "long" doesn't come from the translation. It's a bug when converting the date from English to non-English - for example Norwegian. ("long" might indicate that the website framework considers the results of the conversion a long variable instead of a date.)

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 11.30am, Thursday, 18th March 2010]

It does come from a translation, but it's a rails translation not an OSM translation. The rails translations are here:

http://github.com/zargony/rails-i18n/tree/master/locale/

The specific problem will be the lack of a time.formats.long translation.

In fact I suspect the real problem is that the rails translations are using no-NB so aren't getting picked up and merged into the no translations that we use - nor would they get merged into the nb translations you are proposing.

I can arrange to alias things together but we need some sort of agreement on which codes exactly are equivalent... I assume that:

nb == no-NB
nn == no-NN

But should no also be aliased to nb for backwards compatibility? I don't really know what the history of all this is to be able to make a judgement.

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 11.31am, Thursday, 18th March 2010]

Actually http://github.com/svenfuchs/rails-i18n/tree/master/rails/locale/ is the master repository...

@openstreetmap-trac
Copy link
Author

Author: hansfn
[Added to the original trac issue at 11.46am, Thursday, 18th March 2010]

OK, thanks for the explanation. This makes me think Rails has messed up big time - a missing translation should always give the source text (the English string) so it is at least understandable. In addition Rails have manage to create their own language codes. Amazing.

Yes, "no" should be aliased to "nb". (nb == no-NB and nn == no-NN is also correct.)

PS! I looked at http://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/no-NB.yml and it seems time.formats.long is translated in that file. Could you apply it to the OSM website?

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 12.05pm, Thursday, 18th March 2010]

Rails does generally fall back to english, but there's a specific issue about the way it handles time formats that makes that fail.

What it does is look up time.formats (which returns an array of formats) and if it doesn't find that then it looks up time.formats in English. Then it looks up the format it wants in that array. The result is that if the array exists in your language, but doesn't have the specific format requested, then it fails to fall back.

I'll look at patching things up later on.

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 10.50pm, Thursday, 18th March 2010]

This should be fixed now. I've renamed the rails translations (as you say, the codes upstream are using are nonsense) and arranged to alias no and nb together.

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

No branches or pull requests

1 participant