Skip to content

i18n(fr): translate utils/kysely-and-sdk.mdx#182

Merged
dreyfus92 merged 3 commits into
withstudiocms:mainfrom
ArmandPhilippot:i18n/fr-add-utils/kysely-and-sdk
Dec 20, 2025
Merged

i18n(fr): translate utils/kysely-and-sdk.mdx#182
dreyfus92 merged 3 commits into
withstudiocms:mainfrom
ArmandPhilippot:i18n/fr-add-utils/kysely-and-sdk

Conversation

@ArmandPhilippot
Copy link
Copy Markdown
Member

@ArmandPhilippot ArmandPhilippot commented Dec 20, 2025

Description

Translates in French utils/kysely-and-sdk.mdx added in #177

Summary by CodeRabbit

  • Documentation
    • Added a new French documentation page covering Kysely basics, supported dialects (libSQL/SQLite, MySQL, PostgreSQL), client setup and common DB operations, plus detailed guidance for the StudioCMS Kysely client and StudioCMS SDK (typed DB ops, migrations, schema introspection, auth, config, caching, middleware, REST helpers and token handling) with usage examples.

✏️ Tip: You can customize this high-level summary in your review settings.

@ArmandPhilippot ArmandPhilippot requested a review from a team as a code owner December 20, 2025 17:20
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 20, 2025

📝 Walkthrough

Walkthrough

Ajout d'une nouvelle page de documentation en français présentant Kysely (bases, dialectes supportés), exemples d'utilisation et la description des packages StudioCMS Kysely client et SDK, avec extraits de code et références externes. No changes to code or public APIs.

Changes

Cohort / File(s) Summary
French Kysely & SDK Documentation
src/content/docs/fr/utils/kysely-and-sdk.mdx
Nouvelle page de documentation en français expliquant l'intégration Kysely, bases et dialectes supportés, configuration du client, exemples TypeScript / Effect‑ts, et les fonctionnalités du SDK StudioCMS (auth, config, DB, middleware, etc.).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

  • Focus: content accuracy, French wording, code snippet correctness and formatting.

Possibly related PRs

Suggested reviewers

  • dreyfus92
  • Adammatthiesen

Poem

🐰 Bonjour — je saute, je note, je souris,

Des docs français pour Kysely aujourd'hui,
SDK et exemples en pas à pas,
Je grignote du code et chante déjà,
Vive la doc, hop — et voilà!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: adding a French translation of the utils/kysely-and-sdk.mdx documentation file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b842aef and 03115b7.

