summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-07-24 11:36:20 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-08-01 08:20:17 +0200
commitede15f0988c02cf65f9d1a763d9bb2ea0edde2e9 (patch)
tree7e2295dd8598ba894b4eaaf7d7d47ff8b4946d7e
parentfd465d4e492bf19812f2c62f06766b3d70f8a270 (diff)
downloadnextcloud-server-ede15f0988c02cf65f9d1a763d9bb2ea0edde2e9.tar.gz
nextcloud-server-ede15f0988c02cf65f9d1a763d9bb2ea0edde2e9.zip
Fix L10N::t
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r--apps/files_external/lib/config.php6
-rw-r--r--apps/updatenotification/lib/Notification/Notifier.php2
-rw-r--r--apps/user_ldap/lib/Notification/Notifier.php4
-rw-r--r--apps/workflowengine/lib/Manager.php10
-rw-r--r--lib/private/App/DependencyAnalyzer.php8
-rw-r--r--lib/private/AppFramework/DependencyInjection/DIContainer.php2
-rw-r--r--lib/private/AppFramework/Http/Request.php2
-rw-r--r--lib/private/Setup.php4
-rw-r--r--lib/private/Tags.php2
9 files changed, 20 insertions, 20 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 7a10d4bbc24..4900de57b64 100644
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -313,11 +313,11 @@ class OC_Mount_Config {
private static function getSingleDependencyMessage(\OCP\IL10N $l, $module, $backend) {
switch (strtolower($module)) {
case 'curl':
- return (string)$l->t('The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', $backend);
+ return (string)$l->t('The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', [$backend]);
case 'ftp':
- return (string)$l->t('The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', $backend);
+ return (string)$l->t('The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it.', [$backend]);
default:
- return (string)$l->t('"%s" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it.', array($module, $backend));
+ return (string)$l->t('"%s" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it.', [$module, $backend]);
}
}
diff --git a/apps/updatenotification/lib/Notification/Notifier.php b/apps/updatenotification/lib/Notification/Notifier.php
index e512825da04..2fc1d36b0cb 100644
--- a/apps/updatenotification/lib/Notification/Notifier.php
+++ b/apps/updatenotification/lib/Notification/Notifier.php
@@ -117,7 +117,7 @@ class Notifier implements INotifier {
}
$notification->setParsedSubject($l->t('Update for %1$s to version %2$s is available.', [$appName, $notification->getObjectId()]))
- ->setRichSubject($l->t('Update for {app} to version %s is available.', $notification->getObjectId()), [
+ ->setRichSubject($l->t('Update for {app} to version %s is available.', [$notification->getObjectId()]), [
'app' => [
'type' => 'app',
'id' => $notification->getObjectType(),
diff --git a/apps/user_ldap/lib/Notification/Notifier.php b/apps/user_ldap/lib/Notification/Notifier.php
index 0099d764f03..795d8d4c344 100644
--- a/apps/user_ldap/lib/Notification/Notifier.php
+++ b/apps/user_ldap/lib/Notification/Notifier.php
@@ -63,9 +63,9 @@ class Notifier implements INotifier {
$params = $notification->getSubjectParameters();
$days = (int) $params[0];
if ($days === 2) {
- $notification->setParsedSubject($l->t('Your password will expire tomorrow.', $days));
+ $notification->setParsedSubject($l->t('Your password will expire tomorrow.'));
} else if ($days === 1) {
- $notification->setParsedSubject($l->t('Your password will expire today.', $days));
+ $notification->setParsedSubject($l->t('Your password will expire today.'));
} else {
$notification->setParsedSubject($l->n(
'Your password will expire within %n day.',
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php
index e93498b5075..48d29cf207e 100644
--- a/apps/workflowengine/lib/Manager.php
+++ b/apps/workflowengine/lib/Manager.php
@@ -165,7 +165,7 @@ class Manager implements IManager {
return $row;
}
- throw new \UnexpectedValueException($this->l->t('Operation #%s does not exist', $id));
+ throw new \UnexpectedValueException($this->l->t('Operation #%s does not exist', [$id]));
}
/**
@@ -250,11 +250,11 @@ class Manager implements IManager {
/** @var IOperation $instance */
$instance = $this->container->query($class);
} catch (QueryException $e) {
- throw new \UnexpectedValueException($this->l->t('Operation %s does not exist', $class));
+ throw new \UnexpectedValueException($this->l->t('Operation %s does not exist', [$class]));
}
if (!($instance instanceof IOperation)) {
- throw new \UnexpectedValueException($this->l->t('Operation %s is invalid', $class));
+ throw new \UnexpectedValueException($this->l->t('Operation %s is invalid', [$class]));
}
$instance->validateOperation($name, $checks, $operation);
@@ -264,11 +264,11 @@ class Manager implements IManager {
/** @var ICheck $instance */
$instance = $this->container->query($check['class']);
} catch (QueryException $e) {
- throw new \UnexpectedValueException($this->l->t('Check %s does not exist', $class));
+ throw new \UnexpectedValueException($this->l->t('Check %s does not exist', [$class]));
}
if (!($instance instanceof ICheck)) {
- throw new \UnexpectedValueException($this->l->t('Check %s is invalid', $class));
+ throw new \UnexpectedValueException($this->l->t('Check %s is invalid', [$class]));
}
$instance->validateCheck($check['operator'], $check['value']);
diff --git a/lib/private/App/DependencyAnalyzer.php b/lib/private/App/DependencyAnalyzer.php
index 1ec028b9728..4e998c71f32 100644
--- a/lib/private/App/DependencyAnalyzer.php
+++ b/lib/private/App/DependencyAnalyzer.php
@@ -179,7 +179,7 @@ class DependencyAnalyzer {
}, $supportedDatabases);
$currentDatabase = $this->platform->getDatabase();
if (!in_array($currentDatabase, $supportedDatabases)) {
- $missing[] = (string)$this->l->t('Following databases are supported: %s', implode(', ', $supportedDatabases));
+ $missing[] = (string)$this->l->t('Following databases are supported: %s', [implode(', ', $supportedDatabases)]);
}
return $missing;
}
@@ -282,7 +282,7 @@ class DependencyAnalyzer {
}
$currentOS = $this->platform->getOS();
if (!in_array($currentOS, $oss)) {
- $missing[] = (string)$this->l->t('Following platforms are supported: %s', implode(', ', $oss));
+ $missing[] = (string)$this->l->t('Following platforms are supported: %s', [implode(', ', $oss)]);
}
return $missing;
}
@@ -315,12 +315,12 @@ class DependencyAnalyzer {
if (!is_null($minVersion)) {
if ($this->compareSmaller($this->platform->getOcVersion(), $minVersion)) {
- $missing[] = (string)$this->l->t('Server version %s or higher is required.', $this->toVisibleVersion($minVersion));
+ $missing[] = (string)$this->l->t('Server version %s or higher is required.', [$this->toVisibleVersion($minVersion)]);
}
}
if (!is_null($maxVersion)) {
if ($this->compareBigger($this->platform->getOcVersion(), $maxVersion)) {
- $missing[] = (string)$this->l->t('Server version %s or lower is required.', $this->toVisibleVersion($maxVersion));
+ $missing[] = (string)$this->l->t('Server version %s or lower is required.', [$this->toVisibleVersion($maxVersion)]);
}
}
return $missing;
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php
index b233f3ca9b6..d0c69c3bf32 100644
--- a/lib/private/AppFramework/DependencyInjection/DIContainer.php
+++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php
@@ -75,7 +75,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
* Put your class dependencies in here
* @param string $appName the name of the app
* @param array $urlParams
- * @param ServerContainer $server
+ * @param ServerContainer|null $server
*/
public function __construct($appName, $urlParams = array(), ServerContainer $server = null){
parent::__construct();
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index 09e18f74177..956744e5d5e 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -721,7 +721,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
// strip off the script name's dir and file name
// FIXME: Sabre does not really belong here
- list($path, $name) = \Sabre\HTTP\URLUtil::splitPath($scriptName);
+ list($path, $name) = \Sabre\Uri\split($scriptName);
if (!empty($path)) {
if($path === $pathInfo || strpos($pathInfo, $path.'/') === 0) {
$pathInfo = substr($pathInfo, strlen($path));
diff --git a/lib/private/Setup.php b/lib/private/Setup.php
index 1e98ed5456d..521a8f75f8e 100644
--- a/lib/private/Setup.php
+++ b/lib/private/Setup.php
@@ -223,7 +223,7 @@ class Setup {
'error' => $this->l10n->t(
'Mac OS X is not supported and %s will not work properly on this platform. ' .
'Use it at your own risk! ',
- $this->defaults->getName()
+ [$this->defaults->getName()]
),
'hint' => $this->l10n->t('For the best results, please consider using a GNU/Linux server instead.')
);
@@ -234,7 +234,7 @@ class Setup {
'error' => $this->l10n->t(
'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 4 GB and is highly discouraged.',
- $this->defaults->getName()
+ [$this->defaults->getName()]
),
'hint' => $this->l10n->t('Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP.')
);
diff --git a/lib/private/Tags.php b/lib/private/Tags.php
index 3ec1af00e3f..b63435ff838 100644
--- a/lib/private/Tags.php
+++ b/lib/private/Tags.php
@@ -274,7 +274,7 @@ class Tags implements \OCP\ITags {
if($tagId === false) {
$l10n = \OC::$server->getL10N('core');
throw new \Exception(
- $l10n->t('Could not find category "%s"', $tag)
+ $l10n->t('Could not find category "%s"', [$tag])
);
}