Skip to content

Commit adc5156

Browse files
authored
Update README.md
1 parent d619c62 commit adc5156

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

README.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ Most pictures are in SVG format. Strings inside it are usually just text, they c
9898
9999
That's great, as there are many strings in English in images, like tips, notes, etc. They look nice when translated.
100100

101-
Image translations reside in `images.yml` file in the repository root, for example: <https://github.com/javascript-tutorial/ru.javascript.info/blob/master/images.yml>. Please, create it if needed.
101+
Image translations reside in `images.yml` in the repository root, for example: <https://github.com/javascript-tutorial/ru.javascript.info/blob/master/images.yml>. Please, create it if needed.
102102

103-
The file format is called "YAML", it's quite easy to understand:
103+
The file format is "YAML", it's quite easy to understand:
104104
105105
```yaml
106106
code-style.svg: # image file name
@@ -118,18 +118,19 @@ The translated string may become longer or shorter. By default, the translated s
118118
119119
Sometimes they need to be repositioned:
120120
121-
- `position: "center"` centers the translated string, good if you have a vertical diagram, keeps text centered:
122-
```
123-
|
124-
hello world
125-
你好世界
126-
|
127-
```
128-
- `position: "right"` makes sure that the translated string keeps the same right edge:
129-
```
130-
hello world |
131-
你好世界 |
132-
```
121+
`position: "center"` centers the translated string, good if you have a vertical diagram, keeps text centered:
122+
```
123+
|
124+
hello world
125+
你好世界
126+
|
127+
```
128+
129+
`position: "right"` makes sure that the translated string keeps the same right edge:
130+
```
131+
hello world |
132+
你好世界 |
133+
```
133134
134135
After `images.yaml` with translations is ready, it's time to apply translations:
135136

@@ -162,11 +163,12 @@ P.S In order for positioning to work, you need to have ImageMagick installed: <h
162163
## Extract strings
163164
164165
The task to get all strings from an image as YAML (for translation, to add to `images.yml`):
165-
```
166-
cd /js/server
167-
NODE_LANG=zh npm run gulp engine:koa:tutorial:imageYaml --image hello.svg
168-
```
169-
166+
167+
```bash
168+
cd /js/server
169+
NODE_LANG=zh npm run gulp engine:koa:tutorial:imageYaml --image hello.svg
170+
```
171+
170172
171173
# Dev mode
172174

0 commit comments

Comments
 (0)