📒 Files selected for processing (1)
  • src/content/docs/fr/utils/kysely-and-sdk.mdx (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: ArmandPhilippot
Repo: withstudiocms/docs PR: 149
File: src/content/docs/fr/guides/upgrade/version-guides/0-1-0-beta-21.mdx:13-15
Timestamp: 2025-07-24T11:57:15.225Z
Learning: In the withstudiocms/docs repository, when reviewing French translation files, maintain consistency with the English version even if it means keeping unused imports. Structural parity between language versions is prioritized over removing unused code.
Learnt from: ArmandPhilippot
Repo: withstudiocms/docs PR: 130
File: src/content/docs/fr/guides/upgrade/version-guides/0-1-0-beta-17.mdx:1-11
Timestamp: 2025-04-26T12:29:17.995Z
Learning: When reviewing translations in the withstudiocms/docs repository, compare with the corresponding English version as the source of truth, not with other files in the same target language. French translations should maintain structural parity with their English counterparts.
Learnt from: ArmandPhilippot
Repo: withstudiocms/docs PR: 149
File: src/content/docs/fr/guides/upgrade/version-guides/0-1-0-beta-20.mdx:18-18
Timestamp: 2025-07-24T12:00:35.014Z
Learning: In the withstudiocms/docs repository, while translations should maintain structural parity with English versions, improving readability during translation is acceptable when the original text has clear redundancy or readability issues that would also impact the translation quality. The maintainer ArmandPhilippot confirmed this approach is reasonable when the technical meaning is preserved.
📚 Learning: 2025-07-24T11:57:15.225Z
Learnt from: ArmandPhilippot
Repo: withstudiocms/docs PR: 149
File: src/content/docs/fr/guides/upgrade/version-guides/0-1-0-beta-21.mdx:13-15
Timestamp: 2025-07-24T11:57:15.225Z
Learning: In the withstudiocms/docs repository, when reviewing French translation files, maintain consistency with the English version even if it means keeping unused imports. Structural parity between language versions is prioritized over removing unused code.

Applied to files:

  • src/content/docs/fr/utils/kysely-and-sdk.mdx
🪛 LanguageTool
src/content/docs/fr/utils/kysely-and-sdk.mdx

[style] ~19-~19: Cette structure peut être modifiée afin de devenir plus percutante.
Context: ...oCMS et fournissent les fonctionnalités de base de données utilisées par StudioCMS. Ils...

(DE_BASE3)


[style] ~19-~19: Une phrase longue peut induire une perte de sens pour le lecteur. Celle-ci peut donc être divisée afin d’apporter de la clarté et du rythme.
Context: ... destinés à un usage interne à StudioCMS, mais les utilisateurs peuvent également les util...

(POINT_MAIS)


[style] ~41-~41: Cette structure peut être modifiée afin de devenir plus percutante.
Context: .../kysely/" released={true} /> Un client de base de données offrant la sûreté du typage ...

(DE_BASE3)


[style] ~41-~41: Utilisé hors du contexte militaire, on préfèrera d’autres tournures à « baser sur ».
Context: ...un système de migration pour StudioCMS, basé sur Kysely. Il fourn...

(BASER_SUR)


[style] ~45-~45: Cette structure peut être modifiée afin de devenir plus percutante.
Context: .... ### Caractéristiques - Opérations de base de données avec sûreté du typage - Pr...

(DE_BASE3)


[style] ~50-~50: Cette structure peut être modifiée afin de devenir plus percutante.
Context: ...as** - Inspecter et valider les schémas de base de données lors de l'exécution - **Inté...

(DE_BASE3)


[style] ~55-~55: Cette structure peut être modifiée afin de devenir plus percutante.
Context: ...### Exemple de code #### Configuration de base du client ```ts twoslash title="client...

(DE_BASE3)


[grammar] ~77-~77: Il y a peut-être une erreur ici
Context: ...## Exemple pour obtenir les utilisateurs ts twoslash title="get-users.ts" import { getDBClientLive, type StudioCMSDatabaseSchema } from '@withstudiocms/kysely'; import { libsqlDriver } from '@withstudiocms/kysely/drivers/libsql'; import { ConfigProvider, Effect } from 'studiocms/effect'; export const getDbClient = Effect.gen(function* () { // Configurez le pilote LibSQL avec une URL de base de données à partir de la configuration. const dialect = yield* libsqlDriver.pipe( Effect.withConfigProvider( ConfigProvider.fromJson({ CMS_LIBSQL_URL: 'file:./test.db', }) ) ); // Renvoyez le client DB de Kysely avec les utilitaires d'Effect return yield* getDBClientLive<StudioCMSDatabaseSchema>(dialect); }); // ---cut--- import { Schema } from 'studiocms/effect'; import { StudioCMSUsersTable } from '@withstudiocms/kysely'; export const getUsers = Effect.gen(function* () { const { withDecoder } = yield* getDbClient; const getUsers = withDecoder({ decoder: Schema.Array(StudioCMSUsersTable.Select), callbackFn: (db) => db((client) => client.selectFrom('StudioCMSUsersTable').selectAll().execute()), }); const users = yield* getUsers(); console.log('Users:', users); /* type of 'users' is: const users: readonly { readonly url: string | null | undefined; readonly id: string; readonly name: string; readonly email: string | null | undefined; readonly avatar: string | null | undefined; readonly username: string; readonly password: string | null | undefined; readonly updatedAt: Date; readonly createdAt: Date; readonly emailVerified: boolean; readonly notifications: string | null | undefined; }[] */ }); #### Exemple pour insérer un nouvel utilisate...

(QB_NEW_FR)


[typographical] ~131-~131: Caractère d’apostrophe incorrect.
Context: ...mple pour insérer un nouvel utilisateur (withEncoder) ```ts twoslash title="ins...

(APOS_INCORRECT)


[grammar] ~184-~184: Essayez d’enlever «  d’  »
Context: ...`` #### Exemple pour insérer un nouvel d'utilisateur (withCodec) ```ts twoslash title="in...

(QB_NEW_FR_OTHER_ERROR_IDS_UNNECESSARY_ADPOSITION_DAPOSTROPHE)


[typographical] ~184-~184: Caractère d’apostrophe incorrect.
Context: ...le pour insérer un nouvel d'utilisateur (withCodec) ```ts twoslash title="inser...

(APOS_INCORRECT)


[grammar] ~256-~256: Il y a peut-être une erreur ici
Context: ...récupération d'un utilisateur par son ID ts twoslash title="get-user.ts" import { getDBClientLive, type StudioCMSDatabaseSchema } from '@withstudiocms/kysely'; import { libsqlDriver } from '@withstudiocms/kysely/drivers/libsql'; import { ConfigProvider, Effect } from 'studiocms/effect'; export const getDbClient = Effect.gen(function* () { // Configurez le pilote LibSQL avec une URL de base de données à partir de la configuration. const dialect = yield* libsqlDriver.pipe( Effect.withConfigProvider( ConfigProvider.fromJson({ CMS_LIBSQL_URL: 'file:./test.db', }) ) ); // Renvoyez le client DB de Kysely avec les utilitaires d'Effect return yield* getDBClientLive<StudioCMSDatabaseSchema>(dialect); }); // ---cut--- import { Schema } from 'studiocms/effect'; import { StudioCMSUsersTable } from '@withstudiocms/kysely'; export const insertUser = Effect.gen(function* () { const { withCodec } = yield* getDbClient; const getUserById = withCodec({ encoder: Schema.String, decoder: Schema.UndefinedOr(StudioCMSUsersTable.Select), callbackFn: (db, id) => db((client) => client.selectFrom('StudioCMSUsersTable').selectAll().where('id', '=', id).executeTakeFirst() ), }); const user = yield* getUserById('un-identifiant-utilisateur'); console.log('Utilisateur par identifiant :', user); /* le type de 'user' est : const user: { readonly url: string | null | undefined; readonly id: string; readonly name: string; readonly email: string | null | undefined; readonly avatar: string | null | undefined; readonly username: string; readonly password: string | null | undefined; readonly updatedAt: Date; readonly createdAt: Date; readonly emailVerified: boolean; readonly notifications: string | null | undefined; } | undefined */ }); ## Le paquet SDK <Integration title="@with...

