summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-12-17 09:14:21 +0100
committerJoas Schilling <coding@schilljs.com>2020-12-17 09:14:21 +0100
commit15956c20c3f9889c718761683bb89b92156ff2b6 (patch)
treed7e88eb19f6c1a64b4b203c7ff650426fb507c4b /core/js
parentacf9aa19da7f67cfbdee06772cc19b937720b48e (diff)
downloadnextcloud-server-15956c20c3f9889c718761683bb89b92156ff2b6.tar.gz
nextcloud-server-15956c20c3f9889c718761683bb89b92156ff2b6.zip
Improve hints for default_phone_region
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'core/js')
-rw-r--r--core/js/setupchecks.js4
-rw-r--r--core/js/tests/specs/setupchecksSpec.js2
2 files changed, 4 insertions, 2 deletions
diff --git a/core/js/setupchecks.js b/core/js/setupchecks.js
index 22c8589f73b..60d6350634b 100644
--- a/core/js/setupchecks.js
+++ b/core/js/setupchecks.js
@@ -218,7 +218,9 @@
}
if (!data.isDefaultPhoneRegionSet) {
messages.push({
- msg: t('core', 'Your installation has no default phone region set. This is required to be able to validate phone numbers in the profile settings without a country code. To allow numbers without a country code, please add "default_phone_region" with the respective ISO 3166-1 code of the wished region.'),
+ msg: t('core', 'Your installation has no default phone region set. This is required to validate phone numbers in the profile settings without a country code. To allow numbers without a country code, please add "default_phone_region" with the respective {linkstart}ISO 3166-1 code ↗{linkend} of the region to your config file.')
+ .replace('{linkstart}', '<a target="_blank" rel="noreferrer noopener" class="external" href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements">')
+ .replace('{linkend}', '</a>'),
type: OC.SetupChecks.MESSAGE_TYPE_INFO
});
}
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js
index c3cddb88a9d..d8019282814 100644
--- a/core/js/tests/specs/setupchecksSpec.js
+++ b/core/js/tests/specs/setupchecksSpec.js
@@ -1143,7 +1143,7 @@ describe('OC.SetupChecks tests', function() {
async.done(function( data, s, x ){
expect(data).toEqual([{
- msg: 'Your installation has no default phone region set. This is required to be able to validate phone numbers in the profile settings without a country code. To allow numbers without a country code, please add "default_phone_region" with the respective ISO 3166-1 code of the wished region.',
+ msg: 'Your installation has no default phone region set. This is required to validate phone numbers in the profile settings without a country code. To allow numbers without a country code, please add "default_phone_region" with the respective <a target="_blank" rel="noreferrer noopener" class="external" href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements">ISO 3166-1 code ↗</a> of the region to your config file.',
type: OC.SetupChecks.MESSAGE_TYPE_INFO
}]);
done();