Browse Source

Use domain "tools" for translations

Jan Rio Krause 11 years ago
parent
commit
200bd56548
51 changed files with 267 additions and 267 deletions
  1. 4 4
      Console/Command/CopyShell.php
  2. 6 6
      Console/Command/FolderSyncShell.php
  3. 10 10
      Console/Command/HashShell.php
  4. 1 1
      Console/Command/IndentShell.php
  5. 1 1
      Console/Command/IndexShell.php
  6. 1 1
      Console/Command/PhpTagShell.php
  7. 2 2
      Console/Command/PwdShell.php
  8. 2 2
      Console/Command/ResetShell.php
  9. 9 9
      Console/Command/UserShell.php
  10. 3 3
      Console/Command/WhitespaceShell.php
  11. 12 12
      Controller/Component/AuthExtComponent.php
  12. 2 2
      Controller/Component/CalendarComponent.php
  13. 6 6
      Controller/Component/CommonComponent.php
  14. 1 1
      Controller/Component/MobileComponent.php
  15. 3 3
      Controller/QloginController.php
  16. 1 1
      Controller/TinyUrlsController.php
  17. 20 20
      Lib/GeocodeLib.php
  18. 12 12
      Lib/Misc/ZodiacLib.php
  19. 3 3
      Lib/SpellLib.php
  20. 2 2
      Lib/Utility/FolderLib.php
  21. 28 28
      Lib/Utility/TimeLib.php
  22. 9 9
      Model/Behavior/CaptchaBehavior.php
  23. 1 1
      Model/Behavior/ConfirmableBehavior.php
  24. 1 1
      Model/Behavior/CustomFindsBehavior.php
  25. 6 6
      Model/Behavior/LogableBehavior.php
  26. 1 1
      Model/Behavior/PasswordableBehavior.php
  27. 1 1
      Model/Behavior/SluggedBehavior.php
  28. 1 1
      Test/Case/Lib/Misc/ZodiacLibTest.php
  29. 1 1
      Test/Case/Lib/SpellLibTest.php
  30. 25 25
      Test/Case/Lib/Utility/TimeLibTest.php
  31. 4 4
      Test/Case/Model/Behavior/BitmaskedBehaviorTest.php
  32. 1 1
      Test/Case/Model/Behavior/GeocoderBehaviorTest.php
  33. 1 1
      Test/Case/Model/Behavior/MasterPasswordBehaviorTest.php
  34. 3 3
      Test/Case/Model/Behavior/PasswordableBehaviorTest.php
  35. 1 1
      Test/Case/Model/Behavior/SluggedBehaviorTest.php
  36. 4 4
      Test/Case/Model/MyModelTest.php
  37. 4 4
      Test/Case/View/Helper/CommonHelperTest.php
  38. 8 8
      Test/Case/View/Helper/FormatHelperTest.php
  39. 1 1
      Test/Case/View/Helper/GoogleMapV3HelperTest.php
  40. 2 2
      View/Elements/master_password.ctp
  41. 5 5
      View/Elements/pagination.ctp
  42. 4 4
      View/Helper/CaptchaHelper.php
  43. 5 5
      View/Helper/CommonHelper.php
  44. 4 4
      View/Helper/DatetimeHelper.php
  45. 1 1
      View/Helper/FlattrHelper.php
  46. 5 5
      View/Helper/FormExtHelper.php
  47. 25 25
      View/Helper/FormatHelper.php
  48. 4 4
      View/Helper/GoogleMapV3Helper.php
  49. 1 1
      View/Helper/TextExtHelper.php
  50. 8 8
      View/Qlogin/admin_index.ctp
  51. 1 1
      View/RssView.php

+ 4 - 4
Console/Command/CopyShell.php

@@ -159,7 +159,7 @@ class CopyShell extends AppShell {
 		*/
 		} else {
 			array_unshift($connections, 'q', 'h');
-			$connection = $this->in(__('Use Sitecopy Config ([q] to quit, [h] for help)') . ':', $connections, 'q');
+			$connection = $this->in(__d('tools', 'Use Sitecopy Config ([q] to quit, [h] for help)') . ':', $connections, 'q');
 		}
 
 		$this->out('');