(QB_NEW_FR)


[grammar] ~313-~313: Il y a peut-être une erreur ici
Context: ...ned; } | undefined */ }); ``` ## Le paquet SDK Un kit de développement logiciel complet...

(QB_NEW_FR)


[typographical] ~317-~317: Caractère d’apostrophe incorrect.
Context: ...fonctionnelle, ainsi qu'avec Kysely DB ([@withstudiocms/kysely](#le-paquet-clien...

(APOS_INCORRECT)


[style] ~323-~323: Cette structure peut être modifiée afin de devenir plus percutante.
Context: ...u typage avec validation - Opérations de base de données - Opérations CRUD avec ges...

(DE_BASE3)


[style] ~328-~328: Un verbe peut dynamiser votre phrase.
Context: ...istants d'API REST** - Utilitaires pour la création de points de terminaison REST - **Paramètr...

(PROP_NOMINALES_EN_VERBALES)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Run Starlight Link Check
  • GitHub Check: build-and-push
🔇 Additional comments (1)
src/content/docs/fr/utils/kysely-and-sdk.mdx (1)

1-340: Translation quality is excellent overall.

The French translation maintains strong structural parity with the English version and accurately conveys the technical concepts. The code examples are syntactically correct and the documentation is clear and comprehensive. Only two minor issues remain to be addressed (lines 184 and 280).

Based on learnings, this translation maintains appropriate consistency with the English version.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@studiocms-no-reply
Copy link
Copy Markdown
Member

studiocms-no-reply commented Dec 20, 2025

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
fr/utils/kysely-and-sdk.mdx Localization added, 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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
src/content/docs/fr/utils/kysely-and-sdk.mdx (1)

101-101: Variable shadowing: getUsers function declared twice in same scope.

Line 101 declares the effect generator as getUsers, and line 104 redeclares a variable with the same name inside it. While this works, it shadows the outer binding. Consider renaming the inner variable to clarify intent (e.g., getUsersFn or executeGetUsers).

Also applies to: 104-104

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e168b89 and b842aef.

📒 Files selected for processing (1)
  • src/content/docs/fr/utils/kysely-and-sdk.mdx (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: ArmandPhilippot
Repo: withstudiocms/docs PR: 149
File: src/content/docs/fr/guides/upgrade/version-guides/0-1-0-beta-21.mdx:13-15
Timestamp: 2025-07-24T11:57:15.225Z
Learning: In the withstudiocms/docs repository, when reviewing French translation files, maintain consistency with the English version even if it means keeping unused imports. Structural parity between language versions is prioritized over removing unused code.
Learnt from: ArmandPhilippot
Repo: withstudiocms/docs PR: 149
File: src/content/docs/fr/guides/upgrade/version-guides/0-1-0-beta-20.mdx:18-18
Timestamp: 2025-07-24T12:00:35.014Z
Learning: In the withstudiocms/docs repository, while translations should maintain structural parity with English versions, improving readability during translation is acceptable when the original text has clear redundancy or readability issues that would also impact the translation quality. The maintainer ArmandPhilippot confirmed this approach is reasonable when the technical meaning is preserved.
Learnt from: ArmandPhilippot
Repo: withstudiocms/docs PR: 130
File: src/content/docs/fr/guides/upgrade/version-guides/0-1-0-beta-17.mdx:1-11
Timestamp: 2025-04-26T12:29:17.995Z
Learning: When reviewing translations in the withstudiocms/docs repository, compare with the corresponding English version as the source of truth, not with other files in the same target language. French translations should maintain structural parity with their English counterparts.
🪛 LanguageTool
src/content/docs/fr/utils/kysely-and-sdk.mdx

[style] ~19-~19: Cette structure peut être modifiée afin de devenir plus percutante.
Context: ...oCMS et fournissent les fonctionnalités de base de données utilisées par StudioCMS. Ils...

(DE_BASE3)


[style] ~19-~19: Une phrase longue peut induire une perte de sens pour le lecteur. Celle-ci peut donc être divisée afin d’apporter de la clarté et du rythme.
Context: ... destinés à un usage interne à StudioCMS, mais les utilisateurs peuvent également les util...

(POINT_MAIS)


[style] ~41-~41: Cette structure peut être modifiée afin de devenir plus percutante.
Context: .../kysely/" released={true} /> Un client de base de données offrant la sûreté du typage ...

(DE_BASE3)


[style] ~41-~41: Utilisé hors du contexte militaire, on préfèrera d’autres tournures à « baser sur ».
Context: ...un système de migration pour StudioCMS, basé sur Kysely. Il fourn...

(BASER_SUR)


[style] ~45-~45: Cette structure peut être modifiée afin de devenir plus percutante.
Context: .... ### Caractéristiques - Opérations de base de données avec sûreté du typage - Pr...

(DE_BASE3)


[style] ~50-~50: Cette structure peut être modifiée afin de devenir plus percutante.
Context: ...as** - Inspecter et valider les schémas de base de données lors de l'exécution - **Inté...

(DE_BASE3)


[style] ~55-~55: Cette structure peut être modifiée afin de devenir plus percutante.
Context: ...### Exemple de code #### Configuration de base du client ```ts twoslash title="client...

