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

Use zh-TW for language code, instead of zh_Hant. #725

Merged
merged 1 commit into from
Jul 27, 2022
Merged
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 src/shared/i18next.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const languages = [
{ resource: sv, code: "sv", name: "Svenska" },
{ resource: vi, code: "vi", name: "Tiếng Việt" },
{ resource: zh, code: "zh", name: "中文 (简体)" },
{ resource: zh_Hant, code: "zh_Hant", name: "中文 (繁體)" },
{ resource: zh_Hant, code: "zh-TW", name: "中文 (繁體)" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must use an underscore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you elaborate more why we must use an underscore here?
I have tested on my machine. It seems that it's not OK to use underscores for both zh_TW and pt_BR.
Lemmy (without a login) will not pick the correct language based on browser settings.

Copy link
Contributor Author

@sonata-chen sonata-chen Jul 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my browser setting
navigator.languages: [ "zh-TW", "en-US", "en" ]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah... I was under the impression it needed one, coulda swore I tested that with pt-BR. In that case I'll trust your judgement here, thx!

];

const resources: Resource = {};
Expand Down