Closed Bug 925944 Opened 11 years ago Closed 8 years ago

"2 minutes ago" text is not localizable

Categories

(Input Graveyard :: Dashboard, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: willkg, Unassigned, Mentored)

Details

(Whiteboard: u=user c=dashboard p= s= )

On the dashboard, in the section that shows all the responses, there's some text for each response that tells you when the response was created. It's usually some delta from now and it's text like "2 minutes ago".

That's coming from a naturaltime filter and it's not localizeable.

This bug covers either figuring out why it's not localizeable and fixing it or ditching it for another option.
I'm tossing it in the 2013q4 sprint--seems like it's a good thing to fix.

This is a well-encapsulated bug that anyone could look into. The problem point is fjord/analytics/templates/analytics/dashboard.html around line 37:

    {{ feedback.created|naturaltime }}

That naturaltime filter is returning English text for all locales. Why? Can this be fixed? If not, what's an alternative that works better?

If you're interested in working on this, let me know in the bug comments or on IRC in the #input channel on irc.mozilla.org.
Priority: -- → P3
Whiteboard: u=user c=dashboard p= s=input.2013q4 [mentor=willkg]
I am ready to work on this. I am a total noob, thought starting with this bug would be better as u mentioned its encapsulated.
Assigning bug to hrishit!

If you need help, let me know.
Assignee: nobody → hripat1989
Hi! I haven't heard anything from you. Are you doing ok?
I haven't heard from hrishit in a couple of months, so unassigning and putting it back in the pool. Also, bumping it out of this quarter.
Assignee: hripat1989 → nobody
Whiteboard: u=user c=dashboard p= s=input.2013q4 [mentor=willkg] → u=user c=dashboard p= s= [mentor=willkg]
Mentor: willkg
Whiteboard: u=user c=dashboard p= s= [mentor=willkg] → u=user c=dashboard p= s=
I'm going to try to find out why it doesn't translate correctly (django's source code shows that translation is supported), and if I can't, I'll suggest using moment.js [0] instead. 

[0] http://momentjs.com/
Assignee: nobody → adrian
Status: NEW → ASSIGNED
Currently, this is localized on the server side. I think we should keep the localization on the server side if we can.
I wanted to file a bug about the "hours ago" string not appearing localized but found this one that may be related.

The next 3/6 strings are in Verbatim's .po file appearing as obsolete (~):

#~ msgid "{0} day ago"
#~ msgid_plural "{0} days ago"

#~ msgid "{0} hour ago"
#~ msgid_plural "{0} hours ago"

#~ msgid "{0} minute ago"
#~ msgid_plural "{0} minutes ago"

It looks like this happened in http://viewvc.svn.mozilla.org/vc/projects/l10n-misc/trunk/input/locale/en_US/LC_MESSAGES/django.po?r1=108455&r2=109260 .

Any chance this will be fixed soon?
Ton: That svn entry is dated 2012. That's when we switched from the old-outdated-busted Input to the rewritten Input. Why those strings aren't in the new Input .pot file isn't clear and that's what this bug is about.

Since those strings are just on the dashboard and not on a feedback form, it's not super high priority which is why I made this bug mentorable originally. Seemed like a good bug for a contributor.

I'm guessing Adrian isn't working on this anymore, though, since 6 months have gone by with no progress. Given that, I'm going to unassign it and put it back in the pool.
Assignee: adrian → nobody
Status: ASSIGNED → NEW
I was testing something on -stage and noticed this text is now translated. I don't know what happened between when this bug got filed and now, but it appears to be working.

Marking as WORKSFORME.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Will,

I’m sorry but I think you’re a bit wrong here, because:

- The strings involved are not in Verbatim and hence can never be displayed properly
- As you know, if nothing changed, nothing can be fixed by itself, in particular if the strings are lacking

I have monitored this behavior for a while and what I noticed is that on prod, none of them are localized OR, when logged in, part of those strings are. When looking at prod now, none of them are, and on stage, parts of then are. For instance, I now see:

2 dagen ago
4 dagen, 16 uren ago

First of all, "ago" isn’t localized, and second, the plural for hours in Dutch shoukd be singular (so "uur"). What apparently happens is that sometimes and in some occasions, parts of the strings are obtained from who know where and for what reason. Instead, the full (!) strings mentioned in comment 8 - probably including the parts before the comma if necessary (I haven’t checked) - should be reimplemented and display well in all cases. Words like "ago" should also display translated, and words like "minutes" in such strings should not be obtained in any other way (per word) than from the full strings themselves.

Can you please set the bug back to New/Confirmed and have this fixed or put back in the pool? It shouldn’t be that hard to fix it.
That's all very puzzling. I'll reopen.

If you think it's not hard to fix, please feel free to try.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
I’m sorry but I’m not into coding - just not my cup of tea and I’ð like to keep it that way.

Nevertheless this shouldn’t be that hard. I think it may go wrong because of combining the parts before and after the comma. Maybe if l10n is done by words, leaving out e.g. the plural rule thing, things may get easier. i.e. just provide l10n for "ago", "hour",  "hours", "day" etc and making sure they are not obtained from any other place might just do it.
(In reply to Ton from comment #13)
> I’m sorry but I’m not into coding - just not my cup of tea and I’ð like to
> keep it that way.
> 
> Nevertheless this shouldn’t be that hard. I think it may go wrong because of
> combining the parts before and after the comma. Maybe if l10n is done by
> words, leaving out e.g. the plural rule thing, things may get easier. i.e.
> just provide l10n for "ago", "hour",  "hours", "day" etc and making sure
> they are not obtained from any other place might just do it.

Please please please don't make statements about how easy something is to fix unless you know enough to do it. It's clear you haven't looked at the code, read the earlier comments or know what you're talking about. I find these statements frustrating to deal with because it puts me in a defensive position where I have to either spend the time to prove you wrong or let it hang in the air suggesting I don't know how to do my job. Further, it looks poorly on you and makes me wonder about other estimations you make. Let's not keep doing that.

Given that this has been around for 2 years and gone through a couple of assignees, I claim two things:

1. it's not impactful or important enough for someone to fix
2. it's not straightforward or easy

I'm pretty sure the problem has to do with use of the naturaltime filter. That's a good starting point for someone to look into this. I haven't looked into this further and probably won't in the near term since it has to do with the dashboard which is not a high priority part of the site.
Sorry for the above, personal feedback on it was done over IRC.

Meanwhile (and I know this bug has low priority), it looks like switching to momentjs would mainly do the trick, and some nits in it could be done outside Mozilla. Any chance of a foreseeable time to implement momentjs? Or would it also depend on someone volunteering?
I haven't gotten around to bug cleanup yet (because no one has been touching any of them) but Input's going to be replaced by a SurveyGizmo-powered survey for collecting feedback from users by November (when Persona auth goes away), so the dashboard isn't being actively maintained currently. Sorry.

For now, I'll mark this as WONTFIX.
Status: REOPENED → RESOLVED
Closed: 9 years ago8 years ago
Resolution: --- → WONTFIX
Product: Input → Input Graveyard
You need to log in before you can comment on or make changes to this bug.