@@ -294,7 +294,7 @@ class CopyShell extends AppShell {
 				$this->args[0] = null; # only the first time
 			}
 			if (empty($action) || !in_array($action, $allowedActions)) {
-				$action = strtolower($this->in(__('Init, Catchup, List, Fetch, Update, Synch (or [q] to quit)') . ':', array_merge($allowedActions, array('q')), 'l'));
+				$action = strtolower($this->in(__d('tools', 'Init, Catchup, List, Fetch, Update, Synch (or [q] to quit)') . ':', array_merge($allowedActions, array('q')), 'l'));
 			}
 
 			if ($action === 'q') {
@@ -303,7 +303,7 @@ class CopyShell extends AppShell {
 			if (in_array($action, $allowedActions)) {
 				// synch can destroy local information that might not have been saved yet, so confirm
 				if ($action === 's') {
-					$continue = $this->in(__('Local files might be overridden... Continue?'), array('y', 'n'), 'n');
+					$continue = $this->in(__d('tools', 'Local files might be overridden... Continue?'), array('y', 'n'), 'n');
 					if (strtolower($continue) !== 'y' && strtolower($continue) !== 'yes') {
 						$action = '';
 						continue;
@@ -478,7 +478,7 @@ class CopyShell extends AppShell {
 		$this->out("\ts: Synch (Get remote content and override local files");
 		$this->out("");
 
-		$continue = $this->in(__('Show script help, too?'), array('y', 'n'), 'y');
+		$continue = $this->in(__d('tools', 'Show script help, too?'), array('y', 'n'), 'y');
 		if (strtolower($continue) === 'y' || strtolower($continue) === 'yes') {
 			// somehow does not work yet (inside cake console anyway...)
 			$this->_exec(false, array('--help'));

+ 6 - 6
Console/Command/FolderSyncShell.php

@@ -75,11 +75,11 @@ class FolderSyncShell extends AppShell {
 		$excludes = $this->excludes;
 		$this->_sync($this->sourceFolder, $this->targetFolder, $excludes);
 
-		$this->out(__('Files: %s', $this->files));
+		$this->out(__d('tools', 'Files: %s', $this->files));
 		$this->out();
 
 		if (!empty($this->missing)) {
-			$this->out(__('%s missing files', count($this->missing)));
+			$this->out(__d('tools', '%s missing files', count($this->missing)));
 			foreach ($this->missing as $missing) {
 				$this->out('- ' . $missing, 1, Shell::VERBOSE);
 			}
@@ -87,10 +87,10 @@ class FolderSyncShell extends AppShell {
 		}
 
 		if ($this->updatedFiles) {
-			$this->out(__('%s target files updated', $this->updatedFiles));
+			$this->out(__d('tools', '%s target files updated', $this->updatedFiles));
 		}
 		if ($this->removedFiles) {
-			$this->out(__('%s source files removed', $this->removedFiles));
+			$this->out(__d('tools', '%s source files removed', $this->removedFiles));
 		}
 		if (!$this->updatedFiles && !$this->removedFiles) {
 			$this->out('(nothing to do)');
@@ -152,9 +152,9 @@ class FolderSyncShell extends AppShell {
 	}
 
 	public function help() {
-		$head = __("Usage: cake FolderSync <command>") . "\n";
+		$head = __d('tools', "Usage: cake FolderSync <command>") . "\n";
 		$head .= "-----------------------------------------------\n";
-		$head .= __("Commands:") . "\n\n";
+		$head .= __d('tools', "Commands:") . "\n\n";
 
 		$head .= "\t" . 'update' . "\n\n";
 		//$head .= "\t" . 'update' . "\n\n";

+ 10 - 10
Console/Command/HashShell.php

@@ -28,7 +28,7 @@ class HashShell extends AppShell {
 			$this->out(($key + 1) . ': ' . $t . (in_array($t, $this->active) ? ' (!)' : ''));
 		}
 		while (!isset($type) || !in_array($type - 1, $types)) {
-			$type = $this->in(__('Select hashType - or [q] to quit'), null, static::DEFAULT_HASH_ALG);
+			$type = $this->in(__d('tools', 'Select hashType - or [q] to quit'), null, static::DEFAULT_HASH_ALG);
 			if ($type === 'q') {
 				return $this->error('Aborted!');
 			}
@@ -36,7 +36,7 @@ class HashShell extends AppShell {
 		$type--;
 
 		while (empty($pwToHash) || mb_strlen($pwToHash) < 2) {
-			$pwToHash = $this->in(__('String to Hash (2 characters at least)'));
+			$pwToHash = $this->in(__d('tools', 'String to Hash (2 characters at least)'));
 		}
 
 		$pw = $this->_hash($hashAlgos[$type], $pwToHash);
@@ -112,25 +112,25 @@ class HashShell extends AppShell {
 	public function getOptionParser() {
 		$parser = parent::getOptionParser();
 
-		$parser->description(__('A console tool for hashing strings'))
+		$parser->description(__d('tools', 'A console tool for hashing strings'))
 			->addSubcommand('string', array(
-				'help' => __('Hash a string'),
+				'help' => __d('tools', 'Hash a string'),
 				'parser' => array(
-					'description' => __('hash'),
+					'description' => __d('tools', 'hash'),
 				)
 			))->addSubcommand('compare', array(
-				'help' => __('Compare algs'),
+				'help' => __d('tools', 'Compare algs'),
 				'parser' => array(
-					'description' => __('Compare algs'),
+					'description' => __d('tools', 'Compare algs'),
 				)
 			))->addSubcommand('time', array(
-				'help' => __('Measure alg times'),
+				'help' => __d('tools', 'Measure alg times'),
 				'parser' => array(
-					'description' => __('Measure alg times'),
+					'description' => __d('tools', 'Measure alg times'),
 				)
 			))->epilog(
 				array(
-					__('sha1 is the default algorithm')
+					__d('tools', 'sha1 is the default algorithm')
 				)
 			);
 		return $parser;

+ 1 - 1
Console/Command/IndentShell.php

@@ -92,7 +92,7 @@ class IndentShell extends AppShell {
 			if (!empty($this->params['dry-run'])) {
 				$this->out('TEST DONE');
 			} else {
-				$continue = $this->in(__('Modifying files! Continue?'), array('y', 'n'), 'n');
+				$continue = $this->in(__d('tools', 'Modifying files! Continue?'), array('y', 'n'), 'n');
 				if (strtolower($continue) !== 'y' && strtolower($continue) !== 'yes') {
 					return $this->error('...aborted');
 				}

+ 1 - 1
Console/Command/IndexShell.php

@@ -208,7 +208,7 @@ class IndexShell extends AppShell {
 		if (empty($this->params['interactive'])) {
 			$continue = 'Y';
 		} else {
-			$continue = strtoupper($this->in(__('Run this statement?'), array('Y', 'N', 'A', 'Q')));
+			$continue = strtoupper($this->in(__d('tools', 'Run this statement?'), array('Y', 'N', 'A', 'Q')));
 			switch ($continue) {
 				case 'Q':
 					return $this->_stop();

+ 1 - 1
Console/Command/PhpTagShell.php

@@ -74,7 +74,7 @@ class PhpTagShell extends AppShell {
 
 					while (empty($action)) {
 						//TODO: [r]!
-						$action = $this->in(__('Remove? [y]/[n], [a] for all in this folder, [r] for all below, [*] for all files(!), [q] to quit'), array('y', 'n', 'r', 'a', 'q', '*'), 'q');
+						$action = $this->in(__d('tools', 'Remove? [y]/[n], [a] for all in this folder, [r] for all below, [*] for all files(!), [q] to quit'), array('y', 'n', 'r', 'a', 'q', '*'), 'q');
 					}
 				} else {
 					$action = 'y';

+ 2 - 2
Console/Command/PwdShell.php

@@ -27,13 +27,13 @@ class PwdShell extends AppShell {
 			}
 		}
 		if (!$class || !method_exists($class, 'password')) {
-			return $this->error(__('No Auth Component found'));
+			return $this->error(__d('tools', 'No Auth Component found'));
 		}
 
 		$this->out('Using: ' . $class);
 
 		while (empty($pwToHash) || mb_strlen($pwToHash) < 2) {
-			$pwToHash = $this->in(__('Password to Hash (2 characters at least)'));
+			$pwToHash = $this->in(__d('tools', 'Password to Hash (2 characters at least)'));
 		}
 
 		if ($authType = Configure::read('Passwordable.authType')) {

+ 2 - 2
Console/Command/ResetShell.php

@@ -34,7 +34,7 @@ class ResetShell extends AppShell {
 		$this->out('Email:');
 		App::uses('Validation', 'Utility');
 		while (empty($email) || !Validation::email($email)) {
-			$email = $this->in(__('New email address (must have a valid form at least)'));
+			$email = $this->in(__d('tools', 'New email address (must have a valid form at least)'));
 		}
 
 		$this->User = ClassRegistry::init(CLASS_USER);
@@ -76,7 +76,7 @@ class ResetShell extends AppShell {
 			$pwToHash = $this->args[0];
 		}
 		while (empty($pwToHash) || mb_strlen($pwToHash) < 2) {
-			$pwToHash = $this->in(__('Password to Hash (2 characters at least)'));
+			$pwToHash = $this->in(__d('tools', 'Password to Hash (2 characters at least)'));
 		}
 		$this->hr();
 		$this->out('Password:');

+ 9 - 9
Console/Command/UserShell.php

@@ -24,10 +24,10 @@ class UserShell extends AppShell {
 	 */
 	public function main() {
 		while (empty($username)) {
-			$username = $this->in(__('Username (2 characters at least)'));
+			$username = $this->in(__d('tools', 'Username (2 characters at least)'));
 		}
 		while (empty($password)) {
-			$password = $this->in(__('Password (2 characters at least)'));
+			$password = $this->in(__d('tools', 'Password (2 characters at least)'));
 		}
 
 		$schema = $this->User->schema();
@@ -42,7 +42,7 @@ class UserShell extends AppShell {
 
 			$roleIds = array_keys($roles);
 			while (!empty($roles) && empty($role)) {
-				$role = $this->in(__('Role'), $roleIds);
+				$role = $this->in(__d('tools', 'Role'), $roleIds);
 			}
 		} elseif (method_exists($this->User, 'roles')) {
 			$roles = User::roles();
@@ -54,12 +54,12 @@ class UserShell extends AppShell {
 
 			$roleIds = array_keys($roles);
 			while (!empty($roles) && empty($role)) {
-				$role = $this->in(__('Role'), $roleIds);
+				$role = $this->in(__d('tools', 'Role'), $roleIds);
 			}
 		}
 		if (empty($roles)) {
 			$this->out('No Role found (either no table, or no data)');
-			$role = $this->in(__('Please insert a role manually'));
+			$role = $this->in(__d('tools', 'Please insert a role manually'));
 		}
 
 		$this->out('');
@@ -83,15 +83,15 @@ class UserShell extends AppShell {
 		if (!empty($schema['status']) && method_exists('User', 'statuses')) {
 			$statuses = User::statuses();
 			$this->out(print_r($statuses, true));
-			$status = $this->in(__('Please insert a status'), array_keys($statuses));
+			$status = $this->in(__d('tools', 'Please insert a status'), array_keys($statuses));
 
 			$data['User']['status'] = $status;
 		}
 
 		if (!empty($schema['email'])) {
-			$provideEmail = $this->in(__('Provide Email? '), array('y', 'n'), 'n');
+			$provideEmail = $this->in(__d('tools', 'Provide Email? '), array('y', 'n'), 'n');
 			if ($provideEmail === 'y') {
-				$email = $this->in(__('Please insert an email'));
+				$email = $this->in(__d('tools', 'Please insert an email'));
 				$data['User']['email'] = $email;
 			}
 			if (!empty($schema['email_confirmed'])) {
@@ -100,7 +100,7 @@ class UserShell extends AppShell {
 		}
 
 		$this->out('');
-		$continue = $this->in(__('Continue?'), array('y', 'n'), 'n');
+		$continue = $this->in(__d('tools', 'Continue?'), array('y', 'n'), 'n');
 		if ($continue !== 'y') {
 			return $this->error('Not Executed!');
 		}

+ 3 - 3
Console/Command/WhitespaceShell.php

@@ -28,7 +28,7 @@ class WhitespaceShell extends AppShell {
 		$files = $App->findRecursive('.*\.php');
 		$this->out('Found ' . count($files) . ' files.');
 
-		$action = $this->in(__('Continue? [y]/[n]'), array('y', 'n'), 'n');
+		$action = $this->in(__d('tools', 'Continue? [y]/[n]'), array('y', 'n'), 'n');
 		if ($action !== 'y') {
 			return $this->error('Aborted');
 		}
@@ -64,7 +64,7 @@ class WhitespaceShell extends AppShell {
 
 				while (empty($action)) {
 					//TODO: [r]!
-					$action = $this->in(__('Remove? [y]/[n], [a] for all in this folder, [r] for all below, [*] for all files(!), [q] to quit'), array('y', 'n', 'r', 'a', 'q', '*'), 'q');
+					$action = $this->in(__d('tools', 'Remove? [y]/[n], [a] for all in this folder, [r] for all below, [*] for all files(!), [q] to quit'), array('y', 'n', 'r', 'a', 'q', '*'), 'q');
 				}
 			} else {
 				$action = 'y';
@@ -121,7 +121,7 @@ class WhitespaceShell extends AppShell {
 
 		$this->out('Found ' . count($files) . ' files.');
 
-		$action = $this->in(__('Continue? [y]/[n]'), array('y', 'n'), 'n');
+		$action = $this->in(__d('tools', 'Continue? [y]/[n]'), array('y', 'n'), 'n');
 		if ($action !== 'y') {
 			return $this->error('Aborted');
 		}

+ 12 - 12
Controller/Component/AuthExtComponent.php

@@ -77,53 +77,53 @@ class AuthExtComponent extends AuthComponent {
 		$user = $this->completeAuth($user);
 
 		if (empty($user)) {
-			$this->loginError = __('invalidLoginCredentials');
+			$this->loginError = __d('tools', 'invalidLoginCredentials');
 			return false;
 		}
 
 		// custom checks
 		if (isset($user['active'])) {
 			if (empty($user['active'])) {
-				$this->loginError = __('Account not active yet');
+				$this->loginError = __d('tools', 'Account not active yet');
 				return false;
 			}
 			if (!empty($user['suspended'])) {
-				$this->loginError = __('Account temporarily locked');
+				$this->loginError = __d('tools', 'Account temporarily locked');
 				if (!empty($user['suspended_reason'])) {
-					$this->loginError .= BR . BR . __('Reason') . ':' . BR . nl2br(h($user['suspended_reason']));
+					$this->loginError .= BR . BR . __d('tools', 'Reason') . ':' . BR . nl2br(h($user['suspended_reason']));
 				}
 				return false;
 			}
 		} else {
 			if (isset($user['status']) && empty($user['status'])) {
-				$this->loginError = __('Account not active yet');
+				$this->loginError = __d('tools', 'Account not active yet');
 				return false;
 			}
 			if (isset($user['status']) && defined('User::STATUS_PENDING') && $user['status'] == User::STATUS_PENDING) {
-				$this->loginError = __('Account not active yet');
+				$this->loginError = __d('tools', 'Account not active yet');
 				return false;
 			}
 			if (isset($user['status']) && defined('User::STATUS_SUSPENDED') && $user['status'] == User::STATUS_SUSPENDED) {
-				$this->loginError = __('Account temporarily locked');
+				$this->loginError = __d('tools', 'Account temporarily locked');
 				if (!empty($user['suspended_reason'])) {
-					$this->loginError .= BR . BR . __('Reason') . ':' . BR . nl2br(h($user['suspended_reason']));
+					$this->loginError .= BR . BR . __d('tools', 'Reason') . ':' . BR . nl2br(h($user['suspended_reason']));
 				}
 				return false;
 			}
 			if (isset($user['status']) && defined('User::STATUS_DEL') && $user['status'] == User::STATUS_DEL) {
-				$this->loginError = __('Account deleted');
+				$this->loginError = __d('tools', 'Account deleted');
 				if (!empty($user['suspended_reason'])) {
-					$this->loginError .= BR . BR . __('Reason') . ':' . BR . nl2br(h($user['suspended_reason']));
+					$this->loginError .= BR . BR . __d('tools', 'Reason') . ':' . BR . nl2br(h($user['suspended_reason']));
 				}
 				return false;
 			}
 			if (isset($user['status']) && defined('User::STATUS_ACTIVE') && $user['status'] != User::STATUS_ACTIVE) {
-				$this->loginError = __('Unknown Error');
+				$this->loginError = __d('tools', 'Unknown Error');
 				return false;
 			}
 		}
 		if (isset($user['email_confirmed']) && empty($user['email_confirmed'])) {
-			$this->loginError = __('Email not active yet');
+			$this->loginError = __d('tools', 'Email not active yet');
 			return false;
 		}
 

+ 2 - 2
Controller/Component/CalendarComponent.php

@@ -62,7 +62,7 @@ class CalendarComponent extends Component {
 		$current = date('Y');
 
 		if (empty($month) || $year < $current - $span || $year > $current + $span) {
-			$this->Controller->Common->flashMessage(__('invalid date'), 'error');
+			$this->Controller->Common->flashMessage(__d('tools', 'invalid date'), 'error');
 			$this->Controller->redirect(array('action' => 'index'));
 		}
 
@@ -74,7 +74,7 @@ class CalendarComponent extends Component {
 		}
 
 		if ($month < 1 || $month > 12) {
-			$this->Controller->Common->flashMessage(__('invalid date'), 'error');
+			$this->Controller->Common->flashMessage(__d('tools', 'invalid date'), 'error');
 			$this->Controller->redirect(array('action' => 'index'));
 		}
 		return true;

+ 6 - 6
Controller/Component/CommonComponent.php

@@ -503,7 +503,7 @@ class CommonComponent extends Component {
 	 */
 	public function setMeta($type, $content, $prep = true) {
 		if (!in_array($type, array('title', 'canonical', 'description', 'keywords', 'robots', 'language', 'custom'))) {
-			trigger_error(__('Meta Type invalid'), E_USER_WARNING);
+			trigger_error(__d('tools', 'Meta Type invalid'), E_USER_WARNING);
 			return;
 		}
 		if ($type === 'canonical' && $prep) {
@@ -816,8 +816,8 @@ class CommonComponent extends Component {
 	public static function separators($s = null, $valueOnly = false) {
 		$separatorsValues = array(SEPARATOR_COMMA => ',', SEPARATOR_SEMI => ';', SEPARATOR_SPACE => ' ', SEPARATOR_TAB => TB, SEPARATOR_NL => NL);
 
-		$separators = array(SEPARATOR_COMMA => '[ , ] ' . __('Comma'), SEPARATOR_SEMI => '[ ; ] ' . __('Semicolon'), SEPARATOR_SPACE => '[ &nbsp; ] ' . __('Space'), SEPARATOR_TAB =>
-			'[ &nbsp;&nbsp;&nbsp;&nbsp; ] ' . __('Tabulator'), SEPARATOR_NL => '[ \n ] ' . __('New Line'));
+		$separators = array(SEPARATOR_COMMA => '[ , ] ' . __d('tools', 'Comma'), SEPARATOR_SEMI => '[ ; ] ' . __d('tools', 'Semicolon'), SEPARATOR_SPACE => '[ &nbsp; ] ' . __d('tools', 'Space'), SEPARATOR_TAB =>
+			'[ &nbsp;&nbsp;&nbsp;&nbsp; ] ' . __d('tools', 'Tabulator'), SEPARATOR_NL => '[ \n ] ' . __d('tools', 'New Line'));
 
 		if ($s !== null) {
 			if (array_key_exists($s, $separators)) {
@@ -1041,7 +1041,7 @@ class CommonComponent extends Component {
 		if ($code === null) {
 			if ($autoTranslate) {
 				foreach ($responses as $key => $value) {
-					$responses[$key] = __($value);
+					$responses[$key] = __d('tools', $value);
 				}
 			}
 			return $responses;
@@ -1054,7 +1054,7 @@ class CommonComponent extends Component {
 
 		if (!empty($code) && array_key_exists((int)$code, $responses)) {
 			if ($autoTranslate) {
-				return __($responses[$code]);
+				return __d('tools', $responses[$code]);
 			}
 			return $responses[$code];
 		}
@@ -1078,7 +1078,7 @@ class CommonComponent extends Component {
 		);
 		if (!empty($code) && array_key_exists((int)$code, $responses)) {
 			if ($autoTranslate) {
-				return __($responses[$code]);
+				return __d('tools', $responses[$code]);
 			}
 			return $responses[$code];
 		}

+ 1 - 1
Controller/Component/MobileComponent.php

@@ -265,7 +265,7 @@ class MobileComponent extends Component {
 			return call_user_func($this->settings['engine']);
 		}
 		if (!in_array($this->settings['engine'], array('tools', 'vendor'))) {
-			throw new CakeException(__('Engine %s not available', $this->settings['engine']));
+			throw new CakeException(__d('tools', 'Engine %s not available', $this->settings['engine']));
 		}
 		return $this->detectByVendor($this->settings['engine']);
 	}

+ 3 - 3
Controller/QloginController.php

@@ -35,7 +35,7 @@ class QloginController extends ToolsAppController {
 		}
 
 		if (empty($entry)) {
-			$this->Common->flashMessage(__('Invalid Key'), 'error');
+			$this->Common->flashMessage(__d('tools', 'Invalid Key'), 'error');
 			return $this->Common->autoRedirect($default);
 		}
 
@@ -47,7 +47,7 @@ class QloginController extends ToolsAppController {
 			if ($this->Common->manualLogin($uid)) {
 				$this->Session->write('Auth.User.Login.qlogin', true);
 				if (!Configure::read('Qlogin.suppressMessage')) {
-					$this->Common->flashMessage(__('You successfully logged in via qlogin'), 'success');
+					$this->Common->flashMessage(__d('tools', 'You successfully logged in via qlogin'), 'success');
 				}
 			} else {
 				$this->Common->flashMessage($this->Auth->loginError, 'error');
@@ -105,7 +105,7 @@ class QloginController extends ToolsAppController {
 		$this->request->allowMethod(array('post', 'delete'));
 		$this->Token = ClassRegistry::init('Tools.Token');
 		$this->Token->deleteAll(array('type' => 'qlogin'));
-		$this->Common->flashMessage(__('Success'), 'success');
+		$this->Common->flashMessage(__d('tools', 'Success'), 'success');
 		return $this->Common->autoRedirect(array('action' => 'index'));
 	}
 

+ 1 - 1
Controller/TinyUrlsController.php

@@ -97,7 +97,7 @@ class TinyUrlsController extends ToolsAppController {
 			throw new MethodNotAllowedException();
 		}
 		$this->TinyUrl->truncate();
-		$this->Common->flashMessage(__('Done'), 'success');
+		$this->Common->flashMessage(__d('tools', 'Done'), 'success');
 		return $this->Common->autoRedirect(array('action' => 'index'));
 	}
 

+ 20 - 20
Lib/GeocodeLib.php

@@ -260,7 +260,7 @@ class GeocodeLib {
 
 			if (!is_array($result)) {
 				$this->setError('Result parsing failed');
-				CakeLog::write('geocode', __('Failed geocode parsing of \'%s\'', $address));
+				CakeLog::write('geocode', __d('tools', 'Failed geocode parsing of \'%s\'', $address));
 				return false;
 			}
 
@@ -273,14 +273,14 @@ class GeocodeLib {
 
 				// save Result
 				if ($this->options['log']) {
-					CakeLog::write('geocode', __('Address \'%s\' has been geocoded', $address));
+					CakeLog::write('geocode', __d('tools', 'Address \'%s\' has been geocoded', $address));
 				}
 				break;
 
 			} elseif ($status == static::STATUS_TOO_MANY_QUERIES) {
 				// sent geocodes too fast, delay +0.1 seconds
 				if ($this->options['log']) {
-					CakeLog::write('geocode', __('Delay necessary for address \'%s\'', $address));
+					CakeLog::write('geocode', __d('tools', 'Delay necessary for address \'%s\'', $address));
 				}
 				$count++;
 			} else {
@@ -296,14 +296,14 @@ class GeocodeLib {
 				$this->setError('Error ' . $status . ' (' . $errorMessage . ')');
 
 				if ($this->options['log']) {
-					CakeLog::write('geocode', __('Could not geocode \'%s\'', $address));
+					CakeLog::write('geocode', __d('tools', 'Could not geocode \'%s\'', $address));
 				}
 				return false; # for now...
 			}
 
 			if ($count > $this->options['repeat']) {
 				if ($this->options['log']) {
-					CakeLog::write('geocode', __('Aborted after too many trials with \'%s\'', $address));
+					CakeLog::write('geocode', __d('tools', 'Aborted after too many trials with \'%s\'', $address));
 				}
 				$this->setError('Too many trials - abort');
 				$this->reachedQueryLimit = true;
@@ -340,7 +340,7 @@ class GeocodeLib {
 			$result = $this->_fetch($requestUrl, $this->params);
 			if ($result === false || $result === null) {
 				$this->setError('Could not retrieve url');
-				CakeLog::write('geocode', __('Could not retrieve url with \'%s\'', $latlng));
+				CakeLog::write('geocode', __d('tools', 'Could not retrieve url with \'%s\'', $latlng));
 				return false;
 			}
 
@@ -348,7 +348,7 @@ class GeocodeLib {
 			$result = $this->_transform($result);
 			if (!is_array($result)) {
 				$this->setError('Result parsing failed');
-				CakeLog::write('geocode', __('Failed reverseGeocode parsing of \'%s\'', $latlng));
+				CakeLog::write('geocode', __d('tools', 'Failed reverseGeocode parsing of \'%s\'', $latlng));
 				return false;
 			}
 
@@ -361,14 +361,14 @@ class GeocodeLib {
 
 				// save Result
 				if ($this->options['log']) {
-					CakeLog::write('geocode', __('Address \'%s\' has been geocoded', $latlng));
+					CakeLog::write('geocode', __d('tools', 'Address \'%s\' has been geocoded', $latlng));
 				}
 				break;
 
 			} elseif ($status == static::STATUS_TOO_MANY_QUERIES) {
 				// sent geocodes too fast, delay +0.1 seconds
 				if ($this->options['log']) {
-					CakeLog::write('geocode', __('Delay necessary for \'%s\'', $latlng));
+					CakeLog::write('geocode', __d('tools', 'Delay necessary for \'%s\'', $latlng));
 				}
 				$count++;
 
@@ -377,15 +377,15 @@ class GeocodeLib {
 				$this->setError('Error ' . $status . (isset($this->statusCodes[$status]) ? ' (' . $this->statusCodes[$status] . ')' : ''));
 
 				if ($this->options['log']) {
-					CakeLog::write('geocode', __('Could not geocode \'%s\'', $latlng));
+					CakeLog::write('geocode', __d('tools', 'Could not geocode \'%s\'', $latlng));
 				}
 				return false; # for now...
 			}
 			if ($count > $this->options['repeat']) {
 				if ($this->options['log']) {
-					CakeLog::write('geocode', __('Aborted after too many trials with \'%s\'', $latlng));
+					CakeLog::write('geocode', __d('tools', 'Aborted after too many trials with \'%s\'', $latlng));
 				}
-				$this->setError(__('Too many trials - abort'));
+				$this->setError(__d('tools', 'Too many trials - abort'));
 				$this->reachedQueryLimit = true;
 				return false;
 			}
@@ -420,13 +420,13 @@ class GeocodeLib {
 
 		// validate
 		if (!$this->options['allow_inconclusive'] && $validResults > 1) {
-			$this->setError(__('Inconclusive result (total of %s)', $validResults));
+			$this->setError(__d('tools', 'Inconclusive result (total of %s)', $validResults));
 			return false;
 		}
 
 		if ($this->_isNotAccurateEnough($this->result['accuracy'])) {
 			$minAccuracy = $this->accuracyTypes[$this->options['min_accuracy']];
-			$this->setError(__('Accuracy not good enough (%s instead of at least %s)', $this->result['accuracy_name'], $minAccuracy));
+			$this->setError(__d('tools', 'Accuracy not good enough (%s instead of at least %s)', $this->result['accuracy_name'], $minAccuracy));
 
 			return false;
 		}
@@ -441,7 +441,7 @@ class GeocodeLib {
 			$validExpectation = !empty($found);
 
 			if (!$validExpectation) {
-				$this->setError(__('Expectation not reached (we have %s instead of at least one of %s)',
+				$this->setError(__d('tools', 'Expectation not reached (we have %s instead of at least one of %s)',
 					implode(', ', $found),
 					implode(', ', $expected)
 				));
@@ -743,7 +743,7 @@ class GeocodeLib {
 		}
 		$unit = strtoupper($unit);
 		if (!isset($this->units[$unit])) {
-			throw new CakeException(__('Invalid Unit: %s', $unit));
+			throw new CakeException(__d('tools', 'Invalid Unit: %s', $unit));
 		}
 
 		$res = $this->calculateDistance($pointX, $pointY);
@@ -787,7 +787,7 @@ class GeocodeLib {
 	 */
 	public function convert($value, $fromUnit, $toUnit) {
 		if (!isset($this->units[($fromUnit = strtoupper($fromUnit))]) || !isset($this->units[($toUnit = strtoupper($toUnit))])) {
-			throw new CakeException(__('Invalid Unit'));
+			throw new CakeException(__d('tools', 'Invalid Unit'));
 		}
 		if ($fromUnit === 'M') {
 			$value *= $this->units[$toUnit];
@@ -832,7 +832,7 @@ class GeocodeLib {
 			case 5:
 				break;
 			default:
-				throw new CakeException(__('Invalid level \'%s\'', $level));
+				throw new CakeException(__d('tools', 'Invalid level \'%s\'', $level));
 		}
 		$scrambleVal = 0.000001 * mt_rand(1000, 2000) * (mt_rand(0, 1) === 0 ? 1 : -1);
 
@@ -858,7 +858,7 @@ class GeocodeLib {
 	 */
 	public function statusMessage($code) {
 		if (isset($this->statusCodes[$code])) {
-			return __($this->statusCodes[$code]);
+			return __d('tools', $this->statusCodes[$code]);
 		}
 		return '';
 	}
@@ -886,7 +886,7 @@ class GeocodeLib {
 			static::CODE_TOO_MANY_QUERIES => 'Too Many Queries',
 		);
 		if (isset($codes[$code])) {
-			return __($codes[$code]);
+			return __d('tools', $codes[$code]);
 		}
 		return '';
 	}

+ 12 - 12
Lib/Misc/ZodiacLib.php

@@ -154,18 +154,18 @@ class ZodiacLib {
 	 */
 	public static function signs($value = null) {
 		$res = array(
-			static::SIGN_AQUARIUS	=> __('zodiacAquarius'),
-			static::SIGN_PISCES	=> __('zodiacPisces'),
-			static::SIGN_ARIES	=> __('zodiacAries'),
-			static::SIGN_TAURUS	=> __('zodiacTaurus'),
-			static::SIGN_GEMINI	=> __('zodiacGemini'),
-			static::SIGN_CANCER	=> __('zodiacCancer'),
-			static::SIGN_LEO	=> __('zodiacLeo'),
-			static::SIGN_VIRGO	=> __('zodiacVirgo'),
-			static::SIGN_LIBRA	=> __('zodiacLibra'),
-			static::SIGN_SCORPIO	=> __('zodiacScorpio'),
-			static::SIGN_SAGITTARIUS	=> __('zodiacSagittarius'),
-			static::SIGN_CAPRICORN	=> __('zodiacCapricorn'),
+			static::SIGN_AQUARIUS	=> __d('tools', 'zodiacAquarius'),
+			static::SIGN_PISCES	=> __d('tools', 'zodiacPisces'),
+			static::SIGN_ARIES	=> __d('tools', 'zodiacAries'),
+			static::SIGN_TAURUS	=> __d('tools', 'zodiacTaurus'),
+			static::SIGN_GEMINI	=> __d('tools', 'zodiacGemini'),
+			static::SIGN_CANCER	=> __d('tools', 'zodiacCancer'),
+			static::SIGN_LEO	=> __d('tools', 'zodiacLeo'),
+			static::SIGN_VIRGO	=> __d('tools', 'zodiacVirgo'),
+			static::SIGN_LIBRA	=> __d('tools', 'zodiacLibra'),
+			static::SIGN_SCORPIO	=> __d('tools', 'zodiacScorpio'),
+			static::SIGN_SAGITTARIUS	=> __d('tools', 'zodiacSagittarius'),
+			static::SIGN_CAPRICORN	=> __d('tools', 'zodiacCapricorn'),
 		);
 		if ($value === null) {
 			return $res;

+ 3 - 3
Lib/SpellLib.php

@@ -36,7 +36,7 @@ class SpellLib {
 
 	public function __construct($options = array()) {
 		if (!function_exists('enchant_broker_init')) {
-			throw new InternalErrorException(__('Module %s not installed', 'Enchant'));
+			throw new InternalErrorException(__d('tools', 'Module %s not installed', 'Enchant'));
 		}
 		$this->_Broker = enchant_broker_init();
 
@@ -49,13 +49,13 @@ class SpellLib {
 		$options = array_merge($defaults, $options);
 
 		if (!isset($this->_engines[$options['engine']])) {
-			throw new InternalErrorException(__('Engine %s not found', (string) $options['engine']));
+			throw new InternalErrorException(__d('tools', 'Engine %s not found', (string) $options['engine']));
 		}
 		$engineFolder = $this->_engines[$options['engine']];
 		enchant_broker_set_dict_path($this->_Broker, $options['engine'], $options['path'] . $engineFolder . DS);
 
 		if (!enchant_broker_dict_exists($this->_Broker, $options['lang'])) {
-			throw new InternalErrorException(__('Dictionary %s not found', $options['lang']));
+			throw new InternalErrorException(__d('tools', 'Dictionary %s not found', $options['lang']));
 		}
 
 		$this->_Dict = enchant_broker_request_dict($this->_Broker, $options['lang']);

+ 2 - 2
Lib/Utility/FolderLib.php

@@ -39,9 +39,9 @@ class FolderLib extends Folder {
 			}
 			if (is_file($file)) {
 				if (@unlink($file)) {
-					$this->_messages[] = __('%s removed', $file);
+					$this->_messages[] = __d('tools', '%s removed', $file);
 				} else {
-					$this->_errors[] = __('%s NOT removed', $file);
+					$this->_errors[] = __d('tools', '%s NOT removed', $file);
 				}
 			} elseif (is_dir($file) && $this->delete($file) === false) {
 				return false;

+ 28 - 28
Lib/Utility/TimeLib.php

@@ -465,7 +465,7 @@ class TimeLib extends CakeTime {
 				case FORMAT_LOCAL_YMDHM:
 				case FORMAT_LOCAL_HM:
 				case FORMAT_LOCAL_HMS:
-					$date .= ' ' . __('o\'clock');
+					$date .= ' ' . __d('tools', 'o\'clock');
 					break;
 			}
 		}
@@ -518,7 +518,7 @@ class TimeLib extends CakeTime {
 				case FORMAT_NICE_YMDHM:
 				case FORMAT_NICE_HM:
 				case FORMAT_NICE_HMS:
-					$ret .= ' ' . __('o\'clock');
+					$ret .= ' ' . __d('tools', 'o\'clock');
 					break;
 			}
 		}
@@ -576,9 +576,9 @@ class TimeLib extends CakeTime {
 		}
 		//pr($day);
 		if ($abbr) {
-			return __($days['short'][$day]);
+			return __d('tools', $days['short'][$day]);
 		}
-		return __($days['long'][$day]);
+		return __d('tools', $days['long'][$day]);
 	}
 
 	/**
@@ -624,10 +624,10 @@ class TimeLib extends CakeTime {
 		);
 		$month = (int) ($month - 1);
 		if (!$abbr) {
-			return __($months['long'][$month]);
+			return __d('tools', $months['long'][$month]);
 		}
-		$monthName = __($months['short'][$month]);
-		if (!empty($options['appendDot']) && strlen(__($months['long'][$month])) > 3) {
+		$monthName = __d('tools', $months['short'][$month]);
+		if (!empty($options['appendDot']) && strlen(__d('tools', $months['long'][$month])) > 3) {
 			$monthName .= '.';
 		}
 		return $monthName;
@@ -737,17 +737,17 @@ class TimeLib extends CakeTime {
 		}
 		if ($past === true) {
 			// This is in the past
-			return __('%s ago', __($span));
+			return __d('tools', '%s ago', __d('tools', $span));
 		}
 		if ($past === false) {
 			// This in the future
-			return __('in %s', __($span));
+			return __d('tools', 'in %s', __d('tools', $span));
 		}
 		if ($past !== null) {
 			// Custom translation
-			return __($past, __($span));
+			return __d('tools', $past, __d('tools', $span));
 		}
-		return __($span);
+		return __d('tools', $span);
 	}
 
 	/**
@@ -777,18 +777,18 @@ class TimeLib extends CakeTime {
 			$p = $s;
 		} else {
 			$s = array(
-		'm' => ' ' . __('Month'), # translated
-				'd' => ' ' . __('Day'),
-				'h' => ' ' . __('Hour'),
-				'i' => ' ' . __('Minute'),
-				's' => ' ' . __('Second'),
+		'm' => ' ' . __d('tools', 'Month'), # translated
+				'd' => ' ' . __d('tools', 'Day'),
+				'h' => ' ' . __d('tools', 'Hour'),
+				'i' => ' ' . __d('tools', 'Minute'),
+				's' => ' ' . __d('tools', 'Second'),
 			);
 			$p = array(
-		'm' => ' ' . __('Months'), # translated
-				'd' => ' ' . __('Days'),
-				'h' => ' ' . __('Hours'),
-				'i' => ' ' . __('Minutes'),
-				's' => ' ' . __('Seconds'),
+		'm' => ' ' . __d('tools', 'Months'), # translated
+				'd' => ' ' . __d('tools', 'Days'),
+				'h' => ' ' . __d('tools', 'Hours'),
+				'i' => ' ' . __d('tools', 'Minutes'),
+				's' => ' ' . __d('tools', 'Seconds'),
 			);
 		}
 
@@ -887,8 +887,8 @@ class TimeLib extends CakeTime {
 		}
 
 		$defaults = array(
-			'verbose' => __('justNow'), 'zero' => false, 'separator' => ', ',
-			'future' => __('In %s'), 'past' => __('%s ago'), 'default' => '');
+			'verbose' => __d('tools', 'justNow'), 'zero' => false, 'separator' => ', ',
+			'future' => __d('tools', 'In %s'), 'past' => __d('tools', '%s ago'), 'default' => '');
 		$options += $defaults;
 
 		$ret = static::lengthOfTime($sec, $format, $options);
@@ -987,11 +987,11 @@ class TimeLib extends CakeTime {
 	public static function parseLocalizedDate($date, $format = null, $type = 'start') {
 		$date = trim($date);
 		$i18n = array(
-			strtolower(__('Today')) => array('start' => date(FORMAT_DB_DATETIME, mktime(0, 0, 0, date('m'), date('d'), date('Y'))), 'end' => date(FORMAT_DB_DATETIME, mktime(23, 59, 59, date('m'), date('d'), date('Y')))),
-			strtolower(__('Tomorrow')) => array('start' => date(FORMAT_DB_DATETIME, mktime(0, 0, 0, date('m'), date('d'), date('Y')) + DAY), 'end' => date(FORMAT_DB_DATETIME, mktime(23, 59, 59, date('m'), date('d'), date('Y')) + DAY)),
-			strtolower(__('Yesterday')) => array('start' => date(FORMAT_DB_DATETIME, mktime(0, 0, 0, date('m'), date('d'), date('Y')) - DAY), 'end' => date(FORMAT_DB_DATETIME, mktime(23, 59, 59, date('m'), date('d'), date('Y')) - DAY)),
-			strtolower(__('The day after tomorrow')) => array('start' => date(FORMAT_DB_DATETIME, mktime(0, 0, 0, date('m'), date('d'), date('Y')) + 2 * DAY), 'end' => date(FORMAT_DB_DATETIME, mktime(23, 59, 59, date('m'), date('d'), date('Y')) + 2 * DAY)),
-			strtolower(__('The day before yesterday')) => array('start' => date(FORMAT_DB_DATETIME, mktime(0, 0, 0, date('m'), date('d'), date('Y')) - 2 * DAY), 'end' => date(FORMAT_DB_DATETIME, mktime(23, 59, 59, date('m'), date('d'), date('Y')) - 2 * DAY)),
+			strtolower(__d('tools', 'Today')) => array('start' => date(FORMAT_DB_DATETIME, mktime(0, 0, 0, date('m'), date('d'), date('Y'))), 'end' => date(FORMAT_DB_DATETIME, mktime(23, 59, 59, date('m'), date('d'), date('Y')))),
+			strtolower(__d('tools', 'Tomorrow')) => array('start' => date(FORMAT_DB_DATETIME, mktime(0, 0, 0, date('m'), date('d'), date('Y')) + DAY), 'end' => date(FORMAT_DB_DATETIME, mktime(23, 59, 59, date('m'), date('d'), date('Y')) + DAY)),
+			strtolower(__d('tools', 'Yesterday')) => array('start' => date(FORMAT_DB_DATETIME, mktime(0, 0, 0, date('m'), date('d'), date('Y')) - DAY), 'end' => date(FORMAT_DB_DATETIME, mktime(23, 59, 59, date('m'), date('d'), date('Y')) - DAY)),
+			strtolower(__d('tools', 'The day after tomorrow')) => array('start' => date(FORMAT_DB_DATETIME, mktime(0, 0, 0, date('m'), date('d'), date('Y')) + 2 * DAY), 'end' => date(FORMAT_DB_DATETIME, mktime(23, 59, 59, date('m'), date('d'), date('Y')) + 2 * DAY)),
+			strtolower(__d('tools', 'The day before yesterday')) => array('start' => date(FORMAT_DB_DATETIME, mktime(0, 0, 0, date('m'), date('d'), date('Y')) - 2 * DAY), 'end' => date(FORMAT_DB_DATETIME, mktime(23, 59, 59, date('m'), date('d'), date('Y')) - 2 * DAY)),
 		);
 		if (isset($i18n[strtolower($date)])) {
 			return $i18n[strtolower($date)][$type];

+ 9 - 9
Model/Behavior/CaptchaBehavior.php

@@ -70,19 +70,19 @@ class CaptchaBehavior extends ModelBehavior {
 			$this->Model->whitelist = array_merge($Model->whitelist, $this->fields());
 		}
 		if (empty($Model->data[$Model->alias])) {
-			$this->Model->invalidate('captcha', __('captchaContentMissing'));
+			$this->Model->invalidate('captcha', __d('tools', 'captchaContentMissing'));
 
 		} elseif (!$this->_validateDummyField($Model->data[$Model->alias])) {
-			$this->Model->invalidate('captcha', __('captchaIllegalContent'));
+			$this->Model->invalidate('captcha', __d('tools', 'captchaIllegalContent'));
 
 		} elseif (!$this->_validateCaptchaMinTime($Model->data[$Model->alias])) {
-			$this->Model->invalidate('captcha', __('captchaResultTooFast'));
+			$this->Model->invalidate('captcha', __d('tools', 'captchaResultTooFast'));
 
 		} elseif (!$this->_validateCaptchaMaxTime($Model->data[$Model->alias])) {
-			$this->Model->invalidate('captcha', __('captchaResultTooLate'));
+			$this->Model->invalidate('captcha', __d('tools', 'captchaResultTooLate'));
 
 		} elseif (in_array($this->settings[$Model->alias]['type'], array('active', 'both')) && !$this->_validateCaptcha($Model->data[$Model->alias])) {
-			$this->Model->invalidate('captcha', __('captchaResultIncorrect'));
+			$this->Model->invalidate('captcha', __d('tools', 'captchaResultIncorrect'));
 
 		}
 
@@ -114,11 +114,11 @@ class CaptchaBehavior extends ModelBehavior {
 	protected function _validateDummyField($data) {
 		$dummyField = $this->settings[$this->Model->alias]['dummyField'];
 		if (!isset($data[$dummyField])) {
-			return $this->_setError(__('Illegal call'));
+			return $this->_setError(__d('tools', 'Illegal call'));
 		}
 		if (!empty($data[$dummyField])) {
 			// Dummy field not empty - SPAM!
-			return $this->_setError(__('Illegal content'), 'DummyField = \'' . $data[$dummyField] . '\'');
+			return $this->_setError(__d('tools', 'Illegal content'), 'DummyField = \'' . $data[$dummyField] . '\'');
 		}
 		return true;
 	}
@@ -170,7 +170,7 @@ class CaptchaBehavior extends ModelBehavior {
 	protected function _validateCaptcha($data) {
 		if (!isset($data['captcha'])) {
 			// form inputs missing? SPAM!
-			return $this->_setError(__('captchaContentMissing'));
+			return $this->_setError(__d('tools', 'captchaContentMissing'));
 		}
 
 		$hash = $this->_buildHash($data);
@@ -179,7 +179,7 @@ class CaptchaBehavior extends ModelBehavior {
 			return true;
 		}
 		// wrong captcha content or session expired
-		return $this->_setError(__('Captcha incorrect'), 'SubmittedResult = \'' . $data['captcha'] . '\'');
+		return $this->_setError(__d('tools', 'Captcha incorrect'), 'SubmittedResult = \'' . $data['captcha'] . '\'');
 	}
 
 	/**

+ 1 - 1
Model/Behavior/ConfirmableBehavior.php

@@ -72,7 +72,7 @@ class ConfirmableBehavior extends ModelBehavior {
 		$message = $this->settings[$Model->alias]['message'];
 
 		if (empty($Model->data[$Model->alias][$field])) {
-				$Model->invalidate($field, __($message));
+				$Model->invalidate($field, __d('tools', $message));
 				return false;
 		}
 

+ 1 - 1
Model/Behavior/CustomFindsBehavior.php

@@ -36,7 +36,7 @@ class CustomFindsBehavior extends ModelBehavior {
 	protected function _verifyContainable(Model $Model, $query) {
 		if (is_array($Model->actsAs) && in_array('Containable', $Model->actsAs) && isset($query['contain'])) {
 			if (array_search('CustomFinds', $Model->actsAs) > array_search('Containable', $Model->actsAs)) {
-				trigger_error(__('The behavior "Containable", if used together with "CustomFinds" needs to be loaded before.'), E_USER_WARNING);
+				trigger_error(__d('tools', 'The behavior "Containable", if used together with "CustomFinds" needs to be loaded before.'), E_USER_WARNING);
 			}
 		}
 	}

+ 6 - 6
Model/Behavior/LogableBehavior.php

@@ -398,7 +398,7 @@ class LogableBehavior extends ModelBehavior {
 			if ($this->settings[$Model->alias]['descriptionIds']) {
 				$logData['description'] .= ' (' . $Model->id . ') ';
 			}
-			$logData['description'] .= __('deleted');
+			$logData['description'] .= __d('tools', 'deleted');
 		}
 		$logData['action'] = 'delete';
 		if (!$this->_saveLog($Model, $logData)) {
@@ -480,9 +480,9 @@ class LogableBehavior extends ModelBehavior {
 			}
 
 			if ($created) {
-				$logData['description'] .= __('added');
+				$logData['description'] .= __d('tools', 'added');
 			} else {
-				$logData['description'] .= __('updated');
+				$logData['description'] .= __d('tools', 'updated');
 			}
 		}
 		if ($this->Log->hasField('action')) {
@@ -621,17 +621,17 @@ class LogableBehavior extends ModelBehavior {
 
 		if ($this->Log->hasField('description')) {
 			if (empty($logData['description'])) {
-				$logData['description'] = __('Custom action');
+				$logData['description'] = __d('tools', 'Custom action');
 			}
 			if ($this->user && $this->UserModel && isset($this->user[$this->UserModel->alias])) {
-				$logData['description'] .= ' ' . __('by') . ' ' . $this->settings[$Model->alias]['userModel'] . ' "' . $this->user[$this->UserModel->alias][$this->UserModel->displayField] . '"';
+				$logData['description'] .= ' ' . __d('tools', 'by') . ' ' . $this->settings[$Model->alias]['userModel'] . ' "' . $this->user[$this->UserModel->alias][$this->UserModel->displayField] . '"';
 				if ($this->settings[$Model->alias]['descriptionIds']) {
 					$logData['description'] .= ' (' . $this->user[$this->UserModel->alias][$this->UserModel->primaryKey] . ')';
 				}
 
 			} else {
 				// UserModel is active, but the data hasnt been set. Assume system action.
-				$logData['description'] .= ' ' . __('by System');
+				$logData['description'] .= ' ' . __d('tools', 'by System');
 			}
 			$logData['description'] .= '.';
 		}

+ 1 - 1
Model/Behavior/PasswordableBehavior.php

@@ -228,7 +228,7 @@ class PasswordableBehavior extends ModelBehavior {
 			// Make sure we trigger validation if allowEmpty is set but we have the password field set
 			if ($new) {
 				if ($this->settings[$Model->alias]['confirm'] && empty($Model->data[$Model->alias][$formFieldRepeat])) {
-					$Model->invalidate($formFieldRepeat, __('valErrPwdNotMatch'));
+					$Model->invalidate($formFieldRepeat, __d('tools', 'valErrPwdNotMatch'));
 				}
 			}
 		}

+ 1 - 1
Model/Behavior/SluggedBehavior.php

@@ -89,7 +89,7 @@ class SluggedBehavior extends ModelBehavior {
 		);
 		$defaults += $this->_defaultConfig;
 		foreach ($defaults['replace'] as $key => $value) {
-			$defaults['replace'][$key] = __($value);
+			$defaults['replace'][$key] = __d('tools', $value);
 		}
 
 		$config += (array)Configure::read('Slugged');

+ 1 - 1
Test/Case/Lib/Misc/ZodiacLibTest.php

@@ -31,7 +31,7 @@ class ZodiacLibTest extends MyCakeTestCase {
 
 		$is = $this->Zodiac->signs($is);
 		$this->debug($is);
-		$this->assertEquals($is, __('zodiacAries'));
+		$this->assertEquals($is, __d('tools', 'zodiacAries'));
 
 		// january
 		$is = $this->Zodiac->getSign(1, 20);

+ 1 - 1
Test/Case/Lib/SpellLibTest.php

@@ -10,7 +10,7 @@ class SpellLibTest extends MyCakeTestCase {
 	public function setUp() {
 		parent::setUp();
 
-		$this->skipIf(!function_exists('enchant_broker_init'), __('Module %s not installed', 'Enchant'));
+		$this->skipIf(!function_exists('enchant_broker_init'), __d('tools', 'Module %s not installed', 'Enchant'));
 
 		$this->SpellLib = new SpellLib();
 	}

+ 25 - 25
Test/Case/Lib/Utility/TimeLibTest.php

@@ -110,7 +110,7 @@ class TimeLibTest extends MyCakeTestCase {
 		$date = '2009-12-01 00:00:00';
 		$format = FORMAT_NICE_YMDHM;
 		$result = TimeLib::niceDate($date, $format, array('oclock' => true));
-		$expected = '01.12.2009, 00:00 ' . __('o\'clock');
+		$expected = '01.12.2009, 00:00 ' . __d('tools', 'o\'clock');
 		$this->assertEquals($expected, $result);
 	}
 
@@ -170,7 +170,7 @@ class TimeLibTest extends MyCakeTestCase {
 		//$this->assertEquals($ret, '2009-02-01 00:00:00');
 
 		$values = array(
-			array(__('Today'), array(date(FORMAT_DB_DATETIME, mktime(0, 0, 0, date('m'), date('d'), date('Y'))), date(FORMAT_DB_DATETIME, mktime(23, 59, 59, date('m'), date('d'), date('Y'))))),
+			array(__d('tools', 'Today'), array(date(FORMAT_DB_DATETIME, mktime(0, 0, 0, date('m'), date('d'), date('Y'))), date(FORMAT_DB_DATETIME, mktime(23, 59, 59, date('m'), date('d'), date('Y'))))),
 			array('2010', array('2010-01-01 00:00:00', '2010-12-31 23:59:59')),
 			array('23.02.2011', array('2011-02-23 00:00:00', '2011-02-23 23:59:59')),
 			array('22/02/2011', array('2011-02-22 00:00:00', '2011-02-22 23:59:59')),
@@ -218,7 +218,7 @@ class TimeLibTest extends MyCakeTestCase {
 		$date = '2009-12-01 00:00:00';
 		$format = FORMAT_LOCAL_YMDHM;
 		$result = TimeLib::localDate($date, $format, array('oclock' => true));
-		$expected = '01.12.2009, 00:00 ' . __('o\'clock');
+		$expected = '01.12.2009, 00:00 ' . __d('tools', 'o\'clock');
 		$this->assertEquals($expected, $result);
 	}
 
@@ -230,7 +230,7 @@ class TimeLibTest extends MyCakeTestCase {
 	public function testPeriod() {
 		$this->out($this->_header(__FUNCTION__), true);
 		$values = array(
-			array(__('Today'), array(date(FORMAT_DB_DATETIME, mktime(0, 0, 0, date('m'), date('d'), date('Y'))), date(FORMAT_DB_DATETIME, mktime(23, 59, 59, date('m'), date('d'), date('Y'))))),
+			array(__d('tools', 'Today'), array(date(FORMAT_DB_DATETIME, mktime(0, 0, 0, date('m'), date('d'), date('Y'))), date(FORMAT_DB_DATETIME, mktime(23, 59, 59, date('m'), date('d'), date('Y'))))),
 
 			array('2010', array('2010-01-01 00:00:00', '2010-12-31 23:59:59')),
 			array('2011-02', array('2011-02-01 00:00:00', '2011-02-28 23:59:59')),
@@ -259,10 +259,10 @@ class TimeLibTest extends MyCakeTestCase {
 	public function testPeriodAsSql() {
 		$this->out($this->_header(__FUNCTION__), true);
 		$values = array(
-			array(__('Today'), "(Model.field >= '" . date(FORMAT_DB_DATE) . " 00:00:00') AND (Model.field <= '" . date(FORMAT_DB_DATE) . " 23:59:59')"),
-			array(__('Yesterday') . ' ' . __('until') . ' ' . __('Today'), "(Model.field >= '" . date(FORMAT_DB_DATE, time() - DAY) . " 00:00:00') AND (Model.field <= '" . date(FORMAT_DB_DATE) . " 23:59:59')"),
-			array(__('Today') . ' ' . __('until') . ' ' . __('Tomorrow'), "(Model.field >= '" . date(FORMAT_DB_DATE, time()) . " 00:00:00') AND (Model.field <= '" . date(FORMAT_DB_DATE, time() + DAY) . " 23:59:59')"),
-			array(__('Yesterday') . ' ' . __('until') . ' ' . __('Tomorrow'), "(Model.field >= '" . date(FORMAT_DB_DATE, time() - DAY) . " 00:00:00') AND (Model.field <= '" . date(FORMAT_DB_DATE, time() + DAY) . " 23:59:59')"),
+			array(__d('tools', 'Today'), "(Model.field >= '" . date(FORMAT_DB_DATE) . " 00:00:00') AND (Model.field <= '" . date(FORMAT_DB_DATE) . " 23:59:59')"),
+			array(__d('tools', 'Yesterday') . ' ' . __d('tools', 'until') . ' ' . __d('tools', 'Today'), "(Model.field >= '" . date(FORMAT_DB_DATE, time() - DAY) . " 00:00:00') AND (Model.field <= '" . date(FORMAT_DB_DATE) . " 23:59:59')"),
+			array(__d('tools', 'Today') . ' ' . __d('tools', 'until') . ' ' . __d('tools', 'Tomorrow'), "(Model.field >= '" . date(FORMAT_DB_DATE, time()) . " 00:00:00') AND (Model.field <= '" . date(FORMAT_DB_DATE, time() + DAY) . " 23:59:59')"),
+			array(__d('tools', 'Yesterday') . ' ' . __d('tools', 'until') . ' ' . __d('tools', 'Tomorrow'), "(Model.field >= '" . date(FORMAT_DB_DATE, time() - DAY) . " 00:00:00') AND (Model.field <= '" . date(FORMAT_DB_DATE, time() + DAY) . " 23:59:59')"),
 		);
 
 		foreach ($values as $v) {
@@ -469,22 +469,22 @@ class TimeLibTest extends MyCakeTestCase {
 	public function testDay() {
 		$this->out($this->_header(__FUNCTION__), true);
 		$ret = TimeLib::day('0');
-		$this->assertEquals(__('Sunday'), $ret);
+		$this->assertEquals(__d('tools', 'Sunday'), $ret);
 
 		$ret = TimeLib::day(2, true);
-		$this->assertEquals(__('Tue'), $ret);
+		$this->assertEquals(__d('tools', 'Tue'), $ret);
 
 		$ret = TimeLib::day(6);
-		$this->assertEquals(__('Saturday'), $ret);
+		$this->assertEquals(__d('tools', 'Saturday'), $ret);
 
 		$ret = TimeLib::day(6, false, 1);
-		$this->assertEquals(__('Sunday'), $ret);
+		$this->assertEquals(__d('tools', 'Sunday'), $ret);
 
 		$ret = TimeLib::day(0, false, 2);
-		$this->assertEquals(__('Tuesday'), $ret);
+		$this->assertEquals(__d('tools', 'Tuesday'), $ret);
 
 		$ret = TimeLib::day(1, false, 6);
-		$this->assertEquals(__('Sunday'), $ret);
+		$this->assertEquals(__d('tools', 'Sunday'), $ret);
 	}
 
 	/**
@@ -495,16 +495,16 @@ class TimeLibTest extends MyCakeTestCase {
 	public function testMonth() {
 		$this->out($this->_header(__FUNCTION__), true);
 		$ret = TimeLib::month('11');
-		$this->assertEquals(__('November'), $ret);
+		$this->assertEquals(__d('tools', 'November'), $ret);
 
 		$ret = TimeLib::month(1);
-		$this->assertEquals(__('January'), $ret);
+		$this->assertEquals(__d('tools', 'January'), $ret);
 
 		$ret = TimeLib::month(2, true, array('appendDot' => true));
-		$this->assertEquals(__('Feb') . '.', $ret);
+		$this->assertEquals(__d('tools', 'Feb') . '.', $ret);
 
 		$ret = TimeLib::month(5, true, array('appendDot' => true));
-		$this->assertEquals(__('May'), $ret);
+		$this->assertEquals(__d('tools', 'May'), $ret);
 	}
 
 	/**
@@ -547,16 +547,16 @@ class TimeLibTest extends MyCakeTestCase {
 
 		$res = TimeLib::relLengthOfTime(date(FORMAT_DB_DATETIME, time() - 4 * DAY - 5 * HOUR), null, array('plural' => 'n'));
 		//pr($res);
-		//$this->assertEquals($res, 'Vor 4 Tagen, 5 '.__('Hours'));
-		$this->assertEquals(__('%s ago', '4 ' . __('Days') . ', ' . '5 ' . __('Hours')), $res);
+		//$this->assertEquals($res, 'Vor 4 Tagen, 5 '.__d('tools', 'Hours'));
+		$this->assertEquals(__d('tools', '%s ago', '4 ' . __d('tools', 'Days') . ', ' . '5 ' . __d('tools', 'Hours')), $res);
 
 		$res = TimeLib::relLengthOfTime(date(FORMAT_DB_DATETIME, time() + 4 * DAY + 5 * HOUR), null, array('plural' => 'n'));
 		//pr($res);
-		$this->assertEquals(__('In %s', '4 ' . __('Days') . ', ' . '5 ' . __('Hours')), $res);
+		$this->assertEquals(__d('tools', 'In %s', '4 ' . __d('tools', 'Days') . ', ' . '5 ' . __d('tools', 'Hours')), $res);
 
 		$res = TimeLib::relLengthOfTime(date(FORMAT_DB_DATETIME, time()), null, array('plural' => 'n'));
 		//pr($res);
-		$this->assertEquals($res, __('justNow'));
+		$this->assertEquals($res, __d('tools', 'justNow'));
 	}
 
 	/**
@@ -653,15 +653,15 @@ class TimeLibTest extends MyCakeTestCase {
 		$ret = TimeLib::lengthOfTime(-121);
 		//pr($ret);
 
-		$this->assertEquals('6 ' . __('Minutes') . ', 40 ' . __('Seconds'), TimeLib::lengthOfTime(400));
+		$this->assertEquals('6 ' . __d('tools', 'Minutes') . ', 40 ' . __d('tools', 'Seconds'), TimeLib::lengthOfTime(400));
 
 		$res = TimeLib::lengthOfTime(400, 'i');
 		//pr($res);
-		$this->assertEquals('6 ' . __('Minutes'), $res);
+		$this->assertEquals('6 ' . __d('tools', 'Minutes'), $res);
 
 		$res = TimeLib::lengthOfTime(6 * DAY);
 		//pr($res);
-		$this->assertEquals('6 ' . __('Days') . ', 0 ' . __('Hours'), $res);
+		$this->assertEquals('6 ' . __d('tools', 'Days') . ', 0 ' . __d('tools', 'Hours'), $res);
 	}
 
 	/**

+ 4 - 4
Test/Case/Model/Behavior/BitmaskedBehaviorTest.php

@@ -188,10 +188,10 @@ class BitmaskedComment extends CakeTestModel {
 
 	public static function statuses($value = null) {
 		$options = array(
-			static::STATUS_ACTIVE => __('Active'),
-			static::STATUS_PUBLISHED => __('Published'),
-			static::STATUS_APPROVED => __('Approved'),
-			static::STATUS_FLAGGED => __('Flagged'),
+			static::STATUS_ACTIVE => __d('tools', 'Active'),
+			static::STATUS_PUBLISHED => __d('tools', 'Published'),
+			static::STATUS_APPROVED => __d('tools', 'Approved'),
+			static::STATUS_FLAGGED => __d('tools', 'Flagged'),
 		);
 
 		return MyModel::enum($value, $options);

+ 1 - 1
Test/Case/Model/Behavior/GeocoderBehaviorTest.php

@@ -135,7 +135,7 @@ class GeocoderBehaviorTest extends MyCakeTestCase {
 		$res = $this->Comment->validates();
 		$this->assertFalse($res);
 		$expectedErrors = array(
-			'lng' => array(__('validateLongitudeError'))
+			'lng' => array(__d('tools', 'validateLongitudeError'))
 		);
 		$this->assertEquals($expectedErrors, $this->Comment->validationErrors);
 	}

+ 1 - 1
Test/Case/Model/Behavior/MasterPasswordBehaviorTest.php

@@ -75,7 +75,7 @@ class MasterPasswordBehaviorTest extends MyCakeTestCase {
 		$this->Model->set($data);
 		$res = $this->Model->validates();
 		$this->assertFalse($res);
-		$this->assertEquals(__('No way'), $this->Model->validationErrors['master_password'][0]);
+		$this->assertEquals(__d('tools', 'No way'), $this->Model->validationErrors['master_password'][0]);
 
 		$data = array(
 			'some_comment' => 'xyz',

+ 3 - 3
Test/Case/Model/Behavior/PasswordableBehaviorTest.php

@@ -92,7 +92,7 @@ class PasswordableBehaviorTest extends CakeTestCase {
 		$is = $this->User->save();
 		//debug($this->User->validationErrors);
 		$this->assertFalse($is);
-		$this->assertEquals(array(__('valErrPwdNotMatch')), $this->User->validationErrors['pwd_repeat']);
+		$this->assertEquals(array(__d('tools', 'valErrPwdNotMatch')), $this->User->validationErrors['pwd_repeat']);
 
 		$this->User->create();
 		$data = array(
@@ -766,8 +766,8 @@ class PasswordableBehaviorTest extends CakeTestCase {
 		$result = $this->User->save();
 		$this->assertFalse($result);
 		$expected = array(
-			'pwd' => array(__('valErrBetweenCharacters %s %s', 3, 6)),
-			'pwd_repeat' => array(__('valErrBetweenCharacters %s %s', 3, 6))
+			'pwd' => array(__d('tools', 'valErrBetweenCharacters %s %s', 3, 6)),
+			'pwd_repeat' => array(__d('tools', 'valErrBetweenCharacters %s %s', 3, 6))
 		);
 		$this->assertEquals($expected, $this->User->validationErrors);
 	}

+ 1 - 1
Test/Case/Model/Behavior/SluggedBehaviorTest.php

@@ -285,7 +285,7 @@ class SluggedBehaviorTest extends CakeTestCase {
 
 		$this->Model->create(array('title' => 'Some & More'));
 		$result = $this->Model->save();
-		$this->assertEquals('Some-' . __('and') . '-More', $result[$this->Model->alias]['slug']);
+		$this->assertEquals('Some-' . __d('tools', 'and') . '-More', $result[$this->Model->alias]['slug']);
 	}
 
 	/**

+ 4 - 4
Test/Case/Model/MyModelTest.php

@@ -549,19 +549,19 @@ class MyModelTest extends MyCakeTestCase {
 	public function testInvalidate() {
 
 		$this->User->create();
-		$this->User->invalidate('fieldx', __('e %s f', 33));
+		$this->User->invalidate('fieldx', __d('tools', 'e %s f', 33));
 		$res = $this->User->validationErrors;
 		$this->out($res);
 		$this->assertTrue(!empty($res));
 
 		$this->User->create();
-		$this->User->invalidate('Model.fieldy', __('e %s f %s g', 33, 'xyz'));
+		$this->User->invalidate('Model.fieldy', __d('tools', 'e %s f %s g', 33, 'xyz'));
 		$res = $this->User->validationErrors;
 		$this->out($res);
 		$this->assertTrue(!empty($res) && $res['Model.fieldy'][0] === 'e 33 f xyz g');
 
 		$this->User->create();
-		$this->User->invalidate('fieldy', __('e %s f %s g %s', true, 'xyz', 55));
+		$this->User->invalidate('fieldy', __d('tools', 'e %s f %s g %s', true, 'xyz', 55));
 		$res = $this->User->validationErrors;
 		$this->out($res);
 		$this->assertTrue(!empty($res) && $res['fieldy'][0] === 'e 1 f xyz g 55');
@@ -579,7 +579,7 @@ class MyModelTest extends MyCakeTestCase {
 		$this->assertTrue(!empty($res));
 
 		$this->User->create();
-		$this->User->invalidate('fieldy', __('a %s b %s c %s %s %s %s %s h %s', 1, 2, 3, 4, 5, 6, 7, 8));
+		$this->User->invalidate('fieldy', __d('tools', 'a %s b %s c %s %s %s %s %s h %s', 1, 2, 3, 4, 5, 6, 7, 8));
 		$res = $this->User->validationErrors;
 		$this->out($res);
 		$this->assertTrue(!empty($res) && $res['fieldy'][0] === 'a 1 b 2 c 3 4 5 6 7 h 8');

+ 4 - 4
Test/Case/View/Helper/CommonHelperTest.php

@@ -237,11 +237,11 @@ class CommonHelperTest extends MyCakeTestCase {
 	 */
 	public function testAsp() {
 		$res = $this->Common->asp('House', 2, true);
-		$expected = __('Houses');
+		$expected = __d('tools', 'Houses');
 		$this->assertEquals($expected, $res);
 
 		$res = $this->Common->asp('House', 1, true);
-		$expected = __('House');
+		$expected = __d('tools', 'House');
 		$this->assertEquals($expected, $res);
 	}
 
@@ -252,14 +252,14 @@ class CommonHelperTest extends MyCakeTestCase {
 	 */
 	public function testSp() {
 		$res = $this->Common->sp('House', 'Houses', 0, true);
-		$expected = __('Houses');
+		$expected = __d('tools', 'Houses');
 		$this->assertEquals($expected, $res);
 
 		$res = $this->Common->sp('House', 'Houses', 2, true);
 		$this->assertEquals($expected, $res);
 
 		$res = $this->Common->sp('House', 'Houses', 1, true);
-		$expected = __('House');
+		$expected = __d('tools', 'House');
 		$this->assertEquals($expected, $res);
 
 		$res = $this->Common->sp('House', 'Houses', 1);

+ 8 - 8
Test/Case/View/Helper/FormatHelperTest.php

@@ -61,7 +61,7 @@ class FormatHelperTest extends MyCakeTestCase {
 	 */
 	public function testIcon() {
 		$result = $this->Format->icon('edit');
-		$expected = '<img src="/img/icons/edit.gif" title="' . __('Edit') . '" alt="[' . __('Edit') . ']" class="icon" />';
+		$expected = '<img src="/img/icons/edit.gif" title="' . __d('tools', 'Edit') . '" alt="[' . __d('tools', 'Edit') . ']" class="icon" />';
 		$this->assertEquals($expected, $result);
 	}
 
@@ -72,7 +72,7 @@ class FormatHelperTest extends MyCakeTestCase {
 	 */
 	public function testCIcon() {
 		$result = $this->Format->cIcon('edit.png');
-		$expected = '<img src="/img/icons/edit.png" title="' . __('Edit') . '" alt="[' . __('Edit') . ']" class="icon" />';
+		$expected = '<img src="/img/icons/edit.png" title="' . __d('tools', 'Edit') . '" alt="[' . __d('tools', 'Edit') . ']" class="icon" />';
 		$this->assertEquals($expected, $result);
 	}
 
@@ -84,7 +84,7 @@ class FormatHelperTest extends MyCakeTestCase {
 	public function testIconWithFontIcon() {
 		$this->Format->settings['fontIcons'] = array('edit' => 'fa fa-pencil');
 		$result = $this->Format->icon('edit');
-		$expected = '<i class="fa fa-pencil edit" title="' . __('Edit') . '" data-placement="bottom" data-toggle="tooltip"></i>';
+		$expected = '<i class="fa fa-pencil edit" title="' . __d('tools', 'Edit') . '" data-placement="bottom" data-toggle="tooltip"></i>';
 		$this->assertEquals($expected, $result);
 	}
 
@@ -96,7 +96,7 @@ class FormatHelperTest extends MyCakeTestCase {
 	public function testCIconWithFontIcon() {
 		$this->Format->settings['fontIcons'] = array('edit' => 'fa fa-pencil');
 		$result = $this->Format->cIcon('edit.png');
-		$expected = '<i class="fa fa-pencil edit" title="' . __('Edit') . '" data-placement="bottom" data-toggle="tooltip"></i>';
+		$expected = '<i class="fa fa-pencil edit" title="' . __d('tools', 'Edit') . '" data-placement="bottom" data-toggle="tooltip"></i>';
 		$this->assertEquals($expected, $result);
 	}
 
@@ -155,11 +155,11 @@ class FormatHelperTest extends MyCakeTestCase {
 	 */
 	public function testYesNo() {
 		$result = $this->Format->yesNo(true);
-		$expected = '<img src="/img/icons/yes.gif" title="' . __('Yes') . '" alt=';
+		$expected = '<img src="/img/icons/yes.gif" title="' . __d('tools', 'Yes') . '" alt=';
 		$this->assertTextContains($expected, $result);
 
 		$result = $this->Format->yesNo(false);
-		$expected = '<img src="/img/icons/no.gif" title="' . __('No') . '" alt=';
+		$expected = '<img src="/img/icons/no.gif" title="' . __d('tools', 'No') . '" alt=';
 		$this->assertTextContains($expected, $result);
 
 		$this->Format->settings['fontIcons'] = array(
@@ -167,11 +167,11 @@ class FormatHelperTest extends MyCakeTestCase {
 			'no' => 'fa fa-times');
 
 		$result = $this->Format->yesNo(true);
-		$expected = '<i class="fa fa-check yes" title="' . __('Yes') . '" data-placement="bottom" data-toggle="tooltip"></i>';
+		$expected = '<i class="fa fa-check yes" title="' . __d('tools', 'Yes') . '" data-placement="bottom" data-toggle="tooltip"></i>';
 		$this->assertEquals($expected, $result);
 
 		$result = $this->Format->yesNo(false);
-		$expected = '<i class="fa fa-times no" title="' . __('No') . '" data-placement="bottom" data-toggle="tooltip"></i>';
+		$expected = '<i class="fa fa-times no" title="' . __d('tools', 'No') . '" data-placement="bottom" data-toggle="tooltip"></i>';
 		$this->assertEquals($expected, $result);
 	}
 

+ 1 - 1
Test/Case/View/Helper/GoogleMapV3HelperTest.php

@@ -195,7 +195,7 @@ class GoogleMapV3HelperTest extends MyCakeTestCase {
 		$mapMarkers = $this->GoogleMapV3->staticMarkers($markers);
 
 		$staticMapUrl = $this->GoogleMapV3->staticMapUrl(array('center' => 48 . ',' . 11, 'markers' => $mapMarkers, 'size' => '640x510', 'zoom' => 6));
-		//echo $this->GoogleMapV3->Html->link('Open Static Map', $staticMapUrl, array('class'=>'staticMap', 'title'=>__('click for full map'))); //, 'escape'=>false
+		//echo $this->GoogleMapV3->Html->link('Open Static Map', $staticMapUrl, array('class'=>'staticMap', 'title'=>__d('tools', 'click for full map'))); //, 'escape'=>false
 
 	}
 

+ 2 - 2
View/Elements/master_password.ctp

@@ -6,6 +6,6 @@ if (!isset($model)) {
 }
 ?>
 <fieldset>
-	<legend><?php echo __('Master Password');?></legend>
-	<?php echo $this->Form->input($model.'master_pwd', array('label'=>__('Password'))); ?>
+	<legend><?php echo __d('tools', 'Master Password');?></legend>
+	<?php echo $this->Form->input($model.'master_pwd', array('label'=>__d('tools', 'Password'))); ?>
 </fieldset>

+ 5 - 5
View/Elements/pagination.ctp

@@ -9,16 +9,16 @@ if (!isset($separator)) {
 }
 
 if (empty($first)) {
-	$first = __('first');
+	$first = __d('tools', 'first');
 }
 if (empty($last)) {
-	$last = __('last');
+	$last = __d('tools', 'last');
 }
 if (empty($prev)) {
-	$prev = __('previous');
+	$prev = __d('tools', 'previous');
 }
 if (empty($next)) {
-	$next = __('next');
+	$next = __d('tools', 'next');
 }
 if (!empty($reverse)) {
 	$tmp = $first;
@@ -35,7 +35,7 @@ if (!empty($addArrows)) {
 }
 
 echo $this->Paginator->counter(array(
-'format' => __('Page %page% of %pages%, showing %current% records out of %count% total')));?></p>
+'format' => __d('tools', 'Page %page% of %pages%, showing %current% records out of %count% total')));?></p>
 <div class="paging">
 	<?php echo $this->Paginator->first($first, array());?>
  <?php echo $separator; ?>

+ 4 - 4
View/Helper/CaptchaHelper.php

@@ -40,7 +40,7 @@ class CaptchaHelper extends AppHelper {
 		$this->numberConvert = array(0 => 'zero', 1 => 'one', 2 => 'two', 3 => 'three', 4 => 'four', 5 => 'five', 6 => 'six', 7 => 'seven', 8 => 'eight', 9 => 'nine', 10 => 'ten');
 
 		// Set up an array with the operators that we want to use. With difficulty=1 it is only subtraction and addition.
-		$this->operatorConvert = array(0 => array('+', __('calcPlus')), 1 => array('-', __('calcMinus')), 2 => '*', __('calcTimes'));
+		$this->operatorConvert = array(0 => array('+', __d('tools', 'calcPlus')), 1 => array('-', __d('tools', 'calcMinus')), 2 => '*', __d('tools', 'calcTimes'));
 	}
 
 	/**
@@ -60,7 +60,7 @@ class CaptchaHelper extends AppHelper {
 		$captchaOperator = $captchaOperatorSelection[mt_rand(0, 1)];
 
 		// Get the equation in textual form to show to the user.
-		$code = (mt_rand(0, 1) == 1 ? __($this->numberConvert[$numberOne]) : $numberOne) . ' ' . $captchaOperator . ' ' . (mt_rand(0, 1) == 1 ? __($this->numberConvert[$numberTwo]) : $numberTwo);
+		$code = (mt_rand(0, 1) == 1 ? __d('tools', $this->numberConvert[$numberOne]) : $numberOne) . ' ' . $captchaOperator . ' ' . (mt_rand(0, 1) == 1 ? __d('tools', $this->numberConvert[$numberTwo]) : $numberTwo);
 
 		// Evaluate the equation and get the result.
 		eval('$result = ' . $numberOne . ' ' . $captchaOperatorSelection[0] . ' ' . $numberTwo . ';');
@@ -123,10 +123,10 @@ class CaptchaHelper extends AppHelper {
 			'class' => 'captcha',
 			'value' => '',
 			'maxlength' => 3,
-			'label' => __('Captcha') . BR . __('captchaExplained'),
+			'label' => __d('tools', 'Captcha') . BR . __d('tools', 'captchaExplained'),
 			'combined' => true,
 			'autocomplete' => 'off',
-			'after' => __('captchaTip'),
+			'after' => __d('tools', 'captchaTip'),
 		);
 		$options += $defaults;
 

+ 5 - 5
View/Helper/CommonHelper.php

@@ -223,7 +223,7 @@ class CommonHelper extends AppHelper {
 		}
 
 		if ($autoTranslate) {
-			$result = __($result);
+			$result = __d('tools', $result);
 		}
 		return $result;
 	}
@@ -370,7 +370,7 @@ class CommonHelper extends AppHelper {
 			'meta' => '<link rel="alternate" type="application/rss+xml" title="%s" href="%s" />',
 		);
 		if (empty($title)) {
-			$title = __('Subscribe to this feed');
+			$title = __d('tools', 'Subscribe to this feed');
 		} else {
 			$title = h($title);
 		}
@@ -499,7 +499,7 @@ class CommonHelper extends AppHelper {
 		if ($this->sessionCheck()) {
 			return '';
 		}
-		return '<div class="cookieWarning">' . __('Please enable cookies') . '</div>';
+		return '<div class="cookieWarning">' . __d('tools', 'Please enable cookies') . '</div>';
 	}
 
 	/**
@@ -699,10 +699,10 @@ piwikTracker.enableLinkTracking();
 		$translate = (array)Configure::read('Role');
 		if (is_array($value)) {
 			foreach ($value as $k => $v) {
-				$ret[$v] = __($translate[$v]);
+				$ret[$v] = __d('tools', $translate[$v]);
 			}
 		} else {
-			$ret[$value] = __($translate[$value]);
+			$ret[$value] = __d('tools', $translate[$value]);
 		}
 		return $ret;
 	}

+ 4 - 4
View/Helper/DatetimeHelper.php

@@ -72,7 +72,7 @@ class DatetimeHelper extends TimeHelper {
 		$span = '';
 		$spanEnd = '';
 		$whenArray = array('-1' => 'already', '0' => 'today', '1' => 'notyet');
-		$titles = array('-1' => __('publishedAlready'), '0' => __('publishedToday'), '1' => __('publishedNotYet'));
+		$titles = array('-1' => __d('tools', 'publishedAlready'), '0' => __d('tools', 'publishedToday'), '1' => __d('tools', 'publishedNotYet'));
 
 		if (!empty($date)) {
 
@@ -90,13 +90,13 @@ class DatetimeHelper extends TimeHelper {
 
 			if ($this->isToday($date)) {
 				$when = 0;
-				$niceDate = __('Today') . $timeAttachment;
+				$niceDate = __d('tools', 'Today') . $timeAttachment;
 			} elseif ($this->isTomorrow($date)) {
 				$when = 1;
-				$niceDate = __('Tomorrow') . $timeAttachment;
+				$niceDate = __d('tools', 'Tomorrow') . $timeAttachment;
 			} elseif ($this->wasYesterday($date)) {
 				$when = -1;
-				$niceDate = __('Yesterday') . $timeAttachment;
+				$niceDate = __d('tools', 'Yesterday') . $timeAttachment;
 			} else {
 				// before or after?
 				if ($this->isNotTodayAndInTheFuture($date)) {

+ 1 - 1
View/Helper/FlattrHelper.php

@@ -98,7 +98,7 @@ class FlattrHelper extends AppHelper {
 			$uid = Configure::read('Flattr.uid');
 		}
 		if (!isset($options['tle'])) {
-			$options['tle'] = __('Donate');
+			$options['tle'] = __d('tools', 'Donate');
 		}
 
 		$vars = '';

+ 5 - 5
View/Helper/FormExtHelper.php

@@ -932,7 +932,7 @@ class FormExtHelper extends FormHelper {
 	public function maxLength($selectors = array(), $options = array()) {
 		$this->maxLengthScripts();
 		$js = '';
-		$this->maxLengthOptions['statusText'] = __($this->maxLengthOptions['statusText']);
+		$this->maxLengthOptions['statusText'] = __d('tools', $this->maxLengthOptions['statusText']);
 
 		$selectors = (array)$selectors;
 		foreach ($selectors as $selector => $settings) {
@@ -1115,11 +1115,11 @@ jQuery(\'' . $selector . '\').maxlength(' . $this->Js->object($settings, array('
 	 */
 	public function checkboxButtons($buttonsOnly = false) {
 		$res = '<div>';
-		$res .= __('Selection') . ': ';
+		$res .= __d('tools', 'Selection') . ': ';
 
-		$res .= $this->Html->link(__('All'), 'javascript:void(0)');
-		$res .= $this->Html->link(__('None'), 'javascript:void(0)');
-		$res .= $this->Html->link(__('Revert'), 'javascript:void(0)');
+		$res .= $this->Html->link(__d('tools', 'All'), 'javascript:void(0)');
+		$res .= $this->Html->link(__d('tools', 'None'), 'javascript:void(0)');
+		$res .= $this->Html->link(__d('tools', 'Revert'), 'javascript:void(0)');
 
 		$res .= '</div>';
 		if ($buttonsOnly !== true) {

+ 25 - 25
View/Helper/FormatHelper.php

@@ -53,11 +53,11 @@ class FormatHelper extends TextHelper {
 	 */
 	public function thumbs($id, $inactive = false, $inactiveTitle = null) {
 		$status = 'Active';
-		$upTitle = __('consentThis');
-		$downTitle = __('dissentThis');
+		$upTitle = __d('tools', 'consentThis');
+		$downTitle = __d('tools', 'dissentThis');
 		if ($inactive === true) {
 			$status = 'Inactive';
-			$upTitle = $downTitle = !empty($inactiveTitle) ? $inactiveTitle : __('alreadyVoted');
+			$upTitle = $downTitle = !empty($inactiveTitle) ? $inactiveTitle : __d('tools', 'alreadyVoted');
 		}
 
 		if ($this->settings['fontIcons']) {
@@ -141,9 +141,9 @@ class FormatHelper extends TextHelper {
 				$url += $options['url'];
 			}
 
-			$ret .= $this->Html->link($this->cIcon(ICON_PREV, false) . '&nbsp;' . __('prev' . $name), $url, array('escape' => false, 'title' => $neighbors['prev'][$titleAlias][$titleField]));
+			$ret .= $this->Html->link($this->cIcon(ICON_PREV, false) . '&nbsp;' . __d('tools', 'prev' . $name), $url, array('escape' => false, 'title' => $neighbors['prev'][$titleAlias][$titleField]));
 		} else {
-			$ret .= $this->cIcon(ICON_PREV_DISABLED, __('noPrev' . $name)) . '&nbsp;' . __('prev' . $name);
+			$ret .= $this->cIcon(ICON_PREV_DISABLED, __d('tools', 'noPrev' . $name)) . '&nbsp;' . __d('tools', 'prev' . $name);
 		}
 		$ret .= '&nbsp;&nbsp;';
 		if (!empty($neighbors['next'])) {
@@ -152,9 +152,9 @@ class FormatHelper extends TextHelper {
 				$url += $options['url'];
 			}
 
-			$ret .= $this->Html->link($this->cIcon(ICON_NEXT, false) . '&nbsp;' . __('next' . $name), $url, array('escape' => false, 'title' => $neighbors['next'][$titleAlias][$titleField]));
+			$ret .= $this->Html->link($this->cIcon(ICON_NEXT, false) . '&nbsp;' . __d('tools', 'next' . $name), $url, array('escape' => false, 'title' => $neighbors['next'][$titleAlias][$titleField]));
 		} else {
-			$ret .= $this->cIcon(ICON_NEXT_DISABLED, __('noNext' . $name)) . '&nbsp;' . __('next' . $name);
+			$ret .= $this->cIcon(ICON_NEXT_DISABLED, __d('tools', 'noNext' . $name)) . '&nbsp;' . __d('tools', 'next' . $name);
 		}
 		$ret .= '</div>';
 		return $ret;
@@ -276,7 +276,7 @@ class FormatHelper extends TextHelper {
 
 		$attr = array(
 			'class' => 'prio-' . $matching[$value],
-			'title' => __('prio' . ucfirst($matching[$value])),
+			'title' => __d('tools', 'prio' . ucfirst($matching[$value])),
 		);
 		if (!$css) {
 			$attr['alt'] = $matching[$value];
@@ -347,7 +347,7 @@ class FormatHelper extends TextHelper {
 	 * @param type
 	 * @param title
 	 * @param alt (set to FALSE if no alt is supposed to be shown)
-	 * @param bool automagic i18n translate [default true = __('xyz')]
+	 * @param bool automagic i18n translate [default true = __d('tools', 'xyz')]
 	 * @param options array ('class'=>'','width/height'=>'','onclick=>'') etc
 	 * @return string
 	 */
@@ -370,8 +370,8 @@ class FormatHelper extends TextHelper {
 				$title = (isset($title) ? $title : $this->icons[$type]['title']);
 				$alt = (isset($alt) ? $alt : preg_replace('/[^a-zA-Z0-9]/', '', $this->icons[$type]['title']));
 				if ($translate !== false) {
-					$title = __($title);
-					$alt = __($alt);
+					$title = __d('tools', $title);
+					$alt = __d('tools', $alt);
 				}
 				$alt = '[' . $alt . ']';
 			} else {
@@ -413,8 +413,8 @@ class FormatHelper extends TextHelper {
 			$title = isset($t) ? $t : ucfirst($type);
 			$alt = (isset($a) ? $a : Inflector::slug($title, '-'));
 			if ($translate !== false) {
-				$title = __($title);
-				$alt = __($alt);
+				$title = __d('tools', $title);
+				$alt = __d('tools', $alt);
 			}
 			$alt = '[' . $alt . ']';
 
@@ -449,7 +449,7 @@ class FormatHelper extends TextHelper {
 		if (!isset($options['title'])) {
 			$options['title'] = ucfirst($type);
 			if ($options['translate'] !== false) {
-				$options['title'] = __($options['title']);
+				$options['title'] = __d('tools', $options['title']);
 			}
 		}
 
@@ -499,7 +499,7 @@ class FormatHelper extends TextHelper {
 			$attributes = array('class' => 'star-bar starBar');
 			$attributes = array_merge($attributes, $attr);
 			if (empty($attributes['title']) && empty($options['title'])) {
-				$attributes['title'] = ($current) . ' ' . __('of') . ' ' . $max;
+				$attributes['title'] = ($current) . ' ' . __d('tools', 'of') . ' ' . $max;
 			}
 
 			$res = $this->Html->tag('span', $text, $attributes);
@@ -528,7 +528,7 @@ class FormatHelper extends TextHelper {
 			'it' => array('title' => 'Italiano'),
 		);
 
-		$languageChange = __('Language') . ': ';
+		$languageChange = __d('tools', 'Language') . ': ';
 
 		$languages = array();
 		foreach ($langs as $lang) {
@@ -543,13 +543,13 @@ class FormatHelper extends TextHelper {
 		$languageChange .= '<span class="country">';
 		foreach ($languages as $code => $la) {
 			if ($lang === $code) {
-				$languageChange .= $this->Html->image('language_flags/' . $code . '.gif', array('alt' => $code, 'title' => $la['title'] . ' (' . __('active') . ')', 'class' => 'country_flag active')) . '';
+				$languageChange .= $this->Html->image('language_flags/' . $code . '.gif', array('alt' => $code, 'title' => $la['title'] . ' (' . __d('tools', 'active') . ')', 'class' => 'country_flag active')) . '';
 			} else {
 				$languageChange .= $this->Html->link($this->Html->image('language_flags/' . $code . '.gif', array('alt' => $code, 'title' => $la['title'], 'class' => 'country_flag')), '/lang/' . $code, array('escape' => false)) . '';
 			}
 		}
 
-		$languageChange .= '</span>'; //.__('(Translation not complete yet)');
+		$languageChange .= '</span>'; //.__d('tools', '(Translation not complete yet)');
 		return $languageChange;
 	}
 
@@ -585,7 +585,7 @@ class FormatHelper extends TextHelper {
 		if (empty($class)) { $class = 'email';}
 
 		$defaults = array(
-			'title' => __('for use in an external mail client'),
+			'title' => __d('tools', 'for use in an external mail client'),
 			'class' => 'email',
 			'escape' => false
 		);
@@ -666,8 +666,8 @@ class FormatHelper extends TextHelper {
 	 * @return image:Yes/No or text:Yes/No
 	 */
 	public function yesNo($v, $ontitle = null, $offtitle = null, $on = 1, $text = false, $notitle = false) {
-		$ontitle = (!empty($ontitle) ? $ontitle : __('Yes'));
-		$offtitle = (!empty($offtitle) ? $offtitle : __('No'));
+		$ontitle = (!empty($ontitle) ? $ontitle : __d('tools', 'Yes'));
+		$offtitle = (!empty($offtitle) ? $offtitle : __d('tools', 'No'));
 		$sbez = array('0' => @substr($offtitle, 0, 1), '1' => @substr($ontitle, 0, 1));
 		$bez = array('0' => $offtitle, '1' => $ontitle);
 
@@ -799,7 +799,7 @@ class FormatHelper extends TextHelper {
 	 * @return string
 	 */
 	public function disabledLink($text, $options = array()) {
-		$defaults = array('class' => 'disabledLink', 'title' => __('notAvailable'));
+		$defaults = array('class' => 'disabledLink', 'title' => __d('tools', 'notAvailable'));
 		$options += $defaults;
 
 		return $this->Html->tag('span', $text, $options);
@@ -867,7 +867,7 @@ class FormatHelper extends TextHelper {
 		$params = Router::queryString($options, array(), true);
 
 		$htmlDefaults = array(
-			'title' => $this->Numeric->format($percent, $options['decimals']) . ' ' . __('Percent'),
+			'title' => $this->Numeric->format($percent, $options['decimals']) . ' ' . __d('tools', 'Percent'),
 			'class' => 'help');
 		$htmlDefaults['alt'] = $htmlDefaults['title'];
 
@@ -947,8 +947,8 @@ class FormatHelper extends TextHelper {
 
 		$icon = (in_array($color, $icons) ? $color : 'blank');
 
-		$defaults = array('title' => (!empty($title) ? $title : ucfirst(__('color' . ucfirst($color)))), 'alt' => (!empty($alt) ? $alt :
-			__('color' . ucfirst($color))), 'class' => 'icon help');
+		$defaults = array('title' => (!empty($title) ? $title : ucfirst(__d('tools', 'color' . ucfirst($color)))), 'alt' => (!empty($alt) ? $alt :
+			__d('tools', 'color' . ucfirst($color))), 'class' => 'icon help');
 		$options += $defaults;
 
 		return $this->Html->image('icons/status_light_' . $icon . '.gif', $options);

+ 4 - 4
View/Helper/GoogleMapV3Helper.php

@@ -431,7 +431,7 @@ class GoogleMapV3Helper extends AppHelper {
 		$this->settings['div']['style'] .= 'height: ' . $this->settings['div']['height'] . ';';
 		unset($this->settings['div']['width']); unset($this->settings['div']['height']);
 
-		$defaultText = isset($this->settings['content']) ? $this->settings['content'] : __('Map cannot be displayed!');
+		$defaultText = isset($this->settings['content']) ? $this->settings['content'] : __d('tools', 'Map cannot be displayed!');
 		$result .= $this->Html->tag('div', $defaultText, $this->settings['div']);
 
 		return $result;
@@ -593,8 +593,8 @@ function geocodeAddress(address) {
 		$options = array(
 			'from' => null,
 			'to' => null,
-			'label' => __('Enter your address'),
-			'submit' => __('Get directions'),
+			'label' => __d('tools', 'Enter your address'),
+			'submit' => __d('tools', 'Get directions'),
 			'escape' => true,
 			'zoom' => null, // auto
 		);
@@ -1269,7 +1269,7 @@ var iconShape = {
 	 * @return string imageTag
 	 */
 	public function staticMap($options = array(), $attributes = array()) {
-		$defaultAttributes = array('alt' => __('Map'));
+		$defaultAttributes = array('alt' => __d('tools', 'Map'));
 
 		return $this->Html->image($this->staticMapUrl($options), array_merge($defaultAttributes, $attributes));
 	}

+ 1 - 1
View/Helper/TextExtHelper.php

@@ -147,7 +147,7 @@ class TextExtHelper extends TextHelper {
 		}
 
 		$defaults = array(
-			'title' => __('for use in an external mail client'),
+			'title' => __d('tools', 'for use in an external mail client'),
 			'class' => 'email',
 			'escape' => false
 		);

+ 8 - 8
View/Qlogin/admin_index.ctp

@@ -1,32 +1,32 @@
 <div class="page form">
 
-<h2><?php echo __('Qlogins'); ?></h2>
-<?php echo $qlogins;?> <?php echo __('valid ones'); ?>
+<h2><?php echo __d('tools', 'Qlogins'); ?></h2>
+<?php echo $qlogins;?> <?php echo __d('tools', 'valid ones'); ?>
 <br /><br />
 <?php if (!empty($url)) { ?>
-<h3><?php echo __('Generated Link'); ?></h3>
+<h3><?php echo __d('tools', 'Generated Link'); ?></h3>
 <code><?php echo h($url);?></code>
 <?php } ?>
 
-<h3><?php echo __('Add %s', __('Qlogin')); ?></h3>
+<h3><?php echo __d('tools', 'Add %s', __d('tools', 'Qlogin')); ?></h3>
 <?php echo $this->Form->create('Qlogin');?>
 	<fieldset>
-		<legend><?php echo __('Add %s', __('Qlogin')); ?></legend>
+		<legend><?php echo __d('tools', 'Add %s', __d('tools', 'Qlogin')); ?></legend>
 	<?php
 		echo $this->Form->input('url', array('placeholder' => '/controller/action/...'));
 		echo $this->Form->input('user_id', array('empty' => '---'));
 	?>
 	</fieldset>
-<?php echo $this->Form->end(__('Submit'));?>
+<?php echo $this->Form->end(__d('tools', 'Submit'));?>
 </div>
 
 <br /><br />
 
 <div class="actions">
 	<ul>
-		<li><?php echo $this->Html->link(__('Reset %s', __('Qlogins')), array('action' => 'reset'), array(), __('Sure?'));?></li>
+		<li><?php echo $this->Html->link(__d('tools', 'Reset %s', __d('tools', 'Qlogins')), array('action' => 'reset'), array(), __d('tools', 'Sure?'));?></li>
 	<?php if (false) { ?>
-		<li><?php echo $this->Html->link(__('List %s', __('Qlogins')), array('action' => 'listing'));?></li>
+		<li><?php echo $this->Html->link(__d('tools', 'List %s', __d('tools', 'Qlogins')), array('action' => 'listing'));?></li>
 	<?php } ?>
 	</ul>
 </div>

+ 1 - 1
View/RssView.php

@@ -219,7 +219,7 @@ class RssView extends View {
 		$namespaces = array();
 		foreach ($this->_usedNamespaces as $usedNamespacePrefix) {
 			if (!isset($this->_namespaces[$usedNamespacePrefix])) {
-				throw new RuntimeException(__('The prefix %s is not specified.', $usedNamespacePrefix));
+				throw new RuntimeException(__d('tools', 'The prefix %s is not specified.', $usedNamespacePrefix));
 			}
 			$namespaces['xmlns:' . $usedNamespacePrefix] = $this->_namespaces[$usedNamespacePrefix];
 		}