feat(i18n): add translations for the new languages (de, es, fr, it, CJK)

This commit is contained in:
Sped0n
2023-11-03 14:19:06 +08:00
parent e2861aa645
commit f4eda42785
19 changed files with 137 additions and 17 deletions

View File

@@ -4,7 +4,13 @@ import { type Swiper } from 'swiper'
import { container } from '../container'
import { type ImageJSON } from '../resources'
import { setIndex, state } from '../state'
import { Watchable, expand, loadGsap, loadSwiper } from '../utils'
import {
Watchable,
capitalizeFirstLetter,
expand,
loadGsap,
loadSwiper
} from '../utils'
import { mounted } from './mounted'
import { scrollable } from './scroll'
@@ -214,7 +220,10 @@ function createGallery(ijs: ImageJSON[]): void {
)
// close
const _close = document.createElement('div')
_close.innerText = 'Close'
const str: string = document
.getElementById('main')
?.getAttribute('closeText') as string
_close.innerText = capitalizeFirstLetter(str)
_close.addEventListener(
'click',
() => {