Skip to content

Commit

Permalink
Use I18n::translate() instead of __()
Browse files Browse the repository at this point in the history
  • Loading branch information
lenton committed Jan 5, 2015
1 parent 36cebda commit 4630503
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions classes/Kohana/Minion/CLI.php
Expand Up @@ -148,7 +148,7 @@ public static function read($text = '', array $options = NULL)
// If options are provided and the choice is not in the array, tell them to try again
if ( ! empty($options) AND ! in_array($input, $options))
{
Minion_CLI::write(__('Invalid option value. Please try again.'));
Minion_CLI::write(I18n::translate('Invalid option value. Please try again.'));

$input = Minion_CLI::read($text, $options);
}
Expand Down Expand Up @@ -239,7 +239,7 @@ public static function wait($seconds = 0, $countdown = FALSE)
}
else
{
Minion_CLI::write(__('Press any key to continue...'));
Minion_CLI::write(I18n::translate('Press any key to continue...'));
Minion_CLI::read();
}
}
Expand Down
2 changes: 1 addition & 1 deletion classes/Kohana/Minion/Task/Exception.php
Expand Up @@ -17,7 +17,7 @@ abstract class Kohana_Minion_Task_Exception extends Minion_Exception {
*/
protected function _cli_format()
{
return __('Task error').':'.PHP_EOL.$this->getMessage().PHP_EOL;
return I18n::translate('Task error').':'.PHP_EOL.$this->getMessage().PHP_EOL;
}

}
4 changes: 2 additions & 2 deletions views/minion/error/validation.php
@@ -1,9 +1,9 @@
<?php echo __('Parameter errors') ?>:
<?php echo I18n::translate('Parameter errors') ?>:

<?php foreach ($errors as $parameter => $error): ?>
<?php echo $parameter.' - '.$error.PHP_EOL ?>
<?php endforeach ?>

<?php echo __('For more help, run') ?>:
<?php echo I18n::translate('For more help, run') ?>:

php index.php --task=<?php echo $task ?> --help
2 changes: 1 addition & 1 deletion views/minion/help/error.php
@@ -1,5 +1,5 @@
<?php echo $error ?>

<?php echo __('For more help, run') ?>:
<?php echo I18n::translate('For more help, run') ?>:

php index.php --task=<?php echo $task ?> --help
8 changes: 4 additions & 4 deletions views/minion/help/list.php
@@ -1,15 +1,15 @@
<?php echo __('Minion is a CLI tool for performing tasks.') ?>
<?php echo I18n::translate('Minion is a CLI tool for performing tasks.') ?>

<?php echo __('Usage') ?>:
<?php echo I18n::translate('Usage') ?>:

php index.php --task=<task> [--option=<value>] [--option2=<value2>]

<?php echo __('Where {task} is one of the following') ?>:
<?php echo I18n::translate('Where {task} is one of the following') ?>:

<?php foreach($tasks as $task): ?>
<?php echo $task.PHP_EOL ?>
<?php endforeach ?>

<?php echo __('For more information on what a task does and usage details execute') ?>:
<?php echo I18n::translate('For more information on what a task does and usage details execute') ?>:

php index.php --task=<task> --help
6 changes: 3 additions & 3 deletions views/minion/help/task.php
@@ -1,13 +1,13 @@
<?php echo __('Usage') ?>:
<?php echo I18n::translate('Usage') ?>:

php index.php --task=<?php echo $task ?> [--option=<value>] [--option2=<value2>]

<?php echo __('Details') ?>:
<?php echo I18n::translate('Details') ?>:

<?php foreach($tags as $tag_name => $tag_content): ?>
<?php echo ucfirst($tag_name).': '.$tag_content.PHP_EOL ?>
<?php endforeach ?>

<?php echo __('Description') ?>:
<?php echo I18n::translate('Description') ?>:

<?php echo $description ?>

0 comments on commit 4630503

Please sign in to comment.