Skip to content

Commit

Permalink
Append default analyzer if no locale
Browse files Browse the repository at this point in the history
  • Loading branch information
maximehuran committed Aug 11, 2023
1 parent 95f4f99 commit ac76594
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mapping/YamlWithLocaleProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ private function appendMapping(string $configurationDirectory, array $mapping, s

private function appendLocaleAnalyzers(string $configurationDirectory, array $mapping, ?string $locale): array
{
$mapping = $this->appendAnalyzers($configurationDirectory . \DIRECTORY_SEPARATOR . 'analyzers.yaml', $mapping);

if (null === $locale) {
return $mapping;
}

$mapping = $this->appendAnalyzers($configurationDirectory . \DIRECTORY_SEPARATOR . 'analyzers.yaml', $mapping);

foreach ($this->getLocaleCode($locale) as $localeCode) {
$mapping = $this->appendAnalyzers($configurationDirectory . \DIRECTORY_SEPARATOR . 'analyzers_' . $localeCode . '.yaml', $mapping);
}
Expand Down

0 comments on commit ac76594

Please sign in to comment.