Skip to content

Commit

Permalink
Avoid prefixing translation files with vendor name for vendor namespa…
Browse files Browse the repository at this point in the history
…ced plugins.
  • Loading branch information
ADmad committed Aug 13, 2014
1 parent 1280fe0 commit 205ee0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/I18n/MessagesFileLoader.php
Expand Up @@ -108,8 +108,13 @@ public function __invoke() {
$ext = $this->_extension;
$file = false;

$fileName = $this->_name;
$pos = strpos($fileName, '/');
if ($pos !== false) {
$fileName = substr($fileName, $pos + 1);
}
foreach ($folders as $folder) {
$path = $folder . str_replace('/', '_', $this->_name) . ".$ext";
$path = $folder . $fileName . ".$ext";
if (is_file($path)) {
$file = $path;
break;
Expand Down

0 comments on commit 205ee0a

Please sign in to comment.