Browse Source

Move away from OC_L10N

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tags/v11.0RC2
Roeland Jago Douma 7 years ago
parent
commit
740659a04c
No account linked to committer's email address

+ 1
- 1
apps/encryption/templates/settings-admin.php View File

@@ -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
- 1
apps/encryption/templates/settings-personal.php View File

@@ -1,6 +1,6 @@
<?php
/** @var array $_ */
/** @var OC_L10N $l */
/** @var \OCP\IL10N $l */
script('encryption', 'settings-personal');
script('core', 'multiselect');
?>

+ 1
- 1
apps/federatedfilesharing/templates/settings-admin.php View File

@@ -1,5 +1,5 @@
<?php
/** @var OC_L10N $l */
/** @var \OCP\IL10N $l */
/** @var array $_ */
script('federatedfilesharing', 'settings-admin');
?>

+ 1
- 1
apps/federatedfilesharing/templates/settings-personal.php View File

@@ -1,5 +1,5 @@
<?php
/** @var OC_L10N $l */
/** @var \OCP\IL10N $l */
/** @var array $_ */
script('federatedfilesharing', 'settings-personal');
style('federatedfilesharing', 'settings-personal');

+ 1
- 1
apps/federation/templates/settings-admin.php View File

@@ -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')
?>

+ 1
- 1
apps/files/lib/Helper.php View File

@@ -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
- 1
apps/files/templates/index.php View File

@@ -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
- 1
apps/files/templates/recentlist.php View File

@@ -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
- 1
apps/files_sharing/templates/authenticate.php View File

@@ -1,6 +1,6 @@
<?php
/** @var $_ array */
/** @var $l OC_L10N */
/** @var $l \OCP\IL10N */
style('files_sharing', 'authenticate');
script('files_sharing', 'authenticate');
?>

+ 1
- 1
apps/files_sharing/templates/list.php View File

@@ -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
- 1
apps/files_sharing/templates/public.php View File

@@ -1,5 +1,5 @@
<?php
/** @var $l OC_L10N */
/** @var $l \OCP\IL10N */
/** @var $_ array */
?>


+ 1
- 1
apps/files_trashbin/templates/index.php View File

@@ -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
- 1
core/templates/404.php View File

@@ -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
- 1
core/templates/exception.php View File

@@ -1,6 +1,6 @@
<?php
/** @var array $_ */
/** @var OC_L10N $l */
/** @var \OCP\IL10N $l */

style('core', ['styles', 'header']);
?>

+ 1
- 1
core/templates/login.php View File

@@ -1,4 +1,4 @@
<?php /** @var $l OC_L10N */ ?>
<?php /** @var $l \OCP\IL10N */ ?>
<?php
vendor_script('jsTimezoneDetect/jstz');
script('core', [

+ 1
- 1
core/templates/twofactorshowchallenge.php View File

@@ -1,5 +1,5 @@
<?php
/** @var $l OC_L10N */
/** @var $l \OCP\IL10N */
/** @var $_ array */
/* @var $error boolean */
$error = $_['error'];

+ 3
- 0
lib/private/AppFramework/DependencyInjection/DIContainer.php View File

@@ -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);
}
}

+ 3
- 2
lib/private/Setup/AbstractDatabase.php View File

@@ -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;

+ 1
- 1
lib/private/TemplateLayout.php View File

@@ -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)) {

+ 1
- 1
lib/private/legacy/util.php View File

@@ -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";

+ 1
- 1
lib/public/Util.php View File

@@ -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) {

+ 1
- 1
settings/personal.php View File

@@ -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…
Cancel
Save