mirror of https://github.com/nextcloud/server
Use product name in places where it is appropriate rather than the instance name
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
4673b54a2c
commit
c0474ba364
|
@ -511,7 +511,8 @@ class ShareController extends AuthPublicShareController {
|
||||||
$download = new SimpleMenuAction('download', $this->l10n->t('Download'), 'icon-download', $shareTmpl['downloadURL'], 10, $shareTmpl['fileSize']);
|
$download = new SimpleMenuAction('download', $this->l10n->t('Download'), 'icon-download', $shareTmpl['downloadURL'], 10, $shareTmpl['fileSize']);
|
||||||
$downloadAll = new SimpleMenuAction('download', $this->l10n->t('Download all files'), 'icon-download', $shareTmpl['downloadURL'], 10, $shareTmpl['fileSize']);
|
$downloadAll = new SimpleMenuAction('download', $this->l10n->t('Download all files'), 'icon-download', $shareTmpl['downloadURL'], 10, $shareTmpl['fileSize']);
|
||||||
$directLink = new LinkMenuAction($this->l10n->t('Direct link'), 'icon-public', $shareTmpl['previewURL']);
|
$directLink = new LinkMenuAction($this->l10n->t('Direct link'), 'icon-public', $shareTmpl['previewURL']);
|
||||||
$externalShare = new ExternalShareMenuAction($this->l10n->t('Add to your Nextcloud'), 'icon-external', $shareTmpl['owner'], $shareTmpl['shareOwner'], $shareTmpl['filename']);
|
// TRANSLATORS The placeholder refers to the software product name as in 'Add to your Nextcloud'
|
||||||
|
$externalShare = new ExternalShareMenuAction($this->l10n->t('Add to your %s', [$this->defaults->getProductName()]), 'icon-external', $shareTmpl['owner'], $shareTmpl['shareOwner'], $shareTmpl['filename']);
|
||||||
|
|
||||||
$responseComposer = [];
|
$responseComposer = [];
|
||||||
|
|
||||||
|
|
|
@ -106,6 +106,8 @@ class ShareControllerTest extends \Test\TestCase {
|
||||||
private $eventDispatcher;
|
private $eventDispatcher;
|
||||||
/** @var IL10N */
|
/** @var IL10N */
|
||||||
private $l10n;
|
private $l10n;
|
||||||
|
/** @var Defaults|MockObject */
|
||||||
|
private $defaults;
|
||||||
|
|
||||||
protected function setUp(): void {
|
protected function setUp(): void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
@ -125,6 +127,7 @@ class ShareControllerTest extends \Test\TestCase {
|
||||||
$this->accountManager = $this->createMock(IAccountManager::class);
|
$this->accountManager = $this->createMock(IAccountManager::class);
|
||||||
$this->eventDispatcher = $this->createMock(IEventDispatcher::class);
|
$this->eventDispatcher = $this->createMock(IEventDispatcher::class);
|
||||||
$this->l10n = $this->createMock(IL10N::class);
|
$this->l10n = $this->createMock(IL10N::class);
|
||||||
|
$this->defaults = $this->createMock(Defaults::class);
|
||||||
|
|
||||||
$this->shareController = new \OCA\Files_Sharing\Controller\ShareController(
|
$this->shareController = new \OCA\Files_Sharing\Controller\ShareController(
|
||||||
$this->appName,
|
$this->appName,
|
||||||
|
@ -142,7 +145,7 @@ class ShareControllerTest extends \Test\TestCase {
|
||||||
$this->accountManager,
|
$this->accountManager,
|
||||||
$this->eventDispatcher,
|
$this->eventDispatcher,
|
||||||
$this->l10n,
|
$this->l10n,
|
||||||
$this->createMock(Defaults::class)
|
$this->defaults
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -310,6 +313,10 @@ class ShareControllerTest extends \Test\TestCase {
|
||||||
return vsprintf($text, $parameters);
|
return vsprintf($text, $parameters);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$this->defaults->expects(self::any())
|
||||||
|
->method('getProductName')
|
||||||
|
->willReturn('Nextcloud');
|
||||||
|
|
||||||
$response = $this->shareController->showShare();
|
$response = $this->shareController->showShare();
|
||||||
$sharedTmplParams = [
|
$sharedTmplParams = [
|
||||||
'owner' => 'ownerUID',
|
'owner' => 'ownerUID',
|
||||||
|
@ -457,6 +464,10 @@ class ShareControllerTest extends \Test\TestCase {
|
||||||
return vsprintf($text, $parameters);
|
return vsprintf($text, $parameters);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
$this->defaults->expects(self::any())
|
||||||
|
->method('getProductName')
|
||||||
|
->willReturn('Nextcloud');
|
||||||
|
|
||||||
$response = $this->shareController->showShare();
|
$response = $this->shareController->showShare();
|
||||||
$sharedTmplParams = [
|
$sharedTmplParams = [
|
||||||
'owner' => '',
|
'owner' => '',
|
||||||
|
|
|
@ -89,7 +89,7 @@ class WhatsNewController extends OCSController {
|
||||||
$whatsNew = $this->whatsNewService->getChangesForVersion($currentVersion);
|
$whatsNew = $this->whatsNewService->getChangesForVersion($currentVersion);
|
||||||
$resultData = [
|
$resultData = [
|
||||||
'changelogURL' => $whatsNew['changelogURL'],
|
'changelogURL' => $whatsNew['changelogURL'],
|
||||||
'product' => $this->defaults->getName(),
|
'product' => $this->defaults->getProductName(),
|
||||||
'version' => $currentVersion,
|
'version' => $currentVersion,
|
||||||
];
|
];
|
||||||
do {
|
do {
|
||||||
|
|
|
@ -239,7 +239,7 @@ class Setup {
|
||||||
'error' => $this->l10n->t(
|
'error' => $this->l10n->t(
|
||||||
'Mac OS X is not supported and %s will not work properly on this platform. ' .
|
'Mac OS X is not supported and %s will not work properly on this platform. ' .
|
||||||
'Use it at your own risk! ',
|
'Use it at your own risk! ',
|
||||||
[$this->defaults->getName()]
|
[$this->defaults->getProductName()]
|
||||||
),
|
),
|
||||||
'hint' => $this->l10n->t('For the best results, please consider using a GNU/Linux server instead.'),
|
'hint' => $this->l10n->t('For the best results, please consider using a GNU/Linux server instead.'),
|
||||||
];
|
];
|
||||||
|
@ -250,7 +250,7 @@ class Setup {
|
||||||
'error' => $this->l10n->t(
|
'error' => $this->l10n->t(
|
||||||
'It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. ' .
|
'It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. ' .
|
||||||
'This will lead to problems with files over 4 GB and is highly discouraged.',
|
'This will lead to problems with files over 4 GB and is highly discouraged.',
|
||||||
[$this->defaults->getName()]
|
[$this->defaults->getProductName()]
|
||||||
),
|
),
|
||||||
'hint' => $this->l10n->t('Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP.'),
|
'hint' => $this->l10n->t('Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP.'),
|
||||||
];
|
];
|
||||||
|
|
|
@ -293,6 +293,7 @@ class JSConfigHelper {
|
||||||
"_theme" => json_encode([
|
"_theme" => json_encode([
|
||||||
'entity' => $this->defaults->getEntity(),
|
'entity' => $this->defaults->getEntity(),
|
||||||
'name' => $this->defaults->getName(),
|
'name' => $this->defaults->getName(),
|
||||||
|
'productName' => $this->defaults->getProductName(),
|
||||||
'title' => $this->defaults->getTitle(),
|
'title' => $this->defaults->getTitle(),
|
||||||
'baseUrl' => $this->defaults->getBaseUrl(),
|
'baseUrl' => $this->defaults->getBaseUrl(),
|
||||||
'syncClientUrl' => $this->defaults->getSyncClientUrl(),
|
'syncClientUrl' => $this->defaults->getSyncClientUrl(),
|
||||||
|
|
|
@ -50,7 +50,7 @@ try {
|
||||||
'version' => implode('.', \OCP\Util::getVersion()),
|
'version' => implode('.', \OCP\Util::getVersion()),
|
||||||
'versionstring' => OC_Util::getVersionString(),
|
'versionstring' => OC_Util::getVersionString(),
|
||||||
'edition' => '',
|
'edition' => '',
|
||||||
'productname' => $defaults->getName(),
|
'productname' => $defaults->getProductName(),
|
||||||
'extendedSupport' => \OCP\Util::hasExtendedSupport()
|
'extendedSupport' => \OCP\Util::hasExtendedSupport()
|
||||||
];
|
];
|
||||||
if (OC::$CLI) {
|
if (OC::$CLI) {
|
||||||
|
|
Loading…
Reference in New Issue