chore: Remove URLs from translations (#7414)

This commit is contained in:
Sivin Varghese
2023-06-29 15:09:02 +05:30
committed by GitHub
parent ea78020f2f
commit 191b8a64fe
6 changed files with 41 additions and 9 deletions

View File

@@ -61,7 +61,7 @@
:class="{ error: $v.domain.$error }"
:label="$t('HELP_CENTER.PORTAL.ADD.DOMAIN.LABEL')"
:placeholder="$t('HELP_CENTER.PORTAL.ADD.DOMAIN.PLACEHOLDER')"
:help-text="$t('HELP_CENTER.PORTAL.ADD.DOMAIN.HELP_TEXT')"
:help-text="domainExampleHelpText"
:error="domainError"
@blur="$v.domain.$touch"
/>
@@ -86,6 +86,9 @@ import { isDomain } from 'shared/helpers/Validators';
import thumbnail from 'dashboard/components/widgets/Thumbnail';
import { convertToCategorySlug } from 'dashboard/helper/commons.js';
import { buildPortalURL } from 'dashboard/helper/portalHelper';
import wootConstants from 'dashboard/constants/globals';
const { EXAMPLE_URL } = wootConstants;
export default {
components: {
@@ -147,6 +150,11 @@ export default {
domainHelpText() {
return buildPortalURL(this.slug);
},
domainExampleHelpText() {
return this.$t('HELP_CENTER.PORTAL.ADD.DOMAIN.HELP_TEXT', {
exampleURL: EXAMPLE_URL,
});
},
},
mounted() {
const portal = this.portal || {};

View File

@@ -41,7 +41,7 @@
:placeholder="
$t('HELP_CENTER.PORTAL.ADD.HOME_PAGE_LINK.PLACEHOLDER')
"
:help-text="$t('HELP_CENTER.PORTAL.ADD.HOME_PAGE_LINK.HELP_TEXT')"
:help-text="homepageExampleHelpText"
:error="
$v.homePageLink.$error
? $t('HELP_CENTER.PORTAL.ADD.HOME_PAGE_LINK.ERROR')
@@ -74,6 +74,9 @@ import { url } from 'vuelidate/lib/validators';
import { getRandomColor } from 'dashboard/helper/labelColor';
import alertMixin from 'shared/mixins/alertMixin';
import wootConstants from 'dashboard/constants/globals';
const { EXAMPLE_URL } = wootConstants;
export default {
components: {},
@@ -102,6 +105,13 @@ export default {
url,
},
},
computed: {
homepageExampleHelpText() {
return this.$t('HELP_CENTER.PORTAL.ADD.HOME_PAGE_LINK.HELP_TEXT', {
exampleURL: EXAMPLE_URL,
});
},
},
mounted() {
this.color = getRandomColor();
this.updateDataFromStore();

View File

@@ -7,9 +7,7 @@
v-model.trim="url"
type="text"
name="url"
:placeholder="
$t('INTEGRATION_SETTINGS.WEBHOOK.FORM.END_POINT.PLACEHOLDER')
"
:placeholder="webhookURLInputPlaceholder"
@input="$v.url.$touch"
/>
<span v-if="$v.url.$error" class="message">
@@ -53,6 +51,9 @@
<script>
import { required, url, minLength } from 'vuelidate/lib/validators';
import webhookMixin from './webhookMixin';
import wootConstants from 'dashboard/constants/globals';
const { EXAMPLE_WEBHOOK_URL } = wootConstants;
const SUPPORTED_WEBHOOK_EVENTS = [
'conversation_created',
@@ -98,6 +99,16 @@ export default {
supportedWebhookEvents: SUPPORTED_WEBHOOK_EVENTS,
};
},
computed: {
webhookURLInputPlaceholder() {
return this.$t(
'INTEGRATION_SETTINGS.WEBHOOK.FORM.END_POINT.PLACEHOLDER',
{
webhookExampleURL: EXAMPLE_WEBHOOK_URL,
}
);
},
},
methods: {
onSubmit() {
this.$emit('submit', {