chore: Refactors widget to use i18n locale for articles (#7958)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Nithin David Thomas
2023-09-21 18:24:03 +05:30
committed by GitHub
parent 48bf8d08e5
commit 018c468303
6 changed files with 3 additions and 29 deletions

View File

@@ -5,7 +5,6 @@ import {
SET_WIDGET_APP_CONFIG,
SET_WIDGET_COLOR,
TOGGLE_WIDGET_OPEN,
SET_WIDGET_LOCALE,
} from '../types';
const state = {
@@ -19,7 +18,6 @@ const state = {
widgetColor: '',
widgetStyle: 'standard',
darkMode: 'light',
locale: 'en',
};
export const getters = {
@@ -31,7 +29,6 @@ export const getters = {
getReferrerHost: $state => $state.referrerHost,
isWidgetStyleFlat: $state => $state.widgetStyle === 'flat',
darkMode: $state => $state.darkMode,
widgetLocale: $state => $state.locale,
};
export const actions = {
@@ -68,9 +65,6 @@ export const actions = {
setBubbleVisibility({ commit }, hideMessageBubble) {
commit(SET_BUBBLE_VISIBILITY, hideMessageBubble);
},
setLocale({ commit }, locale) {
commit(SET_WIDGET_LOCALE, locale);
},
};
export const mutations = {
@@ -97,9 +91,6 @@ export const mutations = {
[SET_COLOR_SCHEME]($state, darkMode) {
$state.darkMode = darkMode;
},
[SET_WIDGET_LOCALE]($state, locale) {
$state.locale = locale || $state.locale;
},
};
export default {