mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
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:
parent
8fbcfe5239
commit
26a864d3df
5 changed files with 16 additions and 16 deletions
|
@ -28,7 +28,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title>
|
<title>
|
||||||
CakePHP: the rapid development php framework:
|
<?php __('CakePHP: the rapid development php framework:'); ?>
|
||||||
<?php echo $title_for_layout;?>
|
<?php echo $title_for_layout;?>
|
||||||
</title>
|
</title>
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
<body>
|
<body>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<div id="header">
|
<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>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<?php
|
<?php
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<?php echo $html->link(
|
<?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/',
|
'http://www.cakephp.org/',
|
||||||
array('target'=>'_new'), null, false
|
array('target'=>'_new'), null, false
|
||||||
);
|
);
|
||||||
|
|
|
@ -64,7 +64,7 @@ foreach (\${$pluralVar} as \${$singularVar}):
|
||||||
$otherModelObj =& ClassRegistry::getObject($otherModelKey);
|
$otherModelObj =& ClassRegistry::getObject($otherModelKey);
|
||||||
$otherPrimaryKey = $otherModelObj->primaryKey;
|
$otherPrimaryKey = $otherModelObj->primaryKey;
|
||||||
$otherDisplayField = $otherModelObj->displayField;
|
$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 {
|
} 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);
|
$otherVariableName = Inflector::variable($otherModelClass);
|
||||||
$otherPluralHumanName = Inflector::humanize($otherControllerPath);
|
$otherPluralHumanName = Inflector::humanize($otherControllerPath);
|
||||||
$otherSingularHumanName = Inflector::humanize($otherModelKey);
|
$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";
|
echo "\t\t<li><?php echo \$html->link(sprintf(__('New %s', true), __('{$otherSingularHumanName}', true)), array('controller'=> '{$otherControllerPath}', 'action'=>'add')); ?> </li>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,10 +47,10 @@ foreach ($fields as $field) {
|
||||||
$otherModelObj =& ClassRegistry::getObject($otherModelKey);
|
$otherModelObj =& ClassRegistry::getObject($otherModelKey);
|
||||||
$otherPrimaryKey = $otherModelObj->primaryKey;
|
$otherPrimaryKey = $otherModelObj->primaryKey;
|
||||||
$otherDisplayField = $otherModelObj->displayField;
|
$otherDisplayField = $otherModelObj->displayField;
|
||||||
echo "\t\t<dt{$class}>".Inflector::humanize($otherModelClass)."</dt>\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}'], array('controller'=> '{$otherControllerPath}', 'action'=>'view', \${$singularVar}['{$otherModelClass}']['{$otherPrimaryKey}'])); ?>\n\t\t\t \n\t\t</dd>\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 \n\t\t</dd>\n";
|
||||||
} else {
|
} else {
|
||||||
echo "\t\t<dt{$class}>".Inflector::humanize($field['name'])."</dt>\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 \n\t\t</dd>\n";
|
echo "\t\t<dd{$class}>\n\t\t\t<?php echo \${$singularVar}['{$modelClass}']['{$field['name']}'] ?>\n\t\t\t \n\t\t</dd>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ foreach ($relations as $assocName => $assocData):
|
||||||
<tr>
|
<tr>
|
||||||
<?php
|
<?php
|
||||||
foreach ($otherFields as $field) {
|
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>
|
<th class="actions"><?php echo "<?php __('Actions');?>";?></th>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title>
|
<title>
|
||||||
CakePHP: the rapid development php framework:
|
<?php __('CakePHP: the rapid development php framework:'); ?>
|
||||||
<?php echo $title_for_layout;?>
|
<?php echo $title_for_layout;?>
|
||||||
</title>
|
</title>
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
<body>
|
<body>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<div id="header">
|
<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>
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<?php
|
<?php
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<?php echo $html->link(
|
<?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/',
|
'http://www.cakephp.org/',
|
||||||
array('target'=>'_new'), null, false
|
array('target'=>'_new'), null, false
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue