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

feat(i18n): add i18n package & language setting page #3

Merged
merged 33 commits into from
Feb 20, 2023
Merged

Conversation

uier
Copy link
Member

@uier uier commented Sep 3, 2022

#2

@uier uier linked an issue Oct 6, 2022 that may be closed by this pull request
2 tasks
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 5, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1f2f5c3
Status: ✅  Deploy successful!
Preview URL: https://bb92d285.nfe.pages.dev
Branch Preview URL: https://feat-i18n.nfe.pages.dev

View logs

@uier
Copy link
Member Author

uier commented Dec 6, 2022

@Misawai great works, keep going!

@as535364
Copy link
Member

as535364 commented Jan 3, 2023

https://github.com/sparanoid/chinese-copywriting-guidelines
或許需要參考一下這個

@uier
Copy link
Member Author

uier commented Jan 12, 2023

@Misawai commit message should be able to tell others what changes you made, the latest two commit messages didn't include useful information.

Also, I recommend to use Conventional Commits, it can be installed by python: https://github.com/commitizen-tools/commitizen

If you have any questions about commit message, we can discuss on Discord

@Misawai
Copy link
Collaborator

Misawai commented Jan 12, 2023

Thanks for that helpful information. I will check them.

Misawai and others added 10 commits January 31, 2023 14:57
* feat(course/[name/]problems): subsitute orginal text to i18n variant

* feat(course/[name]/submissions):subsitute text to i18n variant

* feat(i18n/chinese.ts): add new chinese ver. translation of course/[name]/problems and ../submissions

* fix():fix typo in pages/course/[name]/problems and ../homeworks and fix some translation tone in zh language

* feat(HomeworkCard): subsitute original text until ln 63 to i18n variant

* feat(HomeworkCard.vue):subsitute rest of the text in the page to i18n variant

* feat(i18n/chinese.ts): add Chinese translation of HomeworkCard.vue

* fix(i18n/chinese.ts): change to another translation text

* fix: normalize line endings

* fix(HomeworkCard.vue): update various translation and name style suggestions by uier

---------

Co-authored-by: bogay <[email protected]>
Co-authored-by: TzuWei <[email protected]>
* feat(course/[name/]problems): subsitute orginal text to i18n variant

* feat(course/[name]/submissions):subsitute text to i18n variant

* feat(i18n/chinese.ts): add new chinese ver. translation of course/[name]/problems and ../submissions

* fix():fix typo in pages/course/[name]/problems and ../homeworks and fix some translation tone in zh language

* feat(HomeworkCard): subsitute original text until ln 63 to i18n variant

* feat(HomeworkCard.vue):subsitute rest of the text in the page to i18n variant

* feat(i18n/chinese.ts): add Chinese translation of HomeworkCard.vue

* fix(i18n/chinese.ts): change to another translation text

* fix: normalize line endings

* fix: normalize endline character

---------

Co-authored-by: bogay <[email protected]>
Co-authored-by: TzuWei <[email protected]>
* feat(course/[name/]problems): subsitute orginal text to i18n variant

* feat(course/[name]/submissions):subsitute text to i18n variant

* feat(i18n/chinese.ts): add new chinese ver. translation of course/[name]/problems and ../submissions

* fix():fix typo in pages/course/[name]/problems and ../homeworks and fix some translation tone in zh language

* feat(HomeworkCard): subsitute original text until ln 63 to i18n variant

* feat(HomeworkCard.vue):subsitute rest of the text in the page to i18n variant

* feat(i18n/chinese.ts): add Chinese translation of HomeworkCard.vue

* fix(i18n/chinese.ts): change to another translation text

* fix: normalize line endings

* fix: normalize endline character

* fix: normalize endline character

---------

Co-authored-by: bogay <[email protected]>
Co-authored-by: TzuWei <[email protected]>
* feat(course/[name/]problems): subsitute orginal text to i18n variant

* feat(course/[name]/submissions):subsitute text to i18n variant

* feat(i18n/chinese.ts): add new chinese ver. translation of course/[name]/problems and ../submissions

* fix():fix typo in pages/course/[name]/problems and ../homeworks and fix some translation tone in zh language

* feat(HomeworkCard): subsitute original text until ln 63 to i18n variant

* feat(HomeworkCard.vue):subsitute rest of the text in the page to i18n variant

* feat(i18n/chinese.ts): add Chinese translation of HomeworkCard.vue

* fix(i18n/chinese.ts): change to another translation text

* fix: normalize line endings

* fix: normalize endline character

* fix: normalize endline character

* fix: endline character renormalize to LF

---------

