updating formHelper label to only translate text if the default is used, closes #2314

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6184 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-12-21 19:53:10 +00:00
parent ac4896fabd
commit 87b33dc12a

View file

@ -408,6 +408,10 @@ class FormHelper extends AppHelper {
$text = substr($text, 0, strlen($text) - 3);
}
$text = Inflector::humanize(Inflector::underscore($text));
if (!empty($text)) {
$text = __($text, true);
}
}
if (isset($attributes['for'])) {
@ -416,9 +420,7 @@ class FormHelper extends AppHelper {
} else {
$labelFor = $this->domId($fieldName);
}
if (!empty($text)) {
$text = __($text, true);
}
return $this->output(sprintf($this->Html->tags['label'], $labelFor, $this->_parseAttributes($attributes), $text));
}
/**