From c13b911d539f2eb4c24cad8044201fc0c1dfc994 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Fri, 16 Sep 2022 11:35:54 +0530 Subject: [PATCH] remove theme.translations --- .../components/VPDocAsideOutline.vue | 2 +- .../theme-default/components/VPLocalNav.vue | 4 +- .../components/VPNavBarExtra.vue | 2 +- .../components/VPNavScreenAppearance.vue | 2 +- types/default-theme.d.ts | 39 ++++++++----------- 5 files changed, 22 insertions(+), 27 deletions(-) diff --git a/src/client/theme-default/components/VPDocAsideOutline.vue b/src/client/theme-default/components/VPDocAsideOutline.vue index 2fbb7813dcdf..197436ba7c2a 100644 --- a/src/client/theme-default/components/VPDocAsideOutline.vue +++ b/src/client/theme-default/components/VPDocAsideOutline.vue @@ -46,7 +46,7 @@ function handleClick({ target: el }: Event) { {{ (typeof theme.outline === 'object' && !Array.isArray(theme.outline) && - theme.outline.title) || + theme.outline.label) || theme.outlineTitle || 'On this page' }} diff --git a/src/client/theme-default/components/VPLocalNav.vue b/src/client/theme-default/components/VPLocalNav.vue index 4833a5ee2840..e92846dafab7 100644 --- a/src/client/theme-default/components/VPLocalNav.vue +++ b/src/client/theme-default/components/VPLocalNav.vue @@ -29,12 +29,12 @@ function scrollToTop() { > - {{ theme.translations?.sidebarMenuLabel || 'Menu' }} + {{ theme.sidebarMenuLabel || 'Menu' }} - {{ theme.translations?.returnToTopLabel || 'Return to top' }} + {{ theme.returnToTopLabel || 'Return to top' }} diff --git a/src/client/theme-default/components/VPNavBarExtra.vue b/src/client/theme-default/components/VPNavBarExtra.vue index 35966cc6bb26..65b6dda5264c 100644 --- a/src/client/theme-default/components/VPNavBarExtra.vue +++ b/src/client/theme-default/components/VPNavBarExtra.vue @@ -31,7 +31,7 @@ const hasExtraContent = computed(

- {{ theme.translations?.darkModeSwitchLabel || 'Appearance' }} + {{ theme.darkModeSwitchLabel || 'Appearance' }}

diff --git a/src/client/theme-default/components/VPNavScreenAppearance.vue b/src/client/theme-default/components/VPNavScreenAppearance.vue index 87bbcb4d05de..1bff9cad923d 100644 --- a/src/client/theme-default/components/VPNavScreenAppearance.vue +++ b/src/client/theme-default/components/VPNavScreenAppearance.vue @@ -8,7 +8,7 @@ const { site, theme } = useData()