Co-authored-by: bogay <[email protected]>
Co-authored-by: TzuWei <[email protected]>
* feat(course/[name/]problems): subsitute orginal text to i18n variant

* feat(course/[name]/submissions):subsitute text to i18n variant

* feat(i18n/chinese.ts): add new chinese ver. translation of course/[name]/problems and ../submissions

* fix():fix typo in pages/course/[name]/problems and ../homeworks and fix some translation tone in zh language

* feat(HomeworkCard): subsitute original text until ln 63 to i18n variant

* feat(HomeworkCard.vue):subsitute rest of the text in the page to i18n variant

* feat(i18n/chinese.ts): add Chinese translation of HomeworkCard.vue

* fix(i18n/chinese.ts): change to another translation text

* fix: normalize line endings

* fix: normalize endline character

* fix: normalize endline character

* fix: endline character renormalize to LF

* fix: endline character fix to LF

---------

Co-authored-by: bogay <[email protected]>
Co-authored-by: TzuWei <[email protected]>
* feat(course/[name/]problems): subsitute orginal text to i18n variant

* feat(course/[name]/submissions):subsitute text to i18n variant

* feat(i18n/chinese.ts): add new chinese ver. translation of course/[name]/problems and ../submissions

* fix():fix typo in pages/course/[name]/problems and ../homeworks and fix some translation tone in zh language

* feat(HomeworkCard): subsitute original text until ln 63 to i18n variant

* feat(HomeworkCard.vue):subsitute rest of the text in the page to i18n variant

* feat(i18n/chinese.ts): add Chinese translation of HomeworkCard.vue

* fix(i18n/chinese.ts): change to another translation text

* fix: normalize line endings

* fix: normalize endline character

* fix: normalize endline character

* fix: endline character renormalize to LF

* fix: endline character fix to LF

* fix: fix endline character to LF

---------

Co-authored-by: bogay <[email protected]>
Co-authored-by: TzuWei <[email protected]>
* feat(course/[name/]problems): subsitute orginal text to i18n variant

* feat(course/[name]/submissions):subsitute text to i18n variant

* feat(i18n/chinese.ts): add new chinese ver. translation of course/[name]/problems and ../submissions

* fix():fix typo in pages/course/[name]/problems and ../homeworks and fix some translation tone in zh language

* feat(HomeworkCard): subsitute original text until ln 63 to i18n variant

* feat(HomeworkCard.vue):subsitute rest of the text in the page to i18n variant

* feat(i18n/chinese.ts): add Chinese translation of HomeworkCard.vue

* fix(i18n/chinese.ts): change to another translation text

* feat(SideBar.vue): subsitute text to i18n variant

* feat(chinese.ts): add in chinese translation of SideBar.vue

* feat(ProblemDescriptionForm.vue): subsitute text to i18n variant

* feat(chinese.ts): add in new Chinese translation of ProblemDescriptionForm.vue

* feat(ProblemCard.vue): subsitute text to i18n variant

* feat(chinese.ts): add Chinese translation of ProblemCard.vue

* fix(chinese.ts):update typo of probCard section

* feat: translate en to zh of CourseSideBar.vue

* feat(course/[name]/submission/[id].vue):subsitute text to i18n variant

* fix:fix chinese typo

* feat:fix typo and add in text of submission status

* feat(LoginSection.vue): text subsituted and Chinese translation has finished

* fix(LoginSection.vue): fix unexpected display when apply i18n in ``

* fix: fix fluency of translation word in Engilsh and Chinese languages

* fix(LoginSection.vue): fix typo in {{? :}}

* fix: endline character renormalize to LF

---------

Co-authored-by: TzuWei <[email protected]>
* feat(course/[name/]problems): subsitute orginal text to i18n variant

* feat(course/[name]/submissions):subsitute text to i18n variant

* feat(i18n/chinese.ts): add new chinese ver. translation of course/[name]/problems and ../submissions

* fix():fix typo in pages/course/[name]/problems and ../homeworks and fix some translation tone in zh language

* feat(HomeworkCard): subsitute original text until ln 63 to i18n variant

* feat(HomeworkCard.vue):subsitute rest of the text in the page to i18n variant

* feat(i18n/chinese.ts): add Chinese translation of HomeworkCard.vue

* fix(i18n/chinese.ts): change to another translation text

* feat(SideBar.vue): subsitute text to i18n variant

* feat(chinese.ts): add in chinese translation of SideBar.vue

* feat(ProblemDescriptionForm.vue): subsitute text to i18n variant

* feat(chinese.ts): add in new Chinese translation of ProblemDescriptionForm.vue

* feat(ProblemCard.vue): subsitute text to i18n variant

