summaryrefslogtreecommitdiffstats
path: root/core/l10n/ru.js
diff options
context:
space:
mode:
authorJenkins for ownCloud <owncloud-bot@tmit.eu>2015-02-26 01:55:50 -0500
committerJenkins for ownCloud <owncloud-bot@tmit.eu>2015-02-26 01:55:50 -0500
commit8a4fddeb4afef2e96cadd505600700202fc0ee9b (patch)
tree5153f7b7966735749867a88a9206fd7e3df04d69 /core/l10n/ru.js
parent7ba391cd5ad874dfbc55735342cff8c4c5d2cb28 (diff)
downloadnextcloud-server-8a4fddeb4afef2e96cadd505600700202fc0ee9b.tar.gz
nextcloud-server-8a4fddeb4afef2e96cadd505600700202fc0ee9b.zip
[tx-robot] updated from transifex
Diffstat (limited to 'core/l10n/ru.js')
-rw-r--r--core/l10n/ru.js5
1 files changed, 0 insertions, 5 deletions
diff --git a/core/l10n/ru.js b/core/l10n/ru.js
index 678858c40ee..c02bac4aefd 100644
--- a/core/l10n/ru.js
+++ b/core/l10n/ru.js
@@ -62,9 +62,6 @@ OC.L10N.register(
"So-so password" : "Так себе пароль",
"Good password" : "Хороший пароль",
"Strong password" : "Устойчивый к взлому пароль",
- "Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." : "Веб-сервер до сих пор не настроен для возможности синхронизации файлов. Похоже что проблема в неисправности интерфейса WebDAV.",
- "This server has no working internet connection. This means that some of the features like mounting of external storage, notifications about updates or installation of 3rd party apps don´t work. Accessing files from remote and sending of notification emails might also not work. We suggest to enable internet connection for this server if you want to have all features." : "Данный сервер не имеет подключения к сети интернет. Это значит, что некоторые возможности, такие как подключение удаленных дисков, уведомления об обновлениях или установка сторонних приложений – не работают. Удалённый доступ к файлам и отправка уведомлений по электронной почте вероятнее всего тоже не будут работать. Предлагаем включить соединение с интернетом для этого сервера, если вы хотите использовать все возможности.",
- "Your data directory and your files are probably accessible from the internet. The .htaccess file is not working. We strongly suggest that you configure your webserver in a way that the data directory is no longer accessible or you move the data directory outside the webserver document root." : "Похоже, что каталог с данными и файлами доступны из интернета. Файл .htaccess не работает. Крайне рекомендуется произвести настройку вебсервера таким образом, чтобы каталог с данными больше не был доступен, или переместите каталог с данными в другое место, за пределы каталога документов веб-сервера.",
"Error occurred while checking server setup" : "Произошла ошибка при проверке настроек сервера",
"Shared" : "Общий доступ",
"Shared with {recipients}" : "Вы поделились с {recipients}",
@@ -137,9 +134,7 @@ OC.L10N.register(
"_{count} search result in other places_::_{count} search results in other places_" : ["{count} результат поиска в других местах","{count} результата поиска в других местах","{count} результатов поиска в других местах"],
"Mac OS X is not supported and %s will not work properly on this platform. Use it at your own risk! " : "Mac OS X не поддерживается и %s может работать некорректно на данной платформе. Используйте на свой страх и риск!",
"For the best results, please consider using a GNU/Linux server instead." : "Для достижения наилучших результатов, рассмотрите вариант использования сервера на GNU/Linux.",
- "It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. This will lead to problems with files over 4GB and is highly discouraged." : "Судя по всему, экземпляр %s работает на 32х разрядной сборке PHP и указанной в php.ini директивой open_basedir. Такая конфигурация приведет к проблемам работы с файлами размером более 4GB и крайне не рекомендуется.",
"Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP." : "Удалите директиву open_basedir из файла php.ini или смените PHP на 64х разрядную сборку.",
- "It seems that this %s instance is running on a 32-bit PHP environment and cURL is not installed. This will lead to problems with files over 4GB and is highly discouraged." : "Судя по всему, на сервере не установлен cURL и экземпляр %s работает на 32х разрядной сборке PHP. Такая конфигурация приведет к проблемам работы с файлами размером более 4GB и крайне не рекомендуется.",
"Please install the cURL extension and restart your webserver." : "Установите расширение cURL и перезапустите веб-сервер.",
"Personal" : "Личное",
"Users" : "Пользователи",
81 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422
<?php
/**
 * @copyright Copyright (c) 2016, ownCloud, Inc.
 *
 * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
 * @author Bernhard Posselt <dev@bernhard-posselt.com>
 * @author Bjoern Schiessle <bjoern@schiessle.org>
 * @author Christoph Wurst <christoph@winzerhof-wurst.at>
 * @author Daniel Kesselberg <mail@danielkesselberg.de>
 * @author Joas Schilling <coding@schilljs.com>
 * @author Jörn Friedrich Dreyer <jfd@butonic.de>
 * @author Lukas Reschke <lukas@statuscode.ch>
 * @author Morris Jobke <hey@morrisjobke.de>
 * @author Robin McCorkell <robin@mccorkell.me.uk>
 * @author Roeland Jago Douma <roeland@famdouma.nl>
 * @author Sebastian Wessalowski <sebastian@wessalowski.org>
 * @author Thomas Müller <thomas.mueller@tmit.eu>
 * @author Thomas Tanghus <thomas@tanghus.net>
 *
 * @license AGPL-3.0
 *
 * This code is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License, version 3,
 * as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License, version 3,
 * along with this program. If not, see <http://www.gnu.org/licenses/>
 *
 */

namespace OC\AppFramework\DependencyInjection;

use OC;
use OC\AppFramework\Http;
use OC\AppFramework\Http\Dispatcher;
use OC\AppFramework\Http\Output;
use OC\AppFramework\Middleware\MiddlewareDispatcher;
use OC\AppFramework\Middleware\OCSMiddleware;
use OC\AppFramework\Middleware\Security\CORSMiddleware;
use OC\AppFramework\Middleware\Security\RateLimitingMiddleware;
use OC\AppFramework\Middleware\Security\SecurityMiddleware;
use OC\AppFramework\Middleware\SessionMiddleware;
use OC\AppFramework\Utility\SimpleContainer;
use OC\Core\Middleware\TwoFactorMiddleware;
use OC\ServerContainer;
use OCA\WorkflowEngine\Manager;
use OCP\AppFramework\Http\IOutput;
use OCP\AppFramework\IAppContainer;
use OCP\AppFramework\QueryException;
use OCP\AppFramework\Utility\IControllerMethodReflector;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Files\Folder;
use OCP\Files\IAppData;
use OCP\GlobalScale\IConfig;
use OCP\Group\ISubAdmin;
use OCP\IL10N;
use OCP\ILogger;
use OCP\INavigationManager;
use OCP\IRequest;
use OCP\IServerContainer;
use OCP\ISession;
use OCP\IURLGenerator;
use OCP\IUserSession;

class DIContainer extends SimpleContainer implements IAppContainer {

	/**
	 * @var array
	 */
	private $middleWares = [];

	/** @var ServerContainer */
	private $server;

	/**
	 * Put your class dependencies in here
	 * @param string $appName the name of the app
	 * @param array $urlParams
	 * @param ServerContainer|null $server
	 */
	public function __construct($appName, $urlParams = [], ServerContainer $server = null){
		parent::__construct();
		$this['AppName'] = $appName;
		$this['urlParams'] = $urlParams;

		$this->registerAlias('Request', IRequest::class);

		/** @var \OC\ServerContainer $server */
		if ($server === null) {
			$server = \OC::$server;
		}
		$this->server = $server;
		$this->server->registerAppContainer($appName, $this);

		// aliases
		$this->registerAlias('appName', 'AppName');
		$this->registerAlias('webRoot', 'WebRoot');
		$this->registerAlias('userId', 'UserId');

		/**
		 * Core services
		 */
		$this->registerService(IOutput::class, function(){
			return new Output($this->getServer()->getWebRoot());
		});

		$this->registerService(Folder::class, function() {
			return $this->getServer()->getUserFolder();
		});

		$this->registerService(IAppData::class, function (SimpleContainer $c) {
			return $this->getServer()->getAppDataDir($c->query('AppName'));
		});

		$this->registerService(IL10N::class, function($c) {
			return $this->getServer()->getL10N($c->query('AppName'));
		});

		// Log wrapper
		$this->registerService(ILogger::class, function ($c) {
			return new OC\AppFramework\Logger($this->server->query(ILogger::class), $c->query('AppName'));
		});

		$this->registerService(IServerContainer::class, function () {
			return $this->getServer();
		});
		$this->registerAlias('ServerContainer', IServerContainer::class);

		$this->registerService(\OCP\WorkflowEngine\IManager::class, function ($c) {
			return $c->query(Manager::class);
		});

		$this->registerService(\OCP\AppFramework\IAppContainer::class, function ($c) {
			return $c;
		});

		// commonly used attributes
		$this->registerService('UserId', function ($c) {
			return $c->query(IUserSession::class)->getSession()->get('user_id');
		});

		$this->registerService('WebRoot', function ($c) {
			return $c->query('ServerContainer')->getWebRoot();
		});

		$this->registerService('OC_Defaults', function ($c) {
			return $c->getServer()->getThemingDefaults();
		});

		$this->registerService(IConfig::class, function ($c) {
			return $c->query(OC\GlobalScale\Config::class);
		});

		$this->registerService('Protocol', function($c){
			/** @var \OC\Server $server */
			$server = $c->query('ServerContainer');
			$protocol = $server->getRequest()->getHttpProtocol();
			return new Http($_SERVER, $protocol);
		});

		$this->registerService('Dispatcher', function($c) {
			return new Dispatcher(
				$c['Protocol'],
				$c['MiddlewareDispatcher'],
				$c->query(IControllerMethodReflector::class),
				$c['Request']
			);
		});

		/**
		 * App Framework default arguments
		 */
		$this->registerParameter('corsMethods', 'PUT, POST, GET, DELETE, PATCH');
		$this->registerParameter('corsAllowedHeaders', 'Authorization, Content-Type, Accept');
		$this->registerParameter('corsMaxAge', 1728000);

		/**
		 * Middleware
		 */
		$this->registerService('MiddlewareDispatcher', function(SimpleContainer $c) {
			$server =  $this->getServer();

			$dispatcher = new MiddlewareDispatcher();
			$dispatcher->registerMiddleware(
				$c->query(OC\AppFramework\Middleware\Security\ReloadExecutionMiddleware::class)
			);

			$dispatcher->registerMiddleware(
				new OC\AppFramework\Middleware\Security\SameSiteCookieMiddleware(
					$c->query(IRequest::class),
					$c->query(IControllerMethodReflector::class)
				)
			);
			$dispatcher->registerMiddleware(
				new CORSMiddleware(
					$c->query(IRequest::class),
					$c->query(IControllerMethodReflector::class),
					$c->query(IUserSession::class),
					$c->query(OC\Security\Bruteforce\Throttler::class)
				)
			);
			$dispatcher->registerMiddleware(
				new OCSMiddleware(
					$c->query(IRequest::class)
				)
			);

			$securityMiddleware = new SecurityMiddleware(
				$c->query(IRequest::class),
				$c->query(IControllerMethodReflector::class),
				$c->query(INavigationManager::class),
				$c->query(IURLGenerator::class),
				$server->getLogger(),
				$c['AppName'],
				$server->getUserSession()->isLoggedIn(),
				$server->getGroupManager()->isAdmin($this->getUserId()),
				$server->getUserSession()->getUser() !== null && $server->query(ISubAdmin::class)->isSubAdmin($server->getUserSession()->getUser()),
				$server->getAppManager(),
				$server->getL10N('lib')
			);
			$dispatcher->registerMiddleware($securityMiddleware);
			$dispatcher->registerMiddleware(
				new OC\AppFramework\Middleware\Security\CSPMiddleware(
					$server->query(OC\Security\CSP\ContentSecurityPolicyManager::class),
					$server->query(OC\Security\CSP\ContentSecurityPolicyNonceManager::class),
					$server->query(OC\Security\CSRF\CsrfTokenManager::class)
				)
			);
			$dispatcher->registerMiddleware(
				$server->query(OC\AppFramework\Middleware\Security\FeaturePolicyMiddleware::class)
			);
			$dispatcher->registerMiddleware(
				new OC\AppFramework\Middleware\Security\PasswordConfirmationMiddleware(
					$c->query(IControllerMethodReflector::class),
					$c->query(ISession::class),
					$c->query(IUserSession::class),
					$c->query(ITimeFactory::class)
				)
			);
			$dispatcher->registerMiddleware(
				new TwoFactorMiddleware(
					$c->query(OC\Authentication\TwoFactorAuth\Manager::class),
					$c->query(IUserSession::class),
					$c->query(ISession::class),
					$c->query(IURLGenerator::class),
					$c->query(IControllerMethodReflector::class),
					$c->query(IRequest::class)
				)
			);
			$dispatcher->registerMiddleware(
				new OC\AppFramework\Middleware\Security\BruteForceMiddleware(
					$c->query(IControllerMethodReflector::class),
					$c->query(OC\Security\Bruteforce\Throttler::class),
					$c->query(IRequest::class)
				)
			);
			$dispatcher->registerMiddleware(
				new RateLimitingMiddleware(
					$c->query(IRequest::class),
					$c->query(IUserSession::class),
					$c->query(IControllerMethodReflector::class),
					$c->query(OC\Security\RateLimiting\Limiter::class)
				)
			);
			$dispatcher->registerMiddleware(
				new OC\AppFramework\Middleware\PublicShare\PublicShareMiddleware(
					$c->query(IRequest::class),
					$c->query(ISession::class),
					$c->query(\OCP\IConfig::class)
				)
			);
			$dispatcher->registerMiddleware(
				$c->query(\OC\AppFramework\Middleware\AdditionalScriptsMiddleware::class)
			);

			foreach($this->middleWares as $middleWare) {
				$dispatcher->registerMiddleware($c->query($middleWare));
			}

			$dispatcher->registerMiddleware(
				new SessionMiddleware(
					$c->query(IControllerMethodReflector::class),
					$c->query(ISession::class)
				)
			);
			return $dispatcher;
		});

		$this->registerAlias(\OCP\Collaboration\Resources\IProviderManager::class, OC\Collaboration\Resources\ProviderManager::class);
		$this->registerAlias(\OCP\Collaboration\Resources\IManager::class, OC\Collaboration\Resources\Manager::class);
	}

	/**
	 * @return \OCP\IServerContainer
	 */
	public function getServer()
	{
		return $this->server;
	}

	/**
	 * @param string $middleWare
	 * @return boolean|null
	 */
	public function registerMiddleWare($middleWare) {
		if (in_array($middleWare, $this->middleWares, true) !== false) {
			return false;
		}
		$this->middleWares[] = $middleWare;
	}

	/**
	 * used to return the appname of the set application
	 * @return string the name of your application
	 */
	public function getAppName() {
		return $this->query('AppName');
	}

	/**
	 * @deprecated use IUserSession->isLoggedIn()
	 * @return boolean
	 */
	public function isLoggedIn() {
		return \OC::$server->getUserSession()->isLoggedIn();
	}

	/**
	 * @deprecated use IGroupManager->isAdmin($userId)
	 * @return boolean
	 */
	public function isAdminUser() {
		$uid = $this->getUserId();
		return \OC_User::isAdminUser($uid);
	}

	private function getUserId() {
		return $this->getServer()->getSession()->get('user_id');
	}

	/**
	 * @deprecated use the ILogger instead
	 * @param string $message
	 * @param string $level
	 * @return mixed
	 */
	public function log($message, $level) {
		switch($level){
			case 'debug':
				$level = ILogger::DEBUG;
				break;
			case 'info':
				$level = ILogger::INFO;
				break;
			case 'warn':
				$level = ILogger::WARN;
				break;
			case 'fatal':
				$level = ILogger::FATAL;
				break;
			default:
				$level = ILogger::ERROR;
				break;
		}
		\OCP\Util::writeLog($this->getAppName(), $message, $level);
	}

	/**
	 * Register a capability
	 *
	 * @param string $serviceName e.g. 'OCA\Files\Capabilities'
	 */
	public function registerCapability($serviceName) {
		$this->query('OC\CapabilitiesManager')->registerCapability(function() use ($serviceName) {
			return $this->query($serviceName);
		});
	}

	public function query(string $name, bool $autoload = true) {
		try {
			return $this->queryNoFallback($name);
		} catch (QueryException $firstException) {
			try {
				return $this->getServer()->query($name, $autoload);
			} catch (QueryException $secondException) {
				if ($firstException->getCode() === 1) {
					throw $secondException;
				}
				throw $firstException;
			}
		}
	}

	/**
	 * @param string $name
	 * @return mixed
	 * @throws QueryException if the query could not be resolved
	 */
	public function queryNoFallback($name) {
		$name = $this->sanitizeName($name);

		if ($this->offsetExists($name)) {
			return parent::query($name);
		} else {
			if ($this['AppName'] === 'settings' && strpos($name, 'OC\\Settings\\') === 0) {
				return parent::query($name);
			} else if ($this['AppName'] === 'core' && strpos($name, 'OC\\Core\\') === 0) {
				return parent::query($name);
			} else if (strpos($name, \OC\AppFramework\App::buildAppNamespace($this['AppName']) . '\\') === 0) {
				return parent::query($name);
			}
		}

		throw new QueryException('Could not resolve ' . $name . '!' .
			' Class can not be instantiated', 1);
	}
}