Skip to content
Permalink
Browse files

Applying patch from 'mete0r' to make the legend generated FormHelper:…

…:inputs() more i18n friendly. Fixes #6360
  • Loading branch information...
markstory committed Aug 28, 2009
1 parent 7c4d60a commit 4bb5b615f798a4d6861bbe8dd83ed555fb025357
Showing with 3 additions and 3 deletions.
  1. +3 −3 cake/libs/view/helpers/form.php
@@ -528,16 +528,16 @@ function inputs($fields = null, $blacklist = null) {
}
if ($legend === true) {
$actionName = __('New', true);
$actionName = __('New %s', true);
$isEdit = (
strpos($this->action, 'update') !== false ||
strpos($this->action, 'edit') !== false
);
if ($isEdit) {
$actionName = __('Edit', true);
$actionName = __('Edit %s', true);
}
$modelName = Inflector::humanize(Inflector::underscore($this->model()));
$legend = $actionName .' '. __($modelName, true);
$legend = sprintf($actionName, __($modelName, true));
}
$out = null;

0 comments on commit 4bb5b61

Please sign in to comment.
You can’t perform that action at this time.