mirror of
https://github.com/archtechx/gloss.git
synced 2025-12-12 11:14:04 +00:00
Improve callable strings
This commit is contained in:
parent
1beb64a7bb
commit
b7df00dd1f
2 changed files with 7 additions and 1 deletions
|
|
@ -228,7 +228,10 @@ class GlossTranslator extends Translator
|
|||
if (is_string($line)) {
|
||||
return $this->makeReplacements($line, $replace);
|
||||
} elseif (is_callable($line)) {
|
||||
return app()->call($line, $replace);
|
||||
return $this->makeReplacements(
|
||||
app()->call($line, $replace),
|
||||
$replace
|
||||
);
|
||||
} elseif (is_array($line) && count($line) > 0) {
|
||||
foreach ($line as $key => $value) {
|
||||
$line[$key] = $this->makeReplacements($value, $replace);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue