mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
fix: document.tile is not translated
This commit is contained in:
parent
c783b962ac
commit
002d9c22ab
4 changed files with 9 additions and 5 deletions
|
@ -7,6 +7,7 @@ import { computed } from 'vue'
|
|||
const props = defineProps<{
|
||||
content?: string
|
||||
defaultHeight?: string
|
||||
readonly?: boolean
|
||||
}>()
|
||||
|
||||
const emit = defineEmits(['update:content'])
|
||||
|
@ -30,6 +31,7 @@ const value = computed({
|
|||
minHeight: defaultHeight || '100vh',
|
||||
borderRadius: '5px',
|
||||
}"
|
||||
:readonly="readonly"
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -13,11 +13,14 @@ const current = ref(gettext.current)
|
|||
|
||||
const languageAvailable = gettext.available
|
||||
|
||||
function init() {
|
||||
async function init() {
|
||||
if (current.value !== 'en') {
|
||||
http.get(`/translation/${current.value}`).then(r => {
|
||||
await http.get(`/translation/${current.value}`).then(r => {
|
||||
gettext.translations[current.value] = r
|
||||
})
|
||||
|
||||
// @ts-expect-error name type
|
||||
document.title = `${route.name?.()} | Nginx UI`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,5 +8,4 @@ export default createGettext({
|
|||
silent: true,
|
||||
})
|
||||
|
||||
export class useGettext {
|
||||
}
|
||||
export class useGettext {}
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
} from '@ant-design/icons-vue'
|
||||
import NProgress from 'nprogress'
|
||||
|
||||
import gettext from '../gettext'
|
||||
import gettext from '@/gettext'
|
||||
import { useUserStore } from '@/pinia'
|
||||
|
||||
import 'nprogress/nprogress.css'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue