Finalise shortcut translation function application.

This commit is contained in:
predominant 2010-04-16 02:43:43 +10:00
parent 74d7682707
commit 591eb43b26
4 changed files with 29 additions and 29 deletions

View file

@ -3,12 +3,12 @@ $count = 10;
$messages = array('count' => 10);
// Plural
__n('You have %d new message.', 'You have %d new messages.', $count);
__n('You deleted %d message.', 'You deleted %d messages.', $messages['count']);
echo __n('You have %d new message.', 'You have %d new messages.', $count);
echo __n('You deleted %d message.', 'You deleted %d messages.', $messages['count']);
// Domain Plural
__dn('domain', 'You have %d new message (domain).', 'You have %d new messages (domain).', '10');
__dn('domain', 'You deleted %d message (domain).', 'You deleted %d messages (domain).', $messages['count']);
echo __dn('domain', 'You have %d new message (domain).', 'You have %d new messages (domain).', '10');
echo __dn('domain', 'You deleted %d message (domain).', 'You deleted %d messages (domain).', $messages['count']);
// Duplicated Message
__('Editing this Page');
echo __('Editing this Page');

View file

@ -9,11 +9,11 @@ endif;
<?php
if (is_writable(TMP)):
echo '<span class="notice success">';
__('Your tmp directory is writable.');
echo __('Your tmp directory is writable.');
echo '</span>';
else:
echo '<span class="notice">';
__('Your tmp directory is NOT writable.');
echo __('Your tmp directory is NOT writable.');
echo '</span>';
endif;
?>
@ -23,11 +23,11 @@ endif;
$settings = Cache::settings();
if (!empty($settings)):
echo '<span class="notice success">';
printf(__('The %s is being used for caching. To change the config edit APP/config/core.php ', true), '<em>'. $settings['engine'] . 'Engine</em>');
printf(__('The %s is being used for caching. To change the config edit APP/config/core.php '), '<em>'. $settings['engine'] . 'Engine</em>');
echo '</span>';
else:
echo '<span class="notice">';
__('Your cache is NOT working. Please check the settings in APP/config/core.php');
echo __('Your cache is NOT working. Please check the settings in APP/config/core.php');
echo '</span>';
endif;
?>
@ -37,14 +37,14 @@ endif;
$filePresent = null;
if (file_exists(CONFIGS . 'database.php')):
echo '<span class="notice success">';
__('Your database configuration file is present.');
echo __('Your database configuration file is present.');
$filePresent = true;
echo '</span>';
else:
echo '<span class="notice">';
__('Your database configuration file is NOT present.');
echo __('Your database configuration file is NOT present.');
echo '<br/>';
__('Rename config/database.php.default to config/database.php');
echo __('Rename config/database.php.default to config/database.php');
echo '</span>';
endif;
?>
@ -61,22 +61,22 @@ if (!empty($filePresent)):
<?php
if ($connected->isConnected()):
echo '<span class="notice success">';
__('Cake is able to connect to the database.');
echo __('Cake is able to connect to the database.');
echo '</span>';
else:
echo '<span class="notice">';
__('Cake is NOT able to connect to the database.');
echo __('Cake is NOT able to connect to the database.');
echo '</span>';
endif;
?>
</p>
<?php endif;?>
<h3><?php __('Editing this Page') ?></h3>
<h3><?php echo __('Editing this Page') ?></h3>
<p>
<?php
printf(__('To change the content of this page, edit: %s
To change its layout, edit: %s
You can also add some CSS styles for your pages at: %s', true),
You can also add some CSS styles for your pages at: %s'),
APP . 'views' . DS . 'pages' . DS . 'home.ctp.<br />', APP . 'views' . DS . 'layouts' . DS . 'default.ctp.<br />', APP . 'webroot' . DS . 'css');
?>
</p>

View file

@ -2,7 +2,7 @@
<cake:nocache>
<?php echo $form->create('User');?>
<fieldset>
<legend><?php __('Add User');?></legend>
<legend><?php echo __('Add User');?></legend>
<?php
echo $form->input('username');
echo $form->input('email');

View file

@ -21,11 +21,11 @@
<cake:nocache>
<span class="notice">
<?php
__('Your tmp directory is ');
echo __('Your tmp directory is ');
if (is_writable(TMP)):
__('writable.');
echo __('writable.');
else:
__('NOT writable.');
echo __('NOT writable.');
endif;
?>
</span>
@ -34,12 +34,12 @@
<p>
<span class="notice">
<?php
__('Your cache is ');
echo __('Your cache is ');
if (Cache::isInitialized()):
__('set up and initialized properly.');
echo __('set up and initialized properly.');
$settings = Cache::settings();
echo '<p>' . $settings['engine'];
__(' is being used to cache, to change this edit config/core.php ');
echo __(' is being used to cache, to change this edit config/core.php ');
echo '</p>';
echo 'Settings: <ul>';
@ -49,10 +49,10 @@
echo '</ul>';
else:
__('NOT working.');
echo __('NOT working.');
echo '<br />';
if (is_writable(TMP)):
__('Edit: config/core.php to insure you have the newset version of this file and the variable $cakeCache set properly');
echo __('Edit: config/core.php to insure you have the newset version of this file and the variable $cakeCache set properly');
endif;
endif;
?>
@ -61,15 +61,15 @@
<p>
<span class="notice">
<?php
__('Your database configuration file is ');
echo __('Your database configuration file is ');
$filePresent = null;
if (file_exists(CONFIGS.'database.php')):
__('present.');
echo __('present.');
$filePresent = true;
else:
__('NOT present.');
echo __('NOT present.');
echo '<br/>';
__('Rename config/database.php.default to config/database.php');
echo __('Rename config/database.php.default to config/database.php');
endif;
?>
</span>