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 Simplified Chinese translation #4379

Merged
merged 6 commits into from
Mar 25, 2024

Conversation

stout-ni
Copy link
Contributor

Changes:

  • Added zh_CN.json for Simplified Chinese translation.
  • Modified some minor issues in README.md:
    • Fixed the issue that the path docs/check-message-template.md was not found.
    • Updated the supported languages (added Greek, Italian, Simplified Chinese and Traditional Chinese).

@stout-ni stout-ni requested a review from a team as a code owner March 20, 2024 05:02
@CLAassistant
Copy link

CLAassistant commented Mar 20, 2024

CLA assistant check
All committers have signed the CLA.

locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
@stout-ni
Copy link
Contributor Author

@dequejosie Thanks for your review, I have made the latest changes. Please take another look to see if there are any other problems.

locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
"help": "有相同名称的链接必须有相似的目的"
},
"image-alt": {
"description": "确保 <img> 元素有替代文本或 role 属性为 \"none\" 或 \"presentation\"",
Copy link
Contributor

@dequejosie dequejosie Mar 23, 2024

Choose a reason for hiding this comment

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

"确保<img>元素有替代文本或角色属性为 "none" 或 "presentation""

Copy link
Contributor Author

@stout-ni stout-ni Mar 24, 2024

Choose a reason for hiding this comment

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

I think it would be better to directly use the English word "role" here. Therefore, the role mentioned here refers to a specific attribute name within an element, such as the "id" attribute, which may be more difficult to understand when translated into Chinese.

Copy link
Contributor

@dequejosie dequejosie Mar 25, 2024

Choose a reason for hiding this comment

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

That's fair. We could stick to this rule to determine when to translate and when to not.

"help": "aria-braille 相关属性必须有非盲文的对应属性"
},
"aria-command-name": {
"description": "确保每个 ARIA 按钮、链接和菜单项都有可访问名称",
Copy link
Contributor

@dequejosie dequejosie Mar 23, 2024

Choose a reason for hiding this comment

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

确保每个 ARIA 按钮、链接和菜单项都有可访问(accessible)名称

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do all the "可访问" in the file need to be followed by (accessible)?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, just for the first time. Please see the reason in the other comment.

"help": "不得使用已弃用的 ARIA 角色属性"
},
"aria-dialog-name": {
"description": "确保每个 ARIA 对话框和警示框节点都有可访问的名称",
Copy link
Contributor

@dequejosie dequejosie Mar 23, 2024

Choose a reason for hiding this comment

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

确保每个 ARIA 对话框和警示框节点(node)都有可访问的名称

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do all the "节点" in the file need to be followed by (node)?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, just for the first time. Please see the reason in the other comment.

"help": "<area> 元素必须有替代文本"
},
"aria-allowed-attr": {
"description": "确保元素的角色支持其 ARIA 属性",
Copy link
Contributor

Choose a reason for hiding this comment

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

确保元素的角色(role)支持其 ARIA 属性

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do all the "角色" in the file need to be followed by (role)?

Copy link
Contributor

@dequejosie dequejosie Mar 25, 2024

Choose a reason for hiding this comment

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

No, just for the first time to map the Chinese translation to the English word, because the word is pretty abstract and there are multiple possible translations. The same answer applies to the other similar scenarios too.

locales/zh_CN.json Outdated Show resolved Hide resolved
},
"td-has-header": {
"description": "确保大于 3 x 3 的 <table> 中每个非空数据单元格都有一个或多个表头",
"help": "较大 <table> 中的非空 <td> 元素必须有关联的表头"
Copy link
Contributor

Choose a reason for hiding this comment

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

确保大于 3 x 3 的表格中每个非空数据单元格都有一个或多个表头
较大表格中的非空 元素必须有关联的表头

Copy link
Contributor Author

@stout-ni stout-ni Mar 24, 2024

Choose a reason for hiding this comment

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

Why is "表格" used here instead of the <table> tag?

Copy link
Contributor

@dequejosie dequejosie Mar 25, 2024

Choose a reason for hiding this comment

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

I just sensed some inconsistence in terms of using the English word or the Chinese translation, but yeah, like what you suggested for role attribute, we could keep <table> here too.

locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
locales/zh_CN.json Outdated Show resolved Hide resolved
stout-ni and others added 2 commits March 24, 2024 11:52
Co-authored-by: dequejosie <83524297+dequejosie@users.noreply.github.com>
@stout-ni stout-ni requested a review from dequejosie March 24, 2024 05:27
@@ -79,7 +79,7 @@
},
"aria-roles": {
"description": "确保所有元素包含的 role 属性值都是有效的",
"help": "使用的 ARIA 角色必须符合有效的值"
"help": "使用的 ARIA 角色属性值必须有效"
Copy link
Contributor

@dequejosie dequejosie Mar 25, 2024

Choose a reason for hiding this comment

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

Here is what I meant by inconsistence. Some of the "role" as attribute is translated and some of them is not. So I hope the mapping at the very beginning would help.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand what you mean. Thank you for your review.

@dequejosie
Copy link
Contributor

It looks good to me.

Copy link
Contributor

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

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

We're all set then. Thank you so much for this kind contribution @stout-ni!

For the books - I reviewed this PR for security.

@WilcoFiers WilcoFiers merged commit bda7c8d into dequelabs:develop Mar 25, 2024
19 of 21 checks passed
WilcoFiers added a commit that referenced this pull request Mar 25, 2024
##
[4.9.0](v4.8.4...v4.9.0)
(2024-03-25)

### Features

- adding the wcag131 tag to the aria-hidden-body rule
([#4349](#4349))
([dd4c3c3](dd4c3c3)),
closes [#4315](#4315)
- **checks:** deprecate aria-busy check
([#4356](#4356))
([be0b555](be0b555)),
closes [#4347](#4347)
[#4340](#4340)
- **color:** add color channel values and luminosity, saturation, clip
functions ([#4366](#4366))
([9e70199](9e70199)),
closes
[/github.com//pull/4365/files#r1517706612](https://github.com/dequelabs//github.com/dequelabs/axe-core/pull/4365/files/issues/r1517706612)
- **i18n:** add Greek Translations
([#3836](#3836))
([3ea9a48](3ea9a48))
- **i18n:** Add Italian translation
([#4344](#4344))
([de1baa9](de1baa9))
- **i18n:** Add Simplified Chinese translation
([#4379](#4379))
([bda7c8d](bda7c8d))
- **i18n:** Add Taiwanese Mandarin translation
([#4299](#4299))
([c5e11de](c5e11de))

### Bug Fixes

- Add LICENSE-3RD-PARTY.txt file
([#4304](#4304))
([daa0fe6](daa0fe6))
- add Object.values polyfill for node <=6
([#4274](#4274))
([5eb867b](5eb867b))
- **aria-required-children:** avoid confusing aria-busy message in
failures ([#4347](#4347))
([591607d](591607d)),
closes [#fail13](https://github.com/dequelabs/axe-core/issues/fail13)
[#4340](#4340)
- avoid reading element-specific node properties of non-element node
types ([#4317](#4317))
([b853b18](b853b18)),
closes [#4316](#4316)
[#4316](#4316)
- **color-contrast:** handle text that is outside `overflow: hidden`
ancestor ([#4357](#4357))
([bdb7300](bdb7300)),
closes [#4253](#4253)
- **color-contrast:** support color blend modes hue, saturation, color,
luminosity ([#4365](#4365))
([7ae4761](7ae4761))
- **d.ts:** RawNodesResult issues
([#4229](#4229))
([d660518](d660518))
- **d.ts:** RunOptions.reporter can be any string
([#4218](#4218))
([e53f5c5](e53f5c5))
- **i18n:** update Italian translations
([#4377](#4377))
([4d65d4b](4d65d4b))
- **listitem:** clarify roleNotValid message
([#4374](#4374))
([0f8a9af](0f8a9af))
- **scrollable-region-focusable:** missing wcag213 tag
([#4201](#4201))
([0080a72](0080a72))
- **target-size:** always pass 10x targets (avoid perf bottleneck)
([#4376](#4376))
([be327c4](be327c4))
- **target-size:** do not crash for nodes with many overlapping widgets
([#4373](#4373))
([1dbea83](1dbea83)),
closes [#4359](#4359)
[#4359](#4359)
[#4360](#4360)
- **utils/get-selector:** ignore 'xmlns' attribute when generating a
selector ([#4303](#4303))
([938b411](938b411))

This PR was opened by a robot 🤖 🎉
@stout-ni stout-ni deleted the feat/locale-zhCN branch March 25, 2024 20:38
@stout-ni stout-ni restored the feat/locale-zhCN branch March 25, 2024 20:42
@stout-ni stout-ni deleted the feat/locale-zhCN branch March 25, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants