Skip to content

Commit b0de79a

Browse files
committed
fix seps in alias
1 parent dd84ced commit b0de79a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Commands/NovaLangPublish.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function handle()
8484
$asAlias = '';
8585

8686
if ($this->option('underscore')) {
87-
$alias = str_replace('-', '_', $alias);
87+
$alias = $this->fixSeparators($alias, '_');
8888
}
8989

9090
if ($alias !== $locale) {
@@ -211,9 +211,9 @@ protected function getLocaleAliases($single = false): Collection
211211
return $aliases;
212212
}
213213

214-
protected function fixSeparators(string $locale)
214+
protected function fixSeparators(string $locale, string $separator = '-')
215215
{
216-
return preg_replace('/['.static::SEPARATORS.']+/', '-', $locale);
216+
return preg_replace('/['.static::SEPARATORS.']+/', $separator, $locale);
217217
}
218218

219219
protected function isForce(): bool

0 commit comments

Comments
 (0)