Skip to content

Commit 3970a82

Browse files
authored
Fix file name wrong change (#132)
1 parent 9164204 commit 3970a82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Actions/SyncPhrasesAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static function execute(Translation $source, $key, $value, $locale, $file
2727

2828
$isRoot = $file === $locale.'.json' || $file === $locale.'.php';
2929
$extension = pathinfo($file, PATHINFO_EXTENSION);
30-
$filePath = str_replace('.'.$extension, '', str_replace($locale.DIRECTORY_SEPARATOR, '', $file));
30+
$filePath = str_replace('.'.$extension, '', preg_replace('/^'.preg_quote($locale.DIRECTORY_SEPARATOR, '/').'/', '', $file));
3131

3232
$translationFile = TranslationFile::firstOrCreate([
3333
'name' => $filePath,

0 commit comments

Comments
 (0)