diff --git a/src/components/LangSelect/index.vue b/src/components/LangSelect/index.vue index 8b88dee5..0d5b3145 100644 --- a/src/components/LangSelect/index.vue +++ b/src/components/LangSelect/index.vue @@ -35,7 +35,7 @@ export default { .international-icon { font-size: 20px; cursor: pointer; - vertical-align: -5px; + vertical-align: -5px!important; } diff --git a/src/utils/i18n.js b/src/utils/i18n.js index faa52062..0cb5e253 100644 --- a/src/utils/i18n.js +++ b/src/utils/i18n.js @@ -1,4 +1,10 @@ // translate router.meta.title, be used in breadcrumb sidebar tagsview export function generateTitle(title) { - return this.$t('route.' + title) // $t :this method from vue-i18n, inject in @/lang/index.js + const hasKey = this.$te('route.' + title) + const translatedTitle = this.$t('route.' + title) // $t :this method from vue-i18n, inject in @/lang/index.js + + if (hasKey) { + return translatedTitle + } + return title } diff --git a/src/views/layout/components/Sidebar/SidebarItem.vue b/src/views/layout/components/Sidebar/SidebarItem.vue index c948748d..5cb12818 100644 --- a/src/views/layout/components/Sidebar/SidebarItem.vue +++ b/src/views/layout/components/Sidebar/SidebarItem.vue @@ -3,7 +3,7 @@