Merge pull request #1295 from cakephp/master-i18n-fixes

Master i18n fixes
This commit is contained in:
Mark Story 2013-05-22 06:20:04 -07:00
commit 085ebae1d3
8 changed files with 18 additions and 18 deletions

View file

@ -87,7 +87,7 @@ class AclShell extends AppShell {
if ($this->command) { if ($this->command) {
if (!config('database')) { if (!config('database')) {
$this->out(__d('cake_console', 'Your database configuration was not found. Take a moment to create one.'), true); $this->out(__d('cake_console', 'Your database configuration was not found. Take a moment to create one.'));
$this->args = null; $this->args = null;
return $this->DbConfig->execute(); return $this->DbConfig->execute();
} }
@ -179,9 +179,9 @@ class AclShell extends AppShell {
); );
$this->Acl->{$class}->create(); $this->Acl->{$class}->create();
if (!$this->Acl->{$class}->save($data)) { if (!$this->Acl->{$class}->save($data)) {
$this->out(__d('cake_console', 'Error in setting new parent. Please make sure the parent node exists, and is not a descendant of the node specified.'), true); $this->out(__d('cake_console', 'Error in setting new parent. Please make sure the parent node exists, and is not a descendant of the node specified.'));
} else { } else {
$this->out(__d('cake_console', 'Node parent set to %s', $this->args[2]) . "\n", true); $this->out(__d('cake_console', 'Node parent set to %s', $this->args[2]) . "\n");
} }
} }
@ -237,9 +237,9 @@ class AclShell extends AppShell {
extract($this->_getParams()); extract($this->_getParams());
if ($this->Acl->check($aro, $aco, $action)) { if ($this->Acl->check($aro, $aco, $action)) {
$this->out(__d('cake_console', '%s is <success>allowed</success>.', $aroName), true); $this->out(__d('cake_console', '%s is <success>allowed</success>.', $aroName));
} else { } else {
$this->out(__d('cake_console', '%s is <error>not allowed</error>.', $aroName), true); $this->out(__d('cake_console', '%s is <error>not allowed</error>.', $aroName));
} }
} }
@ -252,9 +252,9 @@ class AclShell extends AppShell {
extract($this->_getParams()); extract($this->_getParams());
if ($this->Acl->allow($aro, $aco, $action)) { if ($this->Acl->allow($aro, $aco, $action)) {
$this->out(__d('cake_console', 'Permission <success>granted</success>.'), true); $this->out(__d('cake_console', 'Permission <success>granted</success>.'));
} else { } else {
$this->out(__d('cake_console', 'Permission was <error>not granted</error>.'), true); $this->out(__d('cake_console', 'Permission was <error>not granted</error>.'));
} }
} }
@ -267,9 +267,9 @@ class AclShell extends AppShell {
extract($this->_getParams()); extract($this->_getParams());
if ($this->Acl->deny($aro, $aco, $action)) { if ($this->Acl->deny($aro, $aco, $action)) {
$this->out(__d('cake_console', 'Permission denied.'), true); $this->out(__d('cake_console', 'Permission denied.'));
} else { } else {
$this->out(__d('cake_console', 'Permission was not denied.'), true); $this->out(__d('cake_console', 'Permission was not denied.'));
} }
} }
@ -282,9 +282,9 @@ class AclShell extends AppShell {
extract($this->_getParams()); extract($this->_getParams());
if ($this->Acl->inherit($aro, $aco, $action)) { if ($this->Acl->inherit($aro, $aco, $action)) {
$this->out(__d('cake_console', 'Permission inherited.'), true); $this->out(__d('cake_console', 'Permission inherited.'));
} else { } else {
$this->out(__d('cake_console', 'Permission was not inherited.'), true); $this->out(__d('cake_console', 'Permission was not inherited.'));
} }
} }

View file

@ -50,7 +50,7 @@ class CommandListShell extends AppShell {
$this->out(""); $this->out("");
$this->out(__d('cake_console', "<info>Changing Paths:</info>"), 2); $this->out(__d('cake_console', "<info>Changing Paths:</info>"), 2);
$this->out(__d('cake_console', "Your working path should be the same as your application path. To change your path use the '-app' param.")); $this->out(__d('cake_console', "Your working path should be the same as your application path. To change your path use the '-app' param."));
$this->out(__d('cake_console', "Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp"), 2); $this->out(__d('cake_console', "Example: %s or %s", '-app relative/path/to/myapp', '-app /absolute/path/to/myapp'), 2);
$this->out(__d('cake_console', "<info>Available Shells:</info>"), 2); $this->out(__d('cake_console', "<info>Available Shells:</info>"), 2);
} }

