Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 46 additions and 0 deletions.
  1. +3 −0 Config/SquareExtension.php
  2. +32 −0 Localization/DummyTranslator.php
  3. +11 −0 shortcuts.php
View
3 Config/SquareExtension.php
@@ -41,6 +41,9 @@ public function loadConfiguration()
foreach ($config['modules'] as $extension) {
$this->compiler->addExtension($extension::NAME, new $extension);
}
+
+ $container->addDefinition($this->prefix('translator'))
+ ->setClass('Square\Localization\DummyTranslator');
}
}
View
32 Localization/DummyTranslator.php
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * This file is part of the Square CMS
+ *
+ * Copyright (c) 2011, 2012 Tomáš Kolinger <tomas@kolinger.name>
+ *
+ * For the full copyright and license information, please view the file license.txt that was distributed with this source code.
+ */
+
+namespace Square\Localization;
+
+
+
+/**
+ * @author Tomáš Kolinger <tomas@kolinger.name>
+ * @todo implements a real translator
+ */
+class DummyTranslator extends \Nette\Object implements \Nette\Localization\ITranslator
+{
+
+ /**
+ * @param string $string
+ * @param int $count
+ * @return string
+ */
+ public function translate($string, $count = 0)
+ {
+ return $string;
+ }
+
+}
View
11 shortcuts.php
@@ -0,0 +1,11 @@
+<?php
+
+/**
+ * @param $string
+ * @return string
+ * @todo implements translator
+ */
+function __($string)
+{
+ return $string;
+}

No commit comments for this range

Something went wrong with that request. Please try again.