Skip to content

Commit

Permalink
Fact types containing % break translation
Browse files Browse the repository at this point in the history
  • Loading branch information
fisharebest committed Aug 8, 2020
1 parent c531f07 commit 3f9fe4d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/Fact.php
Expand Up @@ -466,11 +466,13 @@ public function label(): string
$type = $this->attribute('TYPE');

if ($type !== '') {
// Allow user-translations of custom types.
$translated = I18N::translate($type);
if (!str_contains($type, '%')) {
// Allow user-translations of custom types.
$translated = I18N::translate($type);

if ($translated !== $type) {
return $translated;
if ($translated !== $type) {
return $translated;
}
}

return e($type);
Expand Down

0 comments on commit 3f9fe4d

Please sign in to comment.