i18n(fr): add plugins pages#36
Conversation
WalkthroughThis pull request adds two new French documentation files for StudioCMS extension modules. The documentation covers module creation, directory structure, TypeScript examples, Astro integration, dynamic routes, grid items, and navigation links. Additionally, new public entities are introduced: a function and interface in the code along with a module declaration for custom configuration. Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant CMS as StudioCMS Core
participant Ext as Extension Module
participant Astro as Astro Integration
Dev->>CMS: Register extension module (using StudioCMSPlugin)
CMS->>Ext: Invoke studioCMSPageInjector(options)
Ext->>Astro: Setup configuration and hooks
Astro->>CMS: Return dynamic routing & navigation details
Suggested labels
Suggested reviewers
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (6)
src/content/docs/fr/plugins/index.mdx (3)
11-18: Introduction and Comparative Language
The introductory paragraphs clearly describe the purpose of extension modules. One minor suggestion: the phrase “sont similaires aux intégrations Astro” (line 17) might be refined for clarity (e.g. “sont analogues aux intégrations Astro”) since the adjective “similaires” is noted by some style guides to be used in an absolute form.🧰 Tools
🪛 LanguageTool
[style] ~17-~17: L’adjectif « similaires » s’emploie uniquement de façon absolue (sans « à »).
Context: ...s modules d’extension de StudioCMS sont similaires aux intégrations Astro, mais ils intègrent ...(SIMILAIRE)
285-291: Explanation Readability and Typography
The explanatory text following the code example (lines 285–291) is informative but could be split into shorter sentences to improve clarity. Additionally, please review the punctuation and spacing (especially around colons and apostrophes) to ensure consistency with typographical standards.
287-290: Link Section Formatting
The<ReadMore>component and the subsequent links block are well structured. A minor suggestion is to add a terminating punctuation (e.g. a period) at the end of the explanatory sentence to enhance readability, and ensure that spacing before colons complies with French typographic rules.src/content/docs/fr/plugins/extended.mdx (3)
120-122: Module Extension Explanation Readability
The brief explanation (lines 120–122) summarizing the module extension example is clear. Consider splitting any lengthy sentences to further improve readability.🧰 Tools
🪛 LanguageTool
[style] ~121-~121: Une autre structure peut sembler plus percutante.
Context: ...it un module d’extension pour StudioCMS incluant une intégration Astro et permettant de ...(INCLUANT_EXCLUANT)
222-312: Navigation Component Integration and Anchor Attribute Syntax
The Navigation component example (lines 222–312) provides a comprehensive implementation for frontend navigation using StudioCMS helpers. One point to verify: the anchor tags are written using the shorthand{href}(e.g.<a {href}>). Consider confirming whether this syntax is fully supported in your Astro setup—standard practice is usually to usehref={href}.🧰 Tools
🪛 LanguageTool
[typographical] ~224-~224: Caractère d’apostrophe incorrect.
Context: ...nière que le fait le module d’extension@studiocms/blog, vous pouvez créer un composant `Naviga...(APOS_INCORRECT)
1-32: General Editorial Suggestions
A few static analysis hints recommend reviewing the document’s overall typography and style. In particular, verify that apostrophes, spaces before colons, and punctuation (including the termination of sentences) adhere to French typographical standards. This will further enhance the document’s professionalism.🧰 Tools
🪛 LanguageTool
[uncategorized] ~24-~24: Cette abréviation peut sembler familière dans un contexte formel.
Context: ...leTree> - package.json - src - index.ts - routes - [...slug].astro - da...(DET_ABREGE)
[typographical] ~26-~26: Le caractère « points de suspension » est suivi par une espace.
Context: ...- src - index.ts - routes - [...slug].astro - dashboard-grid-items - M...(POINTS_SUSPENSIONS_SPACE)
[style] ~27-~27: Alternatives possibles pour cet anglicisme :
Context: ...ts - routes - [...slug].astro - dashboard-grid-items - MyPluginGridItem.astro...(FR_SIMPLE_REPLACE_ANGLICISM_PREMIUM_DASHBOARD)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/content/docs/fr/plugins/extended.mdx(1 hunks)src/content/docs/fr/plugins/index.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/content/docs/fr/plugins/extended.mdx
[uncategorized] ~24-~24: Cette abréviation peut sembler familière dans un contexte formel.
Context: ...leTree> - package.json - src - index.ts - routes - [...slug].astro - da...
(DET_ABREGE)
[typographical] ~26-~26: Le caractère « points de suspension » est suivi par une espace.
Context: ...- src - index.ts - routes - [...slug].astro - dashboard-grid-items - M...
(POINTS_SUSPENSIONS_SPACE)
[style] ~27-~27: Alternatives possibles pour cet anglicisme :
Context: ...ts - routes - [...slug].astro - dashboard-grid-items - MyPluginGridItem.astro...
(FR_SIMPLE_REPLACE_ANGLICISM_PREMIUM_DASHBOARD)
[typographical] ~34-~34: Caractère d’apostrophe incorrect.
Context: ... d’extension Dans le fichier principal src/index.ts, vous définirez le module d’extension p...
(APOS_INCORRECT)
[style] ~34-~34: Une autre structure peut sembler plus percutante.
Context: ... d’un module d’extension pour StudioCMS incluant une intégration Astro pour créer un blo...
(INCLUANT_EXCLUANT)
[style] ~121-~121: Une autre structure peut sembler plus percutante.
Context: ...it un module d’extension pour StudioCMS incluant une intégration Astro et permettant de ...
(INCLUANT_EXCLUANT)
[typographical] ~127-~127: Caractère d’apostrophe incorrect.
Context: ...> ## Exemple de route Dans le fichier src/routes/[...slug].astro, vous définirez la route du module d’ex...
(APOS_INCORRECT)
[typographical] ~127-~127: Caractère d’apostrophe incorrect.
Context: ...est le frontmatter (entre les barrières ---), et la seconde est le modèle HTML plac...
(APOS_INCORRECT)
[typographical] ~127-~127: Caractère d’apostrophe incorrect.
Context: ...èle HTML placé sous la seconde barrière ---. ```ts twoslash title="Frontmatter" //...
(APOS_INCORRECT)
[uncategorized] ~182-~182: Cette conjonction ne s’élide pas dans ce cas précis.
Context: ...ui affiche une liste d’articles de blog lorsqu’aucun slug n’est fourni et affiche le contenu...
(CONJONCTIONS)
[style] ~186-~186: Alternatives possibles pour cet anglicisme :
Context: ...le d’élément de grille Dans le fichier src/dashboard-grid-items/MyPluginGridItem.astro, vou...
(FR_SIMPLE_REPLACE_ANGLICISM_PREMIUM_DASHBOARD)
[style] ~220-~220: Cette structure peut être allégée.
Context: ...5 pages les plus récemment mises à jour au cours des 30 derniers jours. Cet élément inclut u...
(AU_COURS_DE1)
[typographical] ~224-~224: Caractère d’apostrophe incorrect.
Context: ...nière que le fait le module d’extension @studiocms/blog, vous pouvez créer un composant `Naviga...
(APOS_INCORRECT)
src/content/docs/fr/plugins/index.mdx
[style] ~17-~17: L’adjectif « similaires » s’emploie uniquement de façon absolue (sans « à »).
Context: ...s modules d’extension de StudioCMS sont similaires aux intégrations Astro, mais ils intègrent ...
(SIMILAIRE)
[typographical] ~257-~257: Caractère d’apostrophe incorrect.
Context: ...s devez créer un objet conforme au type StudioCMSPlugin. Cet objet doit ressembler à l’exemple ...
(APOS_INCORRECT)
[uncategorized] ~293-~293: Une phrase longue peut apporter une perte de sens pour le lecteur. Celle-ci peut donc être divisée afin d’apporter de la clarté et du rythme.
Context: ...odule d’extension pour StudioCMS appelé Mon module d’extension qui nécessite la ve...
(POINT_DET)
[typographical] ~293-~293: Une espace est requise.
Context: ...sage dans la console lorsque le crochet astro:config:setup est appelé. Pour plus ...
(DEUX_POINTS_ESPACE)
[uncategorized] ~295-~295: Un point est requis pour indiquer la fin de cette phrase.
Context: ...les d’extension utiles][extended-plugins] {/* Links */} [extended-plu...
(POINT)
[style] ~297-~297: Alternatives possibles pour cet anglicisme :
Context: ...iles][extended-plugins] {/* Links */} [extended-plugins]: /fr/plugins/ext...
(FR_SIMPLE_REPLACE_ANGLICISM_PREMIUM_LINKS)
[uncategorized] ~298-~298: Les deux-points sont précédés d’une espace insécable.
Context: ...adMore> {/* Links */} [extended-plugins]: /fr/plugins/extended/
(FRENCH_WHITESPACE)
🔇 Additional comments (13)
src/content/docs/fr/plugins/index.mdx (4)
1-7: Metadata Block Verification
The frontmatter (lines 1–7) correctly sets the translation flag, title, description, and sidebar order.
9-9: Import Statement Verification
The import of theReadMorecomponent is correct. Just ensure the path is resolved correctly in your build configuration.
19-247: Type Definition Completeness
TheStudioCMSPlugintype is comprehensive and well-documented. All required and optional properties are clearly described, which will help developers adhere to the expected interface.
257-283: Module Extension Example – Code Implementation
The code example demonstrating the creation of a StudioCMS extension module viadefinePluginis clear and concise. Verify that the integration process (viamonIntegration) meets your evolving project requirements.🧰 Tools
🪛 LanguageTool
[typographical] ~257-~257: Caractère d’apostrophe incorrect.
Context: ...s devez créer un objet conforme au typeStudioCMSPlugin. Cet objet doit ressembler à l’exemple ...(APOS_INCORRECT)
src/content/docs/fr/plugins/extended.mdx (9)
1-7: Frontmatter Block Validation
The metadata block (lines 1–7) appropriately configures the page for i18n and sets the sidebar order.
9-10: Import Statements Verification
BothReadMoreandFileTreecomponents are imported correctly. Ensure that theFileTreecomponent displays the file structure as intended in your documentation theme.
12-14: Introduction Text Evaluation
The "Présentation" section clearly introduces the concept of extension modules with a concise description.
16-30: File Structure Demonstration
The FileTree block (lines 16–30) effectively outlines the recommended directory structure for a module extension. This visual aid is a helpful addition for users.🧰 Tools
🪛 LanguageTool
[uncategorized] ~24-~24: Cette abréviation peut sembler familière dans un contexte formel.
Context: ...leTree> - package.json - src - index.ts - routes - [...slug].astro - da...(DET_ABREGE)
[typographical] ~26-~26: Le caractère « points de suspension » est suivi par une espace.
Context: ...- src - index.ts - routes - [...slug].astro - dashboard-grid-items - M...(POINTS_SUSPENSIONS_SPACE)
[style] ~27-~27: Alternatives possibles pour cet anglicisme :
Context: ...ts - routes - [...slug].astro - dashboard-grid-items - MyPluginGridItem.astro...(FR_SIMPLE_REPLACE_ANGLICISM_PREMIUM_DASHBOARD)
36-119: Module Extension Implementation Example
The code sample (lines 36–119) that defines the functionstudioCMSPageInjectorand sets up an Astro integration is well implemented. The integration logic—including the dynamic route injection and virtual imports—is clear and aligns with the intended functionality.
124-153: Dynamic Route Example Verification
The "Exemple de route" section (lines 124–153) effectively demonstrates how to declare a dynamic route with frontmatter and accompanying TypeScript configuration. Verify that the usage ofAstro.paramsand the routing logic meets your application’s requirements.🧰 Tools
🪛 LanguageTool
[typographical] ~127-~127: Caractère d’apostrophe incorrect.
Context: ...> ## Exemple de route Dans le fichiersrc/routes/[...slug].astro, vous définirez la route du module d’ex...(APOS_INCORRECT)
[typographical] ~127-~127: Caractère d’apostrophe incorrect.
Context: ...est le frontmatter (entre les barrières---), et la seconde est le modèle HTML plac...(APOS_INCORRECT)
[typographical] ~127-~127: Caractère d’apostrophe incorrect.
Context: ...èle HTML placé sous la seconde barrière---. ```ts twoslash title="Frontmatter" //...(APOS_INCORRECT)
160-179: Template Example Evaluation
The Astro template provided (lines 160–179) correctly handles both cases—displaying an individual page when a slug is present and a list of pages when it isn’t. The conditional rendering is clear and maintains consistency with standard Astro practices.
182-182: Route Example Summary
The summary sentence (line 182) succinctly explains the behavior of the dynamic route; it is clear and accurate.🧰 Tools
🪛 LanguageTool
[uncategorized] ~182-~182: Cette conjonction ne s’élide pas dans ce cas précis.
Context: ...ui affiche une liste d’articles de blog lorsqu’aucun slug n’est fourni et affiche le contenu...(CONJONCTIONS)
184-218: Dashboard Grid Item Example
The example in the "Exemple d’élément de grille" section (lines 184–218) is well structured. The logic to filter, sort, and slice the list of pages is correctly implemented. Confirm that the 30-day window and the limit of 5 items meet your dashboard requirements.🧰 Tools
🪛 LanguageTool
[style] ~186-~186: Alternatives possibles pour cet anglicisme :
Context: ...le d’élément de grille Dans le fichiersrc/dashboard-grid-items/MyPluginGridItem.astro, vou...(FR_SIMPLE_REPLACE_ANGLICISM_PREMIUM_DASHBOARD)
Description
Adds the French translation of the
pluginspages.Summary by CodeRabbit