aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
authorAndrew Summers <18727110+summersab@users.noreply.github.com>2023-08-29 15:25:03 -0500
committerAndrew Summers <18727110+summersab@users.noreply.github.com>2023-08-29 21:30:42 -0500
commitf80282a5ed1891224e3fa71c69ca2d60412c4c63 (patch)
treec7317195eeffd2f082de44050023618afcddf3df /lib/private/legacy
parent9d1547f59d53b46ba401ddf0e7f4c6e4f067004e (diff)
downloadnextcloud-server-f80282a5ed1891224e3fa71c69ca2d60412c4c63.tar.gz
nextcloud-server-f80282a5ed1891224e3fa71c69ca2d60412c4c63.zip
Refactor `OC\Server::getL10NFactory`
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/OC_Util.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index 9d62c46137e..1d13f94e836 100644
--- a/lib/private/legacy/OC_Util.php
+++ b/lib/private/legacy/OC_Util.php
@@ -71,6 +71,7 @@ use OCP\IConfig;
use OCP\IGroupManager;
use OCP\IURLGenerator;
use OCP\IUser;
+use OCP\L10N\IFactory;
use OCP\Share\IManager;
use Psr\Log\LoggerInterface;
@@ -184,7 +185,7 @@ class OC_Util {
$logger = \OC::$server->get(LoggerInterface::class);
$plainSkeletonDirectory = \OC::$server->getConfig()->getSystemValueString('skeletondirectory', \OC::$SERVERROOT . '/core/skeleton');
- $userLang = \OC::$server->getL10NFactory()->findLanguage();
+ $userLang = \OC::$server->get(IFactory::class)->findLanguage();
$skeletonDirectory = str_replace('{lang}', $userLang, $plainSkeletonDirectory);
if (!file_exists($skeletonDirectory)) {
@@ -403,7 +404,7 @@ class OC_Util {
*/
public static function addTranslations($application, $languageCode = null, $prepend = false) {
if (is_null($languageCode)) {
- $languageCode = \OC::$server->getL10NFactory()->findLanguage($application);
+ $languageCode = \OC::$server->get(IFactory::class)->findLanguage($application);
}
if (!empty($application)) {
$path = "$application/l10n/$languageCode";