Skip to content

Commit 6efa777

Browse files
authored
Merge pull request #67 from olelis/master
Fixed problem with folder separator in Windows platform
2 parents 5de51d1 + 1567da7 commit 6efa777

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

lib/lang.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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)