From abfba4b47eda78489fb22f5696e1018c55940a14 Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 21 Jun 2019 23:55:56 -0400 Subject: [PATCH] fix: match page current locale for UI --- client/components/admin/admin-users.vue | 4 ++-- client/components/common/nav-header.vue | 2 +- client/themes/default/components/page.vue | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/client/components/admin/admin-users.vue b/client/components/admin/admin-users.vue index 37f20fed..e0f37890 100644 --- a/client/components/admin/admin-users.vue +++ b/client/components/admin/admin-users.vue @@ -6,11 +6,11 @@ img.animated.fadeInUp(src='/svg/icon-customer.svg', alt='Users', style='width: 80px;') .admin-header-title .headline.blue--text.text--darken-2.animated.fadeInLeft Users - .subheading.grey--text.animated.fadeInLeft.wait-p2s Manage users + .subheading.grey--text.animated.fadeInLeft.wait-p2s Manage users #[v-chip(label, color='primary', small).white--text coming soon] v-spacer v-btn.animated.fadeInDown.wait-p2s(outline, color='grey', large, @click='refresh') v-icon refresh - v-btn.animated.fadeInDown(color='primary', large, depressed, @click='createUser') + v-btn.animated.fadeInDown(color='primary', large, depressed, @click='createUser', disabled) v-icon(left) add span New User v-card.wiki-form.mt-3.animated.fadeInUp diff --git a/client/components/common/nav-header.vue b/client/components/common/nav-header.vue index 2b75d7e7..0e77c6d3 100644 --- a/client/components/common/nav-header.vue +++ b/client/components/common/nav-header.vue @@ -141,7 +141,7 @@ v-tooltip(bottom, slot='activator') v-btn(icon, slot='activator') v-icon(color='grey') language - span Language + span {{$t('common:header.language')}} v-list.py-0 template(v-for='(lc, idx) of locales') v-list-tile(@click='changeLocale(lc)') diff --git a/client/themes/default/components/page.vue b/client/themes/default/components/page.vue index e2051cd4..3c725b85 100644 --- a/client/themes/default/components/page.vue +++ b/client/themes/default/components/page.vue @@ -141,6 +141,8 @@ import Prism from '@/libs/prism/prism.js' import { get } from 'vuex-pathify' import _ from 'lodash' +/* global siteLangs */ + export default { components: { StatusIndicator @@ -259,6 +261,10 @@ export default { this.$store.commit('page/SET_UPDATED_AT', this.updatedAt) this.$store.commit('page/SET_MODE', 'view') + + if (siteLangs.length > 0) { + this.$i18n.i18next.changeLanguage(this.locale) + } }, mounted () { Prism.highlightAllUnder(this.$refs.container)