Skip to content

Commit 1567da7

Browse files
author
Oleg Liski
committed
* Fixed problem with folder separator in Windows platform
1 parent 7e70bdc commit 1567da7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Mariuzzo/LaravelJsLocalization/Generators/LangJsGenerator.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected function getMessages()
103103
$key = str_replace('\\', '.', $key);
104104
$key = str_replace('/', '.', $key);
105105

106-
$messages[$key] = include "${path}/${pathName}";
106+
$messages[$key] = include $path.DIRECTORY_SEPARATOR.$pathName;
107107
}
108108

109109
return $messages;
@@ -136,6 +136,8 @@ protected function isMessagesExcluded($filePath)
136136
return false;
137137
}
138138

139+
$filePath = str_replace(DIRECTORY_SEPARATOR,'/',$filePath);
140+
139141
$localeDirSeparatorPosition = strpos($filePath, '/');
140142
$filePath = substr($filePath, $localeDirSeparatorPosition);
141143
$filePath = ltrim($filePath, '/');

0 commit comments

Comments
 (0)