summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/composer/composer/autoload_classmap.php1
-rw-r--r--lib/composer/composer/autoload_static.php1
-rw-r--r--lib/l10n/ca.js2
-rw-r--r--lib/l10n/ca.json2
-rw-r--r--lib/l10n/cs.js2
-rw-r--r--lib/l10n/cs.json2
-rw-r--r--lib/l10n/eo.js2
-rw-r--r--lib/l10n/eo.json2
-rw-r--r--lib/l10n/gl.js12
-rw-r--r--lib/l10n/gl.json12
-rw-r--r--lib/l10n/pt_BR.js4
-rw-r--r--lib/l10n/pt_BR.json4
-rw-r--r--lib/l10n/zh_CN.js126
-rw-r--r--lib/l10n/zh_CN.json126
-rw-r--r--lib/private/AppFramework/Routing/RouteConfig.php148
-rw-r--r--lib/private/BackgroundJob/JobList.php2
-rw-r--r--lib/private/ContactsManager.php16
-rw-r--r--lib/private/Files/ObjectStore/Azure.php13
-rw-r--r--lib/private/Files/ObjectStore/ObjectStoreStorage.php22
-rw-r--r--lib/private/Files/ObjectStore/S3ObjectTrait.php4
-rw-r--r--lib/private/Files/ObjectStore/StorageObjectStore.php3
-rw-r--r--lib/private/Files/ObjectStore/Swift.php3
-rw-r--r--lib/private/Files/ObjectStore/SwiftFactory.php68
-rw-r--r--lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php35
-rw-r--r--lib/private/Files/Storage/Wrapper/Encryption.php1
-rw-r--r--lib/private/Log/ExceptionSerializer.php3
-rw-r--r--lib/private/Share/Share.php2
-rw-r--r--lib/private/Template/IconsCacher.php2
-rw-r--r--lib/private/legacy/template.php25
-rw-r--r--lib/public/AppFramework/Http/ContentSecurityPolicy.php4
-rw-r--r--lib/public/Contacts/IManager.php12
-rw-r--r--lib/public/Files/ObjectStore/IObjectStore.php9
-rw-r--r--lib/public/IAddressBook.php7
33 files changed, 424 insertions, 253 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php
index 29910544895..26aee010519 100644
--- a/lib/composer/composer/autoload_classmap.php
+++ b/lib/composer/composer/autoload_classmap.php
@@ -802,6 +802,7 @@ return array(
'OC\\Files\\ObjectStore\\StorageObjectStore' => $baseDir . '/lib/private/Files/ObjectStore/StorageObjectStore.php',
'OC\\Files\\ObjectStore\\Swift' => $baseDir . '/lib/private/Files/ObjectStore/Swift.php',
'OC\\Files\\ObjectStore\\SwiftFactory' => $baseDir . '/lib/private/Files/ObjectStore/SwiftFactory.php',
+ 'OC\\Files\\ObjectStore\\SwiftV2CachingAuthService' => $baseDir . '/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php',
'OC\\Files\\Search\\SearchBinaryOperator' => $baseDir . '/lib/private/Files/Search/SearchBinaryOperator.php',
'OC\\Files\\Search\\SearchComparison' => $baseDir . '/lib/private/Files/Search/SearchComparison.php',
'OC\\Files\\Search\\SearchOrder' => $baseDir . '/lib/private/Files/Search/SearchOrder.php',
diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php
index d476460c827..64eb952d2c6 100644
--- a/lib/composer/composer/autoload_static.php
+++ b/lib/composer/composer/autoload_static.php
@@ -832,6 +832,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OC\\Files\\ObjectStore\\StorageObjectStore' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/StorageObjectStore.php',
'OC\\Files\\ObjectStore\\Swift' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/Swift.php',
'OC\\Files\\ObjectStore\\SwiftFactory' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/SwiftFactory.php',
+ 'OC\\Files\\ObjectStore\\SwiftV2CachingAuthService' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php',
'OC\\Files\\Search\\SearchBinaryOperator' => __DIR__ . '/../../..' . '/lib/private/Files/Search/SearchBinaryOperator.php',
'OC\\Files\\Search\\SearchComparison' => __DIR__ . '/../../..' . '/lib/private/Files/Search/SearchComparison.php',
'OC\\Files\\Search\\SearchOrder' => __DIR__ . '/../../..' . '/lib/private/Files/Search/SearchOrder.php',
diff --git a/lib/l10n/ca.js b/lib/l10n/ca.js
index e4f2f4ecaa4..6689601e3e4 100644
--- a/lib/l10n/ca.js
+++ b/lib/l10n/ca.js
@@ -53,7 +53,7 @@ OC.L10N.register(
"__language_name__" : "Català",
"Help" : "Ajuda",
"Apps" : "Aplicacions",
- "Settings" : "Configuració",
+ "Settings" : "Paràmetres",
"Log out" : "Surt",
"Users" : "Usuaris",
"Unknown user" : "Usuari desconegut",
diff --git a/lib/l10n/ca.json b/lib/l10n/ca.json
index 35966b4617e..1032dd40442 100644
--- a/lib/l10n/ca.json
+++ b/lib/l10n/ca.json
@@ -51,7 +51,7 @@
"__language_name__" : "Català",
"Help" : "Ajuda",
"Apps" : "Aplicacions",
- "Settings" : "Configuració",
+ "Settings" : "Paràmetres",
"Log out" : "Surt",
"Users" : "Usuaris",
"Unknown user" : "Usuari desconegut",
diff --git a/lib/l10n/cs.js b/lib/l10n/cs.js
index 8bca8a7f018..6efbb694de4 100644
--- a/lib/l10n/cs.js
+++ b/lib/l10n/cs.js
@@ -60,7 +60,7 @@ OC.L10N.register(
"Empty filename is not allowed" : "Je třeba vyplnit název souboru",
"App \"%s\" cannot be installed because appinfo file cannot be read." : "Aplikace „%s“ nemůže být nainstalována protože soubor appinfo nelze přečíst.",
"App \"%s\" cannot be installed because it is not compatible with this version of the server." : "Aplikaci „%s“ nelze nainstalovat, protože není kompatibilní s touto verzí serveru.",
- "__language_name__" : "Česky",
+ "__language_name__" : "čeština",
"This is an automatically sent email, please do not reply." : "Toto je automaticky odesílaný email, neodpovídejte na něj.",
"Help" : "Nápověda",
"Apps" : "Aplikace",
diff --git a/lib/l10n/cs.json b/lib/l10n/cs.json
index fc818d5d1b8..6ae5cbfb1f9 100644
--- a/lib/l10n/cs.json
+++ b/lib/l10n/cs.json
@@ -58,7 +58,7 @@
"Empty filename is not allowed" : "Je třeba vyplnit název souboru",
"App \"%s\" cannot be installed because appinfo file cannot be read." : "Aplikace „%s“ nemůže být nainstalována protože soubor appinfo nelze přečíst.",
"App \"%s\" cannot be installed because it is not compatible with this version of the server." : "Aplikaci „%s“ nelze nainstalovat, protože není kompatibilní s touto verzí serveru.",
- "__language_name__" : "Česky",
+ "__language_name__" : "čeština",
"This is an automatically sent email, please do not reply." : "Toto je automaticky odesílaný email, neodpovídejte na něj.",
"Help" : "Nápověda",
"Apps" : "Aplikace",
diff --git a/lib/l10n/eo.js b/lib/l10n/eo.js
index 8933f3e4d93..7ac313b39d5 100644
--- a/lib/l10n/eo.js
+++ b/lib/l10n/eo.js
@@ -1,7 +1,7 @@
OC.L10N.register(
"lib",
{
- "Cannot write into \"config\" directory!" : "Ne skribeblas la dosierujo “config”!",
+ "Cannot write into \"config\" directory!" : "Ne skribeblas la dosierujo „config“!",
"See %s" : "Vidi %s",
"%1$s and %2$s" : "%1$s kaj %2$s",
"%1$s, %2$s and %3$s" : "%1$s, %2$s kaj %3$s",
diff --git a/lib/l10n/eo.json b/lib/l10n/eo.json
index 1cab678c1a6..6d3303f192e 100644
--- a/lib/l10n/eo.json
+++ b/lib/l10n/eo.json
@@ -1,5 +1,5 @@
{ "translations": {
- "Cannot write into \"config\" directory!" : "Ne skribeblas la dosierujo “config”!",
+ "Cannot write into \"config\" directory!" : "Ne skribeblas la dosierujo „config“!",
"See %s" : "Vidi %s",
"%1$s and %2$s" : "%1$s kaj %2$s",
"%1$s, %2$s and %3$s" : "%1$s, %2$s kaj %3$s",
diff --git a/lib/l10n/gl.js b/lib/l10n/gl.js
index 521c01f8e41..33c5c1c7b4c 100644
--- a/lib/l10n/gl.js
+++ b/lib/l10n/gl.js
@@ -105,11 +105,11 @@ OC.L10N.register(
"You are not allowed to share %s" : "Non ten permiso para compartir %s",
"Sharing %s failed, because you can not share with yourself" : "Fallou a compartición de %s por mor de que non pode compartir con vostede mesmo",
"Sharing %1$s failed, because the user %2$s does not exist" : "Fallou a compartición de %1$s, o usuario %2$s non existe",
- "Sharing %1$s failed, because the user %2$s is not a member of any groups that %3$s is a member of" : "Fallou a compartición de %1$s, o usuario %2$s non é participante en ningún grupo no que sexa participante %3$s",
+ "Sharing %1$s failed, because the user %2$s is not a member of any groups that %3$s is a member of" : "Fallou a compartición de %1$s, o usuario %2$s non é membro en ningún grupo no que sexa membro %3$s",
"Sharing %1$s failed, because this item is already shared with %2$s" : "Produciuse un fallou na compartición de %1$s, este elemento xa está compartido con %2$s",
"Sharing %1$s failed, because this item is already shared with user %2$s" : "Fallou a compartición de %1$s por mor de que este elemento xa foi compartido co usuario %2$s",
"Sharing %1$s failed, because the group %2$s does not exist" : "Fallou a compartición de %1$s, o grupo %2$s non existe",
- "Sharing %1$s failed, because %2$s is not a member of the group %3$s" : "Fallou a compartición de %1$s, %2$s non é participante no grupo %3$s",
+ "Sharing %1$s failed, because %2$s is not a member of the group %3$s" : "Fallou a compartición de %1$s, %2$s non é membro do grupo %3$s",
"You need to provide a password to create a public link, only protected links are allowed" : "Ten que fornecer un contrasinal para a ligazón pública, só se permiten ligazóns protexidas",
"Sharing %s failed, because sharing with links is not allowed" : "Fallou a compartición de %s, non está permitido compartir con ligazóns",
"Not allowed to create a federated share with the same user" : "Non está permitido crear un compartido federado co mesmo usuario",
@@ -215,9 +215,9 @@ OC.L10N.register(
"PHP setting \"%s\" is not set to \"%s\"." : "O axuste de PHP «%s» non está estabelecido a «%s».",
"Adjusting this setting in php.ini will make Nextcloud run again" : "Cambiar este axuste no ficheiro php.ini fará que Nextcloud funcione de novo",
"mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload está estabelecido a «%s» no canto do valor «0» agardado",
- "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Para arranxar este problema, estabeleza <code>mbstring.func_overload</code> a <code>0</code> no ficheiro php.ini",
+ "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 problema, actualice a versión de libxml2 e reinicie o servidor web. ",
+ "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.",
"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?",
@@ -249,11 +249,11 @@ OC.L10N.register(
"Tips & tricks" : "Trucos e consellos",
"Sync clients" : "Sincronizar clientes",
"Sharing %s failed, because the user %s does not exist" : "Fallou a compartición de %s, o usuario %s non existe",
- "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "Fallou a compartición de %s, o usuario %s non é participante en ningún grupo no que sexa participante %s",
+ "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "Fallou a compartición de %s, o usuario %s non é membro en ningún grupo no que sexa membro %s",
"Sharing %s failed, because this item is already shared with %s" : "Fallou a compartición de %s, este elemento xa está compartido con %s",
"Sharing %s failed, because this item is already shared with user %s" : "Fallou a compartición de %s por mor de que este elemento xa foi compartido co usuario %s",
"Sharing %s failed, because the group %s does not exist" : "Fallou a compartición de %s, o grupo %s non existe",
- "Sharing %s failed, because %s is not a member of the group %s" : "Fallou a compartición de %s, %s non é participante no grupo %s",
+ "Sharing %s failed, because %s is not a member of the group %s" : "Fallou a compartición de %s, %s non é membro do grupo %s",
"Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "Fallou a compartición de %s, non foi posíbel atopar %s,é probábel que o servidor non estea accesíbel.",
"Share type %s is not valid for %s" : "Non se admite a compartición do tipo %s para %s",
"Sharing %s failed, because the permissions exceed permissions granted to %s" : "Fallou a compartición de %s, os permisos superan os permisos concedidos a %s",
diff --git a/lib/l10n/gl.json b/lib/l10n/gl.json
index f194524717e..f35847f0310 100644
--- a/lib/l10n/gl.json
+++ b/lib/l10n/gl.json
@@ -103,11 +103,11 @@
"You are not allowed to share %s" : "Non ten permiso para compartir %s",
"Sharing %s failed, because you can not share with yourself" : "Fallou a compartición de %s por mor de que non pode compartir con vostede mesmo",
"Sharing %1$s failed, because the user %2$s does not exist" : "Fallou a compartición de %1$s, o usuario %2$s non existe",
- "Sharing %1$s failed, because the user %2$s is not a member of any groups that %3$s is a member of" : "Fallou a compartición de %1$s, o usuario %2$s non é participante en ningún grupo no que sexa participante %3$s",
+ "Sharing %1$s failed, because the user %2$s is not a member of any groups that %3$s is a member of" : "Fallou a compartición de %1$s, o usuario %2$s non é membro en ningún grupo no que sexa membro %3$s",
"Sharing %1$s failed, because this item is already shared with %2$s" : "Produciuse un fallou na compartición de %1$s, este elemento xa está compartido con %2$s",
"Sharing %1$s failed, because this item is already shared with user %2$s" : "Fallou a compartición de %1$s por mor de que este elemento xa foi compartido co usuario %2$s",
"Sharing %1$s failed, because the group %2$s does not exist" : "Fallou a compartición de %1$s, o grupo %2$s non existe",
- "Sharing %1$s failed, because %2$s is not a member of the group %3$s" : "Fallou a compartición de %1$s, %2$s non é participante no grupo %3$s",
+ "Sharing %1$s failed, because %2$s is not a member of the group %3$s" : "Fallou a compartición de %1$s, %2$s non é membro do grupo %3$s",
"You need to provide a password to create a public link, only protected links are allowed" : "Ten que fornecer un contrasinal para a ligazón pública, só se permiten ligazóns protexidas",
"Sharing %s failed, because sharing with links is not allowed" : "Fallou a compartición de %s, non está permitido compartir con ligazóns",
"Not allowed to create a federated share with the same user" : "Non está permitido crear un compartido federado co mesmo usuario",
@@ -213,9 +213,9 @@
"PHP setting \"%s\" is not set to \"%s\"." : "O axuste de PHP «%s» non está estabelecido a «%s».",
"Adjusting this setting in php.ini will make Nextcloud run again" : "Cambiar este axuste no ficheiro php.ini fará que Nextcloud funcione de novo",
"mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload está estabelecido a «%s» no canto do valor «0» agardado",
- "To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "Para arranxar este problema, estabeleza <code>mbstring.func_overload</code> a <code>0</code> no ficheiro php.ini",
+ "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 problema, actualice a versión de libxml2 e reinicie o servidor web. ",
+ "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.",
"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?",
@@ -247,11 +247,11 @@
"Tips & tricks" : "Trucos e consellos",
"Sync clients" : "Sincronizar clientes",
"Sharing %s failed, because the user %s does not exist" : "Fallou a compartición de %s, o usuario %s non existe",
- "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "Fallou a compartición de %s, o usuario %s non é participante en ningún grupo no que sexa participante %s",
+ "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "Fallou a compartición de %s, o usuario %s non é membro en ningún grupo no que sexa membro %s",
"Sharing %s failed, because this item is already shared with %s" : "Fallou a compartición de %s, este elemento xa está compartido con %s",
"Sharing %s failed, because this item is already shared with user %s" : "Fallou a compartición de %s por mor de que este elemento xa foi compartido co usuario %s",
"Sharing %s failed, because the group %s does not exist" : "Fallou a compartición de %s, o grupo %s non existe",
- "Sharing %s failed, because %s is not a member of the group %s" : "Fallou a compartición de %s, %s non é participante no grupo %s",
+ "Sharing %s failed, because %s is not a member of the group %s" : "Fallou a compartición de %s, %s non é membro do grupo %s",
"Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "Fallou a compartición de %s, non foi posíbel atopar %s,é probábel que o servidor non estea accesíbel.",
"Share type %s is not valid for %s" : "Non se admite a compartición do tipo %s para %s",
"Sharing %s failed, because the permissions exceed permissions granted to %s" : "Fallou a compartición de %s, os permisos superan os permisos concedidos a %s",
diff --git a/lib/l10n/pt_BR.js b/lib/l10n/pt_BR.js
index 6997a87efc3..b7084c608da 100644
--- a/lib/l10n/pt_BR.js
+++ b/lib/l10n/pt_BR.js
@@ -72,13 +72,13 @@ OC.L10N.register(
"Change" : "Mudar",
"Delete" : "Excluir",
"Share" : "Compartilhar",
- "Overview" : "Visão Geral",
+ "Overview" : "Visão geral",
"Basic settings" : "Configurações básicas",
"Sharing" : "Compartilhamento",
"Security" : "Segurança",
"Groupware" : "Groupware",
"Additional settings" : "Configurações adicionais",
- "Personal info" : "Informação Pessoal",
+ "Personal info" : "Informação pessoal",
"Mobile & desktop" : "Móvel & desktop",
"Unlimited" : "Ilimitado",
"Verifying" : "Verificando",
diff --git a/lib/l10n/pt_BR.json b/lib/l10n/pt_BR.json
index 4500fb28d20..8c46567a02c 100644
--- a/lib/l10n/pt_BR.json
+++ b/lib/l10n/pt_BR.json
@@ -70,13 +70,13 @@
"Change" : "Mudar",
"Delete" : "Excluir",
"Share" : "Compartilhar",
- "Overview" : "Visão Geral",
+ "Overview" : "Visão geral",
"Basic settings" : "Configurações básicas",
"Sharing" : "Compartilhamento",
"Security" : "Segurança",
"Groupware" : "Groupware",
"Additional settings" : "Configurações adicionais",
- "Personal info" : "Informação Pessoal",
+ "Personal info" : "Informação pessoal",
"Mobile & desktop" : "Móvel & desktop",
"Unlimited" : "Ilimitado",
"Verifying" : "Verificando",
diff --git a/lib/l10n/zh_CN.js b/lib/l10n/zh_CN.js
index b55f42a3251..bab3b63c82c 100644
--- a/lib/l10n/zh_CN.js
+++ b/lib/l10n/zh_CN.js
@@ -1,27 +1,27 @@
OC.L10N.register(
"lib",
{
- "Cannot write into \"config\" directory!" : "无法写入 \"config\" 目录!ond",
+ "Cannot write into \"config\" directory!" : "无法写入 \"config\" 目录!",
"This can usually be fixed by giving the webserver write access to the config directory" : "您可以设置 Web 服务器对 config 目录的写权限修复这个问题",
"See %s" : "查看 %s",
"Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "或者,如果希望保持 config.php 文件的只读权限,请将 \"config_is_read_only\" 设置为 true。",
"This can usually be fixed by giving the webserver write access to the config directory. See %s" : "这个通常可以通过赋予写入权限到 config 目录来修复。查看:%s",
"Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "或者,如果希望保持 config.php 文件的只读权限,请将 \"config_is_read_only\" 设置为 true。查看 %s",
- "The files of the app %$1s were not replaced correctly. Make sure it is a version compatible with the server." : "应用 %$1s 的文件替换不正确. 请确认版本与当前服务器兼容.",
+ "The files of the app %$1s were not replaced correctly. Make sure it is a version compatible with the server." : "应用 %$1s 的文件替换不正确。请确认版本与当前服务器兼容。",
"Sample configuration detected" : "示例配置检测",
- "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "您似乎直接把 config.php 的样例文件直接复制使用. 这可能会破坏您的安装. 在对 config.php 进行修改之前请先阅读相关文档.",
+ "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "您似乎直接把 config.php 的样例文件直接复制使用。这可能会破坏您的安装。在对 config.php 进行修改之前请先阅读相关文档。",
"%1$s and %2$s" : "%1$s 和 %2$s",
- "%1$s, %2$s and %3$s" : "%1$s, %2$s 和 %3$s",
- "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s 和 %4$s",
- "%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s, %2$s, %3$s, %4$s 和 %5$s",
+ "%1$s, %2$s and %3$s" : "%1$s,%2$s 和 %3$s",
+ "%1$s, %2$s, %3$s and %4$s" : "%1$s,%2$s,%3$s 和 %4$s",
+ "%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s,%2$s,%3$s,%4$s 和 %5$s",
"Education Edition" : "教育版",
"Enterprise bundle" : "企业捆绑包",
"Groupware bundle" : "群组捆绑包",
"Social sharing bundle" : "社交共享捆绑包",
"PHP %s or higher is required." : "要求 PHP 版本 %s 或者更高。",
- "PHP with a version lower than %s is required." : "需要版本低于 %s 的PHP.",
- "%sbit or higher PHP required." : "需要 %s 或更高版本的 PHP",
- "Following databases are supported: %s" : "支持以下数据库: %s",
+ "PHP with a version lower than %s is required." : "需要版本低于 %s 的PHP。",
+ "%sbit or higher PHP required." : "需要 %s 或更高版本的 PHP。",
+ "Following databases are supported: %s" : "支持以下数据库:%s",
"The command line tool %s could not be found" : "命令行工具 %s 未找到",
"The library %s is not available." : "库文件 %s 不可用",
"Library %1$s with a version higher than %2$s is required - available version %3$s." : "库版本 %1$s 高于需要的版本 %2$s - 可用版本 %3$s。",
@@ -56,10 +56,10 @@ OC.L10N.register(
"File name is a reserved word" : "文件名包含敏感字符",
"File name contains at least one invalid character" : "文件名中存在至少一个非法字符",
"File name is too long" : "文件名过长",
- "Dot files are not allowed" : ".文件 不被允许",
- "Empty filename is not allowed" : "不允许使用空名称。",
- "App \"%s\" cannot be installed because appinfo file cannot be read." : "无法安装应用\"%s\",因为无法读取appinfo文件.",
- "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "应用程式 \"%s\" 无法安装,因为它与这个版本的服务器不兼容.",
+ "Dot files are not allowed" : "以 . 开头的文件不被允许",
+ "Empty filename is not allowed" : "不允许使用空名称",
+ "App \"%s\" cannot be installed because appinfo file cannot be read." : "无法安装应用\"%s\",因为无法读取appinfo文件。",
+ "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "应用程式 \"%s\" 无法安装,因为它与这个版本的服务器不兼容。",
"__language_name__" : "简体中文",
"This is an automatically sent email, please do not reply." : "这是一个自动生成的电子邮件,请不要回复。",
"Help" : "帮助",
@@ -84,7 +84,7 @@ OC.L10N.register(
"Verifying" : "验证",
"Verifying …" : "验证...",
"Verify" : "验证",
- "%s enter the database username and name." : "%s 输入数据库用户名和名称.",
+ "%s enter the database username and name." : "%s 输入数据库用户名和名称。",
"%s enter the database username." : "%s 输入数据库用户名。",
"%s enter the database name." : "%s 输入数据库名称。",
"%s you may not use dots in the database name" : "%s 您不能在数据库名称中使用英文句号。",
@@ -100,29 +100,29 @@ OC.L10N.register(
"Set an admin password." : "请设置一个管理员密码。",
"Can't create or write into the data directory %s" : "无法创建或写入数据目录 %s",
"Invalid Federated Cloud ID" : "无效的联合云ID",
- "Sharing %s failed, because the backend does not allow shares from type %i" : "共享 %s 失败, 因为后端不允许共享 %i 类型",
- "Sharing %s failed, because the file does not exist" : "共享 %s 失败, 因为文件不存在.",
+ "Sharing %s failed, because the backend does not allow shares from type %i" : "共享 %s 失败,因为后端不允许共享 %i 类型",
+ "Sharing %s failed, because the file does not exist" : "共享 %s 失败,因为文件不存在",
"You are not allowed to share %s" : "您无权共享 %s",
- "Sharing %s failed, because you can not share with yourself" : "共享 %s 失败, 因为您不能共享给自己",
+ "Sharing %s failed, because you can not share with yourself" : "共享 %s 失败,因为您不能共享给自己",
"Sharing %1$s failed, because the user %2$s does not exist" : "共享 %1$s 失败,因为 %2$s 用户不存在",
- "You need to provide a password to create a public link, only protected links are allowed" : "您需要提供密码以创建公开链接,因为只允许创建受保护的链接。",
- "Sharing %s failed, because sharing with links is not allowed" : "共享 %s 失败, 因为不允许使用链接共享",
+ "You need to provide a password to create a public link, only protected links are allowed" : "您需要提供密码以创建公开链接,因为只允许创建受保护的链接",
+ "Sharing %s failed, because sharing with links is not allowed" : "共享 %s 失败,因为不允许使用链接共享",
"Not allowed to create a federated share with the same user" : "不允许创建对相同用户的联合共享",
- "Cannot set expiration date. Shares cannot expire later than %s after they have been shared" : "无法设置过期时间. 过期时间不能晚于其共享时间 %s",
- "Cannot set expiration date. Expiration date is in the past" : "无法设置过期时间. 过期时间不能为过去",
+ "Cannot set expiration date. Shares cannot expire later than %s after they have been shared" : "无法设置过期时间。过期时间不能晚于其共享时间 %s",
+ "Cannot set expiration date. Expiration date is in the past" : "无法设置过期时间。过期时间不能为过去",
"Sharing backend %s must implement the interface OCP\\Share_Backend" : "共享后端 %s 必须实现 OCP\\Share_Backend 接口",
"Sharing backend %s not found" : "%s 的共享后端未找到",
"Sharing backend for %s not found" : "%s 的共享后端未找到",
- "Sharing failed, because the user %s is the original sharer" : "共享失败,因为用户 %s 是原始的共享者。",
- "Sharing %s failed, because resharing is not allowed" : "共享 %s 失败, 因为不允许二次共享",
- "Sharing %s failed, because the file could not be found in the file cache" : "共享 %s 失败, 因为文件缓存中找不到该文件",
- "Open »%s«" : "打开 %s",
+ "Sharing failed, because the user %s is the original sharer" : "共享失败,因为用户 %s 是原始的共享者",
+ "Sharing %s failed, because resharing is not allowed" : "共享 %s 失败,因为不允许二次共享",
+ "Sharing %s failed, because the file could not be found in the file cache" : "共享 %s 失败,因为文件缓存中找不到该文件",
+ "Open »%s«" : "打开 »%s«",
"Can’t increase permissions of %s" : "无法增加%s的权限。",
"Files can’t be shared with delete permissions" : "无法共享有删除权限的文件",
"Files can’t be shared with create permissions" : "无法共享有创建权限的文件",
- "Expiration date is in the past" : "到期日期已过.",
- "Can’t set expiration date more than %s days in the future" : "无法将过期日期设置为超过 %s 天.",
- "Click the button below to open it." : "点击下方按钮可打开它.",
+ "Expiration date is in the past" : "到期日期已过",
+ "Can’t set expiration date more than %s days in the future" : "无法将过期日期设置为超过 %s 天。",
+ "Click the button below to open it." : "点击下方按钮可打开它。",
"The requested share does not exist anymore" : "当前请求的共享已经不存在",
"Could not find category \"%s\"" : "无法找到分类 \"%s\"",
"Sunday" : "星期日",
@@ -179,13 +179,13 @@ OC.L10N.register(
"Could not create user" : "无法创建用户",
"User disabled" : "用户已禁用",
"Login canceled by app" : "已通过应用取消登录",
- "a safe home for all your data" : "给你所有数据一个安全的家",
+ "a safe home for all your data" : "给您所有数据一个安全的家",
"File is currently busy, please try again later" : "文件当前正忙,请稍后再试",
"Can't read file" : "无法读取文件",
"Application is not enabled" : "应用程序未启用",
"Authentication error" : "认证出错",
"Token expired. Please reload page." : "Token 过期,请刷新页面。",
- "No database drivers (sqlite, mysql, or postgresql) installed." : "没有安装数据库驱动 (SQLite、MySQL 或 PostgreSQL)。",
+ "No database drivers (sqlite, mysql, or postgresql) installed." : "没有安装数据库驱动(SQLite、MySQL 或 PostgreSQL)。",
"Cannot write into \"config\" directory" : "无法写入“config”目录",
"Cannot write into \"apps\" directory" : "无法写入“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" : "这个通常可以通过赋予 apps 目录写入权限或者在 config 文件中关闭 AppStore 来修复。详情:%s",
@@ -193,56 +193,56 @@ OC.L10N.register(
"This can usually be fixed by giving the webserver write access to the root directory. See %s" : "这个通常可以通过赋予根目录写入权限来修复。查看:%s",
"Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "权限通常可以通过赋予根目录写入权限来修复。查看:%s。",
"Setting locale to %s failed" : "设置语言为 %s 失败",
- "Please install one of these locales on your system and restart your webserver." : "请在您的系统中安装下述一种语言并重启 Web 服务器.",
- "Please ask your server administrator to install the module." : "请联系服务器管理员安装模块.",
- "PHP module %s not installed." : "PHP %s 模块未安装.",
- "PHP setting \"%s\" is not set to \"%s\"." : "PHP 选项 \"%s\" 未设置为 \"%s\".",
+ "Please install one of these locales on your system and restart your webserver." : "请在您的系统中安装下述一种语言并重启 Web 服务器。",
+ "Please ask your server administrator to install the module." : "请联系服务器管理员安装模块。",
+ "PHP module %s not installed." : "PHP %s 模块未安装。",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP 选项 \"%s\" 未设置为 \"%s\"。",
"Adjusting this setting in php.ini will make Nextcloud run again" : "在 php.ini 中调整该设置将导致 Nextcloud 重新运行",
- "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload 当前设置为 \"%s\", 预期值为 \"0\"",
+ "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload 当前设置为 \"%s\",预期值为 \"0\"",
"To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "请在 php.ini 中设置 <code>mbstring.func_overload</code> 为 <code>0</code> 以解决该问题",
- "libxml2 2.7.0 is at least required. Currently %s is installed." : "至少需要 libxml2 2.7.0. 当前安装 %s.",
- "To fix this issue update your libxml2 version and restart your web server." : "升级您的 libxml2 版本然后重启 Web 服务器以解决该问题.",
- "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP 被设置为移除内联块, 这将导致多个核心应用无法访问.",
- "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "这可能由缓存/加速器导致的, 例如 Zend OPcache 或 eAccelerator.",
- "PHP modules have been installed, but they are still listed as missing?" : "PHP 模块已经安装, 但仍然显示未安装?",
- "Please ask your server administrator to restart the web server." : "请联系服务器管理员重启 Web 服务器.",
+ "libxml2 2.7.0 is at least required. Currently %s is installed." : "至少需要 libxml2 2.7.0. 当前安装 %s。",
+ "To fix this issue update your libxml2 version and restart your web server." : "升级您的 libxml2 版本然后重启 Web 服务器以解决该问题。",
+ "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP 被设置为移除内联块,这将导致多个核心应用无法访问。",
+ "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "这可能由缓存/加速器导致的,例如 Zend OPcache 或 eAccelerator。",
+ "PHP modules have been installed, but they are still listed as missing?" : "PHP 模块已经安装,但仍然显示未安装?",
+ "Please ask your server administrator to restart the web server." : "请联系服务器管理员重启 Web 服务器。",
"PostgreSQL >= 9 required" : "要求 PostgreSQL >= 9",
"Please upgrade your database version" : "请升级您的数据库版本",
- "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "请更改权限为 0770 以避免其他用户查看目录.",
- "Your data directory is readable by other users" : "你的数据目录可被其他用户读取",
+ "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "请更改权限为 0770 以避免其他用户查看目录。",
+ "Your data directory is readable by other users" : "您的数据目录可被其他用户读取",
"Your data directory must be an absolute path" : "您的数据目录必须是绝对路径",
"Check the value of \"datadirectory\" in your configuration" : "请检查配置文件中 \"datadirectory\" 的值",
"Your data directory is invalid" : "您的数据目录无效",
"Ensure there is a file called \".ocdata\" in the root of the data directory." : "请确定在根目录下有一个名为\".ocdata\"的文件。",
- "Action \"%s\" not supported or implemented." : "操作 \"%s\" 不支持或未实现.",
- "Could not obtain lock type %d on \"%s\"." : "无法在 \"%s\" 上获取锁类型 %d.",
- "Storage unauthorized. %s" : "存储认证失败. %s",
- "Storage incomplete configuration. %s" : "存储未完成配置. %s",
- "Storage connection error. %s" : "存储连接错误. %s",
+ "Action \"%s\" not supported or implemented." : "操作 \"%s\" 不支持或未实现。",
+ "Could not obtain lock type %d on \"%s\"." : "无法在 \"%s\" 上获取锁类型 %d。",
+ "Storage unauthorized. %s" : "存储认证失败。%s",
+ "Storage incomplete configuration. %s" : "存储未完成配置。%s",
+ "Storage connection error. %s" : "存储连接错误。%s",
"Storage is temporarily not available" : "存储暂时不可用",
- "Storage connection timeout. %s" : "存储连接超时. %s",
- "Library %s with a version higher than %s is required - available version %s." : "%s 需要 %s 或更高的版本 - 可用版本 %s.",
- "Library %s with a version lower than %s is required - available version %s." : "%s 需要 %s 或更低的版本 - 可用版本 %s.",
+ "Storage connection timeout. %s" : "存储连接超时。%s",
+ "Library %s with a version higher than %s is required - available version %s." : "%s 需要 %s 或更高的版本 - 可用版本 %s。",
+ "Library %s with a version lower than %s is required - available version %s." : "%s 需要 %s 或更低的版本 - 可用版本 %s。",
"APCu" : "APCu",
"Redis" : "Redis",
"Encryption" : "加密",
"Tips & tricks" : "小提示",
"Sync clients" : "同步客户",
- "Sharing %s failed, because the user %s does not exist" : "共享 %s 失败, 因为用户 %s 不存在",
- "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "共享 %s 失败, 因为用户 %s 不是 %s 所属的任何组的用户",
- "Sharing %s failed, because this item is already shared with %s" : "共享 %s 失败, 因为该项已经共享给用户 %s",
- "Sharing %s failed, because this item is already shared with user %s" : "共享 %s 失败, 因为该项已经共享给用户 %s",
- "Sharing %s failed, because the group %s does not exist" : "共享 %s 失败, 因为 %s 分组不存在",
- "Sharing %s failed, because %s is not a member of the group %s" : "共享 %s 失败, 因为 %s 不是 %s 分组的成员",
- "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "共享 %s 失败,无法找到 %s, 该服务当前无法连接。",
+ "Sharing %s failed, because the user %s does not exist" : "共享 %s 失败,因为用户 %s 不存在",
+ "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "共享 %s 失败,因为用户 %s 不是 %s 所属的任何组的用户",
+ "Sharing %s failed, because this item is already shared with %s" : "共享 %s 失败,因为该项已经共享给用户 %s",
+ "Sharing %s failed, because this item is already shared with user %s" : "共享 %s 失败,因为该项已经共享给用户 %s",
+ "Sharing %s failed, because the group %s does not exist" : "共享 %s 失败,因为 %s 分组不存在",
+ "Sharing %s failed, because %s is not a member of the group %s" : "共享 %s 失败,因为 %s 不是 %s 分组的成员",
+ "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "共享 %s 失败,无法找到 %s,该服务当前无法连接。",
"Share type %s is not valid for %s" : "%s 不是 %s 的合法共享类型",
- "Sharing %s failed, because the permissions exceed permissions granted to %s" : "共享 %s 失败, 因为权限超过了 %s 的已有权限",
- "Sharing %s failed, because the sharing backend for %s could not find its source" : "共享 %s 失败, 因为无法找到 %s 共享后端的来源",
+ "Sharing %s failed, because the permissions exceed permissions granted to %s" : "共享 %s 失败,因为权限超过了 %s 的已有权限",
+ "Sharing %s failed, because the sharing backend for %s could not find its source" : "共享 %s 失败,因为无法找到 %s 共享后端的来源",
"%s shared »%s« with you" : "%s 向您共享了 »%s«",
- "%s shared »%s« with you." : "%s 已与您共享了 %s .",
+ "%s shared »%s« with you." : "%s 已与您共享了 »%s«。",
"%s via %s" : "%s 通过 %s",
"No app name specified" : "没有指定的 App 名称",
- "App '%s' could not be installed!" : "应用 '%s' 无法被安装!",
- "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "应用程序 \"%s\" 无法被安装,因为为满足下列依赖关系: %s"
+ "App '%s' could not be installed!" : "应用 '%s' 无法被安装!",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "应用程序 \"%s\" 无法被安装,因为为满足下列依赖关系:%s"
},
"nplurals=1; plural=0;");
diff --git a/lib/l10n/zh_CN.json b/lib/l10n/zh_CN.json
index 2df83c8ee31..17e1ed1f50f 100644
--- a/lib/l10n/zh_CN.json
+++ b/lib/l10n/zh_CN.json
@@ -1,25 +1,25 @@
{ "translations": {
- "Cannot write into \"config\" directory!" : "无法写入 \"config\" 目录!ond",
+ "Cannot write into \"config\" directory!" : "无法写入 \"config\" 目录!",
"This can usually be fixed by giving the webserver write access to the config directory" : "您可以设置 Web 服务器对 config 目录的写权限修复这个问题",
"See %s" : "查看 %s",
"Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "或者,如果希望保持 config.php 文件的只读权限,请将 \"config_is_read_only\" 设置为 true。",
"This can usually be fixed by giving the webserver write access to the config directory. See %s" : "这个通常可以通过赋予写入权限到 config 目录来修复。查看:%s",
"Or, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it. See %s" : "或者,如果希望保持 config.php 文件的只读权限,请将 \"config_is_read_only\" 设置为 true。查看 %s",
- "The files of the app %$1s were not replaced correctly. Make sure it is a version compatible with the server." : "应用 %$1s 的文件替换不正确. 请确认版本与当前服务器兼容.",
+ "The files of the app %$1s were not replaced correctly. Make sure it is a version compatible with the server." : "应用 %$1s 的文件替换不正确。请确认版本与当前服务器兼容。",
"Sample configuration detected" : "示例配置检测",
- "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "您似乎直接把 config.php 的样例文件直接复制使用. 这可能会破坏您的安装. 在对 config.php 进行修改之前请先阅读相关文档.",
+ "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "您似乎直接把 config.php 的样例文件直接复制使用。这可能会破坏您的安装。在对 config.php 进行修改之前请先阅读相关文档。",
"%1$s and %2$s" : "%1$s 和 %2$s",
- "%1$s, %2$s and %3$s" : "%1$s, %2$s 和 %3$s",
- "%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s 和 %4$s",
- "%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s, %2$s, %3$s, %4$s 和 %5$s",
+ "%1$s, %2$s and %3$s" : "%1$s,%2$s 和 %3$s",
+ "%1$s, %2$s, %3$s and %4$s" : "%1$s,%2$s,%3$s 和 %4$s",
+ "%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s,%2$s,%3$s,%4$s 和 %5$s",
"Education Edition" : "教育版",
"Enterprise bundle" : "企业捆绑包",
"Groupware bundle" : "群组捆绑包",
"Social sharing bundle" : "社交共享捆绑包",
"PHP %s or higher is required." : "要求 PHP 版本 %s 或者更高。",
- "PHP with a version lower than %s is required." : "需要版本低于 %s 的PHP.",
- "%sbit or higher PHP required." : "需要 %s 或更高版本的 PHP",
- "Following databases are supported: %s" : "支持以下数据库: %s",
+ "PHP with a version lower than %s is required." : "需要版本低于 %s 的PHP。",
+ "%sbit or higher PHP required." : "需要 %s 或更高版本的 PHP。",
+ "Following databases are supported: %s" : "支持以下数据库:%s",
"The command line tool %s could not be found" : "命令行工具 %s 未找到",
"The library %s is not available." : "库文件 %s 不可用",
"Library %1$s with a version higher than %2$s is required - available version %3$s." : "库版本 %1$s 高于需要的版本 %2$s - 可用版本 %3$s。",
@@ -54,10 +54,10 @@
"File name is a reserved word" : "文件名包含敏感字符",
"File name contains at least one invalid character" : "文件名中存在至少一个非法字符",
"File name is too long" : "文件名过长",
- "Dot files are not allowed" : ".文件 不被允许",
- "Empty filename is not allowed" : "不允许使用空名称。",
- "App \"%s\" cannot be installed because appinfo file cannot be read." : "无法安装应用\"%s\",因为无法读取appinfo文件.",
- "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "应用程式 \"%s\" 无法安装,因为它与这个版本的服务器不兼容.",
+ "Dot files are not allowed" : "以 . 开头的文件不被允许",
+ "Empty filename is not allowed" : "不允许使用空名称",
+ "App \"%s\" cannot be installed because appinfo file cannot be read." : "无法安装应用\"%s\",因为无法读取appinfo文件。",
+ "App \"%s\" cannot be installed because it is not compatible with this version of the server." : "应用程式 \"%s\" 无法安装,因为它与这个版本的服务器不兼容。",
"__language_name__" : "简体中文",
"This is an automatically sent email, please do not reply." : "这是一个自动生成的电子邮件,请不要回复。",
"Help" : "帮助",
@@ -82,7 +82,7 @@
"Verifying" : "验证",
"Verifying …" : "验证...",
"Verify" : "验证",
- "%s enter the database username and name." : "%s 输入数据库用户名和名称.",
+ "%s enter the database username and name." : "%s 输入数据库用户名和名称。",
"%s enter the database username." : "%s 输入数据库用户名。",
"%s enter the database name." : "%s 输入数据库名称。",
"%s you may not use dots in the database name" : "%s 您不能在数据库名称中使用英文句号。",
@@ -98,29 +98,29 @@
"Set an admin password." : "请设置一个管理员密码。",
"Can't create or write into the data directory %s" : "无法创建或写入数据目录 %s",
"Invalid Federated Cloud ID" : "无效的联合云ID",
- "Sharing %s failed, because the backend does not allow shares from type %i" : "共享 %s 失败, 因为后端不允许共享 %i 类型",
- "Sharing %s failed, because the file does not exist" : "共享 %s 失败, 因为文件不存在.",
+ "Sharing %s failed, because the backend does not allow shares from type %i" : "共享 %s 失败,因为后端不允许共享 %i 类型",
+ "Sharing %s failed, because the file does not exist" : "共享 %s 失败,因为文件不存在",
"You are not allowed to share %s" : "您无权共享 %s",
- "Sharing %s failed, because you can not share with yourself" : "共享 %s 失败, 因为您不能共享给自己",
+ "Sharing %s failed, because you can not share with yourself" : "共享 %s 失败,因为您不能共享给自己",
"Sharing %1$s failed, because the user %2$s does not exist" : "共享 %1$s 失败,因为 %2$s 用户不存在",
- "You need to provide a password to create a public link, only protected links are allowed" : "您需要提供密码以创建公开链接,因为只允许创建受保护的链接。",
- "Sharing %s failed, because sharing with links is not allowed" : "共享 %s 失败, 因为不允许使用链接共享",
+ "You need to provide a password to create a public link, only protected links are allowed" : "您需要提供密码以创建公开链接,因为只允许创建受保护的链接",
+ "Sharing %s failed, because sharing with links is not allowed" : "共享 %s 失败,因为不允许使用链接共享",
"Not allowed to create a federated share with the same user" : "不允许创建对相同用户的联合共享",
- "Cannot set expiration date. Shares cannot expire later than %s after they have been shared" : "无法设置过期时间. 过期时间不能晚于其共享时间 %s",
- "Cannot set expiration date. Expiration date is in the past" : "无法设置过期时间. 过期时间不能为过去",
+ "Cannot set expiration date. Shares cannot expire later than %s after they have been shared" : "无法设置过期时间。过期时间不能晚于其共享时间 %s",
+ "Cannot set expiration date. Expiration date is in the past" : "无法设置过期时间。过期时间不能为过去",
"Sharing backend %s must implement the interface OCP\\Share_Backend" : "共享后端 %s 必须实现 OCP\\Share_Backend 接口",
"Sharing backend %s not found" : "%s 的共享后端未找到",
"Sharing backend for %s not found" : "%s 的共享后端未找到",
- "Sharing failed, because the user %s is the original sharer" : "共享失败,因为用户 %s 是原始的共享者。",
- "Sharing %s failed, because resharing is not allowed" : "共享 %s 失败, 因为不允许二次共享",
- "Sharing %s failed, because the file could not be found in the file cache" : "共享 %s 失败, 因为文件缓存中找不到该文件",
- "Open »%s«" : "打开 %s",
+ "Sharing failed, because the user %s is the original sharer" : "共享失败,因为用户 %s 是原始的共享者",
+ "Sharing %s failed, because resharing is not allowed" : "共享 %s 失败,因为不允许二次共享",
+ "Sharing %s failed, because the file could not be found in the file cache" : "共享 %s 失败,因为文件缓存中找不到该文件",
+ "Open »%s«" : "打开 »%s«",
"Can’t increase permissions of %s" : "无法增加%s的权限。",
"Files can’t be shared with delete permissions" : "无法共享有删除权限的文件",
"Files can’t be shared with create permissions" : "无法共享有创建权限的文件",
- "Expiration date is in the past" : "到期日期已过.",
- "Can’t set expiration date more than %s days in the future" : "无法将过期日期设置为超过 %s 天.",
- "Click the button below to open it." : "点击下方按钮可打开它.",
+ "Expiration date is in the past" : "到期日期已过",
+ "Can’t set expiration date more than %s days in the future" : "无法将过期日期设置为超过 %s 天。",
+ "Click the button below to open it." : "点击下方按钮可打开它。",
"The requested share does not exist anymore" : "当前请求的共享已经不存在",
"Could not find category \"%s\"" : "无法找到分类 \"%s\"",
"Sunday" : "星期日",
@@ -177,13 +177,13 @@
"Could not create user" : "无法创建用户",
"User disabled" : "用户已禁用",
"Login canceled by app" : "已通过应用取消登录",
- "a safe home for all your data" : "给你所有数据一个安全的家",
+ "a safe home for all your data" : "给您所有数据一个安全的家",
"File is currently busy, please try again later" : "文件当前正忙,请稍后再试",
"Can't read file" : "无法读取文件",
"Application is not enabled" : "应用程序未启用",
"Authentication error" : "认证出错",
"Token expired. Please reload page." : "Token 过期,请刷新页面。",
- "No database drivers (sqlite, mysql, or postgresql) installed." : "没有安装数据库驱动 (SQLite、MySQL 或 PostgreSQL)。",
+ "No database drivers (sqlite, mysql, or postgresql) installed." : "没有安装数据库驱动(SQLite、MySQL 或 PostgreSQL)。",
"Cannot write into \"config\" directory" : "无法写入“config”目录",
"Cannot write into \"apps\" directory" : "无法写入“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" : "这个通常可以通过赋予 apps 目录写入权限或者在 config 文件中关闭 AppStore 来修复。详情:%s",
@@ -191,56 +191,56 @@
"This can usually be fixed by giving the webserver write access to the root directory. See %s" : "这个通常可以通过赋予根目录写入权限来修复。查看:%s",
"Permissions can usually be fixed by giving the webserver write access to the root directory. See %s." : "权限通常可以通过赋予根目录写入权限来修复。查看:%s。",
"Setting locale to %s failed" : "设置语言为 %s 失败",
- "Please install one of these locales on your system and restart your webserver." : "请在您的系统中安装下述一种语言并重启 Web 服务器.",
- "Please ask your server administrator to install the module." : "请联系服务器管理员安装模块.",
- "PHP module %s not installed." : "PHP %s 模块未安装.",
- "PHP setting \"%s\" is not set to \"%s\"." : "PHP 选项 \"%s\" 未设置为 \"%s\".",
+ "Please install one of these locales on your system and restart your webserver." : "请在您的系统中安装下述一种语言并重启 Web 服务器。",
+ "Please ask your server administrator to install the module." : "请联系服务器管理员安装模块。",
+ "PHP module %s not installed." : "PHP %s 模块未安装。",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP 选项 \"%s\" 未设置为 \"%s\"。",
"Adjusting this setting in php.ini will make Nextcloud run again" : "在 php.ini 中调整该设置将导致 Nextcloud 重新运行",
- "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload 当前设置为 \"%s\", 预期值为 \"0\"",
+ "mbstring.func_overload is set to \"%s\" instead of the expected value \"0\"" : "mbstring.func_overload 当前设置为 \"%s\",预期值为 \"0\"",
"To fix this issue set <code>mbstring.func_overload</code> to <code>0</code> in your php.ini" : "请在 php.ini 中设置 <code>mbstring.func_overload</code> 为 <code>0</code> 以解决该问题",
- "libxml2 2.7.0 is at least required. Currently %s is installed." : "至少需要 libxml2 2.7.0. 当前安装 %s.",
- "To fix this issue update your libxml2 version and restart your web server." : "升级您的 libxml2 版本然后重启 Web 服务器以解决该问题.",
- "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP 被设置为移除内联块, 这将导致多个核心应用无法访问.",
- "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "这可能由缓存/加速器导致的, 例如 Zend OPcache 或 eAccelerator.",
- "PHP modules have been installed, but they are still listed as missing?" : "PHP 模块已经安装, 但仍然显示未安装?",
- "Please ask your server administrator to restart the web server." : "请联系服务器管理员重启 Web 服务器.",
+ "libxml2 2.7.0 is at least required. Currently %s is installed." : "至少需要 libxml2 2.7.0. 当前安装 %s。",
+ "To fix this issue update your libxml2 version and restart your web server." : "升级您的 libxml2 版本然后重启 Web 服务器以解决该问题。",
+ "PHP is apparently set up to strip inline doc blocks. This will make several core apps inaccessible." : "PHP 被设置为移除内联块,这将导致多个核心应用无法访问。",
+ "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "这可能由缓存/加速器导致的,例如 Zend OPcache 或 eAccelerator。",
+ "PHP modules have been installed, but they are still listed as missing?" : "PHP 模块已经安装,但仍然显示未安装?",
+ "Please ask your server administrator to restart the web server." : "请联系服务器管理员重启 Web 服务器。",
"PostgreSQL >= 9 required" : "要求 PostgreSQL >= 9",
"Please upgrade your database version" : "请升级您的数据库版本",
- "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "请更改权限为 0770 以避免其他用户查看目录.",
- "Your data directory is readable by other users" : "你的数据目录可被其他用户读取",
+ "Please change the permissions to 0770 so that the directory cannot be listed by other users." : "请更改权限为 0770 以避免其他用户查看目录。",
+ "Your data directory is readable by other users" : "您的数据目录可被其他用户读取",
"Your data directory must be an absolute path" : "您的数据目录必须是绝对路径",
"Check the value of \"datadirectory\" in your configuration" : "请检查配置文件中 \"datadirectory\" 的值",
"Your data directory is invalid" : "您的数据目录无效",
"Ensure there is a file called \".ocdata\" in the root of the data directory." : "请确定在根目录下有一个名为\".ocdata\"的文件。",
- "Action \"%s\" not supported or implemented." : "操作 \"%s\" 不支持或未实现.",
- "Could not obtain lock type %d on \"%s\"." : "无法在 \"%s\" 上获取锁类型 %d.",
- "Storage unauthorized. %s" : "存储认证失败. %s",
- "Storage incomplete configuration. %s" : "存储未完成配置. %s",
- "Storage connection error. %s" : "存储连接错误. %s",
+ "Action \"%s\" not supported or implemented." : "操作 \"%s\" 不支持或未实现。",
+ "Could not obtain lock type %d on \"%s\"." : "无法在 \"%s\" 上获取锁类型 %d。",
+ "Storage unauthorized. %s" : "存储认证失败。%s",
+ "Storage incomplete configuration. %s" : "存储未完成配置。%s",
+ "Storage connection error. %s" : "存储连接错误。%s",
"Storage is temporarily not available" : "存储暂时不可用",
- "Storage connection timeout. %s" : "存储连接超时. %s",
- "Library %s with a version higher than %s is required - available version %s." : "%s 需要 %s 或更高的版本 - 可用版本 %s.",
- "Library %s with a version lower than %s is required - available version %s." : "%s 需要 %s 或更低的版本 - 可用版本 %s.",
+ "Storage connection timeout. %s" : "存储连接超时。%s",
+ "Library %s with a version higher than %s is required - available version %s." : "%s 需要 %s 或更高的版本 - 可用版本 %s。",
+ "Library %s with a version lower than %s is required - available version %s." : "%s 需要 %s 或更低的版本 - 可用版本 %s。",
"APCu" : "APCu",
"Redis" : "Redis",
"Encryption" : "加密",
"Tips & tricks" : "小提示",
"Sync clients" : "同步客户",
- "Sharing %s failed, because the user %s does not exist" : "共享 %s 失败, 因为用户 %s 不存在",
- "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "共享 %s 失败, 因为用户 %s 不是 %s 所属的任何组的用户",
- "Sharing %s failed, because this item is already shared with %s" : "共享 %s 失败, 因为该项已经共享给用户 %s",
- "Sharing %s failed, because this item is already shared with user %s" : "共享 %s 失败, 因为该项已经共享给用户 %s",
- "Sharing %s failed, because the group %s does not exist" : "共享 %s 失败, 因为 %s 分组不存在",
- "Sharing %s failed, because %s is not a member of the group %s" : "共享 %s 失败, 因为 %s 不是 %s 分组的成员",
- "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "共享 %s 失败,无法找到 %s, 该服务当前无法连接。",
+ "Sharing %s failed, because the user %s does not exist" : "共享 %s 失败,因为用户 %s 不存在",
+ "Sharing %s failed, because the user %s is not a member of any groups that %s is a member of" : "共享 %s 失败,因为用户 %s 不是 %s 所属的任何组的用户",
+ "Sharing %s failed, because this item is already shared with %s" : "共享 %s 失败,因为该项已经共享给用户 %s",
+ "Sharing %s failed, because this item is already shared with user %s" : "共享 %s 失败,因为该项已经共享给用户 %s",
+ "Sharing %s failed, because the group %s does not exist" : "共享 %s 失败,因为 %s 分组不存在",
+ "Sharing %s failed, because %s is not a member of the group %s" : "共享 %s 失败,因为 %s 不是 %s 分组的成员",
+ "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "共享 %s 失败,无法找到 %s,该服务当前无法连接。",
"Share type %s is not valid for %s" : "%s 不是 %s 的合法共享类型",
- "Sharing %s failed, because the permissions exceed permissions granted to %s" : "共享 %s 失败, 因为权限超过了 %s 的已有权限",
- "Sharing %s failed, because the sharing backend for %s could not find its source" : "共享 %s 失败, 因为无法找到 %s 共享后端的来源",
+ "Sharing %s failed, because the permissions exceed permissions granted to %s" : "共享 %s 失败,因为权限超过了 %s 的已有权限",
+ "Sharing %s failed, because the sharing backend for %s could not find its source" : "共享 %s 失败,因为无法找到 %s 共享后端的来源",
"%s shared »%s« with you" : "%s 向您共享了 »%s«",
- "%s shared »%s« with you." : "%s 已与您共享了 %s .",
+ "%s shared »%s« with you." : "%s 已与您共享了 »%s«。",
"%s via %s" : "%s 通过 %s",
"No app name specified" : "没有指定的 App 名称",
- "App '%s' could not be installed!" : "应用 '%s' 无法被安装!",
- "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "应用程序 \"%s\" 无法被安装,因为为满足下列依赖关系: %s"
+ "App '%s' could not be installed!" : "应用 '%s' 无法被安装!",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "应用程序 \"%s\" 无法被安装,因为为满足下列依赖关系:%s"
},"pluralForm" :"nplurals=1; plural=0;"
} \ No newline at end of file
diff --git a/lib/private/AppFramework/Routing/RouteConfig.php b/lib/private/AppFramework/Routing/RouteConfig.php
index 70208725f46..0477f4dc209 100644
--- a/lib/private/AppFramework/Routing/RouteConfig.php
+++ b/lib/private/AppFramework/Routing/RouteConfig.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
@@ -79,47 +80,42 @@ class RouteConfig {
* OCS routes go into a different collection
*/
$oldCollection = $this->router->getCurrentCollection();
- $this->router->useCollection($oldCollection.'.ocs');
+ $this->router->useCollection($oldCollection . '.ocs');
// parse ocs simple routes
$this->processOCS($this->routes);
+ // parse ocs simple routes
+ $this->processOCSResources($this->routes);
+
$this->router->useCollection($oldCollection);
}
- private function processOCS(array $routes) {
- $ocsRoutes = isset($routes['ocs']) ? $routes['ocs'] : [];
+ private function processOCS(array $routes): void {
+ $ocsRoutes = $routes['ocs'] ?? [];
foreach ($ocsRoutes as $ocsRoute) {
$name = $ocsRoute['name'];
- $postfix = '';
-
- if (isset($ocsRoute['postfix'])) {
- $postfix = $ocsRoute['postfix'];
- }
-
- if (isset($ocsRoute['root'])) {
- $root = $ocsRoute['root'];
- } else {
- $root = '/apps/'.$this->appName;
- }
+ $postfix = $ocsRoute['postfix'] ?? '';
+ $root = $ocsRoute['root'] ?? '/apps/' . $this->appName;
$url = $root . $ocsRoute['url'];
- $verb = isset($ocsRoute['verb']) ? strtoupper($ocsRoute['verb']) : 'GET';
+ $verb = strtoupper($ocsRoute['verb'] ?? 'GET');
$split = explode('#', $name, 2);
- if (count($split) != 2) {
+ if (count($split) !== 2) {
throw new \UnexpectedValueException('Invalid route name');
}
- $controller = $split[0];
- $action = $split[1];
+ list($controller, $action) = $split;
$controllerName = $this->buildControllerName($controller);
$actionName = $this->buildActionName($action);
+ $routeName = 'ocs.' . $this->appName . '.' . $controller . '.' . $action . $postfix;
+
// register the route
$handler = new RouteActionHandler($this->container, $controllerName, $actionName);
- $router = $this->router->create('ocs.'.$this->appName.'.'.$controller.'.'.$action . $postfix, $url)
+ $router = $this->router->create($routeName, $url)
->method($verb)
->action($handler);
@@ -142,33 +138,29 @@ class RouteConfig {
* @param array $routes
* @throws \UnexpectedValueException
*/
- private function processSimpleRoutes($routes)
- {
- $simpleRoutes = isset($routes['routes']) ? $routes['routes'] : array();
+ private function processSimpleRoutes(array $routes): void {
+ $simpleRoutes = $routes['routes'] ?? [];
foreach ($simpleRoutes as $simpleRoute) {
$name = $simpleRoute['name'];
- $postfix = '';
-
- if (isset($simpleRoute['postfix'])) {
- $postfix = $simpleRoute['postfix'];
- }
+ $postfix = $simpleRoute['postfix'] ?? '';
$url = $simpleRoute['url'];
- $verb = isset($simpleRoute['verb']) ? strtoupper($simpleRoute['verb']) : 'GET';
+ $verb = strtoupper($simpleRoute['verb'] ?? 'GET');
$split = explode('#', $name, 2);
- if (count($split) != 2) {
+ if (count($split) !== 2) {
throw new \UnexpectedValueException('Invalid route name');
}
- $controller = $split[0];
- $action = $split[1];
+ list($controller, $action) = $split;
$controllerName = $this->buildControllerName($controller);
$actionName = $this->buildActionName($action);
+ $routeName = $this->appName . '.' . $controller . '.' . $action . $postfix;
+
// register the route
$handler = new RouteActionHandler($this->container, $controllerName, $actionName);
- $router = $this->router->create($this->appName.'.'.$controller.'.'.$action . $postfix, $url)
+ $router = $this->router->create($routeName, $url)
->method($verb)
->action($handler);
@@ -187,41 +179,90 @@ class RouteConfig {
}
/**
+ * For a given name and url restful OCS routes are created:
+ * - index
+ * - show
+ * - create
+ * - update
+ * - destroy
+ *
+ * @param array $routes
+ */
+ private function processOCSResources(array $routes): void {
+ // declaration of all restful actions
+ $actions = [
+ ['name' => 'index', 'verb' => 'GET', 'on-collection' => true],
+ ['name' => 'show', 'verb' => 'GET'],
+ ['name' => 'create', 'verb' => 'POST', 'on-collection' => true],
+ ['name' => 'update', 'verb' => 'PUT'],
+ ['name' => 'destroy', 'verb' => 'DELETE'],
+ ];
+
+ $resources = $routes['ocs-resources'] ?? [];
+ foreach ($resources as $resource => $config) {
+ $root = $config['root'] ?? '/apps/' . $this->appName;
+
+ // the url parameter used as id to the resource
+ foreach($actions as $action) {
+ $url = $root . $config['url'];
+ $method = $action['name'];
+ $verb = strtoupper($action['verb'] ?? 'GET');
+ $collectionAction = $action['on-collection'] ?? false;
+ if (!$collectionAction) {
+ $url .= '/{id}';
+ }
+ if (isset($action['url-postfix'])) {
+ $url .= '/' . $action['url-postfix'];
+ }
+
+ $controller = $resource;
+
+ $controllerName = $this->buildControllerName($controller);
+ $actionName = $this->buildActionName($method);
+
+ $routeName = 'ocs.' . $this->appName . '.' . strtolower($resource) . '.' . strtolower($method);
+
+ $this->router->create($routeName, $url)->method($verb)->action(
+ new RouteActionHandler($this->container, $controllerName, $actionName)
+ );
+ }
+ }
+ }
+
+ /**
* For a given name and url restful routes are created:
* - index
* - show
- * - new
* - create
* - update
* - destroy
*
* @param array $routes
*/
- private function processResources($routes)
- {
+ private function processResources(array $routes): void {
// declaration of all restful actions
- $actions = array(
- array('name' => 'index', 'verb' => 'GET', 'on-collection' => true),
- array('name' => 'show', 'verb' => 'GET'),
- array('name' => 'create', 'verb' => 'POST', 'on-collection' => true),
- array('name' => 'update', 'verb' => 'PUT'),
- array('name' => 'destroy', 'verb' => 'DELETE'),
- );
-
- $resources = isset($routes['resources']) ? $routes['resources'] : array();
+ $actions = [
+ ['name' => 'index', 'verb' => 'GET', 'on-collection' => true],
+ ['name' => 'show', 'verb' => 'GET'],
+ ['name' => 'create', 'verb' => 'POST', 'on-collection' => true],
+ ['name' => 'update', 'verb' => 'PUT'],
+ ['name' => 'destroy', 'verb' => 'DELETE'],
+ ];
+
+ $resources = $routes['resources'] ?? [];
foreach ($resources as $resource => $config) {
// the url parameter used as id to the resource
foreach($actions as $action) {
$url = $config['url'];
$method = $action['name'];
- $verb = isset($action['verb']) ? strtoupper($action['verb']) : 'GET';
- $collectionAction = isset($action['on-collection']) ? $action['on-collection'] : false;
+ $verb = strtoupper($action['verb'] ?? 'GET');
+ $collectionAction = $action['on-collection'] ?? false;
if (!$collectionAction) {
- $url = $url . '/{id}';
+ $url .= '/{id}';
}
if (isset($action['url-postfix'])) {
- $url = $url . '/' . $action['url-postfix'];
+ $url .= '/' . $action['url-postfix'];
}
$controller = $resource;
@@ -243,8 +284,7 @@ class RouteConfig {
* @param string $controller
* @return string
*/
- private function buildControllerName($controller)
- {
+ private function buildControllerName(string $controller): string {
if (!isset($this->controllerNameCache[$controller])) {
$this->controllerNameCache[$controller] = $this->underScoreToCamelCase(ucfirst($controller)) . 'Controller';
}
@@ -256,7 +296,7 @@ class RouteConfig {
* @param string $action
* @return string
*/
- private function buildActionName($action) {
+ private function buildActionName(string $action): string {
return $this->underScoreToCamelCase($action);
}
@@ -265,12 +305,12 @@ class RouteConfig {
* @param string $str
* @return string
*/
- private function underScoreToCamelCase($str) {
- $pattern = "/_[a-z]?/";
+ private function underScoreToCamelCase(string $str): string {
+ $pattern = '/_[a-z]?/';
return preg_replace_callback(
$pattern,
function ($matches) {
- return strtoupper(ltrim($matches[0], "_"));
+ return strtoupper(ltrim($matches[0], '_'));
},
$str);
}
diff --git a/lib/private/BackgroundJob/JobList.php b/lib/private/BackgroundJob/JobList.php
index e890c35868b..44b6786841f 100644
--- a/lib/private/BackgroundJob/JobList.php
+++ b/lib/private/BackgroundJob/JobList.php
@@ -273,7 +273,7 @@ class JobList implements IJobList {
}
}
- $job->setId($row['id']);
+ $job->setId((int) $row['id']);
$job->setLastRun($row['last_run']);
$job->setArgument(json_decode($row['argument'], true));
return $job;
diff --git a/lib/private/ContactsManager.php b/lib/private/ContactsManager.php
index 6a83a718d41..e279997e634 100644
--- a/lib/private/ContactsManager.php
+++ b/lib/private/ContactsManager.php
@@ -119,7 +119,12 @@ namespace OC {
}
/**
+ * Return a list of the user's addressbooks display names
+ * ! The addressBook displayName are not unique, please use getUserAddressBooks
+ *
* @return array
+ * @since 6.0.0
+ * @deprecated 16.0.0 - Use `$this->getUserAddressBooks()` instead
*/
public function getAddressBooks() {
$this->loadAddressBooks();
@@ -132,6 +137,17 @@ namespace OC {
}
/**
+ * Return a list of the user's addressbooks
+ *
+ * @return IAddressBook[]
+ * @since 16.0.0
+ */
+ public function getUserAddressBooks(): Array {
+ $this->loadAddressBooks();
+ return $this->addressBooks;
+ }
+
+ /**
* removes all registered address book instances
*/
public function clear() {
diff --git a/lib/private/Files/ObjectStore/Azure.php b/lib/private/Files/ObjectStore/Azure.php
index 899c826ec19..e162c510b98 100644
--- a/lib/private/Files/ObjectStore/Azure.php
+++ b/lib/private/Files/ObjectStore/Azure.php
@@ -115,4 +115,17 @@ class Azure implements IObjectStore {
public function deleteObject($urn) {
$this->getBlobClient()->deleteBlob($this->containerName, $urn);
}
+
+ public function objectExists($urn) {
+ try {
+ $this->getBlobClient()->getBlobMetadata($this->containerName, $urn);
+ return true;
+ } catch (ServiceException $e) {
+ if ($e->getCode() === 404) {
+ return false;
+ } else {
+ throw $e;
+ }
+ }
+ }
}
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
index 26db551a384..7ee1c8e2055 100644
--- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php
+++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
@@ -436,7 +436,10 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
$stat['mimetype'] = $mimetype;
$stat['etag'] = $this->getETag($path);
- $fileId = $this->getCache()->put($path, $stat);
+ $exists = $this->getCache()->inCache($path);
+ $uploadPath = $exists ? $path : $path . '.part';
+ $fileId = $this->getCache()->put($uploadPath, $stat);
+ $urn = $this->getURN($fileId);
try {
//upload to object storage
if ($size === null) {
@@ -446,22 +449,31 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common {
]);
$size = $writtenSize;
});
- $this->objectStore->writeObject($this->getURN($fileId), $countStream);
+ $this->objectStore->writeObject($urn, $countStream);
if (is_resource($countStream)) {
fclose($countStream);
}
} else {
- $this->objectStore->writeObject($this->getURN($fileId), $stream);
+ $this->objectStore->writeObject($urn, $stream);
}
} catch (\Exception $ex) {
- $this->getCache()->remove($path);
+ $this->getCache()->remove($uploadPath);
$this->logger->logException($ex, [
'app' => 'objectstore',
- 'message' => 'Could not create object ' . $this->getURN($fileId) . ' for ' . $path,
+ 'message' => 'Could not create object ' . $urn . ' for ' . $path,
]);
throw $ex; // make this bubble up
}
+ if (!$exists) {
+ if ($this->objectStore->objectExists($urn)) {
+ $this->getCache()->move($uploadPath, $path);
+ } else {
+ $this->getCache()->remove($uploadPath);
+ throw new \Exception("Object not found after writing (urn: $urn, path: $path)", 404);
+ }
+ }
+
return $size;
}
}
diff --git a/lib/private/Files/ObjectStore/S3ObjectTrait.php b/lib/private/Files/ObjectStore/S3ObjectTrait.php
index 280a8efa81c..a1110d87c8f 100644
--- a/lib/private/Files/ObjectStore/S3ObjectTrait.php
+++ b/lib/private/Files/ObjectStore/S3ObjectTrait.php
@@ -90,4 +90,8 @@ trait S3ObjectTrait {
'Key' => $urn
]);
}
+
+ public function objectExists($urn) {
+ return $this->getConnection()->doesObjectExist($this->bucket, $urn);
+ }
}
diff --git a/lib/private/Files/ObjectStore/StorageObjectStore.php b/lib/private/Files/ObjectStore/StorageObjectStore.php
index 0d35ba2ed7a..f9fc1b5a4aa 100644
--- a/lib/private/Files/ObjectStore/StorageObjectStore.php
+++ b/lib/private/Files/ObjectStore/StorageObjectStore.php
@@ -89,4 +89,7 @@ class StorageObjectStore implements IObjectStore {
$this->storage->unlink($urn);
}
+ public function objectExists($urn) {
+ return $this->storage->file_exists($urn);
+ }
}
diff --git a/lib/private/Files/ObjectStore/Swift.php b/lib/private/Files/ObjectStore/Swift.php
index e379e54d018..3d6bf9d69da 100644
--- a/lib/private/Files/ObjectStore/Swift.php
+++ b/lib/private/Files/ObjectStore/Swift.php
@@ -128,4 +128,7 @@ class Swift implements IObjectStore {
$this->getContainer()->delete();
}
+ public function objectExists($urn) {
+ return $this->getContainer()->objectExists($urn);
+ }
}
diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php
index 3ff534b4e64..1034026327b 100644
--- a/lib/private/Files/ObjectStore/SwiftFactory.php
+++ b/lib/private/Files/ObjectStore/SwiftFactory.php
@@ -33,6 +33,7 @@ use OCP\ICache;
use OCP\ILogger;
use OpenStack\Common\Error\BadResponseError;
use OpenStack\Common\Auth\Token;
+use OpenStack\Identity\v2\Models\Catalog;
use OpenStack\Identity\v2\Service as IdentityV2Service;
use OpenStack\Identity\v3\Service as IdentityV3Service;
use OpenStack\OpenStack;
@@ -47,6 +48,13 @@ class SwiftFactory {
private $container = null;
private $logger;
+ const DEFAULT_OPTIONS = [
+ 'autocreate' => false,
+ 'urlType' => 'publicURL',
+ 'catalogName' => 'swift',
+ 'catalogType' => 'object-store'
+ ];
+
public function __construct(ICache $cache, array $params, ILogger $logger) {
$this->cache = $cache;
$this->params = $params;
@@ -62,11 +70,21 @@ class SwiftFactory {
}
}
- private function cacheToken(Token $token, string $cacheKey) {
+ private function cacheToken(Token $token, string $serviceUrl, string $cacheKey) {
if ($token instanceof \OpenStack\Identity\v3\Models\Token) {
+ // for v3 the catalog is cached as part of the token, so no need to cache $serviceUrl separately
$value = json_encode($token->export());
} else {
- $value = json_encode($token);
+ /** @var \OpenStack\Identity\v2\Models\Token $token */
+ $value = json_encode([
+ 'serviceUrl' => $serviceUrl,
+ 'token' => [
+ 'issued_at' => $token->issuedAt->format('c'),
+ 'expires' => $token->expires->format('c'),
+ 'id' => $token->id,
+ 'tenant' => $token->tenant
+ ]
+ ]);
}
$this->cache->set($cacheKey . '/token', $value);
}
@@ -82,10 +100,6 @@ class SwiftFactory {
if (!isset($this->params['container'])) {
$this->params['container'] = 'nextcloud';
}
- if (!isset($this->params['autocreate'])) {
- // should only be true for tests
- $this->params['autocreate'] = false;
- }
if (isset($this->params['user']) && is_array($this->params['user'])) {
$userName = $this->params['user']['name'];
} else {
@@ -97,6 +111,7 @@ class SwiftFactory {
if (!isset($this->params['tenantName']) && isset($this->params['tenant'])) {
$this->params['tenantName'] = $this->params['tenant'];
}
+ $this->params = array_merge(self::DEFAULT_OPTIONS, $this->params);
$cacheKey = $userName . '@' . $this->params['url'] . '/' . $this->params['container'];
$token = $this->getCachedToken($cacheKey);
@@ -114,7 +129,7 @@ class SwiftFactory {
return $this->auth(IdentityV3Service::factory($httpClient), $cacheKey);
} else {
- return $this->auth(IdentityV2Service::factory($httpClient), $cacheKey);
+ return $this->auth(SwiftV2CachingAuthService::factory($httpClient), $cacheKey);
}
}
@@ -127,25 +142,41 @@ class SwiftFactory {
private function auth($authService, string $cacheKey) {
$this->params['identityService'] = $authService;
$this->params['authUrl'] = $this->params['url'];
- $client = new OpenStack($this->params);
$cachedToken = $this->params['cachedToken'];
$hasValidCachedToken = false;
- if (\is_array($cachedToken) && ($authService instanceof IdentityV3Service)) {
- $token = $authService->generateTokenFromCache($cachedToken);
- if (\is_null($token->catalog)) {
- $this->logger->warning('Invalid cached token for swift, no catalog set: ' . json_encode($cachedToken));
- } else if ($token->hasExpired()) {
- $this->logger->debug('Cached token for swift expired');
+ if (\is_array($cachedToken)) {
+ if ($authService instanceof IdentityV3Service) {
+ $token = $authService->generateTokenFromCache($cachedToken);
+ if (\is_null($token->catalog)) {
+ $this->logger->warning('Invalid cached token for swift, no catalog set: ' . json_encode($cachedToken));
+ } else if ($token->hasExpired()) {
+ $this->logger->debug('Cached token for swift expired');
+ } else {
+ $hasValidCachedToken = true;
+ }
} else {
- $hasValidCachedToken = true;
+ try {
+ /** @var \OpenStack\Identity\v2\Models\Token $token */
+ $token = $authService->model(\OpenStack\Identity\v2\Models\Token::class, $cachedToken['token']);
+ $now = new \DateTimeImmutable("now");
+ if ($token->expires > $now) {
+ $hasValidCachedToken = true;
+ $this->params['v2cachedToken'] = $token;
+ $this->params['v2serviceUrl'] = $cachedToken['serviceUrl'];
+ } else {
+ $this->logger->debug('Cached token for swift expired');
+ }
+ } catch (\Exception $e) {
+ $this->logger->logException($e);
+ }
}
}
if (!$hasValidCachedToken) {
try {
- $token = $authService->generateToken($this->params);
- $this->cacheToken($token, $cacheKey);
+ list($token, $serviceUrl) = $authService->authenticate($this->params);
+ $this->cacheToken($token, $serviceUrl, $cacheKey);
} catch (ConnectException $e) {
throw new StorageAuthException('Failed to connect to keystone, verify the keystone url', $e);
} catch (ClientException $e) {
@@ -164,6 +195,9 @@ class SwiftFactory {
}
}
+
+ $client = new OpenStack($this->params);
+
return $client;
}
diff --git a/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php b/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php
new file mode 100644
index 00000000000..38f1e54dac3
--- /dev/null
+++ b/lib/private/Files/ObjectStore/SwiftV2CachingAuthService.php
@@ -0,0 +1,35 @@
+<?php declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2018 Robin Appelman <robin@icewind.nl>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * 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
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OC\Files\ObjectStore;
+
+
+use OpenStack\Identity\v2\Service;
+
+class SwiftV2CachingAuthService extends Service {
+ public function authenticate(array $options = []): array {
+ if (!empty($options['v2cachedToken'])) {
+ return [$options['v2cachedToken'], $options['v2serviceUrl']];
+ } else {
+ return parent::authenticate($options);
+ }
+ }
+}
diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php
index e1c1225e0cc..5485b80985b 100644
--- a/lib/private/Files/Storage/Wrapper/Encryption.php
+++ b/lib/private/Files/Storage/Wrapper/Encryption.php
@@ -1033,7 +1033,6 @@ class Encryption extends Wrapper {
// always fall back to fopen
$target = $this->fopen($path, 'w');
list($count, $result) = \OC_Helper::streamCopy($stream, $target);
- fclose($stream);
fclose($target);
return $count;
}
diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php
index 768c6484963..d291275ee95 100644
--- a/lib/private/Log/ExceptionSerializer.php
+++ b/lib/private/Log/ExceptionSerializer.php
@@ -37,6 +37,9 @@ class ExceptionSerializer {
'{closure}',
'createSessionToken',
+ // Provisioning
+ 'addUser',
+
// TokenProvider
'getToken',
'isTokenPassword',
diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php
index 76a6a1baeca..e96079a8d68 100644
--- a/lib/private/Share/Share.php
+++ b/lib/private/Share/Share.php
@@ -85,7 +85,7 @@ class Share extends Constants {
'supportedFileExtensions' => $supportedFileExtensions
);
if(count(self::$backendTypes) === 1) {
- Util::addScript('core', 'merged-share-backend');
+ Util::addScript('core', 'dist/share_backend');
}
return true;
}
diff --git a/lib/private/Template/IconsCacher.php b/lib/private/Template/IconsCacher.php
index 0d838c4d06d..9cd4f8bca10 100644
--- a/lib/private/Template/IconsCacher.php
+++ b/lib/private/Template/IconsCacher.php
@@ -185,7 +185,7 @@ class IconsCacher {
*/
public function colorizeSvg($svg, $color): string {
// add fill (fill is not present on black elements)
- $fillRe = '/<((circle|rect|path)((?!fill)[a-z0-9 =".\-#():;])+)\/>/mi';
+ $fillRe = '/<((circle|rect|path)((?!fill)[a-z0-9 =".\-#():;,])+)\/>/mi';
$svg = preg_replace($fillRe, '<$1 fill="#' . $color . '"/>', $svg);
// replace any fill or stroke colors
diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php
index 9c7da75e5fd..d0812de5f68 100644
--- a/lib/private/legacy/template.php
+++ b/lib/private/legacy/template.php
@@ -112,8 +112,6 @@ class OC_Template extends \OC\Template\Base {
OC_Util::addStyle('css-variables', null, true);
OC_Util::addStyle('server', null, true);
OC_Util::addStyle('jquery-ui-fixes',null,true);
- OC_Util::addVendorStyle('jquery-ui/themes/base/jquery-ui',null,true);
- OC_Util::addVendorStyle('select2/select2', null, true);
OC_Util::addStyle('jquery.ocdialog');
OC_Util::addTranslations("core", null, true);
OC_Util::addStyle('search', 'results');
@@ -125,30 +123,9 @@ class OC_Template extends \OC\Template\Base {
OC_Util::addScript('files/client');
OC_Util::addScript('contactsmenu');
OC_Util::addScript('contactsmenu_templates');
-
- if (\OC::$server->getConfig()->getSystemValue('debug')) {
- // Add the stuff we need always
- // following logic will import all vendor libraries that are
- // specified in core/js/core.json
- $fileContent = file_get_contents(OC::$SERVERROOT . '/core/js/core.json');
- if($fileContent !== false) {
- $coreDependencies = json_decode($fileContent, true);
- foreach(array_reverse($coreDependencies['vendor']) as $vendorLibrary) {
- //remove trailing ".js" as addVendorScript will append it
- OC_Util::addVendorScript(
- substr($vendorLibrary, 0, -3),null,true);
- }
- } else {
- throw new \Exception('Cannot read core/js/core.json');
- }
- } else {
- // Import all (combined) default vendor libraries
- OC_Util::addVendorScript('core', null, true);
- }
+ OC_Util::addScript('core', 'dist/main', true);
if (\OC::$server->getRequest()->isUserAgent([\OC\AppFramework\Http\Request::USER_AGENT_IE])) {
- // polyfill for btoa/atob for IE friends
- OC_Util::addVendorScript('base64/base64');
// shim for the davclient.js library
\OCP\Util::addScript('files/iedavclient');
}
diff --git a/lib/public/AppFramework/Http/ContentSecurityPolicy.php b/lib/public/AppFramework/Http/ContentSecurityPolicy.php
index 68aa4b5ddb4..c12fbc7561e 100644
--- a/lib/public/AppFramework/Http/ContentSecurityPolicy.php
+++ b/lib/public/AppFramework/Http/ContentSecurityPolicy.php
@@ -86,7 +86,9 @@ class ContentSecurityPolicy extends EmptyContentSecurityPolicy {
protected $allowedChildSrcDomains = [];
/** @var array Domains which can embed this Nextcloud instance */
- protected $allowedFrameAncestors = [];
+ protected $allowedFrameAncestors = [
+ '\'self\'',
+ ];
/** @var array Domains from which web-workers can be loaded */
protected $allowedWorkerSrcDomains = [];
diff --git a/lib/public/Contacts/IManager.php b/lib/public/Contacts/IManager.php
index ec399c37eb4..e744a92d9e2 100644
--- a/lib/public/Contacts/IManager.php
+++ b/lib/public/Contacts/IManager.php
@@ -154,13 +154,25 @@ interface IManager {
public function register(\Closure $callable);
/**
+ * Return a list of the user's addressbooks display names
+ *
* @return array
* @since 6.0.0
+ * @deprecated 16.0.0 - Use `$this->getUserAddressBooks()` instead
*/
public function getAddressBooks();
/**
+ * Return a list of the user's addressbooks
+ *
+ * @return IAddressBook[]
+ * @since 16.0.0
+ */
+ public function getUserAddressBooks();
+
+ /**
* removes all registered address book instances
+ *
* @return void
* @since 6.0.0
*/
diff --git a/lib/public/Files/ObjectStore/IObjectStore.php b/lib/public/Files/ObjectStore/IObjectStore.php
index 628fd5852da..83c4b1065d6 100644
--- a/lib/public/Files/ObjectStore/IObjectStore.php
+++ b/lib/public/Files/ObjectStore/IObjectStore.php
@@ -63,4 +63,13 @@ interface IObjectStore {
* @since 7.0.0
*/
public function deleteObject($urn);
+
+ /**
+ * Check if an object exists in the object store
+ *
+ * @param string $urn
+ * @return bool
+ * @since 16.0.0
+ */
+ public function objectExists($urn);
}
diff --git a/lib/public/IAddressBook.php b/lib/public/IAddressBook.php
index 4739e6f0c5b..c666311ffb2 100644
--- a/lib/public/IAddressBook.php
+++ b/lib/public/IAddressBook.php
@@ -46,6 +46,13 @@ namespace OCP {
public function getKey();
/**
+ * @return string defining the unique uri
+ * @since 16.0.0
+ * @return string
+ */
+ public function getUri(): string;
+
+ /**
* In comparison to getKey() this function returns a human readable (maybe translated) name
* @return mixed
* @since 5.0.0