chore: try i18n
This commit is contained in:
@@ -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'));
|
||||
|
||||
@@ -120,7 +120,7 @@ export default {
|
||||
}
|
||||
},
|
||||
setLocale(locale) {
|
||||
this.$root.$i18n.locale = locale || 'en';
|
||||
this.$i18n.locale = locale || 'en';
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@ export default {
|
||||
};
|
||||
},
|
||||
setLocale(locale) {
|
||||
this.$root.$i18n.locale = locale;
|
||||
this.$i18n.locale = locale;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -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: {},
|
||||
|
||||
Reference in New Issue
Block a user