Skip to content

i18n(zh-CN): update reference/api-reference.mdx - #14457

Open
fyihang wants to merge 1 commit into
withastro:mainfrom
fyihang:i18n-zh-cn/update-api-reference
Open

i18n(zh-CN): update reference/api-reference.mdx#14457
fyihang wants to merge 1 commit into
withastro:mainfrom
fyihang:i18n-zh-cn/update-api-reference

Conversation

@fyihang

@fyihang fyihang commented Aug 23, 2026

Copy link
Copy Markdown

Description (required)

Brings the zh-CN reference/api-reference.mdx translation up to date with the current English version (syncs 9 upstream commits).

Main changes synced:

  • New csp, cache (cache.enabled / cache.set() / cache.options / cache.tags / cache.invalidate()) and logger sections — these provide the anchors that the new zh-CN caching/logger pages link to
  • Updated url, Astro.response, context.redirect(), context.rewrite(), session and cookies sections
  • Removed the deprecated Astro.glob() section

Terminology follows the Simplified Chinese translation guide and the new zh-CN caching translation (#14451).

@github-actions github-actions Bot added the i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help! label Aug 23, 2026
@astrobot-houston

Copy link
Copy Markdown
Contributor

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
zh-cn/reference/api-reference.mdx Localization changed, will be marked as complete.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

</p>

`url` 是一个从当前 `request.url` 值构造的 [URL](https://developer.mozilla.org/zh-CN/docs/Web/API/URL) 对象。它对于与请求 URL 的各个属性进行交互非常有用,例如 pathname 和 origin。
`url` 是一个从当前 `request.url` 值派生的规范化 [URL](https://developer.mozilla.org/zh-CN/docs/Web/API/URL) 对象。它对于与请求 URL 的各个属性进行交互非常有用,例如 pathname 和 origin。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

我覺得此處直譯「derive」反而不好理解,可以考慮類似「url 是当前 request.url 规范化后的 URL 对象」的敘述。

其餘我一個 zh-TW 的就不多作評論了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants