aboutsummaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing
diff options
context:
space:
mode:
Diffstat (limited to 'apps/federatedfilesharing')
-rw-r--r--apps/federatedfilesharing/l10n/eu.js10
-rw-r--r--apps/federatedfilesharing/l10n/eu.json10
-rw-r--r--apps/federatedfilesharing/lib/AddressHandler.php4
-rw-r--r--apps/federatedfilesharing/lib/FederatedShareProvider.php2
-rw-r--r--apps/federatedfilesharing/lib/Notifications.php8
-rw-r--r--apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php4
-rw-r--r--apps/federatedfilesharing/tests/AddressHandlerTest.php20
-rw-r--r--apps/federatedfilesharing/tests/FederatedShareProviderTest.php4
8 files changed, 41 insertions, 21 deletions
diff --git a/apps/federatedfilesharing/l10n/eu.js b/apps/federatedfilesharing/l10n/eu.js
index a9e4cc36d63..c4cf91f45f3 100644
--- a/apps/federatedfilesharing/l10n/eu.js
+++ b/apps/federatedfilesharing/l10n/eu.js
@@ -16,11 +16,17 @@ OC.L10N.register(
"Couldn't establish a federated share." : "Ezin izan da urruneko partekatze federatua gehitu.",
"Couldn't establish a federated share, maybe the password was wrong." : "Ezin izan da urruneko partekatze federatua gehitu, agian pasahitza gaizki dago.",
"Federated Share request sent, you will receive an invitation. Check your notifications." : "Federatutako partekatze eskaera bidali da, gonbidapena jasoko duzu. Notifikazioak begiratu.",
+ "Couldn't establish a federated share, it looks like the server to federate with is too old (Nextcloud <= 9)." : "Ezin izan da federatutako partekatze bat ezarri, badirudi federatu nahi duzun zerbitzaria zaharregia dela (Nextcloud <= 9).",
+ "It is not allowed to send federated group shares from this server." : "Ezin dira federatutako talde-partekatzeak bidali zerbitzari honetatik.",
+ "Sharing %1$s failed, because this item is already shared with %2$s" : "%1$s partekatzeak hutsi egin du, elementu hau jada %2$s-rekin partekatuta dagoelako.",
"Not allowed to create a federated share with the same user" : "Ezin da erabiltzaile berdinarekin federatutako partekatzea sortu.",
"File is already shared with %s" : "Fitxategia 1%s-rekin partekatua dago iada",
+ "Sharing %1$s failed, could not find %2$s, maybe the server is currently unreachable or uses a self-signed certificate." : "%1$s partekatzeak huts egin du, ezin izan da %2$s aurkitu, agian zerbitzaria lineaz kanpo dago edo bere buruak sinatutako ziurtagiria darabil.",
"Could not find share" : "Ezin da partekatzea topatu",
"Federated sharing" : "Federatutako partekatzea",
+ "You received \"%3$s\" as a remote share from %4$s (%1$s) (on behalf of %5$s (%2$s))" : "\"%3$s\" jaso duzu urruneko partekatze gisa %4$s-tik (%1$s) (%5$s(%2$s)-en izenean) ",
"You received {share} as a remote share from {user} (on behalf of {behalf})" : "{user}-en {share} urruneko partekatze bezala jaso duzu ({behalf} ordez)",
+ "You received \"%3$s\" as a remote share from %4$s (%1$s)" : "\"%3$s\" jaso duzu urruneko partekatze gisa %4$s(%1$s)-tik",
"You received {share} as a remote share from {user}" : "{user}-en {share} urruneko partekatze bezala jaso duzu",
"Accept" : "Onartu",
"Decline" : "Ezeztatu",
@@ -28,14 +34,18 @@ OC.L10N.register(
"Share with me through my #Nextcloud Federated Cloud ID" : "Nirekin partekatu #Nextcloud Federatutako Hodei IDa erabiliz, ",
"Sharing" : "Partekatzea",
"Federated file sharing" : "Fitxategien partekatze federatua",
+ "Provide federated file sharing across servers" : "Zerbitzarien arteko federatutako partekatzea eskaini",
"Federated Cloud Sharing" : "Federatutako Hodei Partekatzea",
"Open documentation" : "Ireki dokumentazioa",
"Adjust how people can share between servers." : "Pertsonen zerbitzarien arteko partekatzea konfiguratu",
"Allow users on this server to send shares to other servers" : "Baimendu zerbitzari honetako erabiltzaileak beste zerbitzariekin partekatzera",
"Allow users on this server to receive shares from other servers" : "Baimendu zerbitzari honetako erabiltzaileak beste zerbitzarietatik partekatutakoak jasotzen",
+ "Allow users on this server to send shares to groups on other servers" : "Baimendu zerbitzari honetako erabiltzaileei beste zerbitzari batzuetako taldeei elementuak partekatzen.",
+ "Allow users on this server to receive group shares from other servers" : "Baimendu zerbitzari honetako erabiltzaileek beste zerbitzari batzuetako talde-partekatzeak jasotzen.",
"Search global and public address book for users" : "Helbide liburu global eta publikoetak erabiltzaileak bilatu",
"Allow users to publish their data to a global and public address book" : "Erabiltzaileei bere datuak helbide-liburu publiko eta orokorrean publikatzea baimendu",
"Federated Cloud" : "Hodei Federatua",
+ "You can share with anyone who uses a Nextcloud server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com" : "Nextcloud zerbitzaria edo Open Cloud Mesh (OCM) zerbitzuarekin bateragarri den zerbitzuak erabiltzen duen edonorekin partekatu dezakezu! Ipini beren Federatutako Hodei IDa partekatze leihoan. Horrelako zerbait izan ohi da: erabiltzailea@nextcloud.zerbitzaria.com",
"Your Federated Cloud ID:" : "Federatutatako Hodei ID:",
"Share it so your friends can share files with you:" : "Partekatu zure lagunek fitxategiak zurekin partekatzeko:",
"Add to your website" : "Zure webgunera gehitu",
diff --git a/apps/federatedfilesharing/l10n/eu.json b/apps/federatedfilesharing/l10n/eu.json
index 42b9b794758..d333a46d9cf 100644
--- a/apps/federatedfilesharing/l10n/eu.json
+++ b/apps/federatedfilesharing/l10n/eu.json
@@ -14,11 +14,17 @@
"Couldn't establish a federated share." : "Ezin izan da urruneko partekatze federatua gehitu.",
"Couldn't establish a federated share, maybe the password was wrong." : "Ezin izan da urruneko partekatze federatua gehitu, agian pasahitza gaizki dago.",
"Federated Share request sent, you will receive an invitation. Check your notifications." : "Federatutako partekatze eskaera bidali da, gonbidapena jasoko duzu. Notifikazioak begiratu.",
+ "Couldn't establish a federated share, it looks like the server to federate with is too old (Nextcloud <= 9)." : "Ezin izan da federatutako partekatze bat ezarri, badirudi federatu nahi duzun zerbitzaria zaharregia dela (Nextcloud <= 9).",
+ "It is not allowed to send federated group shares from this server." : "Ezin dira federatutako talde-partekatzeak bidali zerbitzari honetatik.",
+ "Sharing %1$s failed, because this item is already shared with %2$s" : "%1$s partekatzeak hutsi egin du, elementu hau jada %2$s-rekin partekatuta dagoelako.",
"Not allowed to create a federated share with the same user" : "Ezin da erabiltzaile berdinarekin federatutako partekatzea sortu.",
"File is already shared with %s" : "Fitxategia 1%s-rekin partekatua dago iada",
+ "Sharing %1$s failed, could not find %2$s, maybe the server is currently unreachable or uses a self-signed certificate." : "%1$s partekatzeak huts egin du, ezin izan da %2$s aurkitu, agian zerbitzaria lineaz kanpo dago edo bere buruak sinatutako ziurtagiria darabil.",
"Could not find share" : "Ezin da partekatzea topatu",
"Federated sharing" : "Federatutako partekatzea",
+ "You received \"%3$s\" as a remote share from %4$s (%1$s) (on behalf of %5$s (%2$s))" : "\"%3$s\" jaso duzu urruneko partekatze gisa %4$s-tik (%1$s) (%5$s(%2$s)-en izenean) ",
"You received {share} as a remote share from {user} (on behalf of {behalf})" : "{user}-en {share} urruneko partekatze bezala jaso duzu ({behalf} ordez)",
+ "You received \"%3$s\" as a remote share from %4$s (%1$s)" : "\"%3$s\" jaso duzu urruneko partekatze gisa %4$s(%1$s)-tik",
"You received {share} as a remote share from {user}" : "{user}-en {share} urruneko partekatze bezala jaso duzu",
"Accept" : "Onartu",
"Decline" : "Ezeztatu",
@@ -26,14 +32,18 @@
"Share with me through my #Nextcloud Federated Cloud ID" : "Nirekin partekatu #Nextcloud Federatutako Hodei IDa erabiliz, ",
"Sharing" : "Partekatzea",
"Federated file sharing" : "Fitxategien partekatze federatua",
+ "Provide federated file sharing across servers" : "Zerbitzarien arteko federatutako partekatzea eskaini",
"Federated Cloud Sharing" : "Federatutako Hodei Partekatzea",
"Open documentation" : "Ireki dokumentazioa",
"Adjust how people can share between servers." : "Pertsonen zerbitzarien arteko partekatzea konfiguratu",
"Allow users on this server to send shares to other servers" : "Baimendu zerbitzari honetako erabiltzaileak beste zerbitzariekin partekatzera",
"Allow users on this server to receive shares from other servers" : "Baimendu zerbitzari honetako erabiltzaileak beste zerbitzarietatik partekatutakoak jasotzen",
+ "Allow users on this server to send shares to groups on other servers" : "Baimendu zerbitzari honetako erabiltzaileei beste zerbitzari batzuetako taldeei elementuak partekatzen.",
+ "Allow users on this server to receive group shares from other servers" : "Baimendu zerbitzari honetako erabiltzaileek beste zerbitzari batzuetako talde-partekatzeak jasotzen.",
"Search global and public address book for users" : "Helbide liburu global eta publikoetak erabiltzaileak bilatu",
"Allow users to publish their data to a global and public address book" : "Erabiltzaileei bere datuak helbide-liburu publiko eta orokorrean publikatzea baimendu",
"Federated Cloud" : "Hodei Federatua",
+ "You can share with anyone who uses a Nextcloud server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com" : "Nextcloud zerbitzaria edo Open Cloud Mesh (OCM) zerbitzuarekin bateragarri den zerbitzuak erabiltzen duen edonorekin partekatu dezakezu! Ipini beren Federatutako Hodei IDa partekatze leihoan. Horrelako zerbait izan ohi da: erabiltzailea@nextcloud.zerbitzaria.com",
"Your Federated Cloud ID:" : "Federatutatako Hodei ID:",
"Share it so your friends can share files with you:" : "Partekatu zure lagunek fitxategiak zurekin partekatzeko:",
"Add to your website" : "Zure webgunera gehitu",
diff --git a/apps/federatedfilesharing/lib/AddressHandler.php b/apps/federatedfilesharing/lib/AddressHandler.php
index 7a272781fe6..113978bab82 100644
--- a/apps/federatedfilesharing/lib/AddressHandler.php
+++ b/apps/federatedfilesharing/lib/AddressHandler.php
@@ -106,12 +106,12 @@ class AddressHandler {
\OCP\Util::emitHook(
'\OCA\Files_Sharing\API\Server2Server',
'preLoginNameUsedAsUserName',
- array('uid' => &$user1)
+ ['uid' => &$user1]
);
\OCP\Util::emitHook(
'\OCA\Files_Sharing\API\Server2Server',
'preLoginNameUsedAsUserName',
- array('uid' => &$user2)
+ ['uid' => &$user2]
);
if ($user1 === $user2) {
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php
index 575e3cdff57..5d44643899a 100644
--- a/apps/federatedfilesharing/lib/FederatedShareProvider.php
+++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php
@@ -187,7 +187,7 @@ class FederatedShareProvider implements IShareProvider {
$alreadySharedGroup = $this->getSharedWith($shareWith, \OCP\Share::SHARE_TYPE_REMOTE_GROUP, $share->getNode(), 1, 0);
if (!empty($alreadyShared) || !empty($alreadySharedGroup)) {
$message = 'Sharing %1$s failed, because this item is already shared with %2$s';
- $message_t = $this->l->t('Sharing %1$s failed, because this item is already shared with %2$s', array($share->getNode()->getName(), $shareWith));
+ $message_t = $this->l->t('Sharing %1$s failed, because this item is already shared with %2$s', [$share->getNode()->getName(), $shareWith]);
$this->logger->debug(sprintf($message, $share->getNode()->getName(), $shareWith), ['app' => 'Federated File Sharing']);
throw new \Exception($message_t);
}
diff --git a/apps/federatedfilesharing/lib/Notifications.php b/apps/federatedfilesharing/lib/Notifications.php
index 5df2173263c..70cf11c7672 100644
--- a/apps/federatedfilesharing/lib/Notifications.php
+++ b/apps/federatedfilesharing/lib/Notifications.php
@@ -99,7 +99,7 @@ class Notifications {
if ($user && $remote) {
$local = $this->addressHandler->generateRemoteURL();
- $fields = array(
+ $fields = [
'shareWith' => $user,
'token' => $token,
'name' => $name,
@@ -110,7 +110,7 @@ class Notifications {
'sharedByFederatedId' => $sharedByFederatedId,
'remote' => $local,
'shareType' => $shareType
- );
+ ];
$result = $this->tryHttpPostToShareEndpoint($remote, '', $fields);
$status = json_decode($result['result'], true);
@@ -144,12 +144,12 @@ class Notifications {
*/
public function requestReShare($token, $id, $shareId, $remote, $shareWith, $permission, $filename) {
- $fields = array(
+ $fields = [
'shareWith' => $shareWith,
'token' => $token,
'permission' => $permission,
'remoteId' => $shareId,
- );
+ ];
$ocmFields = $fields;
$ocmFields['remoteId'] = $id;
diff --git a/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php b/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
index e2e2f26ad3a..c87d4e273fc 100644
--- a/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
+++ b/apps/federatedfilesharing/lib/ocm/CloudFederationProviderFiles.php
@@ -215,7 +215,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
Util::emitHook(
'\OCA\Files_Sharing\API\Server2Server',
'preLoginNameUsedAsUserName',
- array('uid' => &$shareWith)
+ ['uid' => &$shareWith]
);
$this->logger->debug('shareWith after, ' . $shareWith, ['app' => 'files_sharing']);
@@ -774,7 +774,7 @@ class CloudFederationProviderFiles implements ICloudFederationProvider {
} catch (NotFoundException $e) {
$file = null;
}
- $args = Filesystem::is_dir($file) ? array('dir' => $file) : array('dir' => dirname($file), 'scrollto' => $file);
+ $args = Filesystem::is_dir($file) ? ['dir' => $file] : ['dir' => dirname($file), 'scrollto' => $file];
$link = Util::linkToAbsolute('files', 'index.php', $args);
return [$file, $link];
diff --git a/apps/federatedfilesharing/tests/AddressHandlerTest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php
index d6a7bdaf292..f69bc4209d3 100644
--- a/apps/federatedfilesharing/tests/AddressHandlerTest.php
+++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php
@@ -104,21 +104,21 @@ class AddressHandlerTest extends \Test\TestCase {
}
public function dataTestSplitUserRemoteError() {
- return array(
+ return [
// Invalid path
- array('user@'),
+ ['user@'],
// Invalid user
- array('@server'),
- array('us/er@server'),
- array('us:er@server'),
+ ['@server'],
+ ['us/er@server'],
+ ['us:er@server'],
// Invalid splitting
- array('user'),
- array(''),
- array('us/erserver'),
- array('us:erserver'),
- );
+ ['user'],
+ [''],
+ ['us/erserver'],
+ ['us:erserver'],
+ ];
}
/**
diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
index c8acdd3df53..ecac809d434 100644
--- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
+++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
@@ -97,9 +97,9 @@ class FederatedShareProviderTest extends \Test\TestCase {
->getMock();
$this->l = $this->getMockBuilder(IL10N::class)->getMock();
$this->l->method('t')
- ->will($this->returnCallback(function($text, $parameters = []) {
+ ->willReturnCallback(function($text, $parameters = []) {
return vsprintf($text, $parameters);
- }));
+ });
$this->logger = $this->getMockBuilder(ILogger::class)->getMock();
$this->rootFolder = $this->getMockBuilder('OCP\Files\IRootFolder')->getMock();
$this->config = $this->getMockBuilder(IConfig::class)->getMock();