Skip to content

Commit febcef7

Browse files
committed
More work in spanish version
1 parent 0848498 commit febcef7

File tree

3 files changed

+43
-35
lines changed

3 files changed

+43
-35
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# V by Example
22

33
[Brazilian Portuguese](/pt-br/README.md) | [Deutsch](/de/README.md) | [English](README.md) | [Bahasa Indonesia](/id/README.md) | [Chinese](cn/examples/README.md) | [Spanish](es/examples/README.md)
4+
45
> Learn V by Examples
56
67
V by Example is a direct introduction to V by using annotated program examples.

es/examples/README.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ V por ejemplos es una introducción directa al lenguaje V usando ejemplos con co
1212

1313
Discord: [https://discord.gg/d3Qk65J](https://discord.gg/d3Qk65J)
1414

15-
## Section 1
15+
## Sección 1
1616

17-
Introduction to V by presenting a few basic examples and exercises.
17+
Introducción al lenguaje V usando algunos ejemplos básicos y ejercicios.
1818

1919
- [Hola Mundo](es/examples/section_1/hello_world.md)
2020
- [Palabras clave de V](en/examples/section_1/keywords.md)
@@ -23,47 +23,48 @@ Introduction to V by presenting a few basic examples and exercises.
2323
- [Cadenas](en/examples/section_1/strings.md)
2424
- [Comentarios](en/examples/section_1/comment.md)
2525

26-
## Section 2
26+
## Sección 2
2727

28-
This section discusses the main operators and conditional statements in V.
28+
Esta sección discute los principales operadores y las sentencias condicionales en V.
2929

30-
- [Operator](en/examples/section_2/operator.md)
30+
- [Operadores](en/examples/section_2/operator.md)
3131
- [If-else](en/examples/section_2/if-else.md)
3232
- [Match](en/examples/section_2/match.md)
33-
- [Loops](en/examples/section_2/loops.md)
33+
- [Ciclos](en/examples/section_2/loops.md)
3434

35-
## Section 3
35+
## Sección 3
3636

37-
A study on functions and methods and in the most important data structures in V: arrays and struct.
37+
Un estudio de funciones y métodos y de las estructuras de datos más importantes en V:
38+
arreglos y estructuras
3839

39-
- [Functions](en/examples/section_3/functions.md)
40-
- [Arrays](en/examples/section_3/arrays.md)
41-
- [Struct](en/examples/section_3/struct.md)
42-
- [Methods](en/examples/section_3/methods.md)
40+
- [Funciones](en/examples/section_3/functions.md)
41+
- [Arreglos](en/examples/section_3/arrays.md)
42+
- [Estructuras](en/examples/section_3/struct.md)
43+
- [Métodos](en/examples/section_3/methods.md)
4344

44-
## Section 4
45+
## Sección 4
4546

46-
In this section, we dive deeper and study the features inside the Array object. Other examples like JSON, Writing/reading files and Testing are covered.
47+
En esta sección, discutimos a profundidad las características de los Objetos typo Arreglo. Otros ejemplos como JSON, Escritura/Lectura de archivos y Pruebas.
4748

48-
- [Array Functions](en/examples/section_4/array-functions.md)
49-
- [Testing](en/examples/section_4/testing.md)
50-
- [Files](en/examples/section_4/files.md)
49+
- [Funciones de Arreglos](en/examples/section_4/array-functions.md)
50+
- [Pruebas](en/examples/section_4/testing.md)
51+
- [Archivos](en/examples/section_4/files.md)
5152
- [JSON](en/examples/section_4/json.md)
5253

53-
## Team
54+
## Equipo
5455

55-
Current list of maintainers/authors:
56+
Lista de autores y colaboradores:
5657

5758
- [Don Alfons Nisnoni](https://github.com/dhonx)
5859
- [Ivo-Balbaert](https://github.com/ibalbaert)
5960
- [Sven Patrick Meier](https://github.com/SuicideS3ason)
6061
- [Swastik Baranwal](https://github.com/Delta456)
6162
- [Vitor Oliveira](https://github.com/vbrazo)
6263

63-
## Contributing
64+
## Colaborando
6465

65-
See our [CONTRIBUTING.md](CONTRIBUTING.md) and start contributing today. We usually elect new maintainers based on contributions.
66+
Revisa [CONTRIBUTING.md](CONTRIBUTING.md) y empieza a ayudar desde hoy. Generalmente se seleccionan los nuevos colaboradores con base in las contribuciones.
6667

67-
## License
68+
## Licencia
6869

6970
[MIT](LICENSE)

es/examples/section_1/strings.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
1-
# Strings
1+
# Cadenas
22

3-
In V one can define strings using the `:=` operator. Strings (like other variables) are immutable by default. One is free to use `""` or `''` to denote a string. When using `vfmt` all double-quoted strings will be converted to single-quoted ones unless it contains a single quote character.
3+
4+
En V se pueden definir las cadenas usando el operador `:=`. Las cadenas (como las variables de los otros tipos) son inmutables por defecto. Se puede usar `""` o `''` para denotar los literales tipo cadena. Cuando se usa `vfmt` todas los literales definidos usando comillas dobles se convierten a literales de comillas simples.
45

56
```go
67
name := 'Bob'
78
println(name) // Bob
89
println(name.len) // 3
910
```
1011

11-
Getting the length of a string works with `.len`.
12+
Para objetner la longitud de una cadena se usa `.len`.
13+
14+
## Interpolación
1215

13-
## Interpolation
16+
Es posible hacer la interpolación de cadenas usando `$` antes del nombre de la variable:
1417

15-
It is possible to do string interpolation with `$` in front of the variable:
1618

1719
```go
1820
name:= 'Bob'
1921
println('Hello $name!') // Hello Bob!
2022
```
2123

22-
One can have more complex expressions with interpolation syntax by using `${}`:
24+
Se pueden tener expresiones más complejas con la interpolación usando `${}`:
2325

2426
```go
2527
struct User {
@@ -34,9 +36,9 @@ println('Say Hello to a new User: ${bob.name}, ${bob.age}') // Say H
3436
println('${bob.name}s age is higher or equal to 18: ${bob.age >= 18}') // 0 <=> number representation for false
3537
```
3638

37-
## Concatenation
39+
## Concatenación
3840

39-
Strings can be concatenated with the `+` operator.
41+
Las cadenas se concatenan con `+` operator.
4042

4143
```go
4244
text := 'Hello'
@@ -48,13 +50,15 @@ println(concatenated_text) // Hello World!
4850

4951
Appending to a string works with concatenation as well as with `+=` operator. Since strings are immutable by default it is only possible to do this if they are declared with `mut`.
5052

53+
Las cadenas se pueden concatenar también con el operador `+=`. Dado que las cadenas son inmutables por defecto esto es sólo posible si la variable se ha declarado `mut`..
54+
5155
```go
5256
mut hello := 'Hello '
5357
hello += 'from V!' // appends 'from V!' to the string stored in hello.
5458
println(hello) // Hello from V!
5559
```
5660

57-
In V, string data is encoded using UTF-8 and the string itself is a read-only array of bytes. This makes slicing possible, which means we can access single-character literals or slices of a string variable.
61+
En V, las cadenas son codificadasd usando UTF-8 y las cadenas en si mismas son un arreglo de bytes de sólo lectura. Esto hace que se posible hacer slicing, es decir es posible acceder a los caracteres de forma individual o a slices de la variable typo cadena.
5862

5963
```go
6064
robert := 'Robert'
@@ -63,18 +67,18 @@ rob := robert[0..3] // Rob
6367
println('The persons of interest are: $robert, $bert, $rob') // The persons of interest are: Robert, bert, Rob
6468
```
6569

66-
### Notes
70+
### Notas
6771

68-
When using `some_string[start..end]` syntax the `end` is **not** inclusive.
72+
Cuando se usa `some_string[start..end]`, `end` es **no** inclusivo.
6973

70-
All operators in V must have values of the same type on both sides. The code below will not compile because `age` is an `int`:
74+
Todos los operadores en V tienen que tener valores del mismo tipo en ambos lados. El código siguiente no compila correctamente, debido a que `age` es de tipo `int`:
7175

7276
```go
7377
age := 25
7478
println('age = ' + age)
7579
```
7680

77-
We therefore need to convert it to string by using `.str()` or use string interpolation (preferred):
81+
Es necesario convertir el valor a cadena usando `.str()` o usar interpolación de cadenas (preferido):
7882

7983
```go
8084
age := 25
@@ -84,6 +88,8 @@ println('age = $age') // age = 25
8488

8589
To define character literals use: ` `` `. Raw strings can be defined as prepending `r`. They are not escaped.
8690

91+
Para definir literales tipo caracter se usa: ` `` `. Cadenas planas se pueden definir usando `r` entes del literal tipo cadena. De este modo la cadena no es escapada.
92+
8793
```go
8894
hello := 'Hello\nWorld'
8995
println(hello) // Hello

0 commit comments

Comments
 (0)