We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd84ced commit b0de79aCopy full SHA for b0de79a
src/Commands/NovaLangPublish.php
@@ -84,7 +84,7 @@ public function handle()
84
$asAlias = '';
85
86
if ($this->option('underscore')) {
87
- $alias = str_replace('-', '_', $alias);
+ $alias = $this->fixSeparators($alias, '_');
88
}
89
90
if ($alias !== $locale) {
@@ -211,9 +211,9 @@ protected function getLocaleAliases($single = false): Collection
211
return $aliases;
212
213
214
- protected function fixSeparators(string $locale)
+ protected function fixSeparators(string $locale, string $separator = '-')
215
{
216
- return preg_replace('/['.static::SEPARATORS.']+/', '-', $locale);
+ return preg_replace('/['.static::SEPARATORS.']+/', $separator, $locale);
217
218
219
protected function isForce(): bool
0 commit comments