Closed Bug 377757 Opened 17 years ago Closed 17 years ago

French display for discussion age is messed up

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: xavier, Assigned: wenzel)

References

Details

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 XPCOMViewer/0.9.5
Build Identifier: 

In french locale, the age for discussions appear with duplicated words :
"publié il y a il y a 1 heure jours"
shoud be
"publié il y a 1 heure"

When posts are older, another problem appears:
"publié il y a 09.04.2007 jours"
should be
"publié le 09.04.2007"






Reproducible: Always

Steps to Reproduce:
1.
2.
3.
On which url?
For me, even by switching to french, when i try to go to discussion, the url is automatically change to en-US
(exemple: clicking on https://addons.mozilla.org/fr/firefox/discussions/?AddOnID=1865
change automatically the url to this locale: https://addons.mozilla.org/en-US/firefox/discussions/ ... and so, all discussion are shown, in english

Other page can be browsed in french ...
Maybe it is specified to my firefox version (Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.4pre) Gecko/20070412 BonEcho/2.0.0.4pre ID:2007041203) where i'm in Bon Echo and not Firefox ... en in US language version ...

so, it is an other bug :-)


so, coming back to this bug, i confirm it (using IE7, what a shame :-)
Example here: https://addons.mozilla.org/fr/firefox/discussions/?AddOnID=1865
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: 366239
This is a general problem with a bad l10n string in the discussions which has to be solved for all locales. When these strings were introduced, they did not take account of the uniqueness of languages.

In particular, while we can solve half the problem for French, the "le *date*" is currently not possible.

I therefore suggest we redo the this particular set of tags so we don't run into this problem over and over again.
Since this is an issue containing a lot of localizer action, marking for 3.x .
Target Milestone: --- → 3.x (triaged)
Assignee: nobody → fwenzel
Target Milestone: 3.x (triaged) → 3.2
Alright, I deprecated the old strings and replaced them. I also added a wrapper for the date, so it can be embedded grammatically correct for the specific language.

Note that this still only enables people to have the same word order for the "2 days ago" and "date" sentences, such as: "comment made by %1$s %2$s" where %2 is the date or time difference, respectively. Let me know if you believe this does not accommodate other languages well enough; for now, I personally think all our current locales would be fine with this change. (Allowing different word orders for the two sentence types would require significantly deeper code changes.)
Attachment #267700 - Flags: review?(clouserw)
Comment on attachment 267700 [details] [diff] [review]
Patch for forum date-related l10n strings

I think the word order issue is getting out of the realm of localized strings and into just trying to use them as general parameters, and it's going to end up more complicated than it needs to be, and we'll probably need to redo it when a language doesn't support that ordering (and I'd bet we come across one).

What do you think of just making these strings:

forum_comment_by_name_on_date
forum_last_comment_by_name_on_date
forum_comment_by_name_x_days_ago
forum_last_comment_by_name_x_days_ago

And then use the same php logic to determine which one to display?  I'm r-'ing the attachment, but I can help make a new one if you want.
Attachment #267700 - Flags: review?(clouserw) → review-
Hm. The problem is that there are not only "days ago" but also hours, minutes and seconds, each of which can have singular and plural forms.

I have a feeling we should simplify this somehow: I am almost inclined only to show the date + time, no matter when a comment was posted.

Thoughts?
We've already got forum_x_(days|hours|minutes|seconds)_ago strings - I don't think it would be excessive to remove them and add the new strings.  ngettext() can take care of the singular/plural differences.  So, the new strings would be adding:

forum_comment_by_name_on_date
forum_last_comment_by_name_on_date
forum_comment_by_name_x_days_ago
forum_last_comment_by_name_x_days_ago
forum_comment_by_name_x_hours_ago
forum_last_comment_by_name_x_hours_ago
forum_comment_by_name_x_minutes_ago
forum_last_comment_by_name_x_minutes_ago
forum_comment_by_name_x_seconds_ago
forum_last_comment_by_name_x_seconds_ago

Adding the @partial tags, english fallback checks, and asking localizers to change stuff they've already done is getting old though. I wouldn't object to making it date+time always. ;)
Alright. This patch now always displays the date+time instead of the complicated logic used before.
Attachment #267700 - Attachment is obsolete: true
Attachment #268331 - Flags: review?(clouserw)
Attachment #268331 - Flags: review?(clouserw) → review+
Alright, I committed this fix (SVN r4532). Let's hope this makes it easier for localizers to translate the two tags, because there's no irritating "x_days_ago" in the msgid anymore.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: