Move away from OC_L10N
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
f2cae3cee1
commit
740659a04c
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/** @var array $_ */
|
||||
/** @var OC_L10N $l */
|
||||
/** @var \OCP\IL10N $l */
|
||||
script('encryption', 'settings-admin');
|
||||
script('core', 'multiselect');
|
||||
style('encryption', 'settings-admin');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/** @var array $_ */
|
||||
/** @var OC_L10N $l */
|
||||
/** @var \OCP\IL10N $l */
|
||||
script('encryption', 'settings-personal');
|
||||
script('core', 'multiselect');
|
||||
?>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/** @var OC_L10N $l */
|
||||
/** @var \OCP\IL10N $l */
|
||||
/** @var array $_ */
|
||||
script('federatedfilesharing', 'settings-admin');
|
||||
?>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/** @var OC_L10N $l */
|
||||
/** @var \OCP\IL10N $l */
|
||||
/** @var array $_ */
|
||||
script('federatedfilesharing', 'settings-personal');
|
||||
style('federatedfilesharing', 'settings-personal');
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/** @var array $_ */
|
||||
use OCA\Federation\TrustedServers;
|
||||
|
||||
/** @var OC_L10N $l */
|
||||
/** @var \OCP\IL10N $l */
|
||||
script('federation', 'settings-admin');
|
||||
style('federation', 'settings-admin')
|
||||
?>
|
||||
|
|
|
@ -45,7 +45,7 @@ class Helper {
|
|||
public static function buildFileStorageStatistics($dir) {
|
||||
// information about storage capacities
|
||||
$storageInfo = \OC_Helper::getStorageInfo($dir);
|
||||
$l = new \OC_L10N('files');
|
||||
$l = \OC::$server->getL10N('files');
|
||||
$maxUploadFileSize = \OCP\Util::maxUploadFilesize($dir, $storageInfo['free']);
|
||||
$maxHumanFileSize = \OCP\Util::humanFileSize($maxUploadFileSize);
|
||||
$maxHumanFileSize = $l->t('Upload (max. %s)', array($maxHumanFileSize));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php /** @var $l OC_L10N */ ?>
|
||||
<?php /** @var $l \OCP\IL10N */ ?>
|
||||
<?php $_['appNavigation']->printPage(); ?>
|
||||
<div id="app-content">
|
||||
<?php foreach ($_['appContents'] as $content) { ?>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php /** @var $l OC_L10N */ ?>
|
||||
<?php /** @var $l \OCP\IL10N */ ?>
|
||||
<div id='notification'></div>
|
||||
|
||||
<div id="emptycontent" class="hidden"></div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/** @var $_ array */
|
||||
/** @var $l OC_L10N */
|
||||
/** @var $l \OCP\IL10N */
|
||||
style('files_sharing', 'authenticate');
|
||||
script('files_sharing', 'authenticate');
|
||||
?>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php /** @var $l OC_L10N */ ?>
|
||||
<?php /** @var $l \OCP\IL10N */ ?>
|
||||
<div id='notification'></div>
|
||||
|
||||
<div id="emptycontent" class="hidden"></div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/** @var $l OC_L10N */
|
||||
/** @var $l \OCP\IL10N */
|
||||
/** @var $_ array */
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php /** @var $l OC_L10N */ ?>
|
||||
<?php /** @var $l \OCP\IL10N */ ?>
|
||||
<div id="controls">
|
||||
<div id="file_action_panel"></div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/** @var $_ array */
|
||||
/** @var $l OC_L10N */
|
||||
/** @var $l \OCP\IL10N */
|
||||
/** @var $theme OC_Theme */
|
||||
// @codeCoverageIgnoreStart
|
||||
if(!isset($_)) {//also provide standalone error page
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/** @var array $_ */
|
||||
/** @var OC_L10N $l */
|
||||
/** @var \OCP\IL10N $l */
|
||||
|
||||
style('core', ['styles', 'header']);
|
||||
?>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php /** @var $l OC_L10N */ ?>
|
||||
<?php /** @var $l \OCP\IL10N */ ?>
|
||||
<?php
|
||||
vendor_script('jsTimezoneDetect/jstz');
|
||||
script('core', [
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/** @var $l OC_L10N */
|
||||
/** @var $l \OCP\IL10N */
|
||||
/** @var $_ array */
|
||||
/* @var $error boolean */
|
||||
$error = $_['error'];
|
||||
|
|
|
@ -533,6 +533,9 @@ class DIContainer extends SimpleContainer implements IAppContainer {
|
|||
$this->query('OC\CapabilitiesManager')->registerCapability(function() use ($serviceName) {
|
||||
return $this->query($serviceName);
|
||||
});
|
||||
}
|
||||
|
||||
public function query($name) {
|
||||
return parent::query($name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,12 +29,13 @@ namespace OC\Setup;
|
|||
use OC\AllConfig;
|
||||
use OC\DB\ConnectionFactory;
|
||||
use OCP\IConfig;
|
||||
use OCP\IL10N;
|
||||
use OCP\ILogger;
|
||||
use OCP\Security\ISecureRandom;
|
||||
|
||||
abstract class AbstractDatabase {
|
||||
|
||||
/** @var \OC_L10N */
|
||||
/** @var IL10N */
|
||||
protected $trans;
|
||||
/** @var string */
|
||||
protected $dbDefinitionFile;
|
||||
|
@ -57,7 +58,7 @@ abstract class AbstractDatabase {
|
|||
/** @var ISecureRandom */
|
||||
protected $random;
|
||||
|
||||
public function __construct($trans, $dbDefinitionFile, IConfig $config, ILogger $logger, ISecureRandom $random) {
|
||||
public function __construct(IL10N $trans, $dbDefinitionFile, IConfig $config, ILogger $logger, ISecureRandom $random) {
|
||||
$this->trans = $trans;
|
||||
$this->dbDefinitionFile = $dbDefinitionFile;
|
||||
$this->config = $config;
|
||||
|
|
|
@ -127,7 +127,7 @@ class TemplateLayout extends \OC_Template {
|
|||
|
||||
}
|
||||
// Send the language to our layouts
|
||||
$this->assign('language', \OC_L10N::findLanguage());
|
||||
$this->assign('language', \OC::$server->getL10NFactory()->findLanguage());
|
||||
|
||||
if(\OC::$server->getSystemConfig()->getValue('installed', false)) {
|
||||
if (empty(self::$versionHash)) {
|
||||
|
|
|
@ -526,7 +526,7 @@ class OC_Util {
|
|||
*/
|
||||
public static function addTranslations($application, $languageCode = null, $prepend = false) {
|
||||
if (is_null($languageCode)) {
|
||||
$languageCode = \OC_L10N::findLanguage($application);
|
||||
$languageCode = \OC::$server->getL10NFactory()->findLanguage($application);
|
||||
}
|
||||
if (!empty($application)) {
|
||||
$path = "$application/l10n/$languageCode";
|
||||
|
|
|
@ -195,7 +195,7 @@ class Util {
|
|||
* get l10n object
|
||||
* @param string $application
|
||||
* @param string|null $language
|
||||
* @return \OC_L10N
|
||||
* @return \OCP\IL10N
|
||||
* @since 6.0.0 - parameter $language was added in 8.0.0
|
||||
*/
|
||||
public static function getL10N($application, $language = null) {
|
||||
|
|
|
@ -68,7 +68,7 @@ $storageInfo=OC_Helper::getStorageInfo('/');
|
|||
$user = OC::$server->getUserManager()->get(OC_User::getUser());
|
||||
$email = $user->getEMailAddress();
|
||||
|
||||
$userLang=$config->getUserValue( OC_User::getUser(), 'core', 'lang', OC_L10N::findLanguage() );
|
||||
$userLang=$config->getUserValue( OC_User::getUser(), 'core', 'lang', \OC::$server->getL10NFactory()->findLanguage() );
|
||||
$languageCodes = \OC::$server->getL10NFactory()->findAvailableLanguages();
|
||||
|
||||
// array of common languages
|
||||
|
|
Loading…
Reference in New Issue