Skip to content

Commit

Permalink
Merge pull request #191 from yang1206/master
Browse files Browse the repository at this point in the history
feat(locale): add zh-CN Mainland China translation
  • Loading branch information
dargmuesli authored Feb 23, 2024
2 parents c5aed50 + a450413 commit 5619f7f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

![nuxt-cookie-control](https://drive.google.com/a/broj42.com/uc?id=19sFguJo7SKUvmH4xu9DhK9ZXzR6oWLX8)

✅ Translated for: ar, az, bg, ca, cs, da, de, en, es, fi, fr, hr, hu, id, it, ja, ko, lt, nl, no, oc, pt, pl, ro, rs, ru, sk, sv, tr and uk
✅ Translated for: ar, az, bg, ca, cs, da, de, en, es, fi, fr, hr, hu, id, it, ja, ko, lt, nl, no, oc, pt, pl, ro, rs, ru, sk, sv, tr, uk and zh-CN

✅ Vue 3 support

Expand Down
3 changes: 2 additions & 1 deletion src/runtime/locale/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import sk from './sk'
import sv from './sv'
import tr from './tr'
import uk from './uk'

import zhCN from './zh-CN'
export const locales = [
ar,
az,
Expand Down Expand Up @@ -60,4 +60,5 @@ export const locales = [
sv,
tr,
uk,
zhCN,
]
20 changes: 20 additions & 0 deletions src/runtime/locale/zh-CN.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { LocaleStrings } from '../types'

export default {
accept: '接受',
acceptAll: '接受所有',
bannerDescription:
'我们使用自己的cookie和第三方cookie,以便我们能够正确显示本网站并更好地了解本网站的使用方式,以改善我们提供的服务。关于cookie使用权限的决定可以随时使用cookie按钮进行更改,该按钮将在此横幅上进行选择后显示。',
bannerTitle: 'Cookies',
close: '关闭',
cookiesFunctional: '功能性 Cookies',
cookiesNecessary: '必要 Cookies',
cookiesOptional: '可选 Cookies',
decline: '拒绝',
declineAll: '拒绝所有',
here: '在这里',
iframeBlocked: '如需查看,请启用功能 Cookie',
manageCookies: '了解更多信息并进行自定义',
save: '保存',
settingsUnsaved: '您有未保存的设置',
} as LocaleStrings
1 change: 1 addition & 0 deletions src/runtime/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export type Locale =
| 'sv'
| 'tr'
| 'uk'
| 'zh-CN'

export type PartialRecord<K extends keyof any, T> = Partial<Record<K, T>>

Expand Down

0 comments on commit 5619f7f

Please sign in to comment.