From a12d3547627611a933b3e70ab5b51c2e130b0e24 Mon Sep 17 00:00:00 2001
From: Joas Schilling <nickvergessen@owncloud.com>
Date: Fri, 28 Aug 2015 12:04:52 +0200
Subject: [PATCH] Deprecate OC_L10N::get()

---
 lib/private/l10n.php | 9 +++------
 lib/public/il10n.php | 2 +-
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/lib/private/l10n.php b/lib/private/l10n.php
index 17acaac169..168011cfce 100644
--- a/lib/private/l10n.php
+++ b/lib/private/l10n.php
@@ -81,14 +81,11 @@ class OC_L10N implements \OCP\IL10N {
 	 * get an L10N instance
 	 * @param string $app
 	 * @param string|null $lang
-	 * @return \OC_L10N
+	 * @return \OCP\IL10N
+	 * @deprecated Use \OC::$server->getL10NFactory()->get() instead
 	 */
 	public static function get($app, $lang=null) {
-		if (is_null($lang)) {
-			return OC::$server->getL10N($app);
-		} else {
-			return new \OC_L10N($app, $lang);
-		}
+		return \OC::$server->getL10NFactory()->get($app, $lang);
 	}
 
 	/**
diff --git a/lib/public/il10n.php b/lib/public/il10n.php
index e1d0102105..c6e076a21f 100644
--- a/lib/public/il10n.php
+++ b/lib/public/il10n.php
@@ -100,7 +100,7 @@ interface IL10N {
 
 
 	/**
-	 * The code (en, de, ...) of the language that is used for this OC_L10N object
+	 * The code (en, de, ...) of the language that is used for this IL10N object
 	 *
 	 * @return string language
 	 * @since 7.0.0
-- 
GitLab