Skip to content

[i18n] ja translations developer architecture Service Workers and Scopes#3431

Open
shimotmk wants to merge 1 commit intoWordPress:trunkfrom
shimotmk:docs/i18n-ja-translations-developer-architecture-12-and-13
Open

[i18n] ja translations developer architecture Service Workers and Scopes#3431
shimotmk wants to merge 1 commit intoWordPress:trunkfrom
shimotmk:docs/i18n-ja-translations-developer-architecture-12-and-13

Conversation

@shimotmk
Copy link
Copy Markdown
Contributor

Motivation for the change, related issues

Part of #2202

Add Japanese translations to Service Workers and Scopes

@shimotmk shimotmk requested review from a team, adamziel and Copilot March 25, 2026 02:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Japanese (ja) translations for the “Service Workers” and “Scopes” architecture docs as part of #2202.

Changes:

  • Added ja translation page for browser service workers, including code examples.
  • Added ja translation page for browser scopes, including worker initialization example.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
packages/docs/site/i18n/ja/docusaurus-plugin-content-docs/current/developers/23-architecture/13-browser-scopes.md Adds Japanese translation for the “Scopes” doc page.
packages/docs/site/i18n/ja/docusaurus-plugin-content-docs/current/developers/23-architecture/12-browser-service-workers.md Adds Japanese translation for the “Service Workers” doc page (with setup examples).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +74 to +86
const absoluteURL = 'http://127.0.0.1'

// 代わりに、最初にスコープを設定します。
const scope = Math.random().toFixed(16)
const scopedURL = setURLScope(absoluteURL, scope).toString()

const { phpVersion } = parseWorkerStartupOptions<{ phpVersion?: string }>();
const php = await PHP.load('8.0', {
requestHandler: {
documentRoot: '/',
absoluteUrl: scopedSiteUrl
}
});
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

scopedSiteUrl is not defined in this snippet, and the variable created earlier is scopedURL. This makes the example fail if copied. Update absoluteUrl to use scopedURL (and consider using phpVersion or removing it from the snippet if it’s intentionally unused).

Copilot uses AI. Check for mistakes.
Comment on lines +91 to +93
"default", // PHPインスタンススコープ
"/sw.js", // 有効な Service Worker 実装を指定する必要があります。
"1" // スクリプトの再読み込みに使用されるService Workerのバージョン。
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

The doc references two different service worker script paths: "/sw.js" in the registration example vs /service-worker.js in the text and filename label. This is confusing for readers and makes the setup steps ambiguous. Use a single consistent filename/path across the snippet and the surrounding explanation (either update the registration example to "/service-worker.js" or change the later references to /sw.js).

Copilot uses AI. Check for mistakes.
Comment on lines +115 to +121
また、HTTP リクエストを実際にインターセプトしてルーティングする `/service-worker.js` ファイルも別途必要です。最小限の実装は次のようになります。

<!--
You will also need a separate `/service-worker.js` file that actually intercepts and routes the HTTP requests. Here's what a minimal implementation looks like:
-->

**/service-worker.js**:
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

The doc references two different service worker script paths: "/sw.js" in the registration example vs /service-worker.js in the text and filename label. This is confusing for readers and makes the setup steps ambiguous. Use a single consistent filename/path across the snippet and the surrounding explanation (either update the registration example to "/service-worker.js" or change the later references to /sw.js).

Suggested change
また、HTTP リクエストを実際にインターセプトしてルーティングする `/service-worker.js` ファイルも別途必要です。最小限の実装は次のようになります。
<!--
You will also need a separate `/service-worker.js` file that actually intercepts and routes the HTTP requests. Here's what a minimal implementation looks like:
-->
**/service-worker.js**:
また、HTTP リクエストを実際にインターセプトしてルーティングする `/sw.js` ファイルも別途必要です。最小限の実装は次のようになります。
<!--
You will also need a separate `/sw.js` file that actually intercepts and routes the HTTP requests. Here's what a minimal implementation looks like:
-->
**/sw.js**:

Copilot uses AI. Check for mistakes.
Comment on lines +115 to +121
また、HTTP リクエストを実際にインターセプトしてルーティングする `/service-worker.js` ファイルも別途必要です。最小限の実装は次のようになります。

<!--
You will also need a separate `/service-worker.js` file that actually intercepts and routes the HTTP requests. Here's what a minimal implementation looks like:
-->

**/service-worker.js**:
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

The doc references two different service worker script paths: "/sw.js" in the registration example vs /service-worker.js in the text and filename label. This is confusing for readers and makes the setup steps ambiguous. Use a single consistent filename/path across the snippet and the surrounding explanation (either update the registration example to "/service-worker.js" or change the later references to /sw.js).

Suggested change
また、HTTP リクエストを実際にインターセプトしてルーティングする `/service-worker.js` ファイルも別途必要です。最小限の実装は次のようになります。
<!--
You will also need a separate `/service-worker.js` file that actually intercepts and routes the HTTP requests. Here's what a minimal implementation looks like:
-->
**/service-worker.js**:
また、HTTP リクエストを実際にインターセプトしてルーティングする `/sw.js` ファイルも別途必要です。最小限の実装は次のようになります。
<!--
You will also need a separate `/sw.js` file that actually intercepts and routes the HTTP requests. Here's what a minimal implementation looks like:
-->
**/sw.js**:

Copilot uses AI. Check for mistakes.
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.

2 participants