Skip to content

Commit

Permalink
Finalise shortcut translation function application.
Browse files Browse the repository at this point in the history
  • Loading branch information
predominant committed Apr 15, 2010
1 parent 74d7682 commit 591eb43
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
10 changes: 5 additions & 5 deletions cake/tests/test_app/views/pages/extract.ctp
Expand Up @@ -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');
22 changes: 11 additions & 11 deletions cake/tests/test_app/views/pages/home.ctp
Expand Up @@ -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;
?>
Expand All @@ -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;
?>
Expand All @@ -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;
?>
Expand All @@ -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>
2 changes: 1 addition & 1 deletion cake/tests/test_app/views/posts/cache_form.ctp
Expand Up @@ -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');
Expand Down
24 changes: 12 additions & 12 deletions cake/tests/test_app/views/posts/test_nocache_tags.ctp
Expand Up @@ -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>
Expand All @@ -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>';
Expand All @@ -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;
?>
Expand All @@ -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>
Expand Down

0 comments on commit 591eb43

Please sign in to comment.