Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/62'
Browse files Browse the repository at this point in the history
Close #62
Fixes #53
  • Loading branch information
weierophinney committed May 17, 2017
2 parents bb9c5cc + b3380cd commit 23743e0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ All notable changes to this project will be documented in this file, in reverse
- [#56](https://github.com/zendframework/zend-i18n/pull/56) adds more aliases to
the `LoaderPluginManager` to ensure different cAsIng strategies will still
resolve translation loaders under zend-servicemanager v3.
- [#62](https://github.com/zendframework/zend-i18n/pull/62) fixes an issue with
how the gettext adapter resolves `PoEdit` source keywords when a text_domain is
defined.

## 2.7.3 - 2016-06-07

Expand Down
18 changes: 18 additions & 0 deletions src/Translator/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,24 @@ protected function getTranslatedMessage(
return $this->messages[$textDomain][$locale][$message];
}


/**
* issue https://github.com/zendframework/zend-i18n/issues/53
*
* storage: array:8 [▼
* "default\x04Welcome" => "Cześć"
* "default\x04Top %s Product" => array:3 [▼
* 0 => "Top %s Produkt"
* 1 => "Top %s Produkty"
* 2 => "Top %s Produktów"
* ]
* "Top %s Products" => ""
* ]
*/
if (isset($this->messages[$textDomain][$locale][$textDomain . "\x04" . $message])) {
return $this->messages[$textDomain][$locale][$textDomain . "\x04" . $message];
}

if ($this->isEventManagerEnabled()) {
$until = function ($r) {
return is_string($r);
Expand Down

0 comments on commit 23743e0

Please sign in to comment.