docs: add Spanish docs and fix language-prefixed links - #35
Conversation
📝 WalkthroughWalkthroughThis pull request adds Spanish language localization to the Effectify documentation site. It configures Astro with a default locale and Spanish language definitions, then introduces comprehensive Spanish documentation pages across backend, React, SolidJS, and universal package sections, along with a Spanish landing page. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit 12c631c
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@apps/docs/src/content/docs/es/index.mdx`:
- Around line 20-108: The page uses locale-prefixed relative links like
"es/react/getting-started/", "es/react/", "es/solid/", "es/backend/",
"es/universal/" and "es/solid/getting-started/" which will resolve to /es/es/...
when the file is served under /es/; update those links to be locale-relative
(remove the leading "es/") or switch to absolute/base-aware links (e.g.,
"/react/..." with proper base handling) so they resolve to "/es/react/..." when
the site base is /es/; search for the link targets in this file (strings shown
above) and replace them accordingly.
In `@apps/docs/src/content/docs/es/react/installation.md`:
- Around line 130-141: The RootLayout component example currently sets the html
lang attribute to "en"; update the returned JSX in RootLayout so the html
element uses lang="es" to match the Spanish documentation example (locate the
RootLayout function and modify the html element's lang prop from "en" to "es").
In `@apps/docs/src/content/docs/es/react/packages/react-query.md`:
- Around line 67-71: El ejemplo de fetchUserWithPosts usa fetchUserPosts sin
definir; añade una definición mínima de fetchUserPosts (por ejemplo una función
async/Effect que acepta userId: number y devuelve un array vacío o posts
simulados) junto a la ya usada fetchUser para que el snippet "Combinando
múltiples Effects" sea autocontenible; actualiza el bloque que contiene
fetchUserWithPosts para referenciar esa nueva función y asegurarte de que firmas
(parámetro userId y tipo de retorno) coincidan con fetchUser.
| - text: Empezar | ||
| link: es/react/getting-started/ | ||
| icon: right-arrow | ||
| - text: Ver en GitHub | ||
| link: https://github.com/devx-op/effectify | ||
| icon: external | ||
| variant: minimal | ||
| banner: | ||
| content: | | ||
| Effectify está en desarrollo activo. Danos una estrella en | ||
| <a href="https://github.com/devx-op/effectify">GitHub</a> | ||
| para seguir el avance. | ||
| --- | ||
|
|
||
| import { Card, CardGrid } from "@astrojs/starlight/components"; | ||
|
|
||
| ## ¿Qué es Effectify? | ||
|
|
||
| Effectify es un conjunto integral de paquetes que lleva el poder de [Effect](https://effect.website/) al desarrollo web moderno. Proporciona soluciones componibles y con tipos seguros para aplicaciones en React, SolidJS y Node.js, permitiéndote construir software robusto con excelente manejo de errores y experiencia de desarrollo. | ||
|
|
||
| ## Plataformas | ||
|
|
||
| <CardGrid stagger> | ||
| <Card title="React" icon="react"> | ||
| Integración con TanStack Query, biblioteca de UI y funcionalidades de chat en tiempo real para aplicaciones React. | ||
|
|
||
| [Explorar paquetes de React →](es/react/) | ||
| </Card> | ||
| <Card title="SolidJS" icon="seti:sublime"> | ||
| Integración reactiva de Effect optimizada para el sistema de reactividad de SolidJS, con componentes de UI y chat. | ||
|
|
||
| [Explorar paquetes de SolidJS →](es/solid/) | ||
| </Card> | ||
| <Card title="Backend en Node.js" icon="bars"> | ||
| Servicios de autenticación, integración con better-auth y soluciones completas de backend construidas con Effect. | ||
|
|
||
| [Explorar paquetes de Backend →](es/backend/) | ||
| </Card> | ||
| <Card title="Universal" icon="puzzle"> | ||
| Lógica de dominio, tipos y reglas de negocio compartidas que funcionan en todas las plataformas y frameworks. | ||
|
|
||
| [Explorar paquetes Universales →](es/universal/) | ||
| </Card> | ||
|
|
||
| </CardGrid> | ||
|
|
||
| ## Características clave | ||
|
|
||
| ### Tipos seguros primero | ||
|
|
||
| Cada paquete está construido con TypeScript y el potente sistema de tipos de Effect, ofreciendo garantías en tiempo de compilación y excelente soporte en el IDE. | ||
|
|
||
| ### Arquitectura componible | ||
|
|
||
| Construye aplicaciones complejas a partir de piezas simples y componibles usando los patrones funcionales de Effect. | ||
|
|
||
| ### Manejo de errores | ||
|
|
||
| Manejo robusto de errores con el sistema de gestión de errores de Effect, haciendo tus aplicaciones más confiables y fáciles de depurar. | ||
|
|
||
| ### Consistencia multiplataforma | ||
|
|
||
| Comparte lógica de negocio y tipos entre aplicaciones de React, SolidJS y Node.js para un comportamiento consistente. | ||
|
|
||
| ## Inicio rápido | ||
|
|
||
| Elige tu plataforma para comenzar: | ||
|
|
||
| <CardGrid> | ||
| <Card title="Aplicación React" icon="react"> | ||
| ```bash | ||
| npm install @effectify/react-query @tanstack/react-query effect | ||
| ``` | ||
|
|
||
| [Inicio rápido React →](es/react/getting-started/) | ||
| </Card> | ||
| <Card title="Aplicación SolidJS" icon="seti:sublime"> | ||
| ```bash | ||
| npm install @effectify/solid-query @tanstack/solid-query effect | ||
| ``` | ||
|
|
||
| [Inicio rápido SolidJS →](es/solid/getting-started/) | ||
| </Card> | ||
| <Card title="Backend en Node.js" icon="bars"> | ||
| ```bash | ||
| npm install @effectify/node-better-auth better-auth effect | ||
| ``` | ||
|
|
||
| [Inicio rápido Backend →](es/backend/getting-started/) |
There was a problem hiding this comment.
Fix locale-prefixed links to avoid /es/es/... resolution.
Because this page already lives at /es/, using relative es/... yields a double locale segment. Use locale‑relative links (e.g., react/) or make them base-aware.
✅ Suggested fix (locale-relative paths)
- link: es/react/getting-started/
+ link: react/getting-started/
...
- [Explorar paquetes de React →](es/react/)
+ [Explorar paquetes de React →](react/)
...
- [Explorar paquetes de SolidJS →](es/solid/)
+ [Explorar paquetes de SolidJS →](solid/)
...
- [Explorar paquetes de Backend →](es/backend/)
+ [Explorar paquetes de Backend →](backend/)
...
- [Explorar paquetes Universales →](es/universal/)
+ [Explorar paquetes Universales →](universal/)
...
- [Inicio rápido React →](es/react/getting-started/)
+ [Inicio rápido React →](react/getting-started/)
...
- [Inicio rápido SolidJS →](es/solid/getting-started/)
+ [Inicio rápido SolidJS →](solid/getting-started/)
...
- [Inicio rápido Backend →](es/backend/getting-started/)
+ [Inicio rápido Backend →](backend/getting-started/)🧰 Tools
🪛 LanguageTool
[grammar] ~68-~68: Aquí puede haber un error.
Context: ...ardGrid> ## Características clave ### Tipos seguros primero Cada paquete está cons...
(QB_NEW_ES)
🤖 Prompt for AI Agents
In `@apps/docs/src/content/docs/es/index.mdx` around lines 20 - 108, The page uses
locale-prefixed relative links like "es/react/getting-started/", "es/react/",
"es/solid/", "es/backend/", "es/universal/" and "es/solid/getting-started/"
which will resolve to /es/es/... when the file is served under /es/; update
those links to be locale-relative (remove the leading "es/") or switch to
absolute/base-aware links (e.g., "/react/..." with proper base handling) so they
resolve to "/es/react/..." when the site base is /es/; search for the link
targets in this file (strings shown above) and replace them accordingly.
| export default function RootLayout({ | ||
| children, | ||
| }: { | ||
| children: React.ReactNode | ||
| }) { | ||
| return ( | ||
| <html lang="en"> | ||
| <body> | ||
| <Providers>{children}</Providers> | ||
| </body> | ||
| </html> | ||
| ) |
There was a problem hiding this comment.
Ajustar lang a “es” en el ejemplo de Next.js.
El snippet está en documentación española; usar lang="es" mejora la coherencia del ejemplo.
🔧 Propuesta de ajuste
- <html lang="en">
+ <html lang="es">📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| export default function RootLayout({ | |
| children, | |
| }: { | |
| children: React.ReactNode | |
| }) { | |
| return ( | |
| <html lang="en"> | |
| <body> | |
| <Providers>{children}</Providers> | |
| </body> | |
| </html> | |
| ) | |
| export default function RootLayout({ | |
| children, | |
| }: { | |
| children: React.ReactNode | |
| }) { | |
| return ( | |
| <html lang="es"> | |
| <body> | |
| <Providers>{children}</Providers> | |
| </body> | |
| </html> | |
| ) |
🤖 Prompt for AI Agents
In `@apps/docs/src/content/docs/es/react/installation.md` around lines 130 - 141,
The RootLayout component example currently sets the html lang attribute to "en";
update the returned JSX in RootLayout so the html element uses lang="es" to
match the Spanish documentation example (locate the RootLayout function and
modify the html element's lang prop from "en" to "es").
| ```tsx | ||
| const fetchUserWithPosts = (userId: number) => | ||
| Effect.all([fetchUser(userId), fetchUserPosts(userId)]).pipe( | ||
| Effect.map(([user, posts]) => ({ user, posts })), | ||
| ) |
There was a problem hiding this comment.
Falta definición de fetchUserPosts en el ejemplo avanzado.
El snippet de “Combinando múltiples Effects” referencia fetchUserPosts sin declararlo, lo que dificulta copiar/pegar el ejemplo tal cual. Sugiero añadir un stub mínimo para que el bloque sea autocontenible.
🛠️ Propuesta de ajuste en el snippet
+const fetchUserPosts = (userId: number) =>
+ Effect.tryPromise({
+ try: () => fetch(`/api/users/${userId}/posts`).then((res) => res.json()),
+ catch: (error) => new Error(`Failed to fetch posts: ${error}`),
+ })
+
const fetchUserWithPosts = (userId: number) =>
Effect.all([fetchUser(userId), fetchUserPosts(userId)]).pipe(
Effect.map(([user, posts]) => ({ user, posts })),
)🤖 Prompt for AI Agents
In `@apps/docs/src/content/docs/es/react/packages/react-query.md` around lines 67
- 71, El ejemplo de fetchUserWithPosts usa fetchUserPosts sin definir; añade una
definición mínima de fetchUserPosts (por ejemplo una función async/Effect que
acepta userId: number y devuelve un array vacío o posts simulados) junto a la ya
usada fetchUser para que el snippet "Combinando múltiples Effects" sea
autocontenible; actualiza el bloque que contiene fetchUserWithPosts para
referenciar esa nueva función y asegurarte de que firmas (parámetro userId y
tipo de retorno) coincidan con fetchUser.
Summary:\n- Add Spanish documentation structure under apps/docs/src/content/docs/es\n- Translate React, SolidJS, Universal, and Backend sections\n- Fix language-prefixed links on EN/ES home index to use /en/... and /es/...\n\nVerification:\n- Built docs locally via Astro; all ES/EN pages generate and load\n- Preview running at local dev with correct routes\n\nNotes:\n- PR is docs-only and isolated from app code\n- Commit message and PR are in English as requested
Summary by CodeRabbit
Documentation
Chores