From bc5449f2087f0be3c567a9b471d332229e559426 Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Mon, 13 May 2024 19:13:03 +0530 Subject: [PATCH] chore: translation updates --- app/javascript/dashboard/i18n/locale/en/integrations.json | 7 ++++--- .../routes/dashboard/conversation/linear/LinkIssue.vue | 8 +++----- .../routes/dashboard/conversation/linear/index.vue | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/app/javascript/dashboard/i18n/locale/en/integrations.json b/app/javascript/dashboard/i18n/locale/en/integrations.json index d97971e07..057f2530c 100644 --- a/app/javascript/dashboard/i18n/locale/en/integrations.json +++ b/app/javascript/dashboard/i18n/locale/en/integrations.json @@ -215,7 +215,9 @@ "TITLE": "Link", "EMPTY_LIST": "No linear issues found", "LOADING": "Loading", - "ERROR": "There was an error fetching the linear issues, please try again" + "ERROR": "There was an error fetching the linear issues, please try again", + "LINK_SUCCESS": "Issue linked successfully", + "LINK_ERROR": "There was an error linking the issue, please try again" }, "ADD_OR_LINK": { "TITLE": "Create/link linear issue", @@ -227,8 +229,7 @@ "REQUIRED_ERROR": "Title is required" }, "DESCRIPTION": { - "LABEL": "Description", - "PLACEHOLDER": "SLA for premium customers" + "LABEL": "Description" }, "TEAM": { "LABEL": "Team", diff --git a/app/javascript/dashboard/routes/dashboard/conversation/linear/LinkIssue.vue b/app/javascript/dashboard/routes/dashboard/conversation/linear/LinkIssue.vue index 8423e5d1e..25c5160d1 100644 --- a/app/javascript/dashboard/routes/dashboard/conversation/linear/LinkIssue.vue +++ b/app/javascript/dashboard/routes/dashboard/conversation/linear/LinkIssue.vue @@ -40,7 +40,7 @@ :is-loading="isLinking" @click.prevent="linkIssue" > - {{ $t('INTEGRATION_SETTINGS.LINEAR.ADD_OR_LINK.CREATE') }} + {{ $t('INTEGRATION_SETTINGS.LINEAR.LINK.TITLE') }} @@ -111,14 +111,12 @@ export default { this.isLinking = true; await LinearAPI.link_issue(this.conversationId, issueId); this.showAlert( - this.$t('INTEGRATION_SETTINGS.LINEAR.ADD_OR_LINK.CREATE_SUCCESS') + this.$t('INTEGRATION_SETTINGS.LINEAR.LINK.LINK_SUCCESS') ); this.searchQuery = ''; this.onClose(); } catch (error) { - this.showAlert( - this.$t('INTEGRATION_SETTINGS.LINEAR.ADD_OR_LINK.CREATE_ERROR') - ); + this.showAlert(this.$t('INTEGRATION_SETTINGS.LINEAR.LINK.LINK_ERROR')); } finally { this.isLinking = false; } diff --git a/app/javascript/dashboard/routes/dashboard/conversation/linear/index.vue b/app/javascript/dashboard/routes/dashboard/conversation/linear/index.vue index 63dd18676..6d9f832b0 100644 --- a/app/javascript/dashboard/routes/dashboard/conversation/linear/index.vue +++ b/app/javascript/dashboard/routes/dashboard/conversation/linear/index.vue @@ -91,8 +91,8 @@ export default { try { this.isFetching = true; const response = await LinearAPI.getLinkedIssue(this.conversationId); - const { issues = [] } = response.data; - this.linkedIssue = issues.length ? issues[0] : null; + const issues = response.data; + this.linkedIssue = issues && issues.length ? issues[0] : null; } catch (error) { this.showAlert(this.$t('INTEGRATION_SETTINGS.LINEAR.LOADING_ERROR')); } finally {