Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 @intlify/unplugin-vue-i18n 改善翻譯 #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion locales/en/home.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"coc": {
"title": "COSCUP Code of Conduct",
"content": "Since 2006, the COSCUP, Conference for Open Source Coders, Users, and Promoters has gradually developed into an annual event in the Chinese-speaking open-source community. In establishing an open, friendly, diverse, inclusive, and transparent open-source community environment, COSCUP believes that “respecting all people” is the most basic social consensus. On this basis, we promote equal interaction, maintain community values, prevent the occurrence of inappropriate incidents, and avoid any form of discrimination or harassment of all participants. This is the direction COSCUP strives towards, and therefore, the establishment of this Code of Conduct is the concrete implementation of this goal and also a fulfillment of our social responsibility.\n\n[More](https://hackmd.io/@coscup/cococo-en)"
"content": "Since 2006, the COSCUP, Conference for Open Source Coders, Users, and Promoters has gradually developed into an annual event in the Chinese-speaking open-source community. In establishing an open, friendly, diverse, inclusive, and transparent open-source community environment, COSCUP believes that “respecting all people” is the most basic social consensus. On this basis, we promote equal interaction, maintain community values, prevent the occurrence of inappropriate incidents, and avoid any form of discrimination or harassment of all participants. This is the direction COSCUP strives towards, and therefore, the establishment of this Code of Conduct is the concrete implementation of this goal and also a fulfillment of our social responsibility.\n\n[More](https://hackmd.io/{'@'}coscup/cococo-en)"
},
"about": {
"title": "About COSCUP",
Expand Down
4 changes: 2 additions & 2 deletions locales/en/sponsorship.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"title": "SOLD OUT: Thanks to the support of all sponsors, COSCUP 2023 is officially closed for sponsorship requests.",
"list": [
"Sponsors are welcome to visit COSCUP on both days of the event and email us to reserve a sponsorship for COSCUP 2023.",
"email: sponsorship@coscup.org"
"email: sponsorship{'@'}coscup.org"
]
},
"description": "For the past 3 to 5 years, COSCUP has received an average of 2,000 participants from dozens of communities.",
Expand Down Expand Up @@ -251,7 +251,7 @@
"list": [
{
"q": "Besides the current sponsorship plan, can I sponsor other projects or items?",
"a": "Yes, contact us at [sponsorship@coscup.org](mailto:sponsorship@coscup.org) to create custom sponsorship packages."
"a": "Yes, contact us at [sponsorship{'@'}coscup.org](mailto:sponsorship{'@'}coscup.org) to create custom sponsorship packages."
},
{
"q": "Our company would like to have a booth at COSCUP. Which sponsorship level should we choose?",
Expand Down
4 changes: 2 additions & 2 deletions locales/zh-TW/sponsorship.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"title": "售罄:感激所有贊助商支持, COSCUP 2023 贊助徵求正式截止。",
"list": [
"歡迎所有贊助商在活動兩天參觀 COSCUP,並來信預約 COSCUP 2023 贊助。",
"email: sponsorship@coscup.org"
"email: sponsorship{'@'}coscup.org"
]
},
"description": "COSCUP 過去三至五年平均約有 2,000 多位會眾和數十個社群一同參與。",
Expand Down Expand Up @@ -258,7 +258,7 @@
"list": [
{
"q": "除了目前的贊助方案,還可以贊助其他項目嗎?或是不需要某些項目換折扣",
"a": "COSCUP 歡迎洽談客製化贊助方案,請來信聯繫我們:[sponsorship@coscup.org](mailto:sponsorship@coscup.org)"
"a": "COSCUP 歡迎洽談客製化贊助方案,請來信聯繫我們:[sponsorship{'@'}coscup.org](mailto:sponsorship{'@'}coscup.org)"
},
{
"q": "我們公司想要在 COSCUP 擺攤位,要選擇哪個贊助級別呢?",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"dependencies": {
"@gtm-support/vue-gtm": "^2.0.0",
"@intlify/unplugin-vue-i18n": "1.0.0",
"@types/socket.io-client": "^1.4.36",
"@vueuse/core": "^10.0.2",
"@vueuse/shared": "^10.1.2",
Expand Down
156 changes: 145 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/modules/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ function getFallbackLocale () {
return 'en'
}

const i18nOptions: I18nOptions = {
legacy: false,
const i18nOptions = {
// legacy: false,
locale: 'zh-TW',
fallbackLocale: getFallbackLocale(),
messages
Expand Down Expand Up @@ -69,7 +69,7 @@ export const setupI18nRoutes = (routes: RouteRecordRaw[]) => {
}

export const install: UserModuleInstall = ({ app }) => {
const i18n = createI18n<I18nOptions>(i18nOptions)
const i18n = createI18n(i18nOptions)
app.use(i18n)
}

Expand Down
Loading