Opened 5 years ago

Last modified 5 years ago

#4968 new defect

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

Reported by: kempelen Owned by: rails-dev@…
Priority: minor Milestone:
Component: website Version:
Keywords: Cc:

Description

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 órája

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.

Change History (1)

comment:1 Changed 5 years ago by TomH

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.

Note: See TracTickets for help on using tickets.