fixed block title translation bug, pricing title remains untranslated
This commit is contained in:
parent
efc74ec5f4
commit
345c10b11b
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -103,6 +103,7 @@ export let _v_sitebranding_block, _v_user_block, _v_header_menu,
|
||||||
function initVues () {
|
function initVues () {
|
||||||
// only launch views if we are not in commerce pages
|
// only launch views if we are not in commerce pages
|
||||||
if (!checkNoVuePages()) {
|
if (!checkNoVuePages()) {
|
||||||
|
initVi18n()
|
||||||
initVRouter()
|
initVRouter()
|
||||||
initVSiteBrandingBlock()
|
initVSiteBrandingBlock()
|
||||||
initVPagetitleBlock()
|
initVPagetitleBlock()
|
||||||
|
@ -111,7 +112,6 @@ export let _v_sitebranding_block, _v_user_block, _v_header_menu,
|
||||||
initVSearchBlock()
|
initVSearchBlock()
|
||||||
initVMainContent()
|
initVMainContent()
|
||||||
initVStore()
|
initVStore()
|
||||||
initVi18n()
|
|
||||||
initVLeftContent()
|
initVLeftContent()
|
||||||
}
|
}
|
||||||
initVUserBlock()
|
initVUserBlock()
|
||||||
|
@ -133,7 +133,7 @@ export let _v_sitebranding_block, _v_user_block, _v_header_menu,
|
||||||
function initVRouter () {
|
function initVRouter () {
|
||||||
// we need this to update the title and body classes while using history nav
|
// we need this to update the title and body classes while using history nav
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
console.log('router beforeEach to ', to)
|
console.log('router beforeEach to ', to, router, i18n)
|
||||||
// commit new title to store
|
// commit new title to store
|
||||||
let title = null
|
let title = null
|
||||||
switch (to.name) {
|
switch (to.name) {
|
||||||
|
@ -143,6 +143,9 @@ export let _v_sitebranding_block, _v_user_block, _v_header_menu,
|
||||||
case 'article':
|
case 'article':
|
||||||
title = false
|
title = false
|
||||||
break
|
break
|
||||||
|
case 'pricing':
|
||||||
|
title = i18n.t(to.name)
|
||||||
|
break
|
||||||
default:
|
default:
|
||||||
title = to.name
|
title = to.name
|
||||||
}
|
}
|
||||||
|
@ -251,7 +254,7 @@ export let _v_sitebranding_block, _v_user_block, _v_header_menu,
|
||||||
store.commit('Common/setPagetitle', title)
|
store.commit('Common/setPagetitle', title)
|
||||||
}
|
}
|
||||||
// replace in template the pagetitle by vue binding
|
// replace in template the pagetitle by vue binding
|
||||||
$h2.innerText = '{{ $t("materio."+pagetitle) }}'
|
$h2.innerText = '{{ pagetitle }}'
|
||||||
// create the vue
|
// create the vue
|
||||||
_v_pagetitle_block = new Vue({
|
_v_pagetitle_block = new Vue({
|
||||||
store,
|
store,
|
||||||
|
|
Loading…
Reference in New Issue