ソースを参照

Use product name in places where it is appropriate rather than the instance name

Signed-off-by: Julius Härtl <jus@bitgrid.net>
tags/v22.0.0beta5
Julius Härtl 3年前
コミット
c0474ba364
コミッターのメールアドレスに関連付けられたアカウントが存在しません

+ 2
- 1
apps/files_sharing/lib/Controller/ShareController.php ファイルの表示

@@ -511,7 +511,8 @@ class ShareController extends AuthPublicShareController {
$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']);
$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 = [];


+ 12
- 1
apps/files_sharing/tests/Controller/ShareControllerTest.php ファイルの表示

@@ -106,6 +106,8 @@ class ShareControllerTest extends \Test\TestCase {
private $eventDispatcher;
/** @var IL10N */
private $l10n;
/** @var Defaults|MockObject */
private $defaults;

protected function setUp(): void {
parent::setUp();
@@ -125,6 +127,7 @@ class ShareControllerTest extends \Test\TestCase {
$this->accountManager = $this->createMock(IAccountManager::class);
$this->eventDispatcher = $this->createMock(IEventDispatcher::class);
$this->l10n = $this->createMock(IL10N::class);
$this->defaults = $this->createMock(Defaults::class);

$this->shareController = new \OCA\Files_Sharing\Controller\ShareController(
$this->appName,
@@ -142,7 +145,7 @@ class ShareControllerTest extends \Test\TestCase {
$this->accountManager,
$this->eventDispatcher,
$this->l10n,
$this->createMock(Defaults::class)
$this->defaults
);


@@ -310,6 +313,10 @@ class ShareControllerTest extends \Test\TestCase {
return vsprintf($text, $parameters);
});

$this->defaults->expects(self::any())
->method('getProductName')
->willReturn('Nextcloud');

$response = $this->shareController->showShare();
$sharedTmplParams = [
'owner' => 'ownerUID',
@@ -457,6 +464,10 @@ class ShareControllerTest extends \Test\TestCase {
return vsprintf($text, $parameters);
}));

$this->defaults->expects(self::any())
->method('getProductName')
->willReturn('Nextcloud');

$response = $this->shareController->showShare();
$sharedTmplParams = [
'owner' => '',

+ 1
- 1
core/Controller/WhatsNewController.php ファイルの表示

@@ -89,7 +89,7 @@ class WhatsNewController extends OCSController {
$whatsNew = $this->whatsNewService->getChangesForVersion($currentVersion);
$resultData = [
'changelogURL' => $whatsNew['changelogURL'],
'product' => $this->defaults->getName(),
'product' => $this->defaults->getProductName(),
'version' => $currentVersion,
];
do {

+ 2
- 2
lib/private/Setup.php ファイルの表示

@@ -239,7 +239,7 @@ class Setup {
'error' => $this->l10n->t(
'Mac OS X is not supported and %s will not work properly on this platform. ' .
'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.'),
];
@@ -250,7 +250,7 @@ class Setup {
'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. ' .
'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.'),
];

+ 1
- 0
lib/private/Template/JSConfigHelper.php ファイルの表示

@@ -293,6 +293,7 @@ class JSConfigHelper {
"_theme" => json_encode([
'entity' => $this->defaults->getEntity(),
'name' => $this->defaults->getName(),
'productName' => $this->defaults->getProductName(),
'title' => $this->defaults->getTitle(),
'baseUrl' => $this->defaults->getBaseUrl(),
'syncClientUrl' => $this->defaults->getSyncClientUrl(),

+ 1
- 1
status.php ファイルの表示

@@ -50,7 +50,7 @@ try {
'version' => implode('.', \OCP\Util::getVersion()),
'versionstring' => OC_Util::getVersionString(),
'edition' => '',
'productname' => $defaults->getName(),
'productname' => $defaults->getProductName(),
'extendedSupport' => \OCP\Util::hasExtendedSupport()
];
if (OC::$CLI) {

読み込み中…
キャンセル
保存