<?php
/** @var array $_ */
-/** @var OC_L10N $l */
+/** @var \OCP\IL10N $l */
script('encryption', 'settings-admin');
script('core', 'multiselect');
style('encryption', 'settings-admin');
<?php
/** @var array $_ */
- /** @var OC_L10N $l */
+ /** @var \OCP\IL10N $l */
script('encryption', 'settings-personal');
script('core', 'multiselect');
?>
<?php
-/** @var OC_L10N $l */
+/** @var \OCP\IL10N $l */
/** @var array $_ */
script('federatedfilesharing', 'settings-admin');
?>
<?php
-/** @var OC_L10N $l */
+/** @var \OCP\IL10N $l */
/** @var array $_ */
script('federatedfilesharing', 'settings-personal');
style('federatedfilesharing', 'settings-personal');
/** @var array $_ */
use OCA\Federation\TrustedServers;
-/** @var OC_L10N $l */
+/** @var \OCP\IL10N $l */
script('federation', 'settings-admin');
style('federation', 'settings-admin')
?>
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));
-<?php /** @var $l OC_L10N */ ?>
+<?php /** @var $l \OCP\IL10N */ ?>
<?php $_['appNavigation']->printPage(); ?>
<div id="app-content">
<?php foreach ($_['appContents'] as $content) { ?>
-<?php /** @var $l OC_L10N */ ?>
+<?php /** @var $l \OCP\IL10N */ ?>
<div id='notification'></div>
<div id="emptycontent" class="hidden"></div>
<?php
/** @var $_ array */
- /** @var $l OC_L10N */
+ /** @var $l \OCP\IL10N */
style('files_sharing', 'authenticate');
script('files_sharing', 'authenticate');
?>
-<?php /** @var $l OC_L10N */ ?>
+<?php /** @var $l \OCP\IL10N */ ?>
<div id='notification'></div>
<div id="emptycontent" class="hidden"></div>
<?php
-/** @var $l OC_L10N */
+/** @var $l \OCP\IL10N */
/** @var $_ array */
?>
-<?php /** @var $l OC_L10N */ ?>
+<?php /** @var $l \OCP\IL10N */ ?>
<div id="controls">
<div id="file_action_panel"></div>
</div>
<?php
/** @var $_ array */
-/** @var $l OC_L10N */
+/** @var $l \OCP\IL10N */
/** @var $theme OC_Theme */
// @codeCoverageIgnoreStart
if(!isset($_)) {//also provide standalone error page
<?php
/** @var array $_ */
- /** @var OC_L10N $l */
+ /** @var \OCP\IL10N $l */
style('core', ['styles', 'header']);
?>
-<?php /** @var $l OC_L10N */ ?>
+<?php /** @var $l \OCP\IL10N */ ?>
<?php
vendor_script('jsTimezoneDetect/jstz');
script('core', [
<?php
-/** @var $l OC_L10N */
+/** @var $l \OCP\IL10N */
/** @var $_ array */
/* @var $error boolean */
$error = $_['error'];
$this->query('OC\CapabilitiesManager')->registerCapability(function() use ($serviceName) {
return $this->query($serviceName);
});
+ }
+ public function query($name) {
+ return parent::query($name);
}
}
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;
/** @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;
}
// 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)) {
*/
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";
* 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) {
$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