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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mdupont’s picture

Status: Active » Needs review
mdupont’s picture

FileSize
780 bytes

Here is the working patch

dawehner’s picture

Are 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 ""

dawehner’s picture

Better, we use your first patch :) So this cannot be translated anymore.

mdupont’s picture

The aim is indeed to make them untranslatable :-) We could use %placeholders instead to !placeholders to differentiate them from localized text.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

oh sry something in my brain saw t()

awesome!!

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed to all branches.

Status: Fixed » Closed (fixed)

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