Check for same language

2022.09-rc
nupplaPhil 2019-12-29 16:39:25 +01:00
rodzic 7a2f4dc54e
commit 71a38180e9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: D8365C3D36B77D90
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -413,6 +413,11 @@ class L10n
*/
public function withLang(string $lang)
{
// Don't create a new instance for same language
if ($lang === $this->lang) {
return $this;
}
$newL10n = clone $this;
$newL10n->loadTranslationTable($lang);
return $newL10n;