Skip to content

Commit 63d5a1f

Browse files
authored
Update README.md
1 parent be2896f commit 63d5a1f

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,21 @@ hello world
211211
212212
(The "hello world" is centered between two `|`).
213213
214-
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:
214+
Then, if we just replace the string, it would become:
215+
216+
```
217+
|
218+
你好世界
219+
|
220+
```
221+
222+
As we can see, the new phrase is shorter. We should move it to the right a bit.
223+
224+
The `position: "center"` in `images.yml` does exactly that.
225+
226+
It centers the translated string, so that it will replace the original one and stay "in the middle" of the surrounding context.
227+
228+
Here's the text with `position: "center"`, centered as it should be:
215229
```
216230
|
217231
你好世界
@@ -224,6 +238,8 @@ hello world |
224238
你好世界 |
225239
```
226240

241+
That's also useful for images when we expect the text to stick to the right.
242+
227243
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 or homebrew/macports for MacOS).
228244
229245
## Helper script: extract strings

0 commit comments

Comments
 (0)