mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Merge pull request #1295 from cakephp/master-i18n-fixes
Master i18n fixes
This commit is contained in:
commit
085ebae1d3
8 changed files with 18 additions and 18 deletions
|
@ -87,7 +87,7 @@ class AclShell extends AppShell {
|
|||
|
||||
if ($this->command) {
|
||||
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;
|
||||
return $this->DbConfig->execute();
|
||||
}
|
||||
|
@ -179,9 +179,9 @@ class AclShell extends AppShell {
|
|||
);
|
||||
$this->Acl->{$class}->create();
|
||||
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 {
|
||||
$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());
|
||||
|
||||
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 {
|
||||
$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());
|
||||
|
||||
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 {
|
||||
$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());
|
||||
|
||||
if ($this->Acl->deny($aro, $aco, $action)) {
|
||||
$this->out(__d('cake_console', 'Permission denied.'), true);
|
||||
$this->out(__d('cake_console', 'Permission denied.'));
|
||||
} 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());
|
||||
|
||||
if ($this->Acl->inherit($aro, $aco, $action)) {
|
||||
$this->out(__d('cake_console', 'Permission inherited.'), true);
|
||||
$this->out(__d('cake_console', 'Permission inherited.'));
|
||||
} else {
|
||||
$this->out(__d('cake_console', 'Permission was not inherited.'), true);
|
||||
$this->out(__d('cake_console', 'Permission was not inherited.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ class CommandListShell extends AppShell {
|
|||
$this->out("");
|
||||
$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', "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);
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ class I18nShell extends AppShell {
|
|||
|
||||
if ($this->command && !in_array($this->command, array('help'))) {
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -687,7 +687,7 @@ class ExtractTask extends AppShell {
|
|||
* @return void
|
||||
*/
|
||||
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;
|
||||
$tokenCount = count($this->_tokens);
|
||||
$parenthesis = 1;
|
||||
|
|
|
@ -130,7 +130,7 @@ class ProjectTask extends AppShell {
|
|||
$Folder = new Folder($path);
|
||||
if (!$Folder->chmod($path . 'tmp', 0777)) {
|
||||
$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;
|
||||
}
|
||||
if ($success) {
|
||||
|
|
|
@ -52,7 +52,7 @@ foreach (${$pluralVar} as ${$singularVar}):
|
|||
__d('cake', 'Delete'),
|
||||
array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]),
|
||||
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 '</tr>';
|
||||
|
|
|
@ -178,7 +178,7 @@ $otherSingularVar = Inflector::variable($_alias);
|
|||
__d('cake', 'Delete'),
|
||||
array('plugin' => $_details['plugin'], 'controller' => $_details['controller'], 'action' => 'delete', ${$otherSingularVar}[$_details['primaryKey']]),
|
||||
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 "\t\t\t</td>\n";
|
||||
|
|
|
@ -139,7 +139,7 @@ class ViewBlock {
|
|||
public function concat($name, $value = null, $mode = ViewBlock::APPEND) {
|
||||
if (isset($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])) {
|
||||
$this->_blocks[$name] = '';
|
||||
|
|
Loading…
Add table
Reference in a new issue