Skip to content

Commit 0103fae

Browse files
chore: update translations and generated content (#1294)
Co-authored-by: charIeszhao <[email protected]>
1 parent 888ea2e commit 0103fae

File tree

9 files changed

+63
-81
lines changed
  • i18n
    • de/docusaurus-plugin-content-docs/current/quick-starts/framework/next-app-router
    • es/docusaurus-plugin-content-docs/current/quick-starts/framework/next-app-router
    • fr/docusaurus-plugin-content-docs/current/quick-starts/framework/next-app-router
    • ja/docusaurus-plugin-content-docs/current/quick-starts/framework/next-app-router
    • ko/docusaurus-plugin-content-docs/current/quick-starts/framework/next-app-router
    • pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/next-app-router
    • th/docusaurus-plugin-content-docs/current/quick-starts/framework/next-app-router
    • zh-CN/docusaurus-plugin-content-docs/current/quick-starts/framework/next-app-router
    • zh-TW/docusaurus-plugin-content-docs/current/quick-starts/framework/next-app-router

9 files changed

+63
-81
lines changed

i18n/de/docusaurus-plugin-content-docs/current/quick-starts/framework/next-app-router/_integration.mdx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import SignInFlowSummary from '../../fragments/_web-sign-in-flow-summary.mdx';
55

66
import ServerActionsTip from './_server-actions-tip.mdx';
77

8-
### Konfigurationen vorbereiten \{#prepare-configs}
8+
### Konfiguration vorbereiten \{#prepare-configs}
99

1010
Bereite die Konfiguration für den Logto-Client vor:
1111

@@ -15,15 +15,15 @@ import { LogtoNextConfig } from '@logto/next';
1515
export const logtoConfig: LogtoNextConfig = {
1616
appId: '<your-application-id>',
1717
appSecret: '<your-app-secret-copied-from-console>',
18-
endpoint: '<your-logto-endpoint>', // Z. B. http://localhost:3001
19-
baseUrl: '<your-nextjs-app-base-url>', // Z. B. http://localhost:3000
18+
endpoint: '<your-logto-endpoint>', // Z.B. http://localhost:3001
19+
baseUrl: '<your-nextjs-app-base-url>', // Z.B. http://localhost:3000
2020
cookieSecret: 'complex_password_at_least_32_characters_long',
2121
cookieSecure: process.env.NODE_ENV === 'production',
2222
};
2323
```
2424

2525
**Hinweis:**
26-
Wenn du eine Umgebungsvariable für `cookieSecret` verwendest (z. B. `process.env.LOGTO_COOKIE_SECRET`), stelle sicher, dass der Wert mindestens 32 Zeichen lang ist. Wenn diese Anforderung nicht erfüllt ist, wirft Logto während des Builds oder zur Laufzeit folgenden Fehler:
26+
Wenn du eine Umgebungsvariable für `cookieSecret` verwendest (z. B. `process.env.LOGTO_COOKIE_SECRET`), stelle sicher, dass der Wert mindestens 32 Zeichen lang ist. Wenn diese Anforderung nicht erfüllt ist, wirft Logto während des Build- oder Laufzeitprozesses folgenden Fehler:
2727

2828
`TypeError: Either sessionWrapper or encryptionKey must be provided for CookieStorage`
2929

@@ -39,9 +39,9 @@ Um diesen Fehler zu vermeiden, stelle sicher, dass die Umgebungsvariable korrekt
3939

4040
### Callback behandeln \{#handle-callback}
4141

42-
Nachdem sich der Benutzer angemeldet hat, leitet Logto den Benutzer zurück zur oben konfigurierten Redirect-URI. Es gibt jedoch noch Dinge zu tun, damit deine Anwendung richtig funktioniert.
42+
Nachdem sich der Benutzer angemeldet hat, leitet Logto den Benutzer zurück zur oben konfigurierten Redirect-URI. Es gibt jedoch noch weitere Schritte, damit deine Anwendung korrekt funktioniert.
4343

44-
Wir stellen eine Hilfsfunktion `handleSignIn` bereit, um den Sign-In-Callback zu behandeln:
44+
Wir stellen eine Hilfsfunktion `handleSignIn` bereit, um den Sign-In-Callback zu verarbeiten:
4545

4646
```tsx title="app/callback/route.ts"
4747
import { handleSignIn } from '@logto/next/server-actions';
@@ -61,7 +61,7 @@ export async function GET(request: NextRequest) {
6161

6262
#### Sign-In- und Sign-Out-Button implementieren \{#implement-sign-in-and-sign-out-button}
6363

64-
Im Next.js App Router werden Ereignisse in Client-Komponenten behandelt, daher müssen wir zuerst zwei Komponenten erstellen: `SignIn` und `SignOut`.
64+
Im Next.js App Router werden Events in Client-Komponenten behandelt, daher müssen wir zuerst zwei Komponenten erstellen: `SignIn` und `SignOut`.
6565

6666
```tsx title="app/sign-in.tsx"
6767
'use client';
@@ -107,21 +107,21 @@ const SignOut = ({ onSignOut }: Props) => {
107107
export default SignOut;
108108
```
109109

110-
Denke daran, `'use client'` am Anfang der Datei hinzuzufügen, um anzugeben, dass diese Komponenten Client-Komponenten sind.
110+
Denke daran, `'use client'` am Anfang der Datei hinzuzufügen, um anzugeben, dass es sich um Client-Komponenten handelt.
111111

112112
#### Buttons zur Startseite hinzufügen \{#add-buttons-to-home-page}
113113

114114
<ServerActionsTip />
115115

116-
Fügen wir nun die Sign-In- und Sign-Out-Buttons auf deiner Startseite hinzu. Wir müssen die Serveraktionen im SDK bei Bedarf aufrufen. Um dabei zu helfen, verwende `getLogtoContext`, um den Authentifizierungsstatus abzurufen.
116+
Jetzt fügen wir die Sign-In- und Sign-Out-Buttons auf deiner Startseite hinzu. Wir müssen die Serveraktionen im SDK bei Bedarf aufrufen. Um dabei zu helfen, verwende `getLogtoContext`, um den Authentifizierungsstatus abzurufen.
117117

118118
```tsx title="app/page.tsx"
119119
import { getLogtoContext, signIn, signOut } from '@logto/next/server-actions';
120120
import SignIn from './sign-in';
121121
import SignOut from './sign-out';
122122
import { logtoConfig } from './logto';
123123

124-
const Home = () => {
124+
export default async function Home() {
125125
const { isAuthenticated, claims } = await getLogtoContext(logtoConfig);
126126

127127
return (
@@ -150,9 +150,7 @@ const Home = () => {
150150
)}
151151
</nav>
152152
);
153-
};
154-
155-
export default Home;
153+
}
156154
```
157155

158156
<Checkpoint />

i18n/es/docusaurus-plugin-content-docs/current/quick-starts/framework/next-app-router/_integration.mdx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const logtoConfig: LogtoNextConfig = {
2323
```
2424

2525
**Nota:**
26-
Si utilizas una variable de entorno para `cookieSecret` (por ejemplo, `process.env.LOGTO_COOKIE_SECRET`), asegúrate de que el valor tenga al menos 32 caracteres. Si no se cumple este requisito, Logto lanzará el siguiente error durante la compilación o en tiempo de ejecución:
26+
Si usas una variable de entorno para `cookieSecret` (por ejemplo, `process.env.LOGTO_COOKIE_SECRET`), asegúrate de que el valor tenga al menos 32 caracteres. Si no se cumple este requisito, Logto lanzará el siguiente error durante la compilación o en tiempo de ejecución:
2727

2828
`TypeError: Either sessionWrapper or encryptionKey must be provided for CookieStorage`
2929

@@ -39,7 +39,7 @@ Para evitar este error, asegúrate de que la variable de entorno esté correctam
3939

4040
### Manejar el callback \{#handle-callback}
4141

42-
Después de que el usuario inicie sesión, Logto redirigirá al usuario de vuelta al URI de redirección configurado anteriormente. Sin embargo, aún hay cosas que hacer para que tu aplicación funcione correctamente.
42+
Después de que el usuario inicie sesión, Logto redirigirá al usuario de vuelta al URI de redirección configurado anteriormente. Sin embargo, aún hay cosas por hacer para que tu aplicación funcione correctamente.
4343

4444
Proporcionamos una función auxiliar `handleSignIn` para manejar el callback de inicio de sesión:
4545

@@ -77,7 +77,7 @@ const SignIn = ({ onSignIn }: Props) => {
7777
onSignIn();
7878
}}
7979
>
80-
Sign In
80+
Iniciar sesión
8181
</button>
8282
);
8383
};
@@ -99,7 +99,7 @@ const SignOut = ({ onSignOut }: Props) => {
9999
onSignOut();
100100
}}
101101
>
102-
Sign Out
102+
Cerrar sesión
103103
</button>
104104
);
105105
};
@@ -113,15 +113,15 @@ Recuerda agregar `'use client'` en la parte superior del archivo para indicar qu
113113

114114
<ServerActionsTip />
115115

116-
Ahora vamos a agregar los botones de inicio y cierre de sesión en tu página de inicio. Necesitamos llamar a las acciones del servidor en el SDK cuando sea necesario. Para ayudarte con esto, utiliza `getLogtoContext` para obtener el estado de autenticación.
116+
Ahora vamos a agregar los botones de inicio y cierre de sesión en tu página de inicio. Necesitamos llamar a las acciones del servidor en el SDK cuando sea necesario. Para ayudarte con esto, usa `getLogtoContext` para obtener el estado de autenticación.
117117

118118
```tsx title="app/page.tsx"
119119
import { getLogtoContext, signIn, signOut } from '@logto/next/server-actions';
120120
import SignIn from './sign-in';
121121
import SignOut from './sign-out';
122122
import { logtoConfig } from './logto';
123123

124-
const Home = () => {
124+
export default async function Home() {
125125
const { isAuthenticated, claims } = await getLogtoContext(logtoConfig);
126126

127127
return (
@@ -150,9 +150,7 @@ const Home = () => {
150150
)}
151151
</nav>
152152
);
153-
};
154-
155-
export default Home;
153+
}
156154
```
157155

158156
<Checkpoint />

i18n/fr/docusaurus-plugin-content-docs/current/quick-starts/framework/next-app-router/_integration.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ import SignIn from './sign-in';
121121
import SignOut from './sign-out';
122122
import { logtoConfig } from './logto';
123123

124-
const Home = () => {
124+
export default async function Home() {
125125
const { isAuthenticated, claims } = await getLogtoContext(logtoConfig);
126126

127127
return (
@@ -150,9 +150,7 @@ const Home = () => {
150150
)}
151151
</nav>
152152
);
153-
};
154-
155-
export default Home;
153+
}
156154
```
157155

158156
<Checkpoint />

i18n/ja/docusaurus-plugin-content-docs/current/quick-starts/framework/next-app-router/_integration.mdx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const logtoConfig: LogtoNextConfig = {
2727

2828
`TypeError: Either sessionWrapper or encryptionKey must be provided for CookieStorage`
2929

30-
このエラーを防ぐには、環境変数が正しく設定されているか、または 32 文字以上のフォールバック値を用意してください
30+
このエラーを防ぐには、環境変数が正しく設定されているか、または 32 文字以上のフォールバック値を指定してください
3131

3232
### リダイレクト URI の設定 \{#configure-redirect-uris}
3333

@@ -39,7 +39,7 @@ export const logtoConfig: LogtoNextConfig = {
3939

4040
### コールバックの処理 \{#handle-callback}
4141

42-
ユーザーがサインインした後、Logto は上記で設定したリダイレクト URI にユーザーをリダイレクトします。ただし、アプリケーションが正しく動作するためには、まだやるべきことがあります
42+
ユーザーがサインインした後、Logto は上記で設定したリダイレクト URI にユーザーをリダイレクトします。ただし、アプリケーションが正しく動作するためには、さらに処理が必要です
4343

4444
サインインコールバックを処理するためのヘルパー関数 `handleSignIn` を提供しています:
4545

@@ -77,7 +77,7 @@ const SignIn = ({ onSignIn }: Props) => {
7777
onSignIn();
7878
}}
7979
>
80-
Sign In
80+
サインイン
8181
</button>
8282
);
8383
};
@@ -99,29 +99,29 @@ const SignOut = ({ onSignOut }: Props) => {
9999
onSignOut();
100100
}}
101101
>
102-
Sign Out
102+
サインアウト
103103
</button>
104104
);
105105
};
106106