* feat(chinese.ts): add Chinese translation of ProblemCard.vue

* fix(chinese.ts):update typo of probCard section

* feat: translate en to zh of CourseSideBar.vue

* feat(course/[name]/submission/[id].vue):subsitute text to i18n variant

* fix:fix chinese typo

* feat:fix typo and add in text of submission status

* feat(LoginSection.vue): text subsituted and Chinese translation has finished

* fix(LoginSection.vue): fix unexpected display when apply i18n in ``

* fix: fix fluency of translation word in Engilsh and Chinese languages

* fix(LoginSection.vue): fix typo in {{? :}}

* fix: endline character renormalize to LF

* feat(DueCountdown): subsitute text to i18n variant and translate text to Chinese

* fix: change class name to lowercase

---------

Co-authored-by: TzuWei <[email protected]>
Misawai and others added 6 commits February 11, 2023 15:39
* feat(course/[name/]problems): subsitute orginal text to i18n variant

* feat(course/[name]/submissions):subsitute text to i18n variant

* feat(i18n/chinese.ts): add new chinese ver. translation of course/[name]/problems and ../submissions

* fix():fix typo in pages/course/[name]/problems and ../homeworks and fix some translation tone in zh language

* feat(HomeworkCard): subsitute original text until ln 63 to i18n variant

* feat(HomeworkCard.vue):subsitute rest of the text in the page to i18n variant

* feat(i18n/chinese.ts): add Chinese translation of HomeworkCard.vue

* fix(i18n/chinese.ts): change to another translation text

* feat(SideBar.vue): subsitute text to i18n variant

* feat(chinese.ts): add in chinese translation of SideBar.vue

* feat(ProblemDescriptionForm.vue): subsitute text to i18n variant

* feat(chinese.ts): add in new Chinese translation of ProblemDescriptionForm.vue

* feat(ProblemCard.vue): subsitute text to i18n variant

* feat(chinese.ts): add Chinese translation of ProblemCard.vue

* fix(chinese.ts):update typo of probCard section

* feat: translate en to zh of CourseSideBar.vue

* feat(course/[name]/submission/[id].vue):subsitute text to i18n variant

* fix:fix chinese typo

* feat:fix typo and add in text of submission status

* feat(LoginSection.vue): text subsituted and Chinese translation has finished

* fix(LoginSection.vue): fix unexpected display when apply i18n in ``

* fix: fix fluency of translation word in Engilsh and Chinese languages

* fix(LoginSection.vue): fix typo in {{? :}}

* fix: endline character renormalize to LF

* feat(DueCountdown): subsitute text to i18n variant and translate text to Chinese

* fix: change class name to lowercase

* feat: translate text to chinese and subsitute i18n variant

---------

Co-authored-by: TzuWei <[email protected]>
* feat(course/[name/]problems): subsitute orginal text to i18n variant

* feat(course/[name]/submissions):subsitute text to i18n variant

* feat(i18n/chinese.ts): add new chinese ver. translation of course/[name]/problems and ../submissions

* fix():fix typo in pages/course/[name]/problems and ../homeworks and fix some translation tone in zh language

* feat(HomeworkCard): subsitute original text until ln 63 to i18n variant

* feat(HomeworkCard.vue):subsitute rest of the text in the page to i18n variant

* feat(i18n/chinese.ts): add Chinese translation of HomeworkCard.vue

* fix(i18n/chinese.ts): change to another translation text

* feat(SideBar.vue): subsitute text to i18n variant

* feat(chinese.ts): add in chinese translation of SideBar.vue

* feat(ProblemDescriptionForm.vue): subsitute text to i18n variant

* feat(chinese.ts): add in new Chinese translation of ProblemDescriptionForm.vue

* feat(ProblemCard.vue): subsitute text to i18n variant

* feat(chinese.ts): add Chinese translation of ProblemCard.vue

* fix(chinese.ts):update typo of probCard section

* feat: translate en to zh of CourseSideBar.vue

* feat(course/[name]/submission/[id].vue):subsitute text to i18n variant

* fix:fix chinese typo

* feat:fix typo and add in text of submission status

* feat(LoginSection.vue): text subsituted and Chinese translation has finished

* fix(LoginSection.vue): fix unexpected display when apply i18n in ``

* fix: fix fluency of translation word in Engilsh and Chinese languages

* fix(LoginSection.vue): fix typo in {{? :}}

* fix: endline character renormalize to LF

* feat(DueCountdown): subsitute text to i18n variant and translate text to Chinese

* fix: change class name to lowercase

* feat: translate text to chinese and subsitute i18n variant

