When translating this views release in localise.drupal.org, HTML tags shows up to translate (DIV, SPAN, H1,H2,H3,H4,H4,H6, P, STRONG, EM). Is there a reason to make HTML tags translatable? Otherwise it is confusing for translation teams. It pops up from the function function get_elements() in views_handler.inc to enable to format HTML around a field:

function get_elements() {
    static $elements = NULL;
    if (!isset($elements)) {
      $elements = variable_get('views_field_rewrite_elements', array(
        '' => t('- Use default -'),
        '0' => t('- None -'),
        'div' => t('DIV'),
        'span' => t('SPAN'),
        'h1' => t('H1'),
        'h2' => t('H2'),
        'h3' => t('H3'),
        'h4' => t('H4'),
        'h5' => t('H5'),
        'h6' => t('H6'),
        'p' => t('P'),
        'strong' => t('STRONG'),
        'em' => t('EM'),
      ));
    }
    return $elements;
  }

I would propose:

function get_elements() {
    static $elements = NULL;
    if (!isset($elements)) {
      $elements = variable_get('views_field_rewrite_elements', array(
        '' => t('- Use default -'),
        '0' => t('- None -'),
        'div' => 'DIV',
        'span' => 'SPAN',
        'h1' => 'H1',
        'h2' => 'H2',
        'h3' => 'H3',
        'h4' => 'H4',
        'h5' => 'H5',
        'h6' => 'H6',
        'p' => 'P',
        'strong' => 'STRONG',
        'em' => 'EM',
      ));
    }
    return $elements;
  }
CommentFileSizeAuthor
#2 patch_commit_97b94d9fb77f.patch1.02 KBHanno
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Hanno’s picture

Issue summary: View changes

typo

dawehner’s picture

Yeah there is no reason to translate it here. It would be kind of cool if you would create a patch, otherwise i will come back to it one day.

Hanno’s picture

OK, created a patch.

Hanno’s picture

Status: Active » Needs review
dawehner’s picture

Status: Needs review » Fixed

Great!
Thanks for providing a patch.
Commited as it is to 6.x-3.x and 7.x-3.x

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

em