Browse Source

translation

euromark 11 years ago
parent
commit
641f928e2d

+ 1 - 1
src/Model/Behavior/SluggedBehavior.php

@@ -88,7 +88,7 @@ class SluggedBehavior extends Behavior {
 		$this->_defaultConfig['notices'] = Configure::read('debug');
 		$this->_defaultConfig['label'] = $table->displayField();
 		foreach ($this->_defaultConfig['replace'] as $key => $value) {
-			$this->_defaultConfig['replace'][$key] = __($value);
+			$this->_defaultConfig['replace'][$key] = __d('tools', $value);
 		}
 		$config += (array)Configure::read('Slugged');
 

+ 10 - 10
src/Shell/WhitespaceShell.php

@@ -44,7 +44,7 @@ class WhitespaceShell extends Shell {
 		$files = $App->findRecursive('.*\.php');
 		$this->out('Found ' . count($files) . ' files.');
 
-		$action = $this->in(__('Continue? [y]/[n]'), array('y', 'n'), 'n');
+		$action = $this->in('Continue? [y]/[n]', array('y', 'n'), 'n');
 		if ($action !== 'y') {
 			return $this->error('Aborted');
 		}
@@ -79,7 +79,7 @@ class WhitespaceShell extends Shell {
 			}
 
 			while (empty($action)) {
-				$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('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');
 			}
 
 			if ($action === '*') {
@@ -135,7 +135,7 @@ class WhitespaceShell extends Shell {
 
 		$this->out('Found ' . count($files) . ' files.');
 
-		$action = $this->in(__('Continue? [y]/[n]'), array('y', 'n'), 'n');
+		$action = $this->in('Continue? [y]/[n]', array('y', 'n'), 'n');
 		if ($action !== 'y') {
 			return $this->error('Aborted');
 		}
@@ -166,31 +166,31 @@ class WhitespaceShell extends Shell {
 			'options' => array(
 				'ext' => array(
 					'short' => 'e',
-					'help' => __d('cake_console', 'Specify extensions [php|txt|...]'),
+					'help' => 'Specify extensions [php|txt|...]',
 					'default' => '',
 				),
 				'dry-run' => array(
 					'short' => 'd',
-					'help' => __d('cake_console', 'Dry run the clear command, no files will actually be deleted. Should be combined with verbose!'),
+					'help' => 'Dry run the clear command, no files will actually be deleted. Should be combined with verbose!',
 					'boolean' => true
 				),
 				'plugin' => array(
 					'short' => 'p',
-					'help' => __d('cake_console', 'Plugin'),
+					'help' => 'Plugin',
 					'default' => '',
 				),
 			)
 		);
 
 		return parent::getOptionParser()
-			->description(__d('cake_console', 'The Whitespace Shell removes uncessary/wrong whitespaces.
-Either provide a path as first argument, use -p PluginName or run it as it is for the complete APP dir.'))
+			->description('The Whitespace Shell removes uncessary/wrong whitespaces.
+Either provide a path as first argument, use -p PluginName or run it as it is for the complete APP dir.')
 			->addSubcommand('clean', array(
-				'help' => __d('cake_console', 'Detect and remove any leading/trailing whitespaces'),
+				'help' => 'Detect and remove any leading/trailing whitespaces',
 				'parser' => $subcommandParser
 			))
 			->addSubcommand('eof', array(
-				'help' => __d('cake_console', 'Fix whitespace issues at the end of PHP files (a single newline as per coding standards)'),
+				'help' => 'Fix whitespace issues at the end of PHP files (a single newline as per coding standards)',
 				'parser' => $subcommandParser
 			));
 	}

+ 1 - 1
src/View/Helper/CommonHelper.php

@@ -303,7 +303,7 @@ class CommonHelper extends Helper {
 			'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);
 		}

+ 10 - 10
src/View/Helper/FormatHelper.php

@@ -57,11 +57,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']) {
@@ -145,9 +145,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'])) {
@@ -156,9 +156,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;
@@ -356,8 +356,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);
 
@@ -424,7 +424,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);

+ 1 - 1
src/View/RssView.php

@@ -227,7 +227,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(sprintf('The prefix %s is not specified.', $usedNamespacePrefix));
 			}
 			$namespaces['xmlns:' . $usedNamespacePrefix] = $this->_namespaces[$usedNamespacePrefix];
 		}