* feat: translate stats.vue to Chinese

* Merge branch 'feat/i18n' into feat/i18n-stats

---------

Co-authored-by: TzuWei <[email protected]>
* feat(course/[name/]problems): subsitute orginal text to i18n variant

* feat(course/[name]/submissions):subsitute text to i18n variant

* feat(i18n/chinese.ts): add new chinese ver. translation of course/[name]/problems and ../submissions

* fix():fix typo in pages/course/[name]/problems and ../homeworks and fix some translation tone in zh language

* feat(HomeworkCard): subsitute original text until ln 63 to i18n variant

* feat(HomeworkCard.vue):subsitute rest of the text in the page to i18n variant

* feat(i18n/chinese.ts): add Chinese translation of HomeworkCard.vue

* fix(i18n/chinese.ts): change to another translation text

* feat(SideBar.vue): subsitute text to i18n variant

* feat(chinese.ts): add in chinese translation of SideBar.vue

* feat(ProblemDescriptionForm.vue): subsitute text to i18n variant

* feat(chinese.ts): add in new Chinese translation of ProblemDescriptionForm.vue

* feat(ProblemCard.vue): subsitute text to i18n variant

* feat(chinese.ts): add Chinese translation of ProblemCard.vue

* fix(chinese.ts):update typo of probCard section

* feat: translate en to zh of CourseSideBar.vue

* feat(course/[name]/submission/[id].vue):subsitute text to i18n variant

* fix:fix chinese typo

* feat:fix typo and add in text of submission status

* feat(LoginSection.vue): text subsituted and Chinese translation has finished

* fix(LoginSection.vue): fix unexpected display when apply i18n in ``

* fix: fix fluency of translation word in Engilsh and Chinese languages

* fix(LoginSection.vue): fix typo in {{? :}}

* fix: endline character renormalize to LF

* feat(DueCountdown): subsitute text to i18n variant and translate text to Chinese

* fix: change class name to lowercase

* feat: translate text to chinese and subsitute i18n variant

* feat: translate stats.vue to Chinese

* feat: translate formatTime

* feat(settings.vue): intergrated localize package in dayjs to language selection

Since dayjs provides localize package in different lang code, using switch method to combine to the exist language code

* refactor(dayjs): move locale changing from settings.vue to App.vue to avoid not detecting right lang at the beginning

---------

Co-authored-by: TzuWei <[email protected]>
@uier
Copy link
Member Author

uier commented Feb 12, 2023

另外我們從 useI18n() import 的 t 都只有在 template 用到

或許該設一個全域的 $t 來使用

更:看起來 vue-i18n 本來就有 XD

@uier uier marked this pull request as ready for review February 14, 2023 04:23
@uier
Copy link
Member Author

uier commented Feb 14, 2023

中英文翻譯的部份可以開始供大家 review 了

@uier
Copy link
Member Author

uier commented Feb 14, 2023

一個蠻重要的問題是助教在跟學生說明平台時用到的專有名詞,翻譯的部份要比較慎重
例如 PID題號,不見得所有人都知道他們是指同樣的東西,我們可以選擇不翻譯 PID題號,否則助教就要注意說明時的用詞,較謹慎的說法可能是「題號(PID)」

@uier
Copy link
Member Author

uier commented Feb 14, 2023

另外 Submissions 的 繳交狀態 我在想狀態兩字是否不需要?

@uier
Copy link
Member Author

uier commented Feb 14, 2023

tag 一些對上述討論可能會有興趣參與的人

@Misawai @toto6038 @ra890927 @Bogay

@Misawai
Copy link
Collaborator

Misawai commented Feb 14, 2023

另外 Submissions 的 繳交狀態 我在想狀態兩字是否不需要?

翻譯時考量「繳交」一般語境做動詞,故加上「狀態」二字做名詞。
若直接翻成「繳交」,代表日後相關字詞需以名詞看待。

@Bogay
Copy link
Member

Bogay commented Feb 14, 2023

一個蠻重要的問題是助教在跟學生說明平台時用到的專有名詞,翻譯的部份要比較慎重
例如 PID題號,不見得所有人都知道他們是指同樣的東西,我們可以選擇不翻譯 PID題號,否則助教就要注意說明時的用詞,較謹慎的說法可能是「題號(PID)」

我覺得題號還好欸,應該不容易誤會成其他東西?

@uier
Copy link
Member Author

uier commented Feb 17, 2023

我剛剛發現此 PR 新加入了 commitizen,在之前大家都是各自裝自己喜歡的 cli,沒有特別加到 dependency,可能要討論一下

@uier uier merged commit 258d67f into main Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants