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

"%{variable} ago" cannot be translated to some languages (incl. Hungarian) #4968

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

Comments

@openstreetmap-trac
Copy link

Reporter: kempelen
[Submitted to the original trac issue database at 7.23am, Wednesday, 28th August 2013]

There are several strings for OpenStreetMap.org website GUI that use a combination of "{variable}" for a time period and followed by word "ago".

The strings related to changes to NOTES:

2 hours ago

The string related to license acceptance:

2 years ago

"hours ago" is a single modified word of "hours" in Hungarian, so it cannot be translated separately. Also "years ago", "minutes ago" and so on.

2 hours -> 2 ra
ago -> ta
2 hours ago -> 2 rja

While current resulting string: "2 ra ta", that means "since 2 o'clock" which is totally false.

Some of the affected strings:

{{PLURAL|one=1 hour|%{count} hours}}

%{when} ago

Created %{when} ago

Accepted %{ago} ago

Recommended solution:

Possible solution 1:

Created %{when} hours ago
Created %{when} minutes ago
Created %{when} years ago

Or another solution:

%{count} hours ago
%{count} hours (if this format is also needed, make separate string)
%{count} years ago
%{count} years

But the first might be more secure for more languages, as that also allows to freely modify the order of words and so on.

@openstreetmap-trac
Copy link
Author

Author: TomH
[Added to the original trac issue at 11.21pm, Wednesday, 28th August 2013]

The problem here is that we don't control the whole chain as part of the work is being done by rails - the substituted text "X hours", "Y days", "just now" etc comes from a rails method that generates a "friendly" description of the date.

So without recreating all the work that rails does to select the various different forms of date, and then using a different string in our translations for each one, it's not clear what we can actually do here.

@openstreetmap-trac
Copy link
Author

Author: osm[at]gravitystorm.co.uk
[Added to the original trac issue at 12.15pm, Wednesday, 12th June 2019]

Moved to openstreetmap/openstreetmap-website#2255

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