107107
export default SignOut;
108108
```
109109

110-
これらのコンポーネントがクライアントコンポーネントであることを示すため、ファイルの先頭に `'use client'` を追加することを忘れないでください
110+
これらのコンポーネントがクライアントコンポーネントであることを示すため、ファイルの先頭に `'use client'` を追加するのを忘れないでください
111111

112112
#### ホームページにボタンを追加 \{#add-buttons-to-home-page}
113113

114114
<ServerActionsTip />
115115

116-
次に、ホームページにサインイン・サインアウトボタンを追加します。必要に応じて SDK のサーバーアクションを呼び出す必要があります。そのために`getLogtoContext` を使って認証 (Authentication) 状態を取得します。
116+
次に、ホームページにサインイン・サインアウトボタンを追加します。必要に応じて SDK のサーバーアクションを呼び出す必要があります。これを助けるために`getLogtoContext` を使って認証 (Authentication) 状態を取得します。
117117

118118
```tsx title="app/page.tsx"
119119
import { getLogtoContext, signIn, signOut } from '@logto/next/server-actions';
120120
import SignIn from './sign-in';
121121
import SignOut from './sign-out';
122122
import { logtoConfig } from './logto';
123123

124-
const Home = () => {
124+
export default async function Home() {
125125
const { isAuthenticated, claims } = await getLogtoContext(logtoConfig);
126126

127127
return (
@@ -150,9 +150,7 @@ const Home = () => {
150150
)}
151151
</nav>
152152
);
153-
};
154-
155-
export default Home;
153+
}
156154
```
157155

158156
<Checkpoint />

i18n/ko/docusaurus-plugin-content-docs/current/quick-starts/framework/next-app-router/_integration.mdx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import SignInFlowSummary from '../../fragments/_web-sign-in-flow-summary.mdx';
55

66
import ServerActionsTip from './_server-actions-tip.mdx';
77

8-
### 구성 준비하기 \{#prepare-configs}
8+
### 설정 준비하기 \{#prepare-configs}
99

10-
Logto 클라이언트를 위한 구성을 준비하세요:
10+
Logto 클라이언트를 위한 설정을 준비하세요:
1111

1212
```ts title="app/logto.ts"
1313
import { LogtoNextConfig } from '@logto/next';
@@ -27,7 +27,7 @@ export const logtoConfig: LogtoNextConfig = {
2727

2828
`TypeError: Either sessionWrapper or encryptionKey must be provided for CookieStorage`
2929

30-
이 오류를 방지하려면 환경 변수가 올바르게 설정되어 있거나, 최소 길이 32자의 대체 값을 제공해야 합니다.
30+
이 오류를 방지하려면, 환경 변수가 올바르게 설정되어 있거나 최소 길이 32자의 대체 값을 제공해야 합니다.
3131

3232
### 리디렉션 URI 구성하기 \{#configure-redirect-uris}
3333

@@ -61,7 +61,7 @@ export async function GET(request: NextRequest) {
6161

6262
#### 로그인 및 로그아웃 버튼 구현하기 \{#implement-sign-in-and-sign-out-button}
6363

64-
Next.js App Router에서는 이벤트가 클라이언트 컴포넌트에서 처리되므로, 먼저 `SignIn``SignOut` 두 개의 컴포넌트를 생성해야 합니다.
64+
Next.js App Router에서는 이벤트가 클라이언트 컴포넌트에서 처리되므로, 먼저 `SignIn``SignOut` 두 개의 컴포넌트를 만들어야 합니다.
6565

6666
```tsx title="app/sign-in.tsx"
6767
'use client';
@@ -113,15 +113,15 @@ export default SignOut;
113113

114114
<ServerActionsTip />
115115

116-
이제 홈 페이지에 로그인 및 로그아웃 버튼을 추가해 봅시다. 필요할 때 SDK의 서버 액션을 호출해야 합니다. 이를 돕기 위해 `getLogtoContext`를 사용하여 인증 (Authentication) 상태를 가져올 수 있습니다.
116+
이제 홈 페이지에 로그인 및 로그아웃 버튼을 추가해 봅시다. 필요할 때 SDK의 서버 액션을 호출해야 합니다. 이를 돕기 위해 `getLogtoContext`를 사용하여 인증 (Authentication) 상태를 가져옵니다.
117117

118118
```tsx title="app/page.tsx"
119119
import { getLogtoContext, signIn, signOut } from '@logto/next/server-actions';
120120
import SignIn from './sign-in';
121121
import SignOut from './sign-out';
122122
import { logtoConfig } from './logto';
123123

124-
const Home = () => {
124+
export default async function Home() {
125125
const { isAuthenticated, claims } = await getLogtoContext(logtoConfig);
126126

127127
return (
@@ -150,9 +150,7 @@ const Home = () => {
150150
)}
151151
</nav>
152152
);
153-
};
154-
155-
export default Home;
153+
}
156154
```
157155

158156
<Checkpoint />

i18n/pt-BR/docusaurus-plugin-content-docs/current/quick-starts/framework/next-app-router/_integration.mdx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ Para evitar esse erro, certifique-se de que a variável de ambiente esteja corre
3737

3838
<WebConfigureRedirectUris />
3939

40-
### Lidar com o callback \{#handle-callback}
40+
### Tratar o callback \{#handle-callback}
4141

42-
Após o usuário fazer login, o Logto irá redirecionar o usuário de volta para o URI de redirecionamento configurado acima. No entanto, ainda há coisas a serem feitas para que seu aplicativo funcione corretamente.
42+
Após o usuário fazer login, o Logto irá redirecioná-lo de volta para o URI de redirecionamento configurado acima. No entanto, ainda há coisas a serem feitas para que seu aplicativo funcione corretamente.
4343

44-
Nós fornecemos uma função auxiliar `handleSignIn` para lidar com o callback de login:
44+
Nós fornecemos uma função auxiliar `handleSignIn` para tratar o callback de login:
4545

4646
```tsx title="app/callback/route.ts"
4747
import { handleSignIn } from '@logto/next/server-actions';
@@ -61,7 +61,7 @@ export async function GET(request: NextRequest) {
6161

6262
#### Implementar botão de login e logout \{#implement-sign-in-and-sign-out-button}
6363

64-
No Next.js App Router, os eventos são tratados em componentes de cliente, então precisamos criar dois componentes primeiro: `SignIn` e `SignOut`.
64+
No Next.js App Router, eventos são tratados em componentes de cliente, então precisamos criar dois componentes primeiro: `SignIn` e `SignOut`.
6565

6666
```tsx title="app/sign-in.tsx"
6767
'use client';
@@ -113,15 +113,15 @@ Lembre-se de adicionar `'use client'` no topo do arquivo para indicar que esses
113113

114114
<ServerActionsTip />
115115

116-
Agora vamos adicionar os botões de login e logout na sua página inicial. Precisamos chamar as server actions do SDK quando necessário. Para ajudar com isso, use `getLogtoContext` para buscar o status de autenticação.
116+
Agora vamos adicionar os botões de login e logout na sua página inicial. Precisamos chamar as server actions do SDK quando necessário. Para ajudar nisso, use `getLogtoContext` para buscar o status de autenticação.
117117

118118
```tsx title="app/page.tsx"
119119
import { getLogtoContext, signIn, signOut } from '@logto/next/server-actions';
120120
import SignIn from './sign-in';
121121
import SignOut from './sign-out';
122122
import { logtoConfig } from './logto';
123123

124-
const Home = () => {
124+
export default async function Home() {
125125
const { isAuthenticated, claims } = await getLogtoContext(logtoConfig);
126126

127127
return (
@@ -150,9 +150,7 @@ const Home = () => {
150150
)}
151151
</nav>
152152
);
153-
};
154-
155-
export default Home;
153+
}
156154
```
157155

158156
<Checkpoint />

0 commit comments

Comments
 (0)