Merge pull request #27039 from nextcloud/fix/2973/rename-external-storages

Rename External storages to External storage
This commit is contained in:
Morris Jobke 2021-05-21 11:09:52 +02:00 committed by GitHub
commit b2c2f32968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 24 additions and 24 deletions

View File

@ -43,7 +43,7 @@ $appContainer = \OCA\Files_External\MountConfig::$app->getContainer();
'appname' => 'files_external', 'appname' => 'files_external',
'script' => 'list.php', 'script' => 'list.php',
'order' => 30, 'order' => 30,
'name' => $l->t('External storages'), 'name' => $l->t('External storage'),
]; ];
}); });

View File

@ -34,7 +34,7 @@ OCA.Files_External.App = {
); );
this._extendFileList(this.fileList); this._extendFileList(this.fileList);
this.fileList.appName = t('files_external', 'External storages'); this.fileList.appName = t('files_external', 'External storage');
return this.fileList; return this.fileList;
}, },

View File

@ -28,7 +28,7 @@
FileList.prototype = _.extend({}, OCA.Files.FileList.prototype, FileList.prototype = _.extend({}, OCA.Files.FileList.prototype,
/** @lends OCA.Files_External.FileList.prototype */ { /** @lends OCA.Files_External.FileList.prototype */ {
appName: 'External storages', appName: 'External storage',
_allowSelection: false, _allowSelection: false,

View File

@ -33,7 +33,7 @@ use OC\Files\Filesystem;
use OCA\Files_External\Lib\StorageConfig; use OCA\Files_External\Lib\StorageConfig;
/** /**
* Service class to manage global external storages * Service class to manage global external storage
*/ */
class GlobalStoragesService extends StoragesService { class GlobalStoragesService extends StoragesService {
/** /**

View File

@ -97,7 +97,7 @@ abstract class LegacyStoragesService {
} }
/** /**
* Read the external storages config * Read the external storage config
* *
* @return StorageConfig[] map of storage id to storage config * @return StorageConfig[] map of storage id to storage config
*/ */

View File

@ -45,7 +45,7 @@ use OCP\Files\StorageNotAvailableException;
use OCP\ILogger; use OCP\ILogger;
/** /**
* Service class to manage external storages * Service class to manage external storage
*/ */
abstract class StoragesService { abstract class StoragesService {
@ -125,7 +125,7 @@ abstract class StoragesService {
} }
/** /**
* Read the external storages config * Read the external storage config
* *
* @return array map of storage id to storage config * @return array map of storage id to storage config
*/ */

View File

@ -36,7 +36,7 @@ use OCP\Files\Config\IUserMountCache;
use OCP\IUserSession; use OCP\IUserSession;
/** /**
* Service class to manage user external storages * Service class to manage user external storage
* (aka personal storages) * (aka personal storages)
*/ */
class UserStoragesService extends StoragesService { class UserStoragesService extends StoragesService {

View File

@ -60,7 +60,7 @@ class Section implements IIconSection {
* @return string * @return string
*/ */
public function getName() { public function getName() {
return $this->l->t('External storages'); return $this->l->t('External storage');
} }
/** /**

View File

@ -101,7 +101,7 @@ $canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN ||
</div> </div>
<form data-can-create="<?php echo $canCreateMounts?'true':'false' ?>" id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>"> <form data-can-create="<?php echo $canCreateMounts?'true':'false' ?>" id="files_external" class="section" data-encryption-enabled="<?php echo $_['encryptionEnabled']?'true': 'false'; ?>">
<h2 class="inlineblock" data-anchor-name="external-storage"><?php p($l->t('External storages')); ?></h2> <h2 class="inlineblock" data-anchor-name="external-storage"><?php p($l->t('External storage')); ?></h2>
<a target="_blank" rel="noreferrer" class="icon-info" title="<?php p($l->t('Open documentation'));?>" href="<?php p(link_to_docs('admin-external-storage')); ?>"></a> <a target="_blank" rel="noreferrer" class="icon-info" title="<?php p($l->t('Open documentation'));?>" href="<?php p(link_to_docs('admin-external-storage')); ?>"></a>
<p class="settings-hint"><?php p($l->t('External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow users to mount their own external storage services.')); ?></p> <p class="settings-hint"><?php p($l->t('External storage enables you to mount external storage services and devices as secondary Nextcloud storage devices. You may also allow users to mount their own external storage services.')); ?></p>
<?php if (isset($_['dependencies']) and ($_['dependencies'] !== '') and $canCreateMounts) { <?php if (isset($_['dependencies']) and ($_['dependencies'] !== '') and $canCreateMounts) {
@ -207,7 +207,7 @@ $canCreateMounts = $_['visibilityType'] === BackendService::VISIBILITY_ADMIN ||
<form autocomplete="false" action="#" <form autocomplete="false" action="#"
id="global_credentials" method="post"> id="global_credentials" method="post">
<h2><?php p($l->t('Global credentials')); ?></h2> <h2><?php p($l->t('Global credentials')); ?></h2>
<p class="settings-hint"><?php p($l->t('Global credentials can be used to authenticate with multiple external storages that have the same credentials.')); ?></p> <p class="settings-hint"><?php p($l->t('Global credentials can be used to authenticate with multiple external storage that have the same credentials.')); ?></p>
<input type="text" name="username" <input type="text" name="username"
autocomplete="false" autocomplete="false"
value="<?php p($_['globalCredentials']['user']); ?>" value="<?php p($_['globalCredentials']['user']); ?>"

View File

@ -57,10 +57,10 @@ class SectionTest extends TestCase {
$this->l $this->l
->expects($this->once()) ->expects($this->once())
->method('t') ->method('t')
->with('External storages') ->with('External storage')
->willReturn('External storages'); ->willReturn('External storage');
$this->assertSame('External storages', $this->section->getName()); $this->assertSame('External storage', $this->section->getName());
} }
public function testGetPriority() { public function testGetPriority() {

View File

@ -72,7 +72,7 @@ describe('OCA.Files_External.FileList tests', function() {
alertStub.restore(); alertStub.restore();
}); });
describe('loading file list for external storages', function() { describe('loading file list for external storage', function() {
var ocsResponse; var ocsResponse;
var reloading; var reloading;

View File

@ -71,7 +71,7 @@ class Mount extends MountPoint implements MoveableMount {
} }
/** /**
* Get the type of mount point, used to distinguish things like shares and external storages * Get the type of mount point, used to distinguish things like shares and external storage
* in the web interface * in the web interface
* *
* @return string * @return string

View File

@ -54,7 +54,7 @@ class FileName extends AbstractStringCheck implements IFileCheck {
protected function getActualValue(): string { protected function getActualValue(): string {
$fileName = $this->path === null ? '' : basename($this->path); $fileName = $this->path === null ? '' : basename($this->path);
if ($fileName === '' && (!$this->storage->isLocal() || $this->storage->instanceOfStorage(Local::class))) { if ($fileName === '' && (!$this->storage->isLocal() || $this->storage->instanceOfStorage(Local::class))) {
// Return the mountpoint name of external storages that are not mounted as user home // Return the mountpoint name of external storage that are not mounted as user home
$mountPoints = $this->mountManager->findByStorageId($this->storage->getId()); $mountPoints = $this->mountManager->findByStorageId($this->storage->getId());
if (empty($mountPoints) || $mountPoints[0]->getMountType() !== 'external') { if (empty($mountPoints) || $mountPoints[0]->getMountType() !== 'external') {
return $fileName; return $fileName;

View File

@ -24,7 +24,7 @@ Feature: external-storage
| token | A_TOKEN | | token | A_TOKEN |
| mimetype | httpd/unix-directory | | mimetype | httpd/unix-directory |
Scenario: Shares don't overwrite external storages Scenario: Shares don't overwrite external storage
Given user "user0" exists Given user "user0" exists
And user "user1" exists And user "user1" exists
And As an "user0" And As an "user0"

View File

@ -1548,7 +1548,7 @@ $CONFIG = [
/** /**
* Override where Nextcloud stores temporary files. Useful in situations where * Override where Nextcloud stores temporary files. Useful in situations where
* the system temporary directory is on a limited space ramdisk or is otherwise * the system temporary directory is on a limited space ramdisk or is otherwise
* restricted, or if external storages which do not support streaming are in * restricted, or if external storage which do not support streaming are in
* use. * use.
* *
* The Web server user must have write access to this directory. * The Web server user must have write access to this directory.
@ -1682,7 +1682,7 @@ $CONFIG = [
/** /**
* Specifies how often the local filesystem (the Nextcloud data/ directory, and * Specifies how often the local filesystem (the Nextcloud data/ directory, and
* NFS mounts in data/) is checked for changes made outside Nextcloud. This * NFS mounts in data/) is checked for changes made outside Nextcloud. This
* does not apply to external storages. * does not apply to external storage.
* *
* 0 -> Never check the filesystem for outside changes, provides a performance * 0 -> Never check the filesystem for outside changes, provides a performance
* increase when it's certain that no changes are made directly to the * increase when it's certain that no changes are made directly to the

View File

@ -1665,7 +1665,7 @@ class Manager implements IManager {
return $al; return $al;
} }
//Get node for the owner and correct the owner in case of external storages //Get node for the owner and correct the owner in case of external storage
$userFolder = $this->rootFolder->getUserFolder($owner); $userFolder = $this->rootFolder->getUserFolder($owner);
if ($path->getId() !== $userFolder->getId() && !$userFolder->isSubNode($path)) { if ($path->getId() !== $userFolder->getId() && !$userFolder->isSubNode($path)) {
$nodes = $userFolder->getById($path->getId()); $nodes = $userFolder->getById($path->getId());

View File

@ -78,7 +78,7 @@ class Streamer {
* larger than 4GiB), but it should not happen in the real world. * larger than 4GiB), but it should not happen in the real world.
* *
* We also have to check for a size above 0. As negative sizes could be * We also have to check for a size above 0. As negative sizes could be
* from not fully scanned external storages. And then things fall apart * from not fully scanned external storage. And then things fall apart
* if somebody tries to package to much. * if somebody tries to package to much.
*/ */
if ($size > 0 && $size < 4 * 1000 * 1000 * 1000 && $numberOfFiles < 65536) { if ($size > 0 && $size < 4 * 1000 * 1000 * 1000 && $numberOfFiles < 65536) {

View File

@ -111,7 +111,7 @@ interface IUserMountCache {
* Get the used space for users * Get the used space for users
* *
* Note that this only includes the space in their home directory, * Note that this only includes the space in their home directory,
* not any incoming shares or external storages. * not any incoming shares or external storage.
* *
* @param IUser[] $users * @param IUser[] $users
* @return int[] [$userId => $userSpace] * @return int[] [$userId => $userSpace]

View File

@ -121,7 +121,7 @@ interface IMountPoint {
public function getMountId(); public function getMountId();
/** /**
* Get the type of mount point, used to distinguish things like shares and external storages * Get the type of mount point, used to distinguish things like shares and external storage
* in the web interface * in the web interface
* *
* @return string * @return string