Skip to content

Commit df4cbd0

Browse files
authored
Update README.md
1 parent 3a9c952 commit df4cbd0

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,27 +109,31 @@ code-style.svg: # image file name
109109
position: "center" # (optional) "center" or "right" - to position translated string.
110110
```
111111
112-
The translated string may become longer or shorter. If we have nice pictures, strings move around and need to be repositioned:
112+
The translated string may become longer or shorter. By default, the translated string starts at the same place:
113113
114-
- `position: "right"` makes sure that after the translation the string right edge is at the same place, like this (below is the translated string):
115114
```
116-
hello world
117-
你好世界
115+
|hello world (before)
116+
| 你好世界 (after translation)
118117
```
118+
119+
Sometimes they need to be repositioned:
120+
119121
- `position: "center"` centers the translated string, good if you have a vertical diagram.
120122
```
123+
|
121124
hello world
122125
你好世界
126+
|
123127
```
124-
- (default) the string left edge is the same:
128+
- `position: "right"` makes sure that the translated string keeps the same right edge:
125129
```
126-
hello world
127-
你好世界
130+
hello world |
131+
你好世界 |
128132
```
129133
130-
After `images.yaml` is ready, to apply translations:
134+
After `images.yaml` with translations is ready, it's time to apply translations:
131135

132-
1. Setup upstream (if you haven't yet) and pull latest changes:
136+
1. Setup git upstream (if you haven't yet) and pull latest changes:
133137
```bash
134138
cd /js/zh.javascript.info
135139
git remote add upstream https://github.com/javascript-tutorial/en.javascript.info
@@ -142,7 +146,7 @@ After `images.yaml` is ready, to apply translations:
142146
NODE_LANG=zh glp engine:koa:tutorial:figuresTranslate --image try-catch-flow.svg
143147
```
144148
145-
The task takes upstream image (English version) and replaces strings to it.
149+
The task takes upstream image version (English), replaces strings to it, then writes to same-named image in the tutorial repo.
146150
147151
In order for positioning to work, you need to have ImageMagick installed: <https://imagemagick.org/script/download.php> (or use packages for Linux/MacOS).
148152

0 commit comments

Comments
 (0)