(DE_BASE3)


[grammar] ~77-~77: Il y a peut-être une erreur ici
Context: ...## Exemple pour obtenir les utilisateurs ts twoslash title="get-users.ts" import { getDBClientLive, type StudioCMSDatabaseSchema } from '@withstudiocms/kysely'; import { libsqlDriver } from '@withstudiocms/kysely/drivers/libsql'; import { ConfigProvider, Effect } from 'studiocms/effect'; export const getDbClient = Effect.gen(function* () { // Configurez le pilote LibSQL avec une URL de base de données à partir de la configuration. const dialect = yield* libsqlDriver.pipe( Effect.withConfigProvider( ConfigProvider.fromJson({ CMS_LIBSQL_URL: 'file:./test.db', }) ) ); // Renvoyez le client DB de Kysely avec les utilitaires d'Effect return yield* getDBClientLive<StudioCMSDatabaseSchema>(dialect); }); // ---cut--- import { Schema } from 'studiocms/effect'; import { StudioCMSUsersTable } from '@withstudiocms/kysely'; export const getUsers = Effect.gen(function* () { const { withDecoder } = yield* getDbClient; const getUsers = withDecoder({ decoder: Schema.Array(StudioCMSUsersTable.Select), callbackFn: (db) => db((client) => client.selectFrom('StudioCMSUsersTable').selectAll().execute()), }); const users = yield* getUsers(); console.log('Users:', users); /* type of 'users' is: const users: readonly { readonly url: string | null | undefined; readonly id: string; readonly name: string; readonly email: string | null | undefined; readonly avatar: string | null | undefined; readonly username: string; readonly password: string | null | undefined; readonly updatedAt: Date; readonly createdAt: Date; readonly emailVerified: boolean; readonly notifications: string | null | undefined; }[] */ }); #### Exemple pour insérer un nouvel d'utilisa...

(QB_NEW_FR)


