Skip to content

Commit

Permalink
Do not use dot notation for sentences (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh committed Jun 5, 2023
1 parent 17f5f11 commit cfa0484
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Manager.php
Expand Up @@ -347,7 +347,8 @@ protected function makeTree($translations, $json = false)
{
$array = [];
foreach ($translations as $translation) {
if ($json) {
// For JSON and sentences, do not use dotted notation
if ($json || Str::contains($translation->key, [' ']) || Str::endsWith($translation->key, ['.'])) {
$this->jsonSet($array[$translation->locale][$translation->group], $translation->key,
$translation->value);
} else {
Expand Down

0 comments on commit cfa0484

Please sign in to comment.