Commit adb7572c authored by Vincent Petry's avatar Vincent Petry Committed by GitHub
Browse files

Merge pull request #26547 from owncloud/kill-legacy-OC_OCS

Kill legacy OC_OCS and OC_L10N
parents 7822fb4b b24904cc
<?php
/** @var array $_ */
/** @var OC_L10N $l */
/** @var \OCP\IL10N $l */
style('core', ['styles', 'header']);
?>
......
<?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');
......
......@@ -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')
?>
......
......@@ -44,7 +44,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->getL10NFactory()->get('files');
$maxUploadFileSize = \OCP\Util::maxUploadFilesize($dir, $storageInfo['free']);
$maxHumanFileSize = \OCP\Util::humanFileSize($maxUploadFileSize);
$maxHumanFileSize = $l->t('Upload (max. %s)', [$maxHumanFileSize]);
......
<?php /** @var $l OC_L10N */ ?>
<?php /** @var $l \OCP\IL10N */ ?>
<?php $_['appNavigation']->printPage(); ?>
<div id="app-content">
<?php foreach ($_['appContents'] as $content) { ?>
......
......@@ -79,7 +79,7 @@ class ActivityTest extends TestCase {
$this->l10nFactory = $this->getMockBuilder('OCP\L10N\IFactory')
->disableOriginalConstructor()
->getMock();
$deL10n = $this->getMockBuilder('OC_L10N')
$deL10n = $this->getMockBuilder('\OCP\IL10N')
->disableOriginalConstructor()
->getMock();
$deL10n->expects($this->any())
......@@ -91,8 +91,8 @@ class ActivityTest extends TestCase {
$this->l10nFactory->expects($this->any())
->method('get')
->willReturnMap([
['files', null, new \OC_L10N('files', 'en')],
['files', 'en', new \OC_L10N('files', 'en')],
['files', null, \OC::$server->getL10NFactory()->get('files', 'en')],
['files', 'en', \OC::$server->getL10NFactory()->get('files', 'en')],
['files', 'de', $deL10n],
]);
......
......@@ -26,7 +26,6 @@ namespace OCA\Files\Tests\Controller;
use OCA\Files\Controller\ViewController;
use OCP\AppFramework\Http;
use OCP\Files\NotFoundException;
use OCP\IUser;
use OCP\Template;
use Test\TestCase;
......@@ -47,27 +46,27 @@ use OCP\App\IAppManager;
* @package OCA\Files\Tests\Controller
*/
class ViewControllerTest extends TestCase {
/** @var IRequest */
/** @var IRequest | \PHPUnit_Framework_MockObject_MockObject */
private $request;
/** @var IURLGenerator */
/** @var IURLGenerator | \PHPUnit_Framework_MockObject_MockObject */
private $urlGenerator;
/** @var INavigationManager */
private $navigationManager;
/** @var IL10N */
private $l10n;
/** @var IConfig */
/** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
private $config;
/** @var EventDispatcherInterface */
private $eventDispatcher;
/** @var ViewController */
/** @var ViewController | \PHPUnit_Framework_MockObject_MockObject */
private $viewController;
/** @var IUser */
private $user;
/** @var IUserSession */
private $userSession;
/** @var IAppManager */
/** @var IAppManager | \PHPUnit_Framework_MockObject_MockObject */
private $appManager;
/** @var Folder */
/** @var Folder | \PHPUnit_Framework_MockObject_MockObject */
private $rootFolder;
public function setUp() {
......@@ -190,7 +189,7 @@ class ViewControllerTest extends TestCase {
'appname' => 'files',
'script' => 'list.php',
'order' => 0,
'name' => new \OC_L10N_String(new \OC_L10N('files'), 'All files', []),
'name' => new \OC_L10N_String(\OC::$server->getL10NFactory()->get('files'), 'All files', []),
'active' => false,
'icon' => '',
],
......@@ -208,7 +207,7 @@ class ViewControllerTest extends TestCase {
'appname' => 'files_sharing',
'script' => 'list.php',
'order' => 10,
'name' => new \OC_L10N_String(new \OC_L10N('files_sharing'), 'Shared with you', []),
'name' => new \OC_L10N_String(\OC::$server->getL10NFactory()->get('files_sharing'), 'Shared with you', []),
'active' => false,
'icon' => '',
],
......@@ -217,7 +216,7 @@ class ViewControllerTest extends TestCase {
'appname' => 'files_sharing',
'script' => 'list.php',
'order' => 15,
'name' => new \OC_L10N_String(new \OC_L10N('files_sharing'), 'Shared with others', []),
'name' => new \OC_L10N_String(\OC::$server->getL10NFactory()->get('files_sharing'), 'Shared with others', []),
'active' => false,
'icon' => '',
],
......@@ -226,7 +225,7 @@ class ViewControllerTest extends TestCase {
'appname' => 'files_sharing',
'script' => 'list.php',
'order' => 20,
'name' => new \OC_L10N_String(new \OC_L10N('files_sharing'), 'Shared by link', []),
'name' => new \OC_L10N_String(\OC::$server->getL10NFactory()->get('files_sharing'), 'Shared by link', []),
'active' => false,
'icon' => '',
],
......@@ -235,7 +234,7 @@ class ViewControllerTest extends TestCase {
'appname' => 'systemtags',
'script' => 'list.php',
'order' => 25,
'name' => new \OC_L10N_String(new \OC_L10N('systemtags'), 'Tags', []),
'name' => new \OC_L10N_String(\OC::$server->getL10NFactory()->get('systemtags'), 'Tags', []),
'active' => false,
'icon' => '',
],
......@@ -244,7 +243,7 @@ class ViewControllerTest extends TestCase {
'appname' => 'files_trashbin',
'script' => 'list.php',
'order' => 50,
'name' => new \OC_L10N_String(new \OC_L10N('files_trashbin'), 'Deleted files', []),
'name' => new \OC_L10N_String(\OC::$server->getL10NFactory()->get('files_trashbin'), 'Deleted files', []),
'active' => false,
'icon' => '',
],
......
......@@ -48,7 +48,7 @@ class ListCommandTest extends CommandTest {
}
public function testListAuthIdentifier() {
$l10n = $this->createMock('\OC_L10N', null, [], '', false);
$l10n = $this->createMock('\OCP\IL10N', null, [], '', false);
$session = $this->createMock('\OCP\ISession');
$crypto = $this->createMock('\OCP\Security\ICrypto');
$instance = $this->getInstance();
......
<?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 $theme OC_Defaults */
/** @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'];
......
......@@ -276,7 +276,7 @@ class Factory implements IFactory {
* @param string $lang
* @return string[]
*/
// FIXME This method is only public, until OC_L10N does not need it anymore,
// FIXME This method is only public, until \OCP\IL10N does not need it anymore,
// FIXME This is also the reason, why it is not in the public interface
public function getL10nFilesForApp($app, $lang) {
$languageFiles = [];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment