mirror of
https://github.com/grocy/grocy.git
synced 2025-08-12 17:01:13 +00:00
Fixed an issue with translations string without an placeholder (references #161)
This commit is contained in:
parent
12ba99f649
commit
970e5edfa3
@ -113,8 +113,15 @@ class LocalizationService
|
|||||||
{
|
{
|
||||||
$this->CheckAndAddMissingTranslationToPot($text);
|
$this->CheckAndAddMissingTranslationToPot($text);
|
||||||
|
|
||||||
|
if (func_num_args() === 1)
|
||||||
|
{
|
||||||
|
return $this->Translator->gettext($text);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return vsprintf($this->Translator->gettext($text), ...$placeholderValues);
|
return vsprintf($this->Translator->gettext($text), ...$placeholderValues);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function __n($number, string $singularForm, string $pluralForm)
|
public function __n($number, string $singularForm, string $pluralForm)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user