refactor: i18n 수정
This commit is contained in:
@@ -1,29 +1,27 @@
|
||||
import fallback from './fallback/de'
|
||||
|
||||
export default defineI18nLocale(async (locale: string) => {
|
||||
//https://static-pubcomm.gate8.com/dev/test/multilingual/test_common_template.json?20251021185116
|
||||
const config = useRuntimeConfig()
|
||||
const rootPath = config.public.staticUrl
|
||||
const runType = config.public.runType
|
||||
|
||||
const translationApi = `${rootPath}/${runType}/test/multilingual/test_common_template.json`
|
||||
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const dataResourcesUrl = runtimeConfig.public.dataResourcesUrl as string
|
||||
const multilingualFileName = 'test_common_template.json'
|
||||
try {
|
||||
const { data } = await useFetch(translationApi, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8'
|
||||
}
|
||||
const resultGetMultilingual = await useGetMultilingual({
|
||||
baseApiUrl: dataResourcesUrl,
|
||||
fileName: multilingualFileName,
|
||||
})
|
||||
|
||||
// API 데이터에서 locale에 맞는 데이터를 추출
|
||||
const apiData = data.value?.[locale] || {} // locale에 맞는 데이터가 없으면 빈 객체 반환
|
||||
|
||||
// API 데이터와 common.json 데이터를 병합 (common.json이 우선순위)
|
||||
const finalResult = { ...apiData }
|
||||
|
||||
return finalResult
|
||||
} catch (error) {
|
||||
console.error('Error fetching translation data:', error)
|
||||
// 에러 발생 시 common.json 데이터라도 반환
|
||||
return commonData[locale] || {}
|
||||
// multilingual 객체에서 현재 locale에 해당하는 데이터 추출
|
||||
const multilingualData = resultGetMultilingual?.value?.multilingual
|
||||
if (multilingualData && typeof multilingualData === 'object') {
|
||||
// locale이 'ko'이므로 'ko' 키의 데이터를 반환
|
||||
const localeData = multilingualData[locale] || multilingualData['de'] || {}
|
||||
return localeData
|
||||
}
|
||||
|
||||
return {}
|
||||
} catch (e) {
|
||||
console.error('[Exception] ko.defineI18nLocale: ', e)
|
||||
return fallback
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -1,29 +1,27 @@
|
||||
import fallback from './fallback/en'
|
||||
|
||||
export default defineI18nLocale(async (locale: string) => {
|
||||
//https://static-pubcomm.gate8.com/dev/test/multilingual/test_common_template.json?20251021185116
|
||||
const config = useRuntimeConfig()
|
||||
const rootPath = config.public.staticUrl
|
||||
const runType = config.public.runType
|
||||
|
||||
const translationApi = `${rootPath}/${runType}/test/multilingual/test_common_template.json`
|
||||
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const dataResourcesUrl = runtimeConfig.public.dataResourcesUrl as string
|
||||
const multilingualFileName = 'test_common_template.json'
|
||||
try {
|
||||
const { data } = await useFetch(translationApi, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8'
|
||||
}
|
||||
const resultGetMultilingual = await useGetMultilingual({
|
||||
baseApiUrl: dataResourcesUrl,
|
||||
fileName: multilingualFileName,
|
||||
})
|
||||
|
||||
// API 데이터에서 locale에 맞는 데이터를 추출
|
||||
const apiData = data.value?.[locale] || {} // locale에 맞는 데이터가 없으면 빈 객체 반환
|
||||
|
||||
// API 데이터와 common.json 데이터를 병합 (common.json이 우선순위)
|
||||
const finalResult = { ...apiData }
|
||||
|
||||
return finalResult
|
||||
} catch (error) {
|
||||
console.error('Error fetching translation data:', error)
|
||||
// 에러 발생 시 common.json 데이터라도 반환
|
||||
return commonData[locale] || {}
|
||||
// multilingual 객체에서 현재 locale에 해당하는 데이터 추출
|
||||
const multilingualData = resultGetMultilingual?.value?.multilingual
|
||||
if (multilingualData && typeof multilingualData === 'object') {
|
||||
// locale이 'ko'이므로 'ko' 키의 데이터를 반환
|
||||
const localeData = multilingualData[locale] || multilingualData['en'] || {}
|
||||
return localeData
|
||||
}
|
||||
|
||||
return {}
|
||||
} catch (e) {
|
||||
console.error('[Exception] ko.defineI18nLocale: ', e)
|
||||
return fallback
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -1,29 +1,27 @@
|
||||
import fallback from './fallback/es'
|
||||
|
||||
export default defineI18nLocale(async (locale: string) => {
|
||||
//https://static-pubcomm.gate8.com/dev/test/multilingual/test_common_template.json?20251021185116
|
||||
const config = useRuntimeConfig()
|
||||
const rootPath = config.public.staticUrl
|
||||
const runType = config.public.runType
|
||||
|
||||
const translationApi = `${rootPath}/${runType}/test/multilingual/test_common_template.json`
|
||||
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const dataResourcesUrl = runtimeConfig.public.dataResourcesUrl as string
|
||||
const multilingualFileName = 'test_common_template.json'
|
||||
try {
|
||||
const { data } = await useFetch(translationApi, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8'
|
||||
}
|
||||
const resultGetMultilingual = await useGetMultilingual({
|
||||
baseApiUrl: dataResourcesUrl,
|
||||
fileName: multilingualFileName,
|
||||
})
|
||||
|
||||
// API 데이터에서 locale에 맞는 데이터를 추출
|
||||
const apiData = data.value?.[locale] || {} // locale에 맞는 데이터가 없으면 빈 객체 반환
|
||||
|
||||
// API 데이터와 common.json 데이터를 병합 (common.json이 우선순위)
|
||||
const finalResult = { ...apiData }
|
||||
|
||||
return finalResult
|
||||
} catch (error) {
|
||||
console.error('Error fetching translation data:', error)
|
||||
// 에러 발생 시 common.json 데이터라도 반환
|
||||
return commonData[locale] || {}
|
||||
// multilingual 객체에서 현재 locale에 해당하는 데이터 추출
|
||||
const multilingualData = resultGetMultilingual?.value?.multilingual
|
||||
if (multilingualData && typeof multilingualData === 'object') {
|
||||
// locale이 'ko'이므로 'ko' 키의 데이터를 반환
|
||||
const localeData = multilingualData[locale] || multilingualData['es'] || {}
|
||||
return localeData
|
||||
}
|
||||
|
||||
return {}
|
||||
} catch (e) {
|
||||
console.error('[Exception] ko.defineI18nLocale: ', e)
|
||||
return fallback
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -1,29 +1,27 @@
|
||||
import fallback from './fallback/fr'
|
||||
|
||||
export default defineI18nLocale(async (locale: string) => {
|
||||
//https://static-pubcomm.gate8.com/dev/test/multilingual/test_common_template.json?20251021185116
|
||||
const config = useRuntimeConfig()
|
||||
const rootPath = config.public.staticUrl
|
||||
const runType = config.public.runType
|
||||
|
||||
const translationApi = `${rootPath}/${runType}/test/multilingual/test_common_template.json`
|
||||
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const dataResourcesUrl = runtimeConfig.public.dataResourcesUrl as string
|
||||
const multilingualFileName = 'test_common_template.json'
|
||||
try {
|
||||
const { data } = await useFetch(translationApi, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8'
|
||||
}
|
||||
const resultGetMultilingual = await useGetMultilingual({
|
||||
baseApiUrl: dataResourcesUrl,
|
||||
fileName: multilingualFileName,
|
||||
})
|
||||
|
||||
// API 데이터에서 locale에 맞는 데이터를 추출
|
||||
const apiData = data.value?.[locale] || {} // locale에 맞는 데이터가 없으면 빈 객체 반환
|
||||
|
||||
// API 데이터와 common.json 데이터를 병합 (common.json이 우선순위)
|
||||
const finalResult = { ...apiData }
|
||||
|
||||
return finalResult
|
||||
} catch (error) {
|
||||
console.error('Error fetching translation data:', error)
|
||||
// 에러 발생 시 common.json 데이터라도 반환
|
||||
return commonData[locale] || {}
|
||||
// multilingual 객체에서 현재 locale에 해당하는 데이터 추출
|
||||
const multilingualData = resultGetMultilingual?.value?.multilingual
|
||||
if (multilingualData && typeof multilingualData === 'object') {
|
||||
// locale이 'ko'이므로 'ko' 키의 데이터를 반환
|
||||
const localeData = multilingualData[locale] || multilingualData['fr'] || {}
|
||||
return localeData
|
||||
}
|
||||
|
||||
return {}
|
||||
} catch (e) {
|
||||
console.error('[Exception] ko.defineI18nLocale: ', e)
|
||||
return fallback
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -1,29 +1,27 @@
|
||||
import fallback from './fallback/ja'
|
||||
|
||||
export default defineI18nLocale(async (locale: string) => {
|
||||
//https://static-pubcomm.gate8.com/dev/test/multilingual/test_common_template.json?20251021185116
|
||||
const config = useRuntimeConfig()
|
||||
const rootPath = config.public.staticUrl
|
||||
const runType = config.public.runType
|
||||
|
||||
const translationApi = `${rootPath}/${runType}/test/multilingual/test_common_template.json`
|
||||
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const dataResourcesUrl = runtimeConfig.public.dataResourcesUrl as string
|
||||
const multilingualFileName = 'test_common_template.json'
|
||||
try {
|
||||
const { data } = await useFetch(translationApi, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8'
|
||||
}
|
||||
const resultGetMultilingual = await useGetMultilingual({
|
||||
baseApiUrl: dataResourcesUrl,
|
||||
fileName: multilingualFileName,
|
||||
})
|
||||
|
||||
// API 데이터에서 locale에 맞는 데이터를 추출
|
||||
const apiData = data.value?.[locale] || {} // locale에 맞는 데이터가 없으면 빈 객체 반환
|
||||
|
||||
// API 데이터와 common.json 데이터를 병합 (common.json이 우선순위)
|
||||
const finalResult = { ...apiData }
|
||||
|
||||
return finalResult
|
||||
} catch (error) {
|
||||
console.error('Error fetching translation data:', error)
|
||||
// 에러 발생 시 common.json 데이터라도 반환
|
||||
return commonData[locale] || {}
|
||||
// multilingual 객체에서 현재 locale에 해당하는 데이터 추출
|
||||
const multilingualData = resultGetMultilingual?.value?.multilingual
|
||||
if (multilingualData && typeof multilingualData === 'object') {
|
||||
// locale이 'ko'이므로 'ko' 키의 데이터를 반환
|
||||
const localeData = multilingualData[locale] || multilingualData['ja'] || {}
|
||||
return localeData
|
||||
}
|
||||
|
||||
return {}
|
||||
} catch (e) {
|
||||
console.error('[Exception] ko.defineI18nLocale: ', e)
|
||||
return fallback
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -1,17 +1,24 @@
|
||||
import fallback from './fallback/ko'
|
||||
|
||||
export default defineI18nLocale(async (locale: string) => {
|
||||
//https://static-pubcomm.gate8.com/dev/test/multilingual/test_common_template.json?20251021185116
|
||||
const config = useRuntimeConfig()
|
||||
const rootPath = config.public.staticUrl
|
||||
const runType = config.public.runType
|
||||
|
||||
const translationApi = `${rootPath}/${runType}/test/multilingual/test_common_template.json`
|
||||
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const dataResourcesUrl = runtimeConfig.public.dataResourcesUrl as string
|
||||
const multilingualFileName = 'test_common_template.json'
|
||||
try {
|
||||
const result = (await commonFetch('GET', `${translationApi}`)) as any
|
||||
if(import.meta.client) {
|
||||
console.log("🚀 ~ result:", result[locale])
|
||||
const resultGetMultilingual = await useGetMultilingual({
|
||||
baseApiUrl: dataResourcesUrl,
|
||||
fileName: multilingualFileName,
|
||||
})
|
||||
|
||||
// multilingual 객체에서 현재 locale에 해당하는 데이터 추출
|
||||
const multilingualData = resultGetMultilingual?.value?.multilingual
|
||||
if (multilingualData && typeof multilingualData === 'object') {
|
||||
// locale이 'ko'이므로 'ko' 키의 데이터를 반환
|
||||
const localeData = multilingualData[locale] || multilingualData['ko'] || {}
|
||||
return localeData
|
||||
}
|
||||
return result[locale]
|
||||
|
||||
return {}
|
||||
} catch (e) {
|
||||
console.error('[Exception] ko.defineI18nLocale: ', e)
|
||||
return fallback
|
||||
|
||||
@@ -1,29 +1,27 @@
|
||||
import fallback from './fallback/pt'
|
||||
|
||||
export default defineI18nLocale(async (locale: string) => {
|
||||
//https://static-pubcomm.gate8.com/dev/test/multilingual/test_common_template.json?20251021185116
|
||||
const config = useRuntimeConfig()
|
||||
const rootPath = config.public.staticUrl
|
||||
const runType = config.public.runType
|
||||
|
||||
const translationApi = `${rootPath}/${runType}/test/multilingual/test_common_template.json`
|
||||
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const dataResourcesUrl = runtimeConfig.public.dataResourcesUrl as string
|
||||
const multilingualFileName = 'test_common_template.json'
|
||||
try {
|
||||
const { data } = await useFetch(translationApi, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8'
|
||||
}
|
||||
const resultGetMultilingual = await useGetMultilingual({
|
||||
baseApiUrl: dataResourcesUrl,
|
||||
fileName: multilingualFileName,
|
||||
})
|
||||
|
||||
// API 데이터에서 locale에 맞는 데이터를 추출
|
||||
const apiData = data.value?.[locale] || {} // locale에 맞는 데이터가 없으면 빈 객체 반환
|
||||
|
||||
// API 데이터와 common.json 데이터를 병합 (common.json이 우선순위)
|
||||
const finalResult = { ...apiData }
|
||||
|
||||
return finalResult
|
||||
} catch (error) {
|
||||
console.error('Error fetching translation data:', error)
|
||||
// 에러 발생 시 common.json 데이터라도 반환
|
||||
return commonData[locale] || {}
|
||||
// multilingual 객체에서 현재 locale에 해당하는 데이터 추출
|
||||
const multilingualData = resultGetMultilingual?.value?.multilingual
|
||||
if (multilingualData && typeof multilingualData === 'object') {
|
||||
// locale이 'ko'이므로 'ko' 키의 데이터를 반환
|
||||
const localeData = multilingualData[locale] || multilingualData['pt'] || {}
|
||||
return localeData
|
||||
}
|
||||
|
||||
return {}
|
||||
} catch (e) {
|
||||
console.error('[Exception] ko.defineI18nLocale: ', e)
|
||||
return fallback
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -1,29 +1,27 @@
|
||||
import fallback from './fallback/th'
|
||||
|
||||
export default defineI18nLocale(async (locale: string) => {
|
||||
//https://static-pubcomm.gate8.com/dev/test/multilingual/test_common_template.json?20251021185116
|
||||
const config = useRuntimeConfig()
|
||||
const rootPath = config.public.staticUrl
|
||||
const runType = config.public.runType
|
||||
|
||||
const translationApi = `${rootPath}/${runType}/test/multilingual/test_common_template.json`
|
||||
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const dataResourcesUrl = runtimeConfig.public.dataResourcesUrl as string
|
||||
const multilingualFileName = 'test_common_template.json'
|
||||
try {
|
||||
const { data } = await useFetch(translationApi, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8'
|
||||
}
|
||||
const resultGetMultilingual = await useGetMultilingual({
|
||||
baseApiUrl: dataResourcesUrl,
|
||||
fileName: multilingualFileName,
|
||||
})
|
||||
|
||||
// API 데이터에서 locale에 맞는 데이터를 추출
|
||||
const apiData = data.value?.[locale] || {} // locale에 맞는 데이터가 없으면 빈 객체 반환
|
||||
|
||||
// API 데이터와 common.json 데이터를 병합 (common.json이 우선순위)
|
||||
const finalResult = { ...apiData }
|
||||
|
||||
return finalResult
|
||||
} catch (error) {
|
||||
console.error('Error fetching translation data:', error)
|
||||
// 에러 발생 시 common.json 데이터라도 반환
|
||||
return commonData[locale] || {}
|
||||
// multilingual 객체에서 현재 locale에 해당하는 데이터 추출
|
||||
const multilingualData = resultGetMultilingual?.value?.multilingual
|
||||
if (multilingualData && typeof multilingualData === 'object') {
|
||||
// locale이 'ko'이므로 'ko' 키의 데이터를 반환
|
||||
const localeData = multilingualData[locale] || multilingualData['th'] || {}
|
||||
return localeData
|
||||
}
|
||||
|
||||
return {}
|
||||
} catch (e) {
|
||||
console.error('[Exception] ko.defineI18nLocale: ', e)
|
||||
return fallback
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -1,34 +1,27 @@
|
||||
import fallback from './fallback/zh-cn'
|
||||
|
||||
export default defineI18nLocale(async (locale: string) => {
|
||||
//https://static-pubcomm.gate8.com/dev/test/multilingual/test_common_template.json?20251021185116
|
||||
const config = useRuntimeConfig()
|
||||
const rootPath = config.public.staticUrl
|
||||
const runType = config.public.runType
|
||||
|
||||
const translationApi = `${rootPath}/${runType}/test/multilingual/test_common_template.json`
|
||||
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const dataResourcesUrl = runtimeConfig.public.dataResourcesUrl as string
|
||||
const multilingualFileName = 'test_common_template.json'
|
||||
try {
|
||||
const { data } = await useFetch(translationApi, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8'
|
||||
}
|
||||
const resultGetMultilingual = await useGetMultilingual({
|
||||
baseApiUrl: dataResourcesUrl,
|
||||
fileName: multilingualFileName,
|
||||
})
|
||||
|
||||
|
||||
if(locale === 'zh-cn') {
|
||||
locale = 'zh-CN'
|
||||
// multilingual 객체에서 현재 locale에 해당하는 데이터 추출
|
||||
const multilingualData = resultGetMultilingual?.value?.multilingual
|
||||
if (multilingualData && typeof multilingualData === 'object') {
|
||||
// locale이 'ko'이므로 'ko' 키의 데이터를 반환
|
||||
const localeData = multilingualData[locale] || multilingualData['zh-cn'] || {}
|
||||
return localeData
|
||||
}
|
||||
|
||||
// API 데이터에서 locale에 맞는 데이터를 추출
|
||||
const apiData = data.value?.[locale] || {} // locale에 맞는 데이터가 없으면 빈 객체 반환
|
||||
|
||||
// API 데이터와 common.json 데이터를 병합 (common.json이 우선순위)
|
||||
const finalResult = { ...apiData }
|
||||
|
||||
return finalResult
|
||||
} catch (error) {
|
||||
console.error('Error fetching translation data:', error)
|
||||
// 에러 발생 시 common.json 데이터라도 반환
|
||||
return commonData[locale] || {}
|
||||
|
||||
return {}
|
||||
} catch (e) {
|
||||
console.error('[Exception] ko.defineI18nLocale: ', e)
|
||||
return fallback
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -1,17 +1,24 @@
|
||||
import fallback from './fallback/zh-tw'
|
||||
|
||||
export default defineI18nLocale(async (locale: string) => {
|
||||
//https://static-pubcomm.gate8.com/dev/test/multilingual/test_common_template.json?20251021185116
|
||||
const config = useRuntimeConfig()
|
||||
const rootPath = config.public.staticUrl
|
||||
const runType = config.public.runType
|
||||
|
||||
const translationApi = `${rootPath}/${runType}/test/multilingual/test_common_template.json`
|
||||
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const dataResourcesUrl = runtimeConfig.public.dataResourcesUrl as string
|
||||
const multilingualFileName = 'test_common_template.json'
|
||||
try {
|
||||
const result = (await commonFetch('GET', `${translationApi}`)) as any
|
||||
if(import.meta.client) {
|
||||
console.log("🚀 ~ result:", result[locale])
|
||||
const resultGetMultilingual = await useGetMultilingual({
|
||||
baseApiUrl: dataResourcesUrl,
|
||||
fileName: multilingualFileName,
|
||||
})
|
||||
|
||||
// multilingual 객체에서 현재 locale에 해당하는 데이터 추출
|
||||
const multilingualData = resultGetMultilingual?.value?.multilingual
|
||||
if (multilingualData && typeof multilingualData === 'object') {
|
||||
// locale이 'ko'이므로 'ko' 키의 데이터를 반환
|
||||
const localeData = multilingualData[locale] || multilingualData['zh-tw'] || {}
|
||||
return localeData
|
||||
}
|
||||
return result[locale]
|
||||
|
||||
return {}
|
||||
} catch (e) {
|
||||
console.error('[Exception] ko.defineI18nLocale: ', e)
|
||||
return fallback
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<footer id="footer" ref="footerRef" class="bg-black">
|
||||
<div
|
||||
class="inner relative max-w-7xl mx-auto px-10 py-9 text-[12px] text-gray-400 md:px-4 md:py-9 md:text-[12px]"
|
||||
class="inner relative max-w-7xl mx-auto px-5 md:px-10 py-4 text-[12px] text-gray-400 md:px-4 md:py-9 md:text-[12px]"
|
||||
>
|
||||
<div class="menu-area">
|
||||
<ul class="flex items-center flex-wrap md:gap-6">
|
||||
<div class="menu-area py-4 pb-4">
|
||||
<ul class="flex items-center flex-wrap gap-x-6 gap-y-2">
|
||||
<li
|
||||
v-for="(footerMenuItem, index) in footerLinks"
|
||||
:key="index"
|
||||
class="text-sm md:text-[11px] md:tracking-[-0.5px] relative flex items-center"
|
||||
class="text-[15px] text-white/50 md:tracking-[-0.5px] relative flex items-center"
|
||||
>
|
||||
<NuxtLink
|
||||
:to="footerMenuItem.url"
|
||||
:target="footerMenuItem.target"
|
||||
:class="[
|
||||
footerMenuItem.active === 'y' && 'text-[#e04600]',
|
||||
footerMenuItem.active === 'y' && 'text-white/50',
|
||||
index === 2 && 'text-[#fff]',
|
||||
'hover:text-gray-600 transition-colors',
|
||||
]"
|
||||
@@ -23,13 +23,13 @@
|
||||
</NuxtLink>
|
||||
</li>
|
||||
<li class="relative">
|
||||
<button class="hover:text-gray-600 transition-colors" @click="toggleAgeRating">
|
||||
{{ footerAgeRating }}
|
||||
<button class="text-[15px] text-white/50 hover:text-gray-600 transition-colors" @click="toggleAgeRating">
|
||||
{{ tm('Footer_AgeRating') }}
|
||||
</button>
|
||||
<div v-if="showAgeRating" class="game-rating-card absolute bottom-6 left-1/2 -translate-x-1/2 bg-[#383838] rounded-lg w-[340px] mx-auto z-10">
|
||||
<div v-if="showAgeRating" class="game-rating-card absolute bottom-6 left-1 md:left-1/2 md:-translate-x-1/2 bg-[#383838] rounded-lg border border-white/30 w-[340px] mx-auto z-10">
|
||||
<!-- 헤더 -->
|
||||
<div class="px-6 py-4 rounded-t-lg flex justify-between items-center">
|
||||
<h3 class="text-white text-base">{{ footerAgeRating }}</h3>
|
||||
<h3 class="text-white text-base">{{ tm('Footer_AgeRating') }}</h3>
|
||||
<button class="text-white hover:text-gray-300 transition-colors" @click="toggleAgeRating">
|
||||
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
|
||||
@@ -81,23 +81,27 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="address-area mt-6">
|
||||
<address class="not-italic text-gray-500">
|
||||
<div class="address-area mt-4 hidden sm:block">
|
||||
<address class="not-italic text-white/50">
|
||||
<div class="row my-1.5 leading-5">
|
||||
<span
|
||||
v-dompurify-html="footerAddress"
|
||||
class="[&_a]:cursor-pointer [&_a]:text-blue-500 [&_a]:underline"
|
||||
v-dompurify-html="tm('Footer_Address')"
|
||||
class="text-[13px] [&_a]:cursor-pointer [&_a]:text-white/50 [&_a]:underline"
|
||||
></span>
|
||||
</div>
|
||||
</address>
|
||||
</div>
|
||||
|
||||
<div class="mt-6 md:mt-6">
|
||||
<div class="text-xs text-white/30">{{ footerCaution }}</div>
|
||||
<div class="language-area static md:absolute bottom-7 right-10 text-white mt-5 md:mt-0 md:bottom-5.5 md:right-4">
|
||||
<BlocksLanguageSwitcher />
|
||||
</div>
|
||||
|
||||
<div class="copyright-area mt-6 text-gray-500 md:mt-4">
|
||||
<span>© Smilegate. All rights reserved</span>
|
||||
<div class="mt-6 md:mt-6 hidden sm:block">
|
||||
<div v-dompurify-html="tm('Footer_caution')" class="text-xs text-white/30"></div>
|
||||
</div>
|
||||
|
||||
<div class="copyright-area mt-6 text-[13px] text-white/50 md:mt-4">
|
||||
<span>{{ tm('Footer_Copyright') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="logo-area flex mt-6 md:mt-6">
|
||||
@@ -107,7 +111,7 @@
|
||||
class="smilegate"
|
||||
>
|
||||
<img
|
||||
src="https://static-pubcomm.gate8.com/local/template/l9/common/logo_smilegate.png"
|
||||
:src="getImageHost(`/local/template/l9/common/logo_smilegate.png`, { imageType: 'game' })"
|
||||
alt="스마일게이트 로고"
|
||||
class="w-auto h-auto"
|
||||
/>
|
||||
@@ -119,21 +123,14 @@
|
||||
class="nx3 ml-2.5 md:ml-4"
|
||||
>
|
||||
<img
|
||||
:src="`${staticUrl}${setDevCi.dev_ci_img_path}`"
|
||||
:src="getImageHost(`${setDevCi.dev_ci_img_path}`, { imageType: 'game' })"
|
||||
alt="CI"
|
||||
class="w-auto h-[24px]"
|
||||
class="block w-auto h-[22px]"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="language-area absolute bottom-7 right-10 text-white md:bottom-5.5 md:right-4"
|
||||
>
|
||||
<BlocksLanguageSwitcher />
|
||||
|
||||
<!-- <SelectLanguage /> -->
|
||||
<!-- <AtomsLanguageSwitcher /> -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</footer>
|
||||
</template>
|
||||
@@ -141,20 +138,20 @@
|
||||
<script setup lang="ts">
|
||||
import type { FooterMenuItem, FooterData, DevCiConfig } from '#layers/types/Common'
|
||||
|
||||
const config = useRuntimeConfig()
|
||||
const staticUrl = config.public.staticUrl
|
||||
const runType = config.public.runType
|
||||
// Configuration
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const dataResourcesUrl = runtimeConfig.public.dataResourcesUrl as string
|
||||
const multilingualFileName = 'test_common_template.json'
|
||||
|
||||
const translationApi = `${runType}/test/multilingual/test_common_template.json`
|
||||
|
||||
const result = await useApiData({ baseApiUrl: staticUrl, url: translationApi })
|
||||
|
||||
const { tm } = useI18n({
|
||||
useScope: 'local',
|
||||
messages: result
|
||||
// Multilingual
|
||||
const resultGetMultilingual = await useGetMultilingual({
|
||||
baseApiUrl: dataResourcesUrl,
|
||||
fileName: multilingualFileName,
|
||||
})
|
||||
const { tm }: any = useI18n({
|
||||
useScope: 'local',
|
||||
messages: Object(resultGetMultilingual?.value?.multilingual),
|
||||
})
|
||||
|
||||
// const { tm } = useI18n()
|
||||
|
||||
const gameDataStore = useGameDataStore()
|
||||
const { gameData } = storeToRefs(gameDataStore)
|
||||
@@ -174,22 +171,16 @@ const setDevCi = ref<DevCiConfig>({
|
||||
///local/template/common/grades_age
|
||||
const getGameRatingImage = computed((): string[] => {
|
||||
const contentInfo = footerData.value.game_rating_info.rating_type.split(',')
|
||||
// rating_type 12, 15, 18, 19 에 따라 이미지명을 가져오고 이미지를 반환
|
||||
const ageTypeMap: Record<string, string> = {
|
||||
'12': 'Type12',
|
||||
'15': 'Type15',
|
||||
'19': 'Type19',
|
||||
'all': 'TypeAll',
|
||||
'e': 'TypeExempt'
|
||||
}
|
||||
return contentInfo.map(item => {
|
||||
switch (item) {
|
||||
case '12':
|
||||
return getImageHost('/images/common/grades_age/Type12.svg', { imageType: 'common' })
|
||||
case '15':
|
||||
return getImageHost('/images/common/grades_age/Type15.svg', { imageType: 'common' })
|
||||
case '19':
|
||||
return getImageHost('/images/common/grades_age/Type19.svg', { imageType: 'common' })
|
||||
case 'all':
|
||||
return getImageHost('/images/common/grades_age/TypeAll.svg', { imageType: 'common' })
|
||||
case 'e':
|
||||
return getImageHost('/images/common/grades_age/TypeExempt.svg', { imageType: 'common' })
|
||||
default:
|
||||
return getImageHost('/images/common/grades_age/TypeTest.svg', { imageType: 'common' })
|
||||
}
|
||||
const type = ageTypeMap[item] || 'TypeTest'
|
||||
return getImageHost(`/images/common/grades_age/${type}.svg`, { imageType: 'common' })
|
||||
})
|
||||
})
|
||||
|
||||
@@ -197,24 +188,20 @@ const getContentInfoImage = computed((): string[] => {
|
||||
const contentInfo = footerData.value.game_rating_info.content_info.split(',')
|
||||
contentInfo.pop()
|
||||
|
||||
const contentTypeMap: Record<string, string> = {
|
||||
'1': 'Type-sexual',
|
||||
'2': 'Type-fear',
|
||||
'3': 'Type-inapposite',
|
||||
'4': 'Type-drug',
|
||||
'5': 'Type-crime',
|
||||
'6': 'Type-speculation',
|
||||
'7': 'Type-violence'
|
||||
}
|
||||
|
||||
return contentInfo.map(item => {
|
||||
switch (item) {
|
||||
case '1':
|
||||
return getImageHost('/images/common/grades_use/Type-sexual.svg', { imageType: 'common' })
|
||||
case '2':
|
||||
return getImageHost('/images/common/grades_use/Type-fear.svg', { imageType: 'common' })
|
||||
case '3':
|
||||
return getImageHost('/images/common/grades_use/Type-inapposite.svg', { imageType: 'common' })
|
||||
case '4':
|
||||
return getImageHost('/images/common/grades_use/Type-drug.svg', { imageType: 'common' })
|
||||
case '5':
|
||||
return getImageHost('/images/common/grades_use/Type-crime.svg', { imageType: 'common' })
|
||||
case '6':
|
||||
return getImageHost('/images/common/grades_use/Type-speculation.svg', { imageType: 'common' })
|
||||
case '7':
|
||||
return getImageHost('/images/common/grades_use/Type-violence.svg', { imageType: 'common' })
|
||||
}
|
||||
})
|
||||
const type = contentTypeMap[item]
|
||||
return type ? getImageHost(`/images/common/grades_use/${type}.svg`, { imageType: 'common' }) : ''
|
||||
}).filter(Boolean)
|
||||
})
|
||||
|
||||
const showAgeRating = ref<boolean>(false)
|
||||
@@ -222,37 +209,12 @@ const toggleAgeRating = (): void => {
|
||||
showAgeRating.value = !showAgeRating.value
|
||||
}
|
||||
|
||||
// 템플릿에서 사용할 다국어 텍스트들
|
||||
const footerAgeRating = computed((): string => {
|
||||
const text = (tm as any)('Footer_AgeRating')
|
||||
return typeof text === 'string' ? text : ''
|
||||
})
|
||||
const footerAgeRatingInfo = computed((): string[] => {
|
||||
const info = (tm as any)('Footer_AgeRating_Info')
|
||||
return Array.isArray(info) ? info : []
|
||||
})
|
||||
const footerAddress = computed((): string => {
|
||||
const address = (tm as any)('Footer_Address')
|
||||
return typeof address === 'string' ? address : ''
|
||||
})
|
||||
const footerCaution = computed((): string => {
|
||||
const caution = (tm as any)('Footer_caution')
|
||||
return typeof caution === 'string' ? caution : ''
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
/* 태국어 폰트 크기 조정 */
|
||||
@media (max-width: 411px) {
|
||||
:global(.lang-th) .menu-area li {
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 321px) {
|
||||
:global(.lang-th) .menu-area li {
|
||||
font-size: 9px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user