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); $messages = array('count' => 10);
// Plural // Plural
__n('You have %d new message.', 'You have %d new messages.', $count); echo __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 deleted %d message.', 'You deleted %d messages.', $messages['count']);
// Domain Plural // Domain Plural
__dn('domain', 'You have %d new message (domain).', 'You have %d new messages (domain).', '10'); echo __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 deleted %d message (domain).', 'You deleted %d messages (domain).', $messages['count']);
// Duplicated Message // Duplicated Message
__('Editing this Page'); echo __('Editing this Page');

View file

@ -9,11 +9,11 @@ endif;
<?php <?php
if (is_writable(TMP)): if (is_writable(TMP)):
echo '<span class="notice success">'; echo '<span class="notice success">';
__('Your tmp directory is writable.'); echo __('Your tmp directory is writable.');
echo '</span>'; echo '</span>';
else: else:
echo '<span class="notice">'; echo '<span class="notice">';
__('Your tmp directory is NOT writable.'); echo __('Your tmp directory is NOT writable.');
echo '</span>'; echo '</span>';
endif; endif;
?> ?>
@ -23,11 +23,11 @@ endif;
$settings = Cache::settings(); $settings = Cache::settings();
if (!empty($settings)): if (!empty($settings)):
echo '<span class="notice success">'; 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>'; echo '</span>';
else: else:
echo '<span class="notice">'; 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>'; echo '</span>';
endif; endif;
?> ?>
@ -37,14 +37,14 @@ endif;
$filePresent = null; $filePresent = null;
if (file_exists(CONFIGS . 'database.php')): if (file_exists(CONFIGS . 'database.php')):
echo '<span class="notice success">'; echo '<span class="notice success">';
__('Your database configuration file is present.'); echo __('Your database configuration file is present.');
$filePresent = true; $filePresent = true;
echo '</span>'; echo '</span>';
else: else:
echo '<span class="notice">'; echo '<span class="notice">';
__('Your database configuration file is NOT present.'); echo __('Your database configuration file is NOT present.');
echo '<br/>'; echo '<br/>';
__('Rename config/database.php.default to config/database.php'); echo __('Rename config/database.php.default to config/database.php');
echo '</span>'; echo '</span>';
endif; endif;
?> ?>
@ -61,22 +61,22 @@ if (!empty($filePresent)):
<?php <?php
if ($connected->isConnected()): if ($connected->isConnected()):
echo '<span class="notice success">'; echo '<span class="notice success">';
__('Cake is able to connect to the database.'); echo __('Cake is able to connect to the database.');
echo '</span>'; echo '</span>';
else: else:
echo '<span class="notice">'; 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>'; echo '</span>';
endif; endif;
?> ?>
</p> </p>
<?php endif;?> <?php endif;?>
<h3><?php __('Editing this Page') ?></h3> <h3><?php echo __('Editing this Page') ?></h3>
<p> <p>
<?php <?php
printf(__('To change the content of this page, edit: %s printf(__('To change the content of this page, edit: %s
To change its layout, 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'); APP . 'views' . DS . 'pages' . DS . 'home.ctp.<br />', APP . 'views' . DS . 'layouts' . DS . 'default.ctp.<br />', APP . 'webroot' . DS . 'css');
?> ?>
</p> </p>

View file

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

View file

@ -21,11 +21,11 @@
<cake:nocache> <cake:nocache>
<span class="notice"> <span class="notice">
<?php <?php
__('Your tmp directory is '); echo __('Your tmp directory is ');
if (is_writable(TMP)): if (is_writable(TMP)):
__('writable.'); echo __('writable.');
else: else:
__('NOT writable.'); echo __('NOT writable.');
endif; endif;
?> ?>
</span> </span>
@ -34,12 +34,12 @@
<p> <p>
<span class="notice"> <span class="notice">
<?php <?php
__('Your cache is '); echo __('Your cache is ');
if (Cache::isInitialized()): if (Cache::isInitialized()):
__('set up and initialized properly.'); echo __('set up and initialized properly.');
$settings = Cache::settings(); $settings = Cache::settings();
echo '<p>' . $settings['engine']; 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 '</p>';
echo 'Settings: <ul>'; echo 'Settings: <ul>';
@ -49,10 +49,10 @@
echo '</ul>'; echo '</ul>';
else: else:
__('NOT working.'); echo __('NOT working.');
echo '<br />'; echo '<br />';
if (is_writable(TMP)): 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;
endif; endif;
?> ?>
@ -61,15 +61,15 @@
<p> <p>
<span class="notice"> <span class="notice">
<?php <?php
__('Your database configuration file is '); echo __('Your database configuration file is ');
$filePresent = null; $filePresent = null;
if (file_exists(CONFIGS.'database.php')): if (file_exists(CONFIGS.'database.php')):
__('present.'); echo __('present.');
$filePresent = true; $filePresent = true;
else: else:
__('NOT present.'); echo __('NOT present.');
echo '<br/>'; echo '<br/>';
__('Rename config/database.php.default to config/database.php'); echo __('Rename config/database.php.default to config/database.php');
endif; endif;
?> ?>
</span> </span>