This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5108 from DASPRiD/hotfix/4879
Hotfix/4879
- Loading branch information
Showing
13 changed files
with
163 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\I18n\Translator; | ||
|
||
/** | ||
* Translator interface. | ||
*/ | ||
interface TranslatorInterface | ||
{ | ||
/** | ||
* Translate a message. | ||
* | ||
* @param string $message | ||
* @param string $textDomain | ||
* @param string $locale | ||
* @return string | ||
*/ | ||
public function translate($message, $textDomain = 'default', $locale = null); | ||
|
||
/** | ||
* Translate a plural message. | ||
* | ||
* @param string $singular | ||
* @param string $plural | ||
* @param int $number | ||
* @param string $textDomain | ||
* @param string|null $locale | ||
* @return string | ||
* @throws Exception\OutOfBoundsException | ||
*/ | ||
public function translatePlural( | ||
$singular, | ||
$plural, | ||
$number, | ||
$textDomain = 'default', | ||
$locale = null | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\Mvc\I18n; | ||
|
||
use Zend\I18n\Translator\TranslatorInterface; | ||
use Zend\Validator\Translator\TranslatorInterface as ValidatorTranslatorInterface; | ||
|
||
class DummyTranslator implements | ||
TranslatorInterface, | ||
ValidatorTranslatorInterface | ||
{ | ||
/** | ||
* translate(): defined by ValidatorTranslatorInterface() | ||
* | ||
* @see ValidatorTranslatorInterface::translate() | ||
* @param string $message | ||
* @param string $textDomain | ||
* @param string $locale | ||
* @return string | ||
*/ | ||
public function translate($message, $textDomain = 'default', $locale = null) | ||
{ | ||
return $message; | ||
} | ||
|
||
/** | ||
* translatePlural(): defined by TranslatorInterface() | ||
* | ||
* @see TranslatorInterface::translatePlural() | ||
* @param string $singular | ||
* @param string $plural | ||
* @param int $number | ||
* @param string $textDomain | ||
* @param string|null $locale | ||
* @return string | ||
* @throws Exception\OutOfBoundsException | ||
*/ | ||
public function translatePlural( | ||
$singular, | ||
$plural, | ||
$number, | ||
$textDomain = 'default', | ||
$locale = null | ||
) { | ||
return ($number === 1 ? $singular : $plural); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.