What / Issue : while 'All day' is localized (can be translated by an admin on the site), the ( ) around it are hardcoded.

To get rid of them, I had to modify the file: date/date_all_day/date_all_day.module

function theme_date_all_day_label() {
  return '' . t('All day', array(), array('context' => 'datetime')) . '';

The original was :

function theme_date_all_day_label() {
  return '(' . t('All day', array(), array('context' => 'datetime')) . ')';

It is not a major issue, but ideally that should be easier to theme. In the previous version, I simply modified it using the locale.module in core Drupal. Alternatively, if they have a CSS style, they could be made invisible, but that would be a lot of bytes for only two ().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hiramanpatil’s picture

Assigned: Unassigned » hiramanpatil
Status: Active » Needs work
hiramanpatil’s picture

Assigned: hiramanpatil » Unassigned
Status: Needs work » Needs review

I have created patch. Please check and review.

Priyanka.addweb’s picture

Here is the patch for the solution. The patch includes solution from the original comment.

DamienMcKenna’s picture

Version: 7.x-2.10 » 7.x-2.x-dev
FileSize
494 bytes

Would it not be better to move the parentheses inside the string? Also the empty strings are no longer needed.

steinmb’s picture

Status: Needs review » Reviewed & tested by the community

  • DamienMcKenna committed 59ad05a on 7.x-2.x
    Issue #2894759 by DamienMcKenna, Mansi.AddWeb, hiramanpatil,...
DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed
Parent issue: » #2867810: Plan for Date 7.x-2.11 release

Committed. Thanks!

Status: Fixed » Closed (fixed)

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