Skip to content

Commit

Permalink
fix location
Browse files Browse the repository at this point in the history
  • Loading branch information
uran1980 committed Mar 10, 2015
1 parent 459d7de commit 8784515
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "uran1980/yii2-translate-panel",
"description": "Yii2 Translate Panel makes the translation of your application awesome!",
"version": "0.1.7",
"version": "0.1.8",
"type": "yii2-extension",
"keywords": [
"yii2",
Expand Down
8 changes: 4 additions & 4 deletions models/search/SourceMessageSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,11 @@ protected function extractMessages($fileName, $translator)

$messages[$category][] = $message;
foreach ($this->config['sourcePath'] as $sourcePath) {
$parts = explode('/', $sourcePath);
$key = count($parts) - 1;
$location = $parts[$key] . str_replace(realpath($sourcePath), '', $fileName);
$location = str_replace(realpath($sourcePath), '', $fileName);
if ( $location !== $fileName ) {
$this->locations[$category][] = [md5($message) => $location];
$parts = explode('/', $sourcePath);
$key = count($parts) - 1;
$this->locations[$category][] = [md5($message) => $parts[$key] . $location];
}
}
} else {
Expand Down

0 comments on commit 8784515

Please sign in to comment.