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.
The following string in handlers/views_handler_filter_date.inc is erroneous:
t('An offset from the current time such as "+1 day" or "-2 hours -30 minutes"')
It leads translators to translate "+1 day" and "-2 hours -30 minutes" too, while they shouldn't be translated because the filter will only accept input in English. Putting "+1 jour" or "-2 horas" won't work, and the user won't know why it doesn't work. Attached is a patch to keep these examples in English only.
Comment | File | Size | Author |
---|---|---|---|
#2 | views-translation-fix.patch | 780 bytes | mdupont |
views-translation-fix.patch | 778 bytes | mdupont | |
Comments
Comment #1
mdupontComment #2
mdupontHere is the working patch
Comment #3
dawehnerAre you sure the php date function supports translated placeholders? I cannot see something like this on http://php.net/manual/de/function.date.php
If not, this will not work. It's like translating "" or ""
Comment #4
dawehnerBetter, we use your first patch :) So this cannot be translated anymore.
Comment #5
mdupontThe aim is indeed to make them untranslatable :-) We could use %placeholders instead to !placeholders to differentiate them from localized text.
Comment #6
dawehneroh sry something in my brain saw t()
awesome!!
Comment #7
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted to all branches.