We are currently working hard to translate Drupal 6 in french (the effort is coordinated here: http://drupalfr.org/d6-translation). This is the first (and hope for the best, the last one) translation-related bugs we spotted.

In modules/update/update.report.inc, we have an untranslatable string t('ago').

Trivial patch included (patch against HEAD). Marked at critical to get the attention it deserves.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Priority: Critical » Normal
Status: Active » Needs review

Good catch. This does not make it a critical bug though :) Critical means Drupal does not work without the bug fixed. Let me assure you that I watch for translatability problems, and this 'ago' thing was on my radar, but thankfully you got around to it :)

Are you aware of http://groups.drupal.org/node/7843 which could help with some more fixes here? (but I would suggest only picking the non-controversial things, and those without existing issues).

Damien Tournoud’s picture

Gábor, thanks for your hard work on getting Drupal more translation-friendly. I was unsure such non-critical bugs were getting attention these RC1 days. I'll try to contribute to the other issues you spotted.

bdragon’s picture

Version: 6.0-rc1 » 6.x-dev
Status: Needs review » Needs work

Looking at the code, I think the "never" case is wrong.

It seems to me like it would just print "Never" instead of "Last checked: never".

Also, resetting status.

Damien Tournoud’s picture

Version: 6.x-dev » 6.0-rc1
Status: Needs work » Needs review
FileSize
915 bytes

Right, my bad.

Here is a corrected patch.

Damien Tournoud’s picture

Version: 6.0-rc1 » 6.x-dev

Reverting version change.

Gábor Hojtsy’s picture

Status: Needs review » Fixed

Well, Drupal 6 is an internationalization release, so we should fix these kinds of bugs as well :) Committed the patch from #4. Thanks.

dww’s picture

Can someone explain why the original code was wrong? I don't understand what makes t('ago') untranslatable. The new code seems needlessly complicated and duplicates some things, so I'd like to learn what's wrong with the code I originally wrote for this. ;) Thanks.

keith.smith’s picture

dww: I dunno. I gather it is difficult to find an equivalent translation in some languages, given the context provided in the t string, as pointed out at http://drupal.org/node/203710#comment-669335.

dww’s picture

Ahh, ok. So it's not technically untranslatable, it's just difficult without context. Sure. Thanks for clarifying.

Gábor Hojtsy’s picture

dww: generally t(.....) is better then t(..) . t(..) . t(..), when the t()-ed strings are short. Concatenation does not allow reordering of the parts in the translation, which would be required in some languages, and the sort strings such as t('ago') are not translatable in most languages as-is, as you cannot have an equivalent word. (Hungarian uses word suffixes, so we cannot translate 'ago' into any meaningful word. What we do is we reformat the sentence a bit to say something like "Time elapsed: @time" instead of "@time ago").

dww’s picture

Yup, makes perfect sense. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.