diff options
Diffstat (limited to 'apps/federatedfilesharing')
-rw-r--r-- | apps/federatedfilesharing/appinfo/app.php | 4 | ||||
-rw-r--r-- | apps/federatedfilesharing/l10n/zh_CN.js | 4 | ||||
-rw-r--r-- | apps/federatedfilesharing/l10n/zh_CN.json | 4 | ||||
-rw-r--r-- | apps/federatedfilesharing/tests/TestCase.php | 18 |
4 files changed, 22 insertions, 8 deletions
diff --git a/apps/federatedfilesharing/appinfo/app.php b/apps/federatedfilesharing/appinfo/app.php index 4a5492b0f15..b6a145bcc2c 100644 --- a/apps/federatedfilesharing/appinfo/app.php +++ b/apps/federatedfilesharing/appinfo/app.php @@ -24,7 +24,6 @@ use OCA\FederatedFileSharing\Notifier; $app = new \OCA\FederatedFileSharing\AppInfo\Application(); -$l = \OC::$server->getL10N('files_sharing'); $eventDispatcher = \OC::$server->getEventDispatcher(); $app->registerSettings(); @@ -32,7 +31,8 @@ $app->registerSettings(); $manager = \OC::$server->getNotificationManager(); $manager->registerNotifier(function() { return \OC::$server->query(Notifier::class); -}, function() use ($l) { +}, function() { + $l = \OC::$server->getL10N('files_sharing'); return [ 'id' => 'files_sharing', 'name' => $l->t('Federated sharing'), diff --git a/apps/federatedfilesharing/l10n/zh_CN.js b/apps/federatedfilesharing/l10n/zh_CN.js index 9e3c5700328..6c675674bf0 100644 --- a/apps/federatedfilesharing/l10n/zh_CN.js +++ b/apps/federatedfilesharing/l10n/zh_CN.js @@ -29,9 +29,13 @@ OC.L10N.register( "File is already shared with %s" : "文件已经共享与 %s", "Sharing %s failed, could not find %s, maybe the server is currently unreachable or uses a self-signed certificate." : "共享 %s 失败, 无法找到 %s, 可能该服务器当前无法访问或者使用自签名证书.", "Could not find share" : "没有发现共享", + "You received \"%3$s\" as a remote share from %1$s (on behalf of %2$s)" : "你得到“%3$s\"做为远程分享从”%1$s(代替\"%2$s)", + "You received {share} as a remote share from {user} (on behalf of {behalf})" : "你得到[共享]是从[用户]做为远程共享(代替原来的)", + "You received \"%3$s\" as a remote share from %1$s" : "你从“%1$s\"得到\"%3$s\"做为远程共享", "You received {share} as a remote share from {user}" : "您从 {user} 收到了 {share} 作为远程共享", "Accept" : "接受", "Decline" : "拒绝", + "Share with me through my #Nextcloud Federated Cloud ID, see %s" : "通过我的联合云ID,分享给我,看%s", "Share with me through my #Nextcloud Federated Cloud ID" : "通过我的#Nextcloud联合云ID与我共享", "Federated Cloud Sharing" : "联合云共享", "Open documentation" : "打开文档", diff --git a/apps/federatedfilesharing/l10n/zh_CN.json b/apps/federatedfilesharing/l10n/zh_CN.json index 552ee8596c5..239cee71b1c 100644 --- a/apps/federatedfilesharing/l10n/zh_CN.json +++ b/apps/federatedfilesharing/l10n/zh_CN.json @@ -27,9 +27,13 @@ "File is already shared with %s" : "文件已经共享与 %s", "Sharing %s failed, could not find %s, maybe the server is currently unreachable or uses a self-signed certificate." : "共享 %s 失败, 无法找到 %s, 可能该服务器当前无法访问或者使用自签名证书.", "Could not find share" : "没有发现共享", + "You received \"%3$s\" as a remote share from %1$s (on behalf of %2$s)" : "你得到“%3$s\"做为远程分享从”%1$s(代替\"%2$s)", + "You received {share} as a remote share from {user} (on behalf of {behalf})" : "你得到[共享]是从[用户]做为远程共享(代替原来的)", + "You received \"%3$s\" as a remote share from %1$s" : "你从“%1$s\"得到\"%3$s\"做为远程共享", "You received {share} as a remote share from {user}" : "您从 {user} 收到了 {share} 作为远程共享", "Accept" : "接受", "Decline" : "拒绝", + "Share with me through my #Nextcloud Federated Cloud ID, see %s" : "通过我的联合云ID,分享给我,看%s", "Share with me through my #Nextcloud Federated Cloud ID" : "通过我的#Nextcloud联合云ID与我共享", "Federated Cloud Sharing" : "联合云共享", "Open documentation" : "打开文档", diff --git a/apps/federatedfilesharing/tests/TestCase.php b/apps/federatedfilesharing/tests/TestCase.php index 7ccf76bbbc6..b31772e4e9e 100644 --- a/apps/federatedfilesharing/tests/TestCase.php +++ b/apps/federatedfilesharing/tests/TestCase.php @@ -42,7 +42,7 @@ abstract class TestCase extends \Test\TestCase { // reset backend \OC_User::clearBackends(); - \OC_Group::clearBackends(); + \OC::$server->getGroupManager()->clearBackends(); // create users $backend = new \Test\Util\User\Dummy(); @@ -76,8 +76,8 @@ abstract class TestCase extends \Test\TestCase { // reset backend \OC_User::clearBackends(); \OC_User::useBackend('database'); - \OC_Group::clearBackends(); - \OC_Group::useBackend(new Database()); + \OC::$server->getGroupManager()->clearBackends(); + \OC::$server->getGroupManager()->addBackend(new Database()); parent::tearDownAfterClass(); } @@ -94,9 +94,15 @@ abstract class TestCase extends \Test\TestCase { } if ($create) { - \OC::$server->getUserManager()->createUser($user, $password); - \OC_Group::createGroup('group'); - \OC_Group::addToGroup($user, 'group'); + $userManager = \OC::$server->getUserManager(); + $groupManager = \OC::$server->getGroupManager(); + + $userObject = $userManager->createUser($user, $password); + $group = $groupManager->createGroup('group'); + + if ($group and $userObject) { + $group->addUser($userObject); + } } self::resetStorage(); |