There are no t() functions in the entire module.

Comments

iLLin’s picture

Status: Active » Closed (cannot reproduce)

Where are these t() functions supposed to be that they aren't?

//helper function to build an eazy edit link.
function _l($text, $path, $title = '') {
  return l('<span>' . t($text) . '</span>', $path,
  array(
      'attributes' => array('title' => t($title)),
      'query' => drupal_get_destination(),
      'html' => TRUE,
      'alias' => TRUE
  )
  );
}

Looks like a t() function to me.

How about instead of just putting a single one line sentence of a problem, why don't you submit a patch? That helps the community out tremendously. Marking as closed as I do not see where there "isn't" a t() function used when spitting out text.

mstef’s picture

Should be:

function eazyedit_comment(&$a1, $op) {
75	  if ($op == 'view') {
76	    if (user_access('administer comments')) {
77	      $links[] = _l(t('edit comment'), "comment/edit/$a1->cid");
78	      $links[] = eazyedit_toggle_link($a1, 'status');
79	      $a1->comment .= theme_eazyedit($links);
80	    }
81	  }
82	}
84	//helper function to build an eazy edit link.
85	function _l($text, $path, $title = '') {
86	  return l('<span>' . $text . '</span>', $path,
87	  array(
88	      'attributes' => array('title' => t($title)),
89	      'query' => drupal_get_destination(),
90	      'html' => TRUE,
91	      'alias' => TRUE
92	  )
93	  );
94	}
mstef’s picture

Status: Closed (cannot reproduce) » Needs review
tdway’s picture

Status: Needs review » Postponed (maintainer needs more info)

I'm assuming when you say 'should be' your argument is that it's easier for you to read the code when the t() function is located on the same line as the literal string. I'm using a helper function to ensure all eazyedit strings pass thru the t() function and the links are built consistently. It also saves me from having to write t() repeatedly. If you see another problem with this approach, please explain and I will try to get the change into the next release.

mstef’s picture

I don't think that would work though. Have you tried translating the module? Passing nothing but a variable into t() is useless. How can that be translated?