From 8189937dd5638cf8f984474fd0f8bcce6c56e229 Mon Sep 17 00:00:00 2001 From: Junseong Park Date: Tue, 6 Aug 2024 02:24:55 +0900 Subject: [PATCH] i18n(ko-KR): update `configuration-reference.mdx`, `error-reference.mdx`, `/reference/errors/` (#8991) * i18n(ko-KR): update `error-reference.mdx` * i18n(ko-KR): update error mdx files * i18n(ko-KR): update `configuration-reference.mdx` * i18n(ko-KR): update `error-reference.mdx` and add new error reference file --------- Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com> --- .../ko/reference/configuration-reference.mdx | 102 ------------------ .../docs/ko/reference/error-reference.mdx | 8 +- .../action-called-from-server-error.mdx | 10 ++ .../action-query-string-invalid-error.mdx | 13 +++ .../actions-used-with-for-get-error.mdx | 13 +++ .../errors/rewrite-encountered-an-error.mdx | 9 +- .../errors/rewrite-with-body-used.mdx | 4 +- 7 files changed, 49 insertions(+), 110 deletions(-) create mode 100644 src/content/docs/ko/reference/errors/action-called-from-server-error.mdx create mode 100644 src/content/docs/ko/reference/errors/action-query-string-invalid-error.mdx create mode 100644 src/content/docs/ko/reference/errors/actions-used-with-for-get-error.mdx diff --git a/src/content/docs/ko/reference/configuration-reference.mdx b/src/content/docs/ko/reference/configuration-reference.mdx index 8ad5aa0703f7c..b6de4e7a6d063 100644 --- a/src/content/docs/ko/reference/configuration-reference.mdx +++ b/src/content/docs/ko/reference/configuration-reference.mdx @@ -1419,53 +1419,6 @@ export function Comment({ postId }: { postId: string }) { } ``` -### experimental.contentCollectionJsonSchema - -

- -**타입:** `boolean`
-**기본값:** `false`
- -

- -이 기능은 VSCode와 같은 도구에서 TypeScript 스타일 자동 완성/힌트에 대한 `$schema` 값으로 사용할 수 있는 `type: 'data'` 콘텐츠 컬렉션에 대한 JSON 스키마를 자동으로 생성합니다. - -이 기능을 활성화하려면 experimental 플래그를 추가하세요. - -```diff -import { defineConfig } from 'astro/config'; -export default defineConfig({ - experimental: { -+ contentCollectionJsonSchema: true - } -}); -``` - -이 실험적 구현에서는 컬렉션의 각 데이터 항목 파일에 있는 스키마를 수동으로 참조해야 합니다. - -```diff -// src/content/test/entry.json -{ -+ "$schema": "../../../.astro/collections/test.schema.json", - "test": "test" -} -``` - -또는 [VSCode `json.schemas` 설정](https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings)에서 이를 설정할 수 있습니다. - -```diff -"json.schemas": [ - { - "fileMatch": [ - "/src/content/test/**" - ], - "url": "../../../.astro/collections/test.schema.json" - } -] -``` - -이 초기 구현은 [고급 Zod 스키마에 대해 알려진 문제](https://github.com/StefanTerdell/zod-to-json-schema#known-issues)가 있는 라이브러리를 사용하므로 실험적 플래그를 활성화하기 전에 이러한 제한 사항을 참조하는 것이 좋습니다. - ### experimental.clientPrerender

@@ -1533,61 +1486,6 @@ export default defineConfig({ 경로 우선순위가 동일한 두 경로가 동일한 URL을 빌드하려고 시도하는 경로 충돌이 발생하는 경우 Astro는 충돌하는 경로를 식별하는 경고를 기록합니다. -### experimental.rewriting - -

- -**타입:** `boolean`
-**기본값:** `false`
- -

- -Astro 페이지, 엔드포인트 및 Astro 미들웨어에서 요청을 리라이팅하기 위한 라우팅 기능을 활성화하여 경로를 프로그래밍 방식으로 제어할 수 있습니다. - -```js -{ - experimental: { - rewriting: true, - }, -} -``` - -다른 페이지로 다시 라우팅하려면 `.astro` 파일에서 `Astro.rewrite`를 사용합니다. - -```astro "rewrite" ---- -// src/pages/dashboard.astro -if (!Astro.props.allowed) { - return Astro.rewrite("/") -} ---- -``` - -다른 페이지로 다시 라우팅하려면 엔드포인트 파일에서 `context.rewrite`를 사용합니다. - -```js -// src/pages/api.js -export function GET(ctx) { - if (!ctx.locals.allowed) { - return ctx.rewrite("/") - } -} -``` - -미들웨어 파일에서 `next("/")`를 사용하여 다른 페이지로 다시 라우팅한 후 다음 미들웨어 함수를 호출합니다. - -```js -// src/middleware.js -export function onRequest(ctx, next) { - if (!ctx.cookies.get("allowed")) { - return next("/") // 새 시그니처 - } - return next(); -} -``` - -전체 개요를 확인하고 이 실험적 API에 대한 피드백을 제공하려면 [RFC 리라우팅](https://github.com/withastro/roadmap/blob/feat/reroute/proposals/0047-rerouting.md)을 참조하세요. - ### experimental.env

diff --git a/src/content/docs/ko/reference/error-reference.mdx b/src/content/docs/ko/reference/error-reference.mdx index 81f6f4747fcc9..d75e925d4a5a3 100644 --- a/src/content/docs/ko/reference/error-reference.mdx +++ b/src/content/docs/ko/reference/error-reference.mdx @@ -113,5 +113,11 @@ import DontEditWarning from '~/components/DontEditWarning.astro' - [**ContentCollectionTypeMismatchError**](/ko/reference/errors/content-collection-type-mismatch-error/)
컬렉션에 다른 타입의 항목이 포함되어 있습니다. - [**DataCollectionEntryParseError**](/ko/reference/errors/data-collection-entry-parse-error/)
데이터 컬렉션 항목을 구문 분석하지 못했습니다. - [**DuplicateContentEntrySlugError**](/ko/reference/errors/duplicate-content-entry-slug-error/)
콘텐츠 항목 슬러그가 중복되었습니다. -- [**ActionsWithoutServerOutputError**](/ko/reference/errors/actions-without-server-output-error/)
액션은 서버 출력과 함께 사용해야 합니다. - [**UnsupportedConfigTransformError**](/ko/reference/errors/unsupported-config-transform-error/)
콘텐츠 구성에서 지원되지 않는 변환입니다. + +## 액션 오류 + +- [**ActionsWithoutServerOutputError**](/ko/reference/errors/actions-without-server-output-error/)
액션은 서버 출력과 함께 사용해야 합니다. +- [**ActionsUsedWithForGetError**](/ko/reference/errors/actions-used-with-for-get-error/)
양식에서 잘못된 Action 쿼리 문자열을 전달했습니다. +- [**ActionQueryStringInvalidError**](/ko/reference/errors/action-query-string-invalid-error/)
양식에서 잘못된 Action 쿼리 문자열을 전달했습니다. +- [**ActionCalledFromServerError**](/ko/reference/errors/action-called-from-server-error/)
서버에서 예기치 않은 액션이 호출되었습니다. \ No newline at end of file diff --git a/src/content/docs/ko/reference/errors/action-called-from-server-error.mdx b/src/content/docs/ko/reference/errors/action-called-from-server-error.mdx new file mode 100644 index 0000000000000..3887df96056e5 --- /dev/null +++ b/src/content/docs/ko/reference/errors/action-called-from-server-error.mdx @@ -0,0 +1,10 @@ +--- +title: Action unexpected called from the server. +i18nReady: true +githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts +--- + +> **ActionCalledFromServerError**: Action called from a server page or endpoint without using `Astro.callAction()`. + +## 무엇이 잘못되었나요? +`Astro.callAction()`을 사용하지 않고 서버 페이지 또는 엔드포인트에서 호출된 액션입니다. \ No newline at end of file diff --git a/src/content/docs/ko/reference/errors/action-query-string-invalid-error.mdx b/src/content/docs/ko/reference/errors/action-query-string-invalid-error.mdx new file mode 100644 index 0000000000000..a607e2175a9fe --- /dev/null +++ b/src/content/docs/ko/reference/errors/action-query-string-invalid-error.mdx @@ -0,0 +1,13 @@ +--- +title: An invalid Action query string was passed by a form. +i18nReady: true +githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts +--- + +> **ActionQueryStringInvalidError**: The server received the query string `?_astroAction=ACTION_NAME`, but could not find an action with that name. If you changed an action's name in development, remove this query param from your URL and refresh. + +## 무엇이 잘못되었나요? +서버가 쿼리 문자열 `?_astroAction=name`을 수신했지만 해당 이름의 액션을 찾을 수 없습니다. 액션 함수의 `.queryString` 속성을 사용하여 양식의 `action` URL을 검색하세요. + +**더 보기:** +- [Actions RFC](https://github.com/withastro/roadmap/blob/actions/proposals/0046-actions.md) \ No newline at end of file diff --git a/src/content/docs/ko/reference/errors/actions-used-with-for-get-error.mdx b/src/content/docs/ko/reference/errors/actions-used-with-for-get-error.mdx new file mode 100644 index 0000000000000..420932308c93c --- /dev/null +++ b/src/content/docs/ko/reference/errors/actions-used-with-for-get-error.mdx @@ -0,0 +1,13 @@ +--- +title: An invalid Action query string was passed by a form. +i18nReady: true +githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts +--- + +> **ActionsUsedWithForGetError**: Action ACTION_NAME was called from a form using a GET request, but only POST requests are supported. This often occurs if `method="POST"` is missing on the form. + +## 무엇이 잘못되었나요? +액션은 POST 요청만 지원하지만, 양식에서 GET 요청을 사용하여 호출되었습니다. 이 문제는 양식에 `method="POST"`가 누락된 경우에 자주 발생합니다. + +**더 보기:** +- [Actions RFC](https://github.com/withastro/roadmap/blob/actions/proposals/0046-actions.md) \ No newline at end of file diff --git a/src/content/docs/ko/reference/errors/rewrite-encountered-an-error.mdx b/src/content/docs/ko/reference/errors/rewrite-encountered-an-error.mdx index bb579ed825b06..4c57bbc62b749 100644 --- a/src/content/docs/ko/reference/errors/rewrite-encountered-an-error.mdx +++ b/src/content/docs/ko/reference/errors/rewrite-encountered-an-error.mdx @@ -4,10 +4,11 @@ i18nReady: true githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts --- +:::caution[더 이상 사용되지 않음] +이 오류는 Astro에서 더 이상 발생하지 않습니다. +::: + > **RewriteEncounteredAnError**: The route ROUTE that you tried to render doesn't exist, or it emitted an error during the rendering phase. STACK ? STACK : ''. ## 무엇이 잘못되었나요? -사용자가 존재하지 않는 경로를 사용하여 리라이트하려고 했거나 렌더링 단계에서 런타임 오류가 발생했습니다. - - - +사용자가 존재하지 않는 경로를 사용하여 리라이트하려고 했거나 렌더링 단계에서 런타임 오류가 발생했습니다. \ No newline at end of file diff --git a/src/content/docs/ko/reference/errors/rewrite-with-body-used.mdx b/src/content/docs/ko/reference/errors/rewrite-with-body-used.mdx index 2fd9dd09b4768..c9562c72b2c79 100644 --- a/src/content/docs/ko/reference/errors/rewrite-with-body-used.mdx +++ b/src/content/docs/ko/reference/errors/rewrite-with-body-used.mdx @@ -16,6 +16,4 @@ Astro.rewrite("/target") **더 보기:** - [Request.clone()](https://developer.mozilla.org/en-US/docs/Web/API/Request/clone) -- [Astro.rewrite](/ko/reference/configuration-reference/#experimentalrewriting) - - +- [Astro.rewrite](/ko/reference/api-reference/#astrorewrite) \ No newline at end of file