Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I18n: Spanish #96

Merged
merged 30 commits into from
May 19, 2021
Merged

I18n: Spanish #96

merged 30 commits into from
May 19, 2021

Conversation

markozxuu
Copy link
Contributor

@markozxuu markozxuu commented May 19, 2021

This PR focuses on Spanish language support to the site. Closes #95

Background

Spanish is ranked number 2 of the 10 most spoken languages in the world.

Metrics

SWR was downloaded 1.3 million according to yarn data in the last month, a large part of that percentage are people who speak Spanish. Although I share the idea that English is important for any developer, it is good to have the option.

Major changes

  • feat: added support for Spanish language
  • doc(language): now the footer text is on Spanish
  • docs(language): I18: Snpanish
  • docs(language): Added metadata Spanish
  • docs(language): I18 index spanish page
  • docs(language): I18 Getting started to spanish
  • docs(language): I18 Change log page to Spanish
  • feat(I18): Add metadata related to the example to Spanish
  • docs(I18): Basic use to the Spanish
  • docs(I18): Auth page to Spanish
  • docs(I18): Handleing error page to Spanish
  • docs(I18): Inifinite loading page to Spanish
  • feat(I18-spanish): added metadata related with advances section
  • docs(I18): Translated to Spanish
  • docs(I18): Added metadata related with documentation section
  • refactor: fix typo
  • docs(I18): Option translated to Spanish
  • docs(I18): Configuration global page translated to Spanish
  • docs(I18): Data fetching page translated to Spanish
  • docs:(I18): Error handling page translated to Spanish
  • refactor: Fixy typo
  • docs(I18): Automatic revalidation page translated to Spanish
  • docs(I18): Conditional data fetching page translated to Spanish
  • docs(I18): Arguments page translated to Spanish
  • docs(I18) Mutation page translated to Spanish
  • docs(I18): Pagination page translated to Spanish
  • docs(I18): Prefetching page translated to Spanish
  • docs(I18): Usage with Next.js page translated to Spanish
  • docs(I18): Suspense page translated to Spanish
  • refactor: performance page

@vercel
Copy link

vercel bot commented May 19, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vercel/swr-site/3d4JGEEnzqZYBbZMYkf6SUntDJCC
✅ Preview: https://swr-site-git-fork-markozxuu-language-es.vercel.sh

@shuding
Copy link
Member

shuding commented May 19, 2021

Thank you so much @markozxuu! I don't speak Spanish but I'll trust you and merge this PR, it looks amazing!

@shuding shuding merged commit 456da97 into vercel:master May 19, 2021
También puede personalizar la función de comparación mediante la [opción `compare`](/docs/options) si quieres cambiar el comportamiento.
Por ejemplo, algunas respuestas de la API devuelven una marca de tiempo del servidor que tal vez quiera excluir de la difusión de datos.

## Coleción de dependencias
Copy link

Choose a reason for hiding this comment

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

typo: colección


