Skip to content

Commit e6a611b

Browse files
committed
Add es
1 parent ef216ca commit e6a611b

18 files changed

+1429
-26
lines changed

AGENTS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ This is the documentation repository of LibreTranslate, a free and open source t
1111
- Always preserve images in the proper places.
1212
- Each translation for other languages, like Italian or Spanish, needs to be added as subfolder in `src/content/docs/[langcode]`, where `langcode` is the 2 letter ISO 639 language code. For example, Italian docs go in `src/content/docs/it/`.
1313
- Each translation must have an `index.mdx` and copies of each subfolder (`community`, `guides`) and a copy of each markdown file in each subfolder. Always verify that the number of pages match.
14+
- Always create/update ALL the markdown files when asked to add or update a translation.
15+
- Always translate from English, never from another language.
16+
- Always verify all translations for accuracy and completeness in all markdown files, then fix all inaccuracies and fill any missing section, if any.
1417
- When translating internal links, we always reference them with the appropriate URL that maps to a markdown file of the translation.
1518
- Never modify any other file other than those in `src/content` or `astro.config.mjs` without explicit permission.
1619
- When translating, always check that all the sidebar items in `astro.config.mjs` have a proper translation item in the `translations` key.

astro.config.mjs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,24 @@ export default defineConfig({
2525
{
2626
label: "Welcome",
2727
translations: {
28-
it: "Benvenuti"
28+
it: "Benvenuti",
29+
es: "Bienvenidos"
2930
},
3031
items: [
3132
{ label: "Quickstart",
3233
link: "/",
3334
translations: {
34-
it: "Guida rapida"
35+
it: "Guida rapida",
36+
es: "Guía rápida"
3537
}
3638
},
3739
]
3840
},
3941
{
4042
label: 'Guides',
4143
translations: {
42-
it: 'Guide'
44+
it: 'Guide',
45+
es: 'Guías'
4346
},
4447
items: [
4548
{ slug: 'guides/installation' },
@@ -55,7 +58,8 @@ export default defineConfig({
5558
{
5659
label: "Community",
5760
translations: {
58-
it: "Comunità"
61+
it: "Comunità",
62+
es: "Comunidad"
5963
},
6064
collapsed: true,
6165
items: [
@@ -78,6 +82,9 @@ export default defineConfig({
7882
it: {
7983
label: 'Italiano',
8084
},
85+
es: {
86+
label: 'Español',
87+
},
8188
},
8289

8390
editLink: {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Espejos
3+
description: Lista de espejos disponibles para LibreTranslate.
4+
---
5+
6+
Esta es una lista de instancias públicas de LibreTranslate. Algunas requieren una clave API. Si deseas agregar una nueva URL, abre una [pull request](https://github.com/LibreTranslate/Documentation/edit/main/src/content/docs/community/mirrors.md).
7+
8+
| URL | Clave API Requerida | Enlace |
9+
| --- | --- | --- |
10+
| [libretranslate.com](https://libretranslate.com) | ✔️ | [ [Obtener Clave API](https://portal.libretranslate.com) ] [ [Estado del Servicio](https://status.libretranslate.com/) ] |
11+
| [translate.cutie.dating](https://translate.cutie.dating) || [ [Estado del Servicio](https://status.cutie.dating/status) ] |
12+
13+
## Espejos TOR/i2p
14+
15+
| URL |
16+
| --- |
17+
| [lt.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion](http://lt.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/) |
18+
| [lt.vern.i2p](http://vernf45n7mxwqnp5riaax7p67pwcl7wcefdcnqqvim7ckdx4264a.b32.i2p/) |
19+
| [cutetranskomrvygzfinjwlxny7fqpqvwe4nuioniui5rk4rw7yyw6id.onion](http://cutetranskomrvygzfinjwlxny7fqpqvwe4nuioniui5rk4rw7yyw6id.onion/) |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Proyectos
3+
description: Lista de proyectos que forman parte de LibreTranslate.
4+
---
5+
6+
Además de [LibreTranslate](https://github.com/LibreTranslate/LibreTranslate), trabajamos y mantenemos varios proyectos relacionados con la traducción automática. Algunos de ellos se enumeran a continuación:
7+
8+
* [LTEngine](https://github.com/LibreTranslate/LTEngine): Traducción automática basada en LLM con una API compatible con LibreTranslate
9+
* [LexiLang](https://github.com/LibreTranslate/LexiLang): Detector de idioma simple y rápido basado en diccionario para textos cortos
10+
* [Locomotive](https://github.com/LibreTranslate/Locomotive): Kit de herramientas para entrenar/convertir modelos de lenguaje compatibles con LibreTranslate
11+
* [MiniSBD](https://github.com/LibreTranslate/MiniSBD): Biblioteca para la detección rápida de límites de oraciones
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Recursos
3+
description: Lista de recursos de la comunidad para LibreTranslate.
4+
---
5+
6+
## Foro
7+
8+
Todas las discusiones relacionadas con el proyecto tienen lugar en el foro de la comunidad. Este es también el mejor lugar para pedir ayuda. ¡Ven a saludar!
9+
10+
https://community.libretranslate.com
11+
12+
## GitHub
13+
14+
El código fuente del proyecto está alojado en GitHub. El rastreador de problemas se puede utilizar para informar problemas, pero no para hacer preguntas. Utiliza el foro en su lugar.
15+
16+
https://github.com/LibreTranslate/LibreTranslate
17+
18+
## BlueSky
19+
20+
Tenemos una cuenta de BlueSky de bajo volumen que utilizamos para transmitir las últimas noticias del proyecto.
21+
22+
https://bsky.app/profile/libretranslate.com
23+
24+
## Weblate
25+
26+
Puedes ayudar a traducir la interfaz de usuario de LibreTranslate a través de Weblate.
27+
28+
https://hosted.weblate.org/projects/libretranslate/app/
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
---
2+
title: Uso de la API
3+
description: Cómo traducir con LibreTranslate.
4+
---
5+
6+
Los siguientes ejemplos usan Javascript, pero puedes usar cualquier lenguaje de programación. También hay [enlaces de lenguaje](#language-bindings) disponibles para muchos lenguajes de programación.
7+
8+
### Traducción Simple
9+
10+
Solicitud:
11+
12+
```javascript
13+
const res = await fetch("https://libretranslate.com/translate", {
14+
method: "POST",
15+
body: JSON.stringify({
16+
q: "Hello!",
17+
source: "en",
18+
target: "es",
19+
api_key: "xxxxxx" // puede ser opcional si lo alojas tú mismo
20+
}),
21+
headers: { "Content-Type": "application/json" },
22+
});
23+
24+
console.log(await res.json());
25+
```
26+
27+
Respuesta:
28+
29+
```javascript
30+
{
31+
"translatedText": "¡Hola!"
32+
}
33+
```
34+
35+
:::note
36+
El parámetro `api_key` solo es necesario cuando se utiliza una instancia configurada con claves API, como [libretranslate.com](https://libretranslate.com). Las instancias que alojas tú mismo no lo requieren.
37+
:::
38+
39+
### Detección Automática del Idioma de Origen
40+
41+
Solicitud:
42+
43+
```javascript
44+
const res = await fetch("https://libretranslate.com/translate", {
45+
method: "POST",
46+
body: JSON.stringify({
47+
q: "Bonjour!",
48+
source: "auto",
49+
target: "en",
50+
api_key: "xxxxxx"
51+
}),
52+
headers: { "Content-Type": "application/json" },
53+
});
54+
55+
console.log(await res.json());
56+
```
57+
58+
Respuesta:
59+
60+
```javascript
61+
{
62+
"detectedLanguage": {
63+
"confidence": 90.0,
64+
"language": "fr"
65+
},
66+
"translatedText": "Hello!"
67+
}
68+
```
69+
70+
### Traducir HTML/Marcado
71+
72+
Solicitud:
73+
74+
```javascript
75+
const res = await fetch("https://libretranslate.com/translate", {
76+
method: "POST",
77+
body: JSON.stringify({
78+
q: '<p class="green">Hello!</p>',
79+
source: "en",
80+
target: "es",
81+
format: "html",
82+
api_key: "xxxxxx"
83+
}),
84+
headers: { "Content-Type": "application/json" },
85+
});
86+
87+
console.log(await res.json());
88+
```
89+
90+
Respuesta:
91+
92+
```javascript
93+
{
94+
"translatedText": "<p class=\"green\">¡Hola!</p>"
95+
}
96+
```
97+
98+
### Traducciones Alternativas
99+
100+
Solicitud:
101+
102+
```javascript
103+
const res = await fetch("https://libretranslate.com/translate", {
104+
method: "POST",
105+
body: JSON.stringify({
106+
q: "Hello",
107+
source: "en",
108+
target: "it",
109+
format: "text",
110+
alternatives: 3,
111+
api_key: "xxxxxx"
112+
}),
113+
headers: { "Content-Type": "application/json" },
114+
});
115+
116+
console.log(await res.json());
117+
```
118+
119+
Respuesta:
120+
121+
```javascript
122+
{
123+
"alternatives": [
124+
"Salve",
125+
"Pronto"
126+
],
127+
"translatedText": "Ciao"
128+
}
129+
```
130+
131+
### Detección de Idioma
132+
133+
Solicitud:
134+
135+
```javascript
136+
const res = await fetch("https://libretranslate.com/detect", {
137+
method: "POST",
138+
body: JSON.stringify({
139+
q: "Bonjour!",
140+
}),
141+
headers: { "Content-Type": "application/json" },
142+
});
143+
144+
console.log(await res.json());
145+
```
146+
147+
Respuesta:
148+
149+
```javascript
150+
[{
151+
"confidence": 90.0,
152+
"language": "fr"
153+
}]
154+
```
155+
156+
157+
### Idiomas Soportados
158+
159+
https://libretranslate.com/languages
160+
161+
## Enlaces de Lenguaje
162+
163+
Puedes usar la API de LibreTranslate con los siguientes enlaces:
164+
165+
- Rust: <https://github.com/DefunctLizard/libretranslate-rs>
166+
- Node.js: <https://github.com/franciscop/translate>
167+
- TypeScript: <https://github.com/tderflinger/libretranslate-ts>
168+
- .Net: <https://github.com/sigaloid/LibreTranslate.Net>
169+
- Go: <https://github.com/SnakeSel/libretranslate>
170+
- Python: <https://github.com/argosopentech/LibreTranslate-py>
171+
- PHP: <https://github.com/jefs42/libretranslate>
172+
- C++: <https://github.com/argosopentech/LibreTranslate-cpp>
173+
- Swift: <https://github.com/wacumov/libretranslate>
174+
- Unix: <https://github.com/argosopentech/LibreTranslate-sh>
175+
- Shell: <https://github.com/Hayao0819/Hayao-Tools/tree/master/libretranslate-sh>
176+
- Java: <https://github.com/suuft/libretranslate-java>
177+
- Ruby: <https://github.com/noesya/libretranslate>
178+
- R: <https://github.com/myanesp/libretranslateR>

0 commit comments

Comments
 (0)