Skip to content

Commit 9a3cf7f

Browse files
committed
minor fixes
1 parent 7f86217 commit 9a3cf7f

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

README.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -171,28 +171,41 @@ If your translated string absolutely must be longer and doesn't fit, let me know
171171

172172
## Positioning
173173

174+
By default, the translated string replaces the original one, starting in exactly the same place of the image.
174175

175-
By default, the translated string replaces the original one, starting in exactly the same place of the image:
176+
Before the translation:
176177

177178
```
178-
| hello world (before)
179-
| 你好世界 (after translation)
179+
| hello world
180180
```
181181

182-
Sometimes that's not good, e.g. if the string needs to be centered in a vertical diagram.
182+
After the translation (`` is at the same place where `h` was, the string is left-aligned):
183+
184+
```
185+
| 你好世界
186+
```
187+
188+
Sometimes that's not good, e.g. if the string needs to be centered, e.g. like this:
183189
184-
The `position: "center"` in `images.yml` centers the translated string, so that it will replace the original one and stay "in the middle" of the surrounding context:
185190
```
186191
|
187192
hello world
188-
你好世界
189193
|
190194
```
191195
196+
(The "hello world" is in the middle between two `|`).
197+
198+
The `position: "center"` in `images.yml` centers the translated string, so that it will replace the original one and stay "in the middle" of the surrounding context:
199+
```
200+
🦊
201+
你好世界
202+
🦊
203+
```
204+
192205
The `position: "right"` makes sure that the translated string sticks to the same right edge:
193206
```
194-
hello world |
195-
你好世界 |
207+
hello world 🦊
208+
你好世界 🦊
196209
```
197210
198211
P.S In order for positioning to work, you need to have ImageMagick installed: <https://imagemagick.org/script/download.php> (or use packages for Linux/MacOS).

0 commit comments

Comments
 (0)