diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js index 9eb9c515f9..665030681f 100644 --- a/core/js/setupchecks.js +++ b/core/js/setupchecks.js @@ -77,7 +77,9 @@ if (expectedStatus.indexOf(xhr.status) === -1 || (checkCustomHeader && !customWellKnown)) { var docUrl = placeholderUrl.replace('PLACEHOLDER', 'admin-setup-well-known-URL'); messages.push({ - msg: t('core', 'Your web server is not properly set up to resolve "{url}". Further information can be found in the documentation.', { docLink: docUrl, url: url }), + msg: t('core', 'Your web server is not properly set up to resolve "{url}". Further information can be found in the {linkstart}documentation ↗{linkend}.', { url: url }) + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_INFO }); } @@ -116,7 +118,9 @@ if (expectedStatus.indexOf(xhr.status) === -1) { var docUrl = placeholderUrl.replace('PLACEHOLDER', 'admin-nginx'); messages.push({ - msg: t('core', 'Your web server is not properly set up to resolve "{url}". This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in ".htaccess" for Apache or the provided one in the documentation for Nginx at it\'s documentation page. On Nginx those are typically the lines starting with "location ~" that need an update.', { docLink: docUrl, url: url }), + msg: t('core', 'Your web server is not properly set up to resolve "{url}". This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in ".htaccess" for Apache or the provided one in the documentation for Nginx at it\'s {linkstart}documentation page ↗{linkend}. On Nginx those are typically the lines starting with "location ~" that need an update.', { docLink: docUrl, url: url }) + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } @@ -148,7 +152,9 @@ if (xhr.status !== 200) { var docUrl = placeholderUrl.replace('PLACEHOLDER', 'admin-nginx'); messages.push({ - msg: t('core', 'Your web server is not properly set up to deliver .woff2 files. This is typically an issue with the Nginx configuration. For Nextcloud 15 it needs an adjustement to also deliver .woff2 files. Compare your Nginx configuration to the recommended configuration in our documentation.', { docLink: docUrl, url: url }), + msg: t('core', 'Your web server is not properly set up to deliver .woff2 files. This is typically an issue with the Nginx configuration. For Nextcloud 15 it needs an adjustement to also deliver .woff2 files. Compare your Nginx configuration to the recommended configuration in our {linkstart}documentation ↗{linkend}.', { docLink: docUrl, url: url }) + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } @@ -177,13 +183,9 @@ if (!data.isGetenvServerWorking) { messages.push({ msg: t('core', 'PHP does not seem to be setup properly to query system environment variables. The test with getenv("PATH") only returns an empty response.') + ' ' + - t( - 'core', - 'Please check the installation documentation ↗ for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm.', - { - docLink: OC.theme.docPlaceholderUrl.replace('PLACEHOLDER', 'admin-php-fpm') - } - ), + t('core', 'Please check the {linkstart}installation documentation ↗{linkend} for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } @@ -207,7 +209,9 @@ } if(!data.hasWorkingFileLocking) { messages.push({ - msg: t('core', 'Transactional file locking is disabled, this might lead to issues with race conditions. Enable "filelocking.enabled" in config.php to avoid these problems. See the documentation ↗ for more information.', {docLink: OC.theme.docPlaceholderUrl.replace('PLACEHOLDER', 'admin-transactional-locking')}), + msg: t('core', 'Transactional file locking is disabled, this might lead to issues with race conditions. Enable "filelocking.enabled" in config.php to avoid these problems. See the {linkstart}documentation ↗{linkend} for more information.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } @@ -244,8 +248,9 @@ } if (data.cronInfo.diffInSeconds > 3600) { messages.push({ - msg: t('core', 'Last background job execution ran {relativeTime}. Something seems wrong.', {relativeTime: data.cronInfo.relativeTime}) + - ' ' + t('core', 'Check the background job settings') + '', + msg: t('core', 'Last background job execution ran {relativeTime}. Something seems wrong. {linkstart}Check the background job settings ↗{linkend}', {relativeTime: data.cronInfo.relativeTime}) + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_ERROR }); } @@ -257,13 +262,17 @@ } if(!data.isMemcacheConfigured) { messages.push({ - msg: t('core', 'No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the documentation.', {docLink: data.memcacheDocs}), + msg: t('core', 'No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the {linkstart}documentation ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_INFO }); } if(!data.isRandomnessSecure) { messages.push({ - msg: t('core', 'No suitable source for randomness found by PHP which is highly discouraged for security reasons. Further information can be found in the documentation.', {docLink: data.securityDocs}), + msg: t('core', 'No suitable source for randomness found by PHP which is highly discouraged for security reasons. Further information can be found in the {linkstart}documentation ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_ERROR }); } @@ -275,7 +284,9 @@ } if (data.phpSupported && data.phpSupported.eol) { messages.push({ - msg: t('core', 'You are currently running PHP {version}. Upgrade your PHP version to take advantage of performance and security updates provided by the PHP Group as soon as your distribution supports it.', { version: data.phpSupported.version, phpLink: 'https://secure.php.net/supported-versions.php' }), + msg: t('core', 'You are currently running PHP {version}. Upgrade your PHP version to take advantage of {linkstart}performance and security updates provided by the PHP Group ↗{linkend} as soon as your distribution supports it.', { version: data.phpSupported.version }) + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_INFO }) } @@ -287,50 +298,42 @@ } if(!data.forwardedForHeadersWorking) { messages.push({ - msg: t('core', 'The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the documentation.', {docLink: data.reverseProxyDocs}), + msg: t('core', 'The reverse proxy header configuration is incorrect, or you are accessing Nextcloud from a trusted proxy. If not, this is a security issue and can allow an attacker to spoof their IP address as visible to the Nextcloud. Further information can be found in the {linkstart}documentation ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } if(!data.isCorrectMemcachedPHPModuleInstalled) { messages.push({ - msg: t('core', 'Memcached is configured as distributed cache, but the wrong PHP module "memcache" is installed. \\OC\\Memcache\\Memcached only supports "memcached" and not "memcache". See the memcached wiki about both modules.', {wikiLink: 'https://code.google.com/p/memcached/wiki/PHPClientComparison'}), + msg: t('core', 'Memcached is configured as distributed cache, but the wrong PHP module "memcache" is installed. \\OC\\Memcache\\Memcached only supports "memcached" and not "memcache". See the {linkstart}memcached wiki about both modules ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }); } if(!data.hasPassedCodeIntegrityCheck) { messages.push({ - msg: t( - 'core', - 'Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the documentation. (List of invalid files… / Rescan…)', - { - docLink: data.codeIntegrityCheckerDocumentation, - codeIntegrityDownloadEndpoint: OC.generateUrl('/settings/integrity/failed'), - rescanEndpoint: OC.generateUrl('/settings/integrity/rescan?requesttoken={requesttoken}', {'requesttoken': OC.requestToken}) - } - ), + msg: t('core', 'Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the {linkstart1}documentation ↗{linkend}. ({linkstart2}List of invalid files…{linkend} / {linkstart3}Rescan…{linkend})') + .replace('{linkstart1}', '') + .replace('{linkstart2}', '') + .replace('{linkstart3}', '') + .replace(/{linkend}/g, ''), type: OC.SetupChecks.MESSAGE_TYPE_ERROR }); } if(!data.hasOpcacheLoaded) { messages.push({ - msg: t( - 'core', - 'The PHP OPcache module is not loaded. For better performance it is recommended to load it into your PHP installation.', - { - docLink: data.phpOpcacheDocumentation, - } - ), + msg: t('core', 'The PHP OPcache module is not loaded. {linkstart}For better performance it is recommended ↗{linkend} to load it into your PHP installation.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_INFO }); } else if(!data.isOpcacheProperlySetup) { messages.push({ - msg: t( - 'core', - 'The PHP OPcache is not properly configured. For better performance it is recommended to use the following settings in the php.ini:', - { - docLink: data.phpOpcacheDocumentation, - } - ) + "
opcache.enable=1\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=10000\nopcache.memory_consumption=128\nopcache.save_comments=1\nopcache.revalidate_freq=1
", + msg: t('core', 'The PHP OPcache is not properly configured. {linkstart}For better performance it is recommended ↗{linkend} to use the following settings in the php.ini:') + .replace('{linkstart}', '') + .replace('{linkend}', '') + "
opcache.enable=1\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=10000\nopcache.memory_consumption=128\nopcache.save_comments=1\nopcache.revalidate_freq=1
", type: OC.SetupChecks.MESSAGE_TYPE_INFO }); } @@ -424,13 +427,9 @@ listOfPendingBigIntConversionColumns += "
  • " + element + "
  • "; }); messages.push({ - msg: t( - 'core', - 'Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running \'occ db:convert-filecache-bigint\' those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read the documentation page about this.', - { - docLink: OC.theme.docPlaceholderUrl.replace('PLACEHOLDER', 'admin-bigint-conversion'), - } - ) + "", + msg: t('core', 'Some columns in the database are missing a conversion to big int. Due to the fact that changing column types on big tables could take some time they were not changed automatically. By running \'occ db:convert-filecache-bigint\' those pending changes could be applied manually. This operation needs to be made while the instance is offline. For further details read {linkstart}the documentation page about this ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', '') + "", type: OC.SetupChecks.MESSAGE_TYPE_INFO }) } @@ -440,13 +439,9 @@ 'core', 'SQLite is currently being used as the backend database. For larger installations we recommend that you switch to a different database backend.' ) + ' ' + t('core', 'This is particularly recommended when using the desktop client for file synchronisation.') + ' ' + - t( - 'core', - 'To migrate to another database use the command line tool: \'occ db:convert-type\', or see the documentation ↗.', - { - docLink: data.databaseConversionDocumentation, - } - ), + t('core', 'To migrate to another database use the command line tool: \'occ db:convert-type\', or see the {linkstart}documentation ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }) } @@ -477,13 +472,9 @@ } if (data.isMysqlUsedWithoutUTF8MB4) { messages.push({ - msg: t( - 'core', - 'MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. For further details read the documentation page about this.', - { - docLink: OC.theme.docPlaceholderUrl.replace('PLACEHOLDER', 'admin-mysql-utf8mb4'), - } - ), + msg: t('core', 'MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. For further details read {linkstart}the documentation page about this ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }) } @@ -498,13 +489,9 @@ } if (window.location.protocol === 'http:' && data.reverseProxyGeneratedURL.split('/')[0] !== 'https:') { messages.push({ - msg: t( - 'core', - 'You are accessing your instance over a secure connection, however your instance is generating insecure URLs. This most likely means that you are behind a reverse proxy and the overwrite config variables are not set correctly. Please read the documentation page about this.', - { - docLink: data.reverseProxyDocs - } - ), + msg: t('core', 'You are accessing your instance over a secure connection, however your instance is generating insecure URLs. This most likely means that you are behind a reverse proxy and the overwrite config variables are not set correctly. Please read {linkstart}the documentation page about this ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''), type: OC.SetupChecks.MESSAGE_TYPE_WARNING }) } @@ -544,7 +531,9 @@ var message = setupCheck.description; if (setupCheck.linkToDocumentation) { - message += ' ' + t('core', 'For more details see the documentation.', {docLink: setupCheck.linkToDocumentation}); + message += ' ' + t('core', 'For more details see the {linkstart}documentation ↗{linkend}.') + .replace('{linkstart}', '') + .replace('{linkend}', ''); } if (setupCheck.elements) { message += '