chore: try i18n

This commit is contained in:
Shivam Mishra
2024-10-08 15:20:35 +05:30
parent 47b9399208
commit 412303d1cd
7 changed files with 9 additions and 14 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ export default {
mql.onchange = e => setColorTheme(e.matches);
},
setLocale(locale) {
this.$root.$i18n.locale = locale;
this.$i18n.locale = locale;
},
async initializeAccount() {
await this.$store.dispatch('accounts/get');
@@ -112,7 +112,7 @@ export default {
latest_chatwoot_version: latestChatwootVersion,
} = this.getAccount(this.accountId);
this.$root.$i18n.locale = locale;
this.$i18n.locale = locale;
this.name = name;
this.locale = locale;
this.id = id;
@@ -140,7 +140,7 @@ export default {
support_email: this.supportEmail,
auto_resolve_duration: this.autoResolveDuration,
});
this.$root.$i18n.locale = this.locale;
this.$i18n.locale = this.locale;
this.getAccount(this.id).locale = this.locale;
this.updateDirectionView(this.locale);
useAlert(this.$t('GENERAL_SETTINGS.UPDATE.SUCCESS'));
+1 -1
View File
@@ -120,7 +120,7 @@ export default {
}
},
setLocale(locale) {
this.$root.$i18n.locale = locale || 'en';
this.$i18n.locale = locale || 'en';
},
},
};
+1 -1
View File
@@ -31,7 +31,7 @@ export default {
};
},
setLocale(locale) {
this.$root.$i18n.locale = locale;
this.$i18n.locale = locale;
},
},
};
+2 -2
View File
@@ -132,9 +132,9 @@ export default {
);
if (hasLocaleWithVariation) {
this.$root.$i18n.locale = localeWithVariation;
this.$i18n.locale = localeWithVariation;
} else if (hasLocaleWithoutVariation) {
this.$root.$i18n.locale = localeWithoutVariation;
this.$i18n.locale = localeWithoutVariation;
}
},
registerUnreadEvents() {
@@ -60,12 +60,7 @@ export default {
chatwootWebChannel: { websiteToken },
authToken,
} = window;
popoutChatWindow(
origin,
websiteToken,
this.$root.$i18n.locale,
authToken
);
popoutChatWindow(origin, websiteToken, this.$i18n.locale, authToken);
},
closeWindow() {
if (IFrameHelper.isIFrame()) {
@@ -37,7 +37,7 @@ export default {
},
data() {
return {
locale: this.$root.$i18n.locale,
locale: this.$i18n.locale,
hasErrorInPhoneInput: false,
message: '',
formValues: {},