[grammar] ~131-~131: Essayez d’enlever «  d’  »
Context: ...`` #### Exemple pour insérer un nouvel d'utilisateur (withEncoder) ```ts twoslash title="...

(QB_NEW_FR_OTHER_ERROR_IDS_UNNECESSARY_ADPOSITION_DAPOSTROPHE)


[typographical] ~131-~131: Caractère d’apostrophe incorrect.
Context: ...le pour insérer un nouvel d'utilisateur (withEncoder) ```ts twoslash title="ins...

(APOS_INCORRECT)


[grammar] ~184-~184: Essayez d’enlever «  d’  »
Context: ...`` #### Exemple pour insérer un nouvel d'utilisateur (withCodec) ```ts twoslash title="in...

(QB_NEW_FR_OTHER_ERROR_IDS_UNNECESSARY_ADPOSITION_DAPOSTROPHE)


[typographical] ~184-~184: Caractère d’apostrophe incorrect.
Context: ...le pour insérer un nouvel d'utilisateur (withCodec) ```ts twoslash title="inser...

(APOS_INCORRECT)


[grammar] ~256-~256: Il y a peut-être une erreur ici
Context: ...récupération d'un utilisateur par son ID ts twoslash title="get-user.ts" import { getDBClientLive, type StudioCMSDatabaseSchema } from '@withstudiocms/kysely'; import { libsqlDriver } from '@withstudiocms/kysely/drivers/libsql'; import { ConfigProvider, Effect } from 'studiocms/effect'; export const getDbClient = Effect.gen(function* () { // Configurez le pilote LibSQL avec une URL de base de données à partir de la configuration. const dialect = yield* libsqlDriver.pipe( Effect.withConfigProvider( ConfigProvider.fromJson({ CMS_LIBSQL_URL: 'file:./test.db', }) ) ); // Renvoyez le client DB de Kysely avec les utilitaires d'Effect return yield* getDBClientLive<StudioCMSDatabaseSchema>(dialect); }); // ---cut--- import { Schema } from 'studiocms/effect'; import { StudioCMSUsersTable } from '@withstudiocms/kysely'; export const insertUser = Effect.gen(function* () { const { withCodec } = yield* getDbClient; const getUserById = withCodec({ encoder: Schema.String, decoder: Schema.UndefinedOr(StudioCMSUsersTable.Select), callbackFn: (db, id) => db((client) => client.selectFrom('StudioCMSUsersTable').selectAll().where('id', '=', id).executeTakeFirst() ), }); const user = yield* getUserById('un-identifiant-utilisateur'); console.log('Utilisateur par identifiant :', user); /* le type de 'user' est : const user: { readonly url: string | null | undefined; readonly id: string; readonly name: string; readonly email: string | null | undefined; readonly avatar: string | null | undefined; readonly username: string; readonly password: string | null | undefined; readonly updatedAt: Date; readonly createdAt: Date; readonly emailVerified: boolean; readonly notifications: string | null | undefined; } | undefined */ }); ## Le paquet SDK <Integration title="@with...

(QB_NEW_FR)


[grammar] ~313-~313: Il y a peut-être une erreur ici
Context: ...ned; } | undefined */ }); ``` ## Le paquet SDK Un kit de développement logiciel complet...

(QB_NEW_FR)


[typographical] ~317-~317: Caractère d’apostrophe incorrect.
Context: ...fonctionnelle, ainsi qu'avec Kysely DB ([@withstudiocms/kysely](#le-paquet-clien...

(APOS_INCORRECT)


[style] ~323-~323: Cette structure peut être modifiée afin de devenir plus percutante.
Context: ...u typage avec validation - Opérations de base de données - Opérations CRUD avec ges...

(DE_BASE3)


[style] ~328-~328: Un verbe peut dynamiser votre phrase.
Context: ...istants d'API REST** - Utilitaires pour la création de points de terminaison REST - **Paramètr...

(PROP_NOMINALES_EN_VERBALES)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build-and-push
  • GitHub Check: Run Starlight Link Check

Comment thread src/content/docs/fr/utils/kysely-and-sdk.mdx Outdated
Comment thread src/content/docs/fr/utils/kysely-and-sdk.mdx
@dreyfus92 dreyfus92 merged commit 57e3df8 into withstudiocms:main Dec 20, 2025
8 of 9 checks passed
@ArmandPhilippot ArmandPhilippot deleted the i18n/fr-add-utils/kysely-and-sdk branch December 20, 2025 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants