"X days ago" and similar strings lack placeables



Cloud Services
Server: Firefox Accounts
2 years ago
2 years ago


(Reporter: Rimas Kudelis, Assigned: vladikoff)


Firefox Tracking Flags

(Not tracked)





2 years ago
Not sure if this is the right component for this bug, so please move if necessary.

While reviewing translation suggestions for Firefox Accounts, I've found a bunch of "X foos ago" strings, which lack placeables, thus aren't fully localizeable.

The strings are defined here (thanks Axel for finding them!):

Please convert them to ones with placeables if possible. Thanks!
Thanks Rimas.  These strings are actually a deliberate attempt to *avoid* placeables because we had trouble getting them right in the past.  More context here:


The strings are used to refer to vague timeframe, not a specific time.  @vladikoff gives some good examples in the linked issue, along the lines of "The train to the city left hours ago".

Does this make sense?

Comment 2

2 years ago
I had a suspicion this might be the case.

I'm not sure I like this though. I would need to add a qualifier in my locale anyway. I could translate it to something like "a few hours ago", but wouldn't that be kind of inaccurate with small numbers like 1, or large like 20?

Comment 3

2 years ago
I guess I could work this around creatively by going with "Less than an hour ago" for minutes, "Less than a day ago" for hours and so on. But what was the problem with the placeables anyway?

Also, would they still work if I kept them in the locale?


2 years ago
Assignee: nobody → vlad

Comment 4

2 years ago
This was fixed in https://github.com/mozilla/fxa-content-server/pull/4033

From Pontoon translation point of view you just need to translate this: 
t('Last active: %(translatedTimeAgo)s')

`translatedTimeAgo` variable will be already translated if the locale is supported.
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.