update language domains

no domain - the thing being translated comes from the app - so let the
user handle that
cake - end user
cake_error - error messages
This commit is contained in:
AD7six 2011-03-19 18:29:31 +01:00
parent a3447592d5
commit d2badbeb22
9 changed files with 29 additions and 29 deletions

View file

@ -124,7 +124,7 @@ class Helper extends Object {
* @param array $params Array of params for the method.
*/
public function __call($method, $params) {
trigger_error(__d('cake', 'Method %1$s::%2$s does not exist', get_class($this), $method), E_USER_WARNING);
trigger_error(__d('cake_error', 'Method %1$s::%2$s does not exist', get_class($this), $method), E_USER_WARNING);
}
/**

View file

@ -631,7 +631,7 @@ class FormHelper extends AppHelper {
$actionName = __d('cake', 'Edit %s');
}
$modelName = Inflector::humanize(Inflector::underscore($model));
$legend = sprintf($actionName, __d('cake', $modelName));
$legend = sprintf($actionName, __($modelName));
}
$out = null;
@ -1058,7 +1058,7 @@ class FormHelper extends AppHelper {
$legend = $attributes['legend'];
unset($attributes['legend']);
} elseif (count($options) > 1) {
$legend = __d('cake', Inflector::humanize($this->field()));
$legend = __(Inflector::humanize($this->field()));
}
$label = true;
@ -1151,7 +1151,7 @@ class FormHelper extends AppHelper {
public function __call($method, $params) {
$options = array();
if (empty($params)) {
throw new CakeException(__d('cake', 'Missing field name for FormHelper::%s', $method));
throw new CakeException(__d('cake_error', 'Missing field name for FormHelper::%s', $method));
}
if (isset($params[1])) {
$options = $params[1];

View file

@ -940,13 +940,13 @@ class HtmlHelper extends AppHelper {
$reader = $configFile[1];
}
} else {
throw new ConfigureException(__d('cake', 'Cannot load the configuration file. Wrong "configFile" configuration.'));
throw new ConfigureException(__d('cake_error', 'Cannot load the configuration file. Wrong "configFile" configuration.'));
}
$readerClass = Inflector::camelize($reader) . 'Reader';
App::uses($readerClass, 'Configure');
if (!class_exists($readerClass)) {
throw new ConfigureException(__d('cake', 'Cannot load the configuration file. Unknown reader.'));
throw new ConfigureException(__d('cake_error', 'Cannot load the configuration file. Unknown reader.'));
}
$readerObj = new $readerClass($path);

View file

@ -153,7 +153,7 @@ class JsHelper extends AppHelper {
if (method_exists($this, $method . '_')) {
return call_user_func(array(&$this, $method . '_'), $params);
}
trigger_error(__d('cake', 'JsHelper:: Missing Method %s is undefined', $method), E_USER_WARNING);
trigger_error(__d('cake_error', 'JsHelper:: Missing Method %s is undefined', $method), E_USER_WARNING);
}
/**

View file

@ -307,7 +307,7 @@ class MootoolsEngineHelper extends JsBaseEngineHelper {
function drop($options = array()) {
if (empty($options['drag'])) {
trigger_error(
__d('cake', 'MootoolsEngine::drop() requires a "drag" option to properly function'), E_USER_WARNING
__d('cake_error', 'MootoolsEngine::drop() requires a "drag" option to properly function'), E_USER_WARNING
);
return false;
}

View file

@ -102,7 +102,7 @@ class PaginatorHelper extends AppHelper {
$classname = $ajaxProvider . 'Helper';
if (!method_exists($classname, 'link')) {
throw new CakeException(sprintf(
__d('cake', '%s does not implement a link() method, it is incompatible with PaginatorHelper'), $classname
__d('cake_error', '%s does not implement a link() method, it is incompatible with PaginatorHelper'), $classname
));
}
parent::__construct($View, $settings);
@ -306,7 +306,7 @@ class PaginatorHelper extends AppHelper {
if (empty($title)) {
$title = $key;
$title = __d('cake', Inflector::humanize(preg_replace('/_id$/', '', $title)));
$title = __(Inflector::humanize(preg_replace('/_id$/', '', $title)));
}
$dir = isset($options['direction']) ? $options['direction'] : 'asc';
unset($options['direction']);

View file

@ -396,7 +396,7 @@ class View extends Object {
$layout = $this->layout;
}
if ($this->output === false) {
throw new CakeException(__d('cake', "Error in view %s, got no content.", $viewFileName));
throw new CakeException(__d('cake_error', "Error in view %s, got no content.", $viewFileName));
}
if ($layout && $this->autoLayout) {
$this->output = $this->renderLayout($this->output, $layout);
@ -439,7 +439,7 @@ class View extends Object {
$this->output = $this->_render($layoutFileName);
if ($this->output === false) {
throw new CakeException(__d('cake', "Error in layout %s, got no content.", $layoutFileName));
throw new CakeException(__d('cake_error', "Error in layout %s, got no content.", $layoutFileName));
}
$this->Helpers->trigger('afterLayout', array($layoutFileName));