Skip to content

Commit

Permalink
Merge branch 'respect-lang-json-files' into ignore-excluded-locales
Browse files Browse the repository at this point in the history
  • Loading branch information
ahtinurme committed Feb 2, 2024
2 parents 47ea443 + 939a204 commit 7d10b69
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ function buildPhrasesTree($phrases, $locale): array

/** @var \Outhebox\TranslationsUI\Models\Phrase $phrase */
foreach ($phrases as $phrase) {
if ($phrase->file->file_name === "$locale.json") {
$tree[$locale][$phrase->file->file_name][$phrase->key] = ! blank($phrase->value) ? $phrase->value : $phrase->source->value;
continue;
}
setArrayValue(
array: $tree[$locale][$phrase->file->file_name],
key: $phrase->key,
Expand Down

0 comments on commit 7d10b69

Please sign in to comment.