From 53ccf70a47ecbc5a2a3875ea5c4ee7376f185deb Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Wed, 15 Mar 2023 13:47:55 +0100 Subject: [PATCH] link picker -> smart picker, translate more strings Signed-off-by: Julien Veyssier --- l10n/messages.pot | 12 ++++++++++++ .../NcRichContenteditable/NcRichContenteditable.vue | 2 +- .../NcReferencePicker/NcReferencePickerModal.vue | 9 +++++---- .../NcRichText/NcReferencePicker/providerHelper.js | 2 +- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/l10n/messages.pot b/l10n/messages.pot index dc526e32d2..2fd4cd971d 100644 --- a/l10n/messages.pot +++ b/l10n/messages.pot @@ -35,6 +35,9 @@ msgstr "" msgid "Back" msgstr "" +msgid "Back to provider selection" +msgstr "" + msgid "Cancel changes" msgstr "" @@ -47,6 +50,9 @@ msgstr "" msgid "Clear text" msgstr "" +msgid "Close" +msgstr "" + msgid "Close modal" msgstr "" @@ -56,6 +62,9 @@ msgstr "" msgid "Close sidebar" msgstr "" +msgid "Close smart picker" +msgstr "" + msgid "Collapse menu" msgstr "" @@ -179,6 +188,9 @@ msgstr "" msgid "Show password" msgstr "" +msgid "Smart picker" +msgstr "" + msgid "Smileys & Emotion" msgstr "" diff --git a/src/components/NcRichContenteditable/NcRichContenteditable.vue b/src/components/NcRichContenteditable/NcRichContenteditable.vue index 1bb7880e21..3374451861 100644 --- a/src/components/NcRichContenteditable/NcRichContenteditable.vue +++ b/src/components/NcRichContenteditable/NcRichContenteditable.vue @@ -433,7 +433,7 @@ export default { this.updateValue(this.$refs.contenteditable.innerHTML) }) .catch((error) => { - console.debug('Link picker promise rejected:', error) + console.debug('Smart picker promise rejected:', error) const tmpElem = document.getElementById('tmp-link-result-node') this.setCursorAfter(tmpElem) tmpElem.remove() diff --git a/src/components/NcRichText/NcReferencePicker/NcReferencePickerModal.vue b/src/components/NcRichText/NcReferencePicker/NcReferencePickerModal.vue index 870f0c65e3..f2900f3e40 100644 --- a/src/components/NcRichText/NcReferencePicker/NcReferencePickerModal.vue +++ b/src/components/NcRichText/NcReferencePicker/NcReferencePickerModal.vue @@ -41,6 +41,7 @@ import NcReferencePicker from './NcReferencePicker.vue' import { isCustomPickerElementRegistered } from './customPickerElements.js' import NcButton from '../../NcButton/index.js' import NcModal from '../../NcModal/index.js' +import { t } from '../../../l10n.js' import { emit } from '@nextcloud/event-bus' @@ -88,9 +89,9 @@ export default { return { show: true, selectedProvider: this.initialProvider, - backButtonTitle: 'Back to provider selection', - closeButtonTitle: 'Close', - closeButtonLabel: 'Close link picker', + backButtonTitle: t('Back to provider selection'), + closeButtonTitle: t('Close'), + closeButtonLabel: t('Close smart picker'), } }, computed: { @@ -111,7 +112,7 @@ export default { modalTitle() { return this.isProviderSelected ? this.selectedProvider.title - : 'Link picker' + : t('Smart picker') }, }, mounted() { diff --git a/src/components/NcRichText/NcReferencePicker/providerHelper.js b/src/components/NcRichText/NcReferencePicker/providerHelper.js index 4fbe87bd54..935b7e1b4c 100644 --- a/src/components/NcRichText/NcReferencePicker/providerHelper.js +++ b/src/components/NcRichText/NcReferencePicker/providerHelper.js @@ -43,7 +43,7 @@ export function getProviders() { // avoid providers with no associated search provider and no custom component registered const keep = (!!p.search_providers_ids && p.search_providers_ids.length > 0) || isCustomPickerElementRegistered(p.id) if (!keep) { - console.debug('[link picker]', p.id, 'reference provider is discoverable but does not have any related search provider or custom picker component registered') + console.debug('[smart picker]', p.id, 'reference provider is discoverable but does not have any related search provider or custom picker component registered') } return keep })