There was an error while loading. Please reload this page.
1 parent dac82d0 commit 3fff877Copy full SHA for 3fff877
1 file changed
src/Sign.php
@@ -154,10 +154,12 @@ public function localize(?string $locale = null): SignInterface
154
155
$translatedName = $this->translator()->get($key, locale: $locale);
156
157
- if (is_string($translatedName)) {
158
- $this->name = $translatedName;
+ if (!is_string($translatedName)) {
+ throw new LocalizationException('No translation for "' . $key . '" in locale "' . $locale . '"');
159
}
160
161
+ $this->name = $translatedName;
162
+
163
return $this;
164
165
0 commit comments