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

[zh-cn]: update the translation of Location hash property #24798

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

T34-active
Copy link
Contributor

@T34-active T34-active requested a review from a team as a code owner November 27, 2024 03:10
@T34-active T34-active requested review from JasonLamv-t and removed request for a team November 27, 2024 03:10
@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label Nov 27, 2024
Copy link
Contributor

github-actions bot commented Nov 27, 2024

Preview URLs

(comment last updated: 2024-12-13 12:43:01)

@JasonLamv-t JasonLamv-t enabled auto-merge (squash) November 27, 2024 14:51
@yin1999 yin1999 disabled auto-merge November 27, 2024 14:51
Comment on lines 21 to 25
<a id="myAnchor" href="/zh-CN/docs/Location.href#示例">示例</a>
<script>
var anchor = document.getElementById("myAnchor");
console.log(anchor.hash); // 返回'#Examples'
const anchor = document.getElementById("myAnchor");
console.log(anchor.hash); // '#示例'
</script>
Copy link
Member

@yin1999 yin1999 Nov 27, 2024

Choose a reason for hiding this comment

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

Is the example here appropriate?

The Location interface is accessible via Document.location and Window.location respectively.
--- from The Location interface

I don't think we should use an <a> element here, as <a> element is the implemetation of HTMLAnchorElement interface (not the Location interface).


Another issue on the content of this example. The hash property would be percent-encoded (see the test I made below), so the description above is also wrong 😢

It seems that only non-ascii characters will be encoded (details: mdn/content#37003)

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

我先去修改上游

@T34-active T34-active marked this pull request as draft November 29, 2024 07:08
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added the merge conflicts 🚧 This pull request has merge conflicts that must be resolved. label Dec 13, 2024
@github-actions github-actions bot removed the merge conflicts 🚧 This pull request has merge conflicts that must be resolved. label Dec 13, 2024
@T34-active T34-active marked this pull request as ready for review December 20, 2024 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-zh Issues related to Chinese content.
Projects
Status: Review requested
Development

Successfully merging this pull request may close these issues.

3 participants