Skip to content

Commit

Permalink
Merge branch '7.x' into 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed Sep 8, 2020
2 parents 5c2a4b1 + 60a58ae commit c0a9c17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Translator.php
Expand Up @@ -122,7 +122,7 @@ public function get($key, array $replace = [], $locale = null, $fallback = true)
$locales = $fallback ? $this->localeArray($locale) : [$locale];

foreach ($locales as $locale) {
if (! is_null($line = $this->getLine(
if (! empty($line = $this->getLine(
$namespace, $group, $locale, $item, $replace
))) {
return $line ?? $key;
Expand Down

3 comments on commit c0a9c17

@mc0de
Copy link

@mc0de mc0de commented on c0a9c17 Sep 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@driesvints what was intention of this? i have some translations which are optional, so now instead of displaying empty string, i get keys all over the place, for example if it is helper.
before we had an option to make it null if it is necessary, now it always returns keys.

@mc0de
Copy link

@mc0de mc0de commented on c0a9c17 Sep 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is kinda breaking because affects current projects

@driesvints
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.