fix: Update browser_language logic to include all languages (#5090)

This commit is contained in:
Pranav Raj S
2022-07-22 13:14:17 +05:30
committed by GitHub
parent 6a6a37a67b
commit 32291f4f7d
6 changed files with 693 additions and 61 deletions

View File

@@ -6,6 +6,12 @@
:value="initiatedAt.timestamp"
class="conversation--attribute"
/>
<contact-details-item
v-if="browserLanguage"
:title="$t('CONTACT_PANEL.BROWSER_LANGUAGE')"
:value="browserLanguage"
class="conversation--attribute"
/>
<contact-details-item
v-if="referer"
:title="$t('CONTACT_PANEL.INITIATED_FROM')"
@@ -44,6 +50,7 @@
</template>
<script>
import { getLanguageName } from '../../../components/widgets/conversation/advancedFilterItems/languages';
import ContactDetailsItem from './ContactDetailsItem.vue';
import CustomAttributes from './customAttributes/CustomAttributes.vue';
import CustomAttributeSelector from './customAttributes/CustomAttributeSelector.vue';
@@ -103,6 +110,9 @@ export default {
} = this.conversationAttributes.browser;
return `${browserName} ${browserVersion}`;
},
browserLanguage() {
return getLanguageName(this.conversationAttributes.browser_language);
},
platformName() {
if (!this.conversationAttributes.browser) {
return '';