Skip to content

Commit e758be8

Browse files
author
Martynas Sudintas
committed
Merge pull request #22 from martiis/import-1-patch
translations paths are now set from current working directory
2 parents f78e32a + 57fd7e5 commit e758be8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Translation/Import/FileImport.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function import(SplFileInfo $file)
5252
$domainMessages = $messageCatalogue->all($domain);
5353

5454
if (!empty($domainMessages)) {
55-
$path = pathinfo($file->getPathname(), PATHINFO_DIRNAME);
55+
$path = substr(pathinfo($file->getPathname(), PATHINFO_DIRNAME), strlen(getcwd()) + 1);
5656
$translations[$path][$domain]['format'] = $file->getExtension();
5757
foreach ($domainMessages as $key => $content) {
5858
$translations[$path][$domain]['translations'][$key][$locale] = $content;

0 commit comments

Comments
 (0)