Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b362191

Browse files
committedApr 11, 2019
style
1 parent c4b2a2f commit b362191

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed
 

‎style-guide.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Style Guide
2+
3+
This document describes rules that should be applied to **all** languages.
4+
5+
NOTE TO MAINTAINERS: You may want to translate this guide so that it can be more accessible to your translators.
6+
7+
## General
8+
9+
The translation doesn't have to be word-by-word precise.
10+
11+
It should be technically correct and explain well.
12+
13+
If you feel the original text could be improved, please send a PR.
14+
15+
## Text in Code Blocks
16+
17+
- Translate comments in code blocks.
18+
- Translate example strings (optionally).
19+
- Don't translate variable names, ids, classes.
20+
21+
Example:
22+
23+
```js
24+
// Example
25+
const text = "Hello, world";
26+
document.querySelector('.hello').innerHTML = text;
27+
```
28+
29+
✅ DO (comment):
30+
31+
```js
32+
// Ejemplo
33+
const text = 'Hello, world';
34+
document.querySelector('.hello').innerHTML = text;
35+
```
36+
37+
✅ ALSO OKAY (also text):
38+
39+
```js
40+
// Ejemplo
41+
const text = 'Hola mundo';
42+
document.querySelector('.hello').innerHTML = text;
43+
```
44+
45+
❌ DON'T (class):
46+
47+
```js
48+
// Ejemplo
49+
const text = 'Hola mundo';
50+
// ".hello" is a class
51+
// DO NOT TRANSLATE
52+
document.querySelector('.hola').innerHTML = text;
53+
```
54+
55+
❌ DEFINITELY DON'T (variables):
56+
57+
```js
58+
// Ejemplo
59+
const texto = 'Hola mundo';
60+
documento.querySelector('.hola').interiorHTML = texto;
61+
```
62+
63+
## External Links
64+
65+
If an external link is to Wikipedia, e.g. <https://en.wikipedia.org/wiki/JavaScript>, and a version of that article exists in your language that is of decent quality, consider linking to that version instead.
66+
67+
Example:
68+
69+
```md
70+
[JavaScript](https://en.wikipedia.org/wiki/JavaScript) is a programming language.
71+
```
72+
73+
✅ OK:
74+
75+
```md
76+
[JavaScript](https://es.wikipedia.org/wiki/JavaScript) es un lenguaje de programación.
77+
```
78+
79+
For links that have no equivalent, just use the English link.

0 commit comments

Comments
 (0)
Please sign in to comment.