```

En el peor de los casos (la primera solicitud falló, entonces el reitento fue exitoso), verá 4 líneas de registros:
Copy link

Choose a reason for hiding this comment

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

typo: reintento

Copy link

Choose a reason for hiding this comment

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

use 'entonces' as in 'then' not 'therefore'. "Si la primera solicitud falló, entonces el reintento fue exitoso"

Copy link

Choose a reason for hiding this comment

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

verá is formal you. Let's use impersonal: "Se verán 4 líneas de registros"

Cada componente `<Avatar/>` tiene un hook `useSWR` en su interior. Dado que tienen el mismo key SWR y
que se renderizan casi al mismo tiempo, **sólo se hará 1 solicitud de red**.

Puedes reutilizar tus hooks de datos (como `useUser` en el ejemplo anterior) en todas partes, sin preocuparte por el rendimiento
Copy link

@ernestd ernestd May 23, 2021

Choose a reason for hiding this comment

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

Here the informal 'you' is used whereas later in the document the formal 'you' is used. To avoid mixing it up it's better to use the impersonal form (an alternative is to use the plural as it's correctly used later in the document too):
"Se pueden reutilizar los hooks de datos ... sin preocuparse por el rendimiento"

## Coleción de dependencias

`useSWR` devuelve 3 valores de **estado**: `data`, `error` y `isValidating` cada uno de ellos puede actualizarse de forma independientemente.
Por ejemplo, si imprimimos esos valores dentro de un ciclo de vida completo de obtención de datos, será algo como esto:
Copy link

Choose a reason for hiding this comment

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

good use of the plural to make it impersonal 👍

El mismo proceso ha ocurrido internamente, hubo un error de la primera solicitud, entonces tenemos los datos del reintento.
Sin embargo, **SWR sólo actualiza los estados que utiliza el componente**, que ahora sólo es `data`.

Si no utiliza siempre estos 3 estados, ya se está beneficiando de esta función. En [Vercel](https://vercel.com), esta optimización se
Copy link

Choose a reason for hiding this comment

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

"Si no se utilizan..."

## Tree Shaking

El paquete SWR es [tree-shakeable](https://webpack.js.org/guides/tree-shaking) y no tiene efectos secundarios.
Esto significa que si sólo importa `useSWR` core API, las APIs no utilizadas, como `useSWRInfinite`, no se incluirán en tu aplicación.
Copy link

Choose a reason for hiding this comment

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

... que si sólo se importa...

Copy link

Choose a reason for hiding this comment

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

... no se incluirán en la aplicación.


# Registro de cambios

Visite [SWR release page](https://github.com/vercel/swr/releases) para ver todo el historial de lanzamientos.
Copy link

Choose a reason for hiding this comment

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

Se puede visitar...

Copy link

@ernestd ernestd left a comment

Choose a reason for hiding this comment

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

For now, I just left some comments with corrections in the first files of the PR. I would need more time to go through the rest

uttk referenced this pull request in uttk/swr-site May 24, 2021
* Fix code example in data-fetching.zh-CN.mdx (#90)

* Add license (#93)

* Add license

* Update license.md

Co-authored-by: Paco <[email protected]>

Co-authored-by: Shu Ding <[email protected]>
Co-authored-by: Paco <[email protected]>

* update perf page (#92)

* I18n: Spanish (#96)

* feat: added support for Spanish language

* doc(language): now the footer text is on Spanish

* docs(language): I18: Snpanish

* docs(language): Added metadata Spanish

* docs(language): I18 index spanish page

* docs(language): I18 Getting started to spanish

* docs(language): I18 Change log page to Spanish

* feat(I18): Add metadata related to the example to Spanish

* docs(I18): Basic use to the Spanish

* docs(I18): Auth page to Spanish

* docs(I18): Handleing error page to Spanish

* docs(I18): Inifinite loading page to Spanish

* feat(I18-spanish): added metadata related with advances section

* docs(I18): Translated to Spanish

* docs(I18): Added metadata related with documentation section

* refactor: fix typo

* docs(I18): Option translated to Spanish

* docs(I18): Configuration global page translated to Spanish

* docs(I18): Data fetching page translated to Spanish

* docs:(I18): Error handling page translated to Spanish

* refactor: Fixy typo

* docs(I18): Automatic revalidation page translated to Spanish

* docs(I18): Conditional data fetching page translated to Spanish

* docs(I18): Arguments page translated to Spanish

* docs(I18) Mutation page translated to Spanish

* docs(I18): Pagination page translated to Spanish

* docs(I18): Prefetching page translated to Spanish

* docs(I18): Usage with Next.js page translated to Spanish

* docs(I18): Suspense page translated to Spanish

* refactor: performance page

* docs(readme): Improving credits and add one more. (#97)

* i18n: add Japanese

Co-authored-by: Fang Lu <[email protected]>
Co-authored-by: Joe Cohen <[email protected]>
Co-authored-by: Shu Ding <[email protected]>
Co-authored-by: Paco <[email protected]>
Co-authored-by: Markoz Peña <[email protected]>
@markozxuu markozxuu deleted the language/es branch June 5, 2021 03:08
shuding added a commit that referenced this pull request Jun 6, 2021
* feat: Add japanese translate (#47)

* doc: translate "Global Configuration" page into Japanese (#48)

* doc: translate "Data-Fetching" page into Japanese (#50)

* docs: Add Japanese markdown or mdx files (#54)

* doc: translate "API Options" page into Japanese (#56)

* doc: translate "Top" page into Japanese (#55)

* doc: translate "Conditional Fetching" page into Japanese (#57)

* doc: translate "mutation" page into Japanese (#58)

* doc: translate "Suspense" page into Japanese (#60)

* doc: translate "Change Log" page into Japanese (#62)

* doc: translate "Prefetching Data" page into Japanese (#59)

* doc: translate "Automatic Revalidation" page into Japanese (#63)

* doc: translate "Getting Started" page into Japanese (#61)

* doc: translate "Arguments" page into Japanese (#64)

* doc: translate the swr title into Japanese (#71)

* doc: translate "Advanced Performance" page into Japanese (#65)

* doc: translate "Error Handling" page into Japanese (#69)

* doc: translate the side menu into Japanese (#72)

* doc: translate "Usage with Next.js" page into Japanese (#70)

* doc: translate "pagination" page into Japanese(#73)

* doc: proofread "Top" page (#77)

* doc: proofread "Global Configuration" page (#81)

* doc: proofread "Getting Started" page (#79)

* doc: proofread "Error Handling" page (#83)

* doc: proofread "Conditional Fetching" page (#85)

* doc: proofread "Pagination" page (#87)

* doc: proofread "Usage with Next.js" page (#89)

* docs: proofread the doc pages (#91)

* fix: resolve conflicts (#93)

* Fix code example in data-fetching.zh-CN.mdx (#90)

* Add license (#93)

* Add license

* Update license.md

Co-authored-by: Paco <[email protected]>

Co-authored-by: Shu Ding <[email protected]>
Co-authored-by: Paco <[email protected]>

* update perf page (#92)

* I18n: Spanish (#96)

* feat: added support for Spanish language

* doc(language): now the footer text is on Spanish

* docs(language): I18: Snpanish

* docs(language): Added metadata Spanish

* docs(language): I18 index spanish page

* docs(language): I18 Getting started to spanish

* docs(language): I18 Change log page to Spanish

* feat(I18): Add metadata related to the example to Spanish

* docs(I18): Basic use to the Spanish

* docs(I18): Auth page to Spanish

* docs(I18): Handleing error page to Spanish

* docs(I18): Inifinite loading page to Spanish

* feat(I18-spanish): added metadata related with advances section

* docs(I18): Translated to Spanish

* docs(I18): Added metadata related with documentation section

* refactor: fix typo

* docs(I18): Option translated to Spanish

* docs(I18): Configuration global page translated to Spanish

* docs(I18): Data fetching page translated to Spanish

* docs:(I18): Error handling page translated to Spanish

* refactor: Fixy typo

* docs(I18): Automatic revalidation page translated to Spanish

* docs(I18): Conditional data fetching page translated to Spanish

* docs(I18): Arguments page translated to Spanish

* docs(I18) Mutation page translated to Spanish

* docs(I18): Pagination page translated to Spanish

* docs(I18): Prefetching page translated to Spanish

* docs(I18): Usage with Next.js page translated to Spanish

* docs(I18): Suspense page translated to Spanish

* refactor: performance page

* docs(readme): Improving credits and add one more. (#97)

* i18n: add Japanese

Co-authored-by: Fang Lu <[email protected]>
Co-authored-by: Joe Cohen <[email protected]>
Co-authored-by: Shu Ding <[email protected]>
Co-authored-by: Paco <[email protected]>
Co-authored-by: Markoz Peña <[email protected]>

* Revert "fix: resolve conflicts (#93)"

This reverts commit b29c7b8.

* feat(i18n): add Japanese (#95)

* doc: update translation of "Performance" page (#98)

* doc: add Japanese translators to README.md (#99)

* doc: fix the feature section of top page (#101)

Co-authored-by: Tomohiro (Tomo) SHIOYA <[email protected]>
Co-authored-by: Fang Lu <[email protected]>
Co-authored-by: Joe Cohen <[email protected]>
Co-authored-by: Shu Ding <[email protected]>
Co-authored-by: Paco <[email protected]>
Co-authored-by: Markoz Peña <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I18: Spanish
3 participants