Skip to content

Commit

Permalink
Fix the regex
Browse files Browse the repository at this point in the history
  • Loading branch information
SalemCode8 authored Oct 14, 2024
1 parent 04cbce7 commit c81fc99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Actions/SyncPhrasesAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function execute(Translation $source, $key, $value, $locale, $file

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

$translationFile = TranslationFile::firstOrCreate([
'name' => $filePath,
Expand Down

0 comments on commit c81fc99

Please sign in to comment.