View file

@ -53,7 +53,7 @@ class I18nShell extends AppShell {
if ($this->command && !in_array($this->command, array('help'))) { if ($this->command && !in_array($this->command, array('help'))) {
if (!config('database')) { if (!config('database')) {
$this->out(__d('cake_console', 'Your database configuration was not found. Take a moment to create one.'), true); $this->out(__d('cake_console', 'Your database configuration was not found. Take a moment to create one.'));
return $this->DbConfig->execute(); return $this->DbConfig->execute();
} }
} }

View file

@ -687,7 +687,7 @@ class ExtractTask extends AppShell {
* @return void * @return void
*/ */
protected function _markerError($file, $line, $marker, $count) { protected function _markerError($file, $line, $marker, $count) {
$this->out(__d('cake_console', "Invalid marker content in %s:%s\n* %s(", $file, $line, $marker), true); $this->out(__d('cake_console', "Invalid marker content in %s:%s\n* %s(", $file, $line, $marker));
$count += 2; $count += 2;
$tokenCount = count($this->_tokens); $tokenCount = count($this->_tokens);
$parenthesis = 1; $parenthesis = 1;

View file

@ -130,7 +130,7 @@ class ProjectTask extends AppShell {
$Folder = new Folder($path); $Folder = new Folder($path);
if (!$Folder->chmod($path . 'tmp', 0777)) { if (!$Folder->chmod($path . 'tmp', 0777)) {
$this->err(__d('cake_console', 'Could not set permissions on %s', $path . DS . 'tmp')); $this->err(__d('cake_console', 'Could not set permissions on %s', $path . DS . 'tmp'));
$this->out(__d('cake_console', 'chmod -R 0777 %s', $path . DS . 'tmp')); $this->out('chmod -R 0777 ' . $path . DS . 'tmp');
$success = false; $success = false;
} }
if ($success) { if ($success) {

View file

@ -52,7 +52,7 @@ foreach (${$pluralVar} as ${$singularVar}):
__d('cake', 'Delete'), __d('cake', 'Delete'),
array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]), array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]),
null, null,
__d('cake', 'Are you sure you want to delete').' #' . ${$singularVar}[$modelClass][$primaryKey] __d('cake', 'Are you sure you want to delete # %s?', ${$singularVar}[$modelClass][$primaryKey])
); );
echo '</td>'; echo '</td>';
echo '</tr>'; echo '</tr>';

View file

@ -178,7 +178,7 @@ $otherSingularVar = Inflector::variable($_alias);
__d('cake', 'Delete'), __d('cake', 'Delete'),
array('plugin' => $_details['plugin'], 'controller' => $_details['controller'], 'action' => 'delete', ${$otherSingularVar}[$_details['primaryKey']]), array('plugin' => $_details['plugin'], 'controller' => $_details['controller'], 'action' => 'delete', ${$otherSingularVar}[$_details['primaryKey']]),
null, null,
__d('cake', 'Are you sure you want to delete', true) .' #' . ${$otherSingularVar}[$_details['primaryKey']] . '?' __d('cake', 'Are you sure you want to delete # %s?', ${$otherSingularVar}[$_details['primaryKey']])
); );
echo "\n"; echo "\n";
echo "\t\t\t</td>\n"; echo "\t\t\t</td>\n";

View file

@ -139,7 +139,7 @@ class ViewBlock {
public function concat($name, $value = null, $mode = ViewBlock::APPEND) { public function concat($name, $value = null, $mode = ViewBlock::APPEND) {
if (isset($value)) { if (isset($value)) {
if (!is_string($value)) { if (!is_string($value)) {
throw new CakeException(__d('cake_dev', '$value must be a string.')); throw new CakeException(__d('cake_dev', '%s must be a string.', '$value'));
} }
if (!isset($this->_blocks[$name])) { if (!isset($this->_blocks[$name])) {
$this->_blocks[$name] = ''; $this->_blocks[$name] = '';