Closes #3356, added additional changes for translated views

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5735 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-10-08 20:13:20 +00:00
parent 8fbcfe5239
commit 26a864d3df
5 changed files with 16 additions and 16 deletions

View file

@ -28,7 +28,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
CakePHP: the rapid development php framework:
<?php __('CakePHP: the rapid development php framework:'); ?>
<?php echo $title_for_layout;?>
</title>
@ -41,7 +41,7 @@
<body>
<div id="container">
<div id="header">
<h1><?php echo $html->link('CakePHP: the rapid development php framework', 'http://cakephp.org');?></h1>
<h1><?php echo $html->link(__('CakePHP: the rapid development php framework', true), 'http://cakephp.org');?></h1>
</div>
<div id="content">
<?php
@ -55,7 +55,7 @@
</div>
<div id="footer">
<?php echo $html->link(
$html->image('cake.power.png', array('alt'=>"CakePHP: the rapid development php framework", 'border'=>"0")),
$html->image('cake.power.png', array('alt'=> __("CakePHP: the rapid development php framework", true), 'border'=>"0")),
'http://www.cakephp.org/',
array('target'=>'_new'), null, false
);

View file

@ -38,7 +38,7 @@
}
}
foreach ($hasAndBelongsToMany as $assocName => $assocData) {
echo "\t\techo \$form->input('{$assocName}');\n";
echo "\t\t echo \$form->input('{$assocName}');\n";
}
echo "\t?>\n";
?>

View file

@ -64,9 +64,9 @@ foreach (\${$pluralVar} as \${$singularVar}):
$otherModelObj =& ClassRegistry::getObject($otherModelKey);
$otherPrimaryKey = $otherModelObj->primaryKey;
$otherDisplayField = $otherModelObj->displayField;
echo "\t\t<td>\n\t\t\t<?php echo \$html->link(\${$singularVar}['{$otherModelClass}']['{$otherDisplayField}'], array('controller'=> '{$otherControllerPath}', 'action'=>'view', \${$singularVar}['{$otherModelClass}']['{$otherPrimaryKey}'])); ?>\n\t\t</td>\n";
echo "\t\t<td>\n\t\t\t<?php echo \$html->link(__(\${$singularVar}['{$otherModelClass}']['{$otherDisplayField}'], true), array('controller'=> '{$otherControllerPath}', 'action'=>'view', \${$singularVar}['{$otherModelClass}']['{$otherPrimaryKey}'])); ?>\n\t\t</td>\n";
} else {
echo "\t\t<td>\n\t\t\t<?php echo \${$singularVar}['{$modelClass}']['{$field['name']}']?>\n\t\t</td>\n";
echo "\t\t<td>\n\t\t\t<?php echo \${$singularVar}['{$modelClass}']['{$field['name']}'] ?>\n\t\t</td>\n";
}
}
@ -99,7 +99,7 @@ echo "<?php endforeach; ?>\n";
$otherVariableName = Inflector::variable($otherModelClass);
$otherPluralHumanName = Inflector::humanize($otherControllerPath);
$otherSingularHumanName = Inflector::humanize($otherModelKey);
echo "\t\t<li><?php echo \$html->link(sprintf(__('List %s', true), __('{$otherPluralHumanName}, true)), array('controller'=> '{$otherControllerPath}', 'action'=>'index')); ?> </li>\n";
echo "\t\t<li><?php echo \$html->link(sprintf(__('List %s', true), __('{$otherPluralHumanName}', true)), array('controller'=> '{$otherControllerPath}', 'action'=>'index')); ?> </li>\n";
echo "\t\t<li><?php echo \$html->link(sprintf(__('New %s', true), __('{$otherSingularHumanName}', true)), array('controller'=> '{$otherControllerPath}', 'action'=>'add')); ?> </li>\n";
}
}

View file

@ -47,11 +47,11 @@ foreach ($fields as $field) {
$otherModelObj =& ClassRegistry::getObject($otherModelKey);
$otherPrimaryKey = $otherModelObj->primaryKey;
$otherDisplayField = $otherModelObj->displayField;
echo "\t\t<dt{$class}>".Inflector::humanize($otherModelClass)."</dt>\n";
echo "\t\t<dd{$class}>\n\t\t\t<?php echo \$html->link(\${$singularVar}['{$otherModelClass}']['{$otherDisplayField}'], array('controller'=> '{$otherControllerPath}', 'action'=>'view', \${$singularVar}['{$otherModelClass}']['{$otherPrimaryKey}'])); ?>\n\t\t\t&nbsp;\n\t\t</dd>\n";
echo "\t\t<dt{$class}><?php __('".Inflector::humanize($otherModelClass)."') ?></dt>\n";
echo "\t\t<dd{$class}>\n\t\t\t<?php echo \$html->link(__(\${$singularVar}['{$otherModelClass}']['{$otherDisplayField}'], true), array('controller'=> '{$otherControllerPath}', 'action'=>'view', \${$singularVar}['{$otherModelClass}']['{$otherPrimaryKey}'])); ?>\n\t\t\t&nbsp;\n\t\t</dd>\n";
} else {
echo "\t\t<dt{$class}>".Inflector::humanize($field['name'])."</dt>\n";
echo "\t\t<dd{$class}>\n\t\t\t<?php echo \${$singularVar}['{$modelClass}']['{$field['name']}']?>\n\t\t\t&nbsp;\n\t\t</dd>\n";
echo "\t\t<dt{$class}><?php __('".Inflector::humanize($field['name'])."') ?></dt>\n";
echo "\t\t<dd{$class}>\n\t\t\t<?php echo \${$singularVar}['{$modelClass}']['{$field['name']}'] ?>\n\t\t\t&nbsp;\n\t\t</dd>\n";
}
}
?>
@ -143,7 +143,7 @@ foreach ($relations as $assocName => $assocData):
<tr>
<?php
foreach ($otherFields as $field) {
echo "\t\t<th>".Inflector::humanize($field['name'])."</th>\n";
echo "\t\t<th><?php __('".Inflector::humanize($field['name'])."') ?></th>\n";
}
?>
<th class="actions"><?php echo "<?php __('Actions');?>";?></th>

View file

@ -28,7 +28,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
CakePHP: the rapid development php framework:
<?php __('CakePHP: the rapid development php framework:'); ?>
<?php echo $title_for_layout;?>
</title>
@ -41,7 +41,7 @@
<body>
<div id="container">
<div id="header">
<h1><?php echo $html->link('CakePHP: the rapid development php framework', 'http://cakephp.org');?></h1>
<h1><?php echo $html->link(__('CakePHP: the rapid development php framework', true), 'http://cakephp.org');?></h1>
</div>
<div id="content">
<?php
@ -55,7 +55,7 @@
</div>
<div id="footer">
<?php echo $html->link(
$html->image('cake.power.png', array('alt'=>"CakePHP: the rapid development php framework", 'border'=>"0")),
$html->image('cake.power.png', array('alt'=> __("CakePHP: the rapid development php framework", true), 'border'=>"0")),
'http://www.cakephp.org/',
array('target'=>'_new'), null, false
);
@ -64,4 +64,4 @@
</div>
<?php echo $cakeDebug?>
</body>
</html>
</html>