diff --git a/apps/settings/lib/Settings/Admin/Sharing.php b/apps/settings/lib/Settings/Admin/Sharing.php
index c151e7be4e1adaa479df090c740ebdec09e57106..495af9d53752bcc82467aeea93da1e371044990f 100644
--- a/apps/settings/lib/Settings/Admin/Sharing.php
+++ b/apps/settings/lib/Settings/Admin/Sharing.php
@@ -52,9 +52,9 @@ class Sharing implements ISettings {
 	/**
 	 * @param IConfig $config
 	 */
-	public function __construct(IConfig $config, IFactory $l, IManager $shareManager) {
+	public function __construct(IConfig $config, IL10N $l, IManager $shareManager) {
 		$this->config = $config;
-		$this->l = $l->get('lib');
+		$this->l = $l;
 		$this->shareManager = $shareManager;
 	}
 
diff --git a/apps/settings/tests/Settings/Admin/SharingTest.php b/apps/settings/tests/Settings/Admin/SharingTest.php
index d662c1864dbedb5e7d23263ca2af5799c3c89e17..5006f90cbd18cba2fa3d53be77811ab5ae0104bd 100644
--- a/apps/settings/tests/Settings/Admin/SharingTest.php
+++ b/apps/settings/tests/Settings/Admin/SharingTest.php
@@ -33,7 +33,6 @@ use OCP\AppFramework\Http\TemplateResponse;
 use OCP\Constants;
 use OCP\IConfig;
 use OCP\IL10N;
-use OCP\L10N\IFactory;
 use OCP\Share\IManager;
 use Test\TestCase;
 
@@ -52,15 +51,11 @@ class SharingTest extends TestCase {
 		$this->config = $this->getMockBuilder(IConfig::class)->getMock();
 		$this->l10n = $this->getMockBuilder(IL10N::class)->getMock();
 
-		$l10Factory = $this->createMock(IFactory::class);
-		$l10Factory->method('get')
-			->willReturn($this->l10n);
-
 		$this->shareManager = $this->getMockBuilder(IManager::class)->getMock();
 
 		$this->admin = new Sharing(
 			$this->config,
-			$l10Factory,
+			$this->l10n,
 			$this->shareManager
 		);
 	}