From 99a31f03ca1ed3e051ad1c861de70fcee496693b Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Tue, 12 Mar 2024 12:25:04 +0530 Subject: [PATCH] fix: Away text translations --- app/javascript/widget/i18n/locale/en.json | 5 ++++- app/javascript/widget/mixins/nextAvailabilityTime.js | 10 +++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/javascript/widget/i18n/locale/en.json b/app/javascript/widget/i18n/locale/en.json index 83b442e51..69f759430 100644 --- a/app/javascript/widget/i18n/locale/en.json +++ b/app/javascript/widget/i18n/locale/en.json @@ -20,7 +20,10 @@ "IN_A_FEW_MINUTES": "Typically replies in a few minutes", "IN_A_FEW_HOURS": "Typically replies in a few hours", "IN_A_DAY": "Typically replies in a day", - "BACK_IN": "We will be back online" + "BACK_IN": "We will be back online", + "BACK_AT": "at", + "BACK_ON": "on", + "BACK_IN_SOME_TIME": "in some time" }, "DAY_NAMES": [ "Sunday", diff --git a/app/javascript/widget/mixins/nextAvailabilityTime.js b/app/javascript/widget/mixins/nextAvailabilityTime.js index 55797d282..94576522a 100644 --- a/app/javascript/widget/mixins/nextAvailabilityTime.js +++ b/app/javascript/widget/mixins/nextAvailabilityTime.js @@ -111,7 +111,9 @@ export default { }, exactTimeInAmPm() { return `${ - this.timeSlot.day === this.currentDay ? `at ${this.timeSlot.from}` : '' + this.timeSlot.day === this.currentDay + ? `${this.$t('REPLY_TIME.BACK_AT')} ${this.timeSlot.from}` + : '' }`; }, hoursAndMinutesLeft() { @@ -151,7 +153,7 @@ export default { if (hoursLeft > 0 || minutesLeft > 0) { return this.hoursAndMinutesLeft; } - return 'in some time'; + return this.$t('REPLY_TIME.BACK_IN_SOME_TIME'); }, timeLeftToBackInOnline() { if ( @@ -169,7 +171,9 @@ export default { this.dayDiff >= 1 && this.presentHour >= this.currentDayTimings.closeHour ) { - return `on ${this.dayNameOfNextWorkingDay}`; + return `${this.$t('REPLY_TIME.BACK_ON')} ${ + this.dayNameOfNextWorkingDay + }`; } return this.hoursAndMinutesToBack; },