Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | d6-locale-update-ago-v2.patch | 915 bytes | Damien Tournoud |
d6-locale-update-ago.patch | 902 bytes | Damien Tournoud | |
Comments
Comment #1
Gábor HojtsyGood 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).
Comment #2
Damien Tournoud CreditAttribution: Damien Tournoud commentedGá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.
Comment #3
bdragon CreditAttribution: bdragon commentedLooking 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.
Comment #4
Damien Tournoud CreditAttribution: Damien Tournoud commentedRight, my bad.
Here is a corrected patch.
Comment #5
Damien Tournoud CreditAttribution: Damien Tournoud commentedReverting version change.
Comment #6
Gábor HojtsyWell, Drupal 6 is an internationalization release, so we should fix these kinds of bugs as well :) Committed the patch from #4. Thanks.
Comment #7
dwwCan 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.
Comment #8
keith.smith CreditAttribution: keith.smith commenteddww: 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.
Comment #9
dwwAhh, ok. So it's not technically untranslatable, it's just difficult without context. Sure. Thanks for clarifying.
Comment #10
Gábor Hojtsydww: 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").
Comment #11
dwwYup, makes perfect sense. Thanks.
Comment #12
(not verified) CreditAttribution: commentedAutomatically closed -- issue fixed for two weeks with no activity.