summaryrefslogtreecommitdiffstats
path: root/lib/l10n/gl.json
diff options
context:
space:
mode:
Diffstat (limited to 'lib/l10n/gl.json')
-rw-r--r--lib/l10n/gl.json22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/l10n/gl.json b/lib/l10n/gl.json
index fbe7a36c934..00447bb916c 100644
--- a/lib/l10n/gl.json
+++ b/lib/l10n/gl.json
@@ -32,11 +32,11 @@
"Wiping of device %s has started" : "Iniciouse a limpeza do dispositivo %s",
"Wiping of device »%s« has started" : "Iniciouse a limpeza do dispositivo «%s»",
"»%s« started remote wipe" : "«%s» iniciou a limpeza remota",
- "Device or application »%s« has started the remote wipe process. You will receive another email once the process has finished" : "O dispositivo ou aplicativo «%s» iniciou o proceso remoto de limpeza. Recibirá outro correo cando remate o proceso",
+ "Device or application »%s« has started the remote wipe process. You will receive another email once the process has finished" : "O dispositivo ou aplicación «%s» iniciou o proceso remoto de limpeza. Recibirá outro correo cando remate o proceso",
"Wiping of device %s has finished" : "Rematou a limpeza do dispositivo %s",
"Wiping of device »%s« has finished" : "Rematou a limpeza do dispositivo «%s»",
"»%s« finished remote wipe" : "«%s» rematou a limpeza remota",
- "Device or application »%s« has finished the remote wipe process." : "O dispositivo ou aplicativo «%s» rematou o proceso remoto de limpeza.",
+ "Device or application »%s« has finished the remote wipe process." : "O dispositivo ou aplicación «%s» rematou o proceso remoto de limpeza.",
"Remote wipe started" : "Iniciouse a limpeza remota",
"A remote wipe was started on device %s" : "Iniciouse unha limpeza remota no dispositivo %s",
"Remote wipe finished" : "Rematou a limpeza remota",
@@ -64,18 +64,18 @@
"_%n minute ago_::_%n minutes ago_" : ["hai %n minuto","hai %n minutos"],
"in a few seconds" : "en poucos segundos",
"seconds ago" : "segundos atrás",
- "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Non existe o módulo co ID: %s. Actíveo nos axustes dos aplicativos ou contacte co administrador.",
+ "Module with ID: %s does not exist. Please enable it in your apps settings or contact your administrator." : "Non existe o módulo co ID: %s. Actíveo nos axustes das aplicacións ou contacte co administrador.",
"File name is a reserved word" : "O nome de ficheiro é unha palabra reservada",
"File name contains at least one invalid character" : "O nome de ficheiro contén algún carácter incorrecto",
"File name is too long" : "O nome de ficheiro é longo de máis",
"Dot files are not allowed" : "Non se admiten os ficheiros con punto",
"Empty filename is not allowed" : "Non está permitido deixar baleiro o nome de ficheiro",
- "App \"%s\" cannot be installed because appinfo file cannot be read." : "Non é posíbel instalar o aplicativo «%s» por mor de non poder ler o ficheiro appinfo.",
- "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "Non é posíbel instalar o aplicativo «%s» por mor de non ser compatíbel con esta versión do servidor.",
+ "App \"%s\" cannot be installed because appinfo file cannot be read." : "Non é posíbel instalar a aplicación «%s» por mor de non poder ler o ficheiro appinfo.",
+ "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "Non é posíbel instalar a aplicación «%s» por mor de non ser compatíbel con esta versión do servidor.",
"__language_name__" : "Galego",
"This is an automatically sent email, please do not reply." : "Este é un correo enviado automaticamente, non responda.",
"Help" : "Axuda",
- "Apps" : "Aplicativos",
+ "Apps" : "Aplicacións",
"Settings" : "Axustes",
"Log out" : "Saír",
"Users" : "Usuarios",
@@ -176,18 +176,18 @@
"The username is already being used" : "Este nome de usuario xa está a ser usado",
"Could not create user" : "Non foi posíbel crear o usuario",
"User disabled" : "Usuario desactivado",
- "Login canceled by app" : "Acceso cancelado polo aplicativo",
- "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Non é posíbel instalar o aplicativo «%1$s» por mor de non cumprirse as dependencias: %2$s",
+ "Login canceled by app" : "Acceso cancelado pola aplicación",
+ "App \"%1$s\" cannot be installed because the following dependencies are not fulfilled: %2$s" : "Non é posíbel instalar a aplicación «%1$s» por mor de non cumprirse as dependencias: %2$s",
"a safe home for all your data" : "un lugar seguro para todos os seus datos",
"File is currently busy, please try again later" : "O ficheiro está ocupado neste momento, ténteo máis tarde.",
"Can't read file" : "Non é posíbel ler o ficheiro",
- "Application is not enabled" : "O aplicativo non está activado",
+ "Application is not enabled" : "A aplicación non está activada",
"Authentication error" : "Produciuse un erro de autenticación",
"Token expired. Please reload page." : "Marca caducada. Recargue a páxina.",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Non hai controladores de base de datos (sqlite, mysql, ou postgresql) instalados.",
"Cannot write into \"config\" directory" : "Non é posíbel escribir no directorio «config»",
"Cannot write into \"apps\" directory" : "Non é posíbel escribir no directorio «apps»",
- "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file. See %s" : "Polo xeral, isto pódese solucionar dándolle ao servidor web acceso de escritura ao directorio dos aplicativos ou desactivando a tenda de aplicativos no ficheiro de configuración. Vexa %s",
+ "This can usually be fixed by giving the webserver write access to the apps directory or disabling the appstore in the config file. See %s" : "Polo xeral, isto pódese solucionar dándolle ao servidor web acceso de escritura ao directorio das aplicacións ou desactivando a tenda de aplicacións no ficheiro de configuración. Vexa %s",
"Cannot create \"data\" directory" : "Non é posíbel crear o directorio «data»",
"This can usually be fixed by giving the webserver write access to the root directory. See %s" : "Polo xeral, isto pódese solucionar dándolle ao servidor web acceso de escritura ao directorio raíz. Vexa %s.",
"Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "Polo xeral, pódense corrixir os permisos dándolle ao servidor web acceso de escritura ao directorio raíz. Vexa %s.",
@@ -201,7 +201,7 @@
"To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Para arranxar este incidente, estabeleza <code>mbstring.func_overload</code> a <code>0</code> no ficheiro php.ini",
"libxml2 2.7.0 is at least required. Currently %s is installed." : "Requírese cando menos libxml2 2.7.0. Actualmente esta instalado %s.",
"To fix this issue update your libxml2 version and restart your web server." : "Para arranxar este incidente, actualice a versión de libxml2 e reinicie o servidor web. ",
- "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "Semella que PHP foi configurado para quitar bloques de documentos en liña. Isto fará que varios aplicativos sexan inaccesíbeis.",
+ "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "Semella que PHP foi configurado para quitar bloques de documentos en liña. Isto fará que varias aplicacións sexan inaccesíbeis.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isto probabelmente se debe unha caché/acelerador como Zend OPcache ou eAccelerator.",
"PHP modules have been installed, but they are still listed as missing?" : "Instaláronse os módulos de PHP, mais aínda aparecen listados como perdidos?",
"Please ask your server administrator to restart the web server." : "Pregúntelle ao administrador do servidor polo reinicio do servidor web..",
light .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<?php

/**
 * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */

namespace Test;

use OC\Log;
use OCP\IConfig;

class NullLogger extends Log {
	public function __construct($logger = null) {
		//disable original constructor
	}

	public function log($level, $message, array $context = array()) {
		//noop
	}
}

class TempManagerTest extends \Test\TestCase {

	protected $baseDir = null;

	protected function setUp() {
		parent::setUp();

		$this->baseDir = $this->getManager()->getTempBaseDir() . $this->getUniqueID('/oc_tmp_test');
		if (!is_dir($this->baseDir)) {
			mkdir($this->baseDir);
		}
	}

	protected function tearDown() {
		\OC_Helper::rmdirr($this->baseDir);
		$this->baseDir = null;
		parent::tearDown();
	}

	/**
	 * @param  \OCP\ILogger $logger
	 * @param  \OCP\IConfig $config
	 * @return \OC\TempManager
	 */
	protected function getManager($logger = null, $config = null) {
		if (!$logger) {
			$logger = new NullLogger();
		}
		if (!$config) {
			$config = $this->createMock(IConfig::class);
			$config->method('getSystemValue')
				->with('tempdirectory', null)
				->willReturn('/tmp');
		}
		$manager = new \OC\TempManager($logger, $config);
		if ($this->baseDir) {
			$manager->overrideTempBaseDir($this->baseDir);
		}
		return $manager;
	}

	public function testGetFile() {
		$manager = $this->getManager();
		$file = $manager->getTemporaryFile('txt');
		$this->assertStringEndsWith('.txt', $file);
		$this->assertTrue(is_file($file));
		$this->assertTrue(is_writable($file));

		file_put_contents($file, 'bar');
		$this->assertEquals('bar', file_get_contents($file));
	}

	public function testGetFolder() {
		$manager = $this->getManager();
		$folder = $manager->getTemporaryFolder();
		$this->assertStringEndsWith('/', $folder);
		$this->assertTrue(is_dir($folder));
		$this->assertTrue(is_writable($folder));

		file_put_contents($folder . 'foo.txt', 'bar');
		$this->assertEquals('bar', file_get_contents($folder . 'foo.txt'));
	}

	public function testCleanFiles() {
		$manager = $this->getManager();
		$file1 = $manager->getTemporaryFile('txt');
		$file2 = $manager->getTemporaryFile('txt');
		$this->assertTrue(file_exists($file1));
		$this->assertTrue(file_exists($file2));

		$manager->clean();

		$this->assertFalse(file_exists($file1));
		$this->assertFalse(file_exists($file2));
	}

	public function testCleanFolder() {
		$manager = $this->getManager();
		$folder1 = $manager->getTemporaryFolder();
		$folder2 = $manager->getTemporaryFolder();
		touch($folder1 . 'foo.txt');
		touch($folder1 . 'bar.txt');
		$this->assertTrue(file_exists($folder1));
		$this->assertTrue(file_exists($folder2));
		$this->assertTrue(file_exists($folder1 . 'foo.txt'));
		$this->assertTrue(file_exists($folder1 . 'bar.txt'));

		$manager->clean();

		$this->assertFalse(file_exists($folder1));
		$this->assertFalse(file_exists($folder2));
		$this->assertFalse(file_exists($folder1 . 'foo.txt'));
		$this->assertFalse(file_exists($folder1 . 'bar.txt'));
	}

	public function testCleanOld() {
		$manager = $this->getManager();
		$oldFile = $manager->getTemporaryFile('txt');
		$newFile = $manager->getTemporaryFile('txt');
		$folder = $manager->getTemporaryFolder();
		$nonOcFile = $this->baseDir . '/foo.txt';
		file_put_contents($nonOcFile, 'bar');

		$past = time() - 2 * 3600;
		touch($oldFile, $past);
		touch($folder, $past);
		touch($nonOcFile, $past);

		$manager2 = $this->getManager();
		$manager2->cleanOld();
		$this->assertFalse(file_exists($oldFile));
		$this->assertFalse(file_exists($folder));
		$this->assertTrue(file_exists($nonOcFile));
		$this->assertTrue(file_exists($newFile));
	}

	public function testLogCantCreateFile() {
		$this->markTestSkipped('TODO: Disable because fails on drone');

		$logger = $this->createMock(NullLogger::class);
		$manager = $this->getManager($logger);
		chmod($this->baseDir, 0500);
		$logger->expects($this->once())
			->method('warning')
			->with($this->stringContains('Can not create a temporary file in directory'));
		$this->assertFalse($manager->getTemporaryFile('txt'));
	}

	public function testLogCantCreateFolder() {
		$this->markTestSkipped('TODO: Disable because fails on drone');

		$logger = $this->createMock(NullLogger::class);
		$manager = $this->getManager($logger);
		chmod($this->baseDir, 0500);
		$logger->expects($this->once())
			->method('warning')
			->with($this->stringContains('Can not create a temporary folder in directory'));
		$this->assertFalse($manager->getTemporaryFolder());
	}

	public function testBuildFileNameWithPostfix() {
		$logger = $this->createMock(NullLogger::class);
		$tmpManager = self::invokePrivate(
			$this->getManager($logger),
			'buildFileNameWithSuffix',
			['/tmp/myTemporaryFile', 'postfix']
		);

		$this->assertEquals('/tmp/myTemporaryFile-.postfix', $tmpManager);
	}

	public function testBuildFileNameWithoutPostfix() {
		$logger = $this->createMock(NullLogger::class);
		$tmpManager = self::invokePrivate(
			$this->getManager($logger),
					'buildFileNameWithSuffix',
			['/tmp/myTemporaryFile', '']
		);

		$this->assertEquals('/tmp/myTemporaryFile', $tmpManager);
	}

	public function testBuildFileNameWithSuffixPathTraversal() {
		$logger = $this->createMock(NullLogger::class);
		$tmpManager = self::invokePrivate(
			$this->getManager($logger),
			'buildFileNameWithSuffix',
			['foo', '../Traversal\\../FileName']
		);

		$this->assertStringEndsNotWith('./Traversal\\../FileName', $tmpManager);
		$this->assertStringEndsWith('.Traversal..FileName', $tmpManager);
	}

	public function testGetTempBaseDirFromConfig() {
		$dir = $this->getManager()->getTemporaryFolder();

		$config = $this->createMock(IConfig::class);
		$config->expects($this->once())
			->method('getSystemValue')
			->with('tempdirectory', null)
			->willReturn($dir);

		$this->baseDir = null; // prevent override
		$tmpManager = $this->getManager(null, $config);

		$this->assertEquals($dir, $tmpManager->getTempBaseDir());
	}
}