You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,7 +211,21 @@ hello world
211
211
212
212
(The "hello world" is centered between two `|`).
213
213
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:
215
229
```
216
230
|
217
231
你好世界
@@ -224,6 +238,8 @@ hello world |
224
238
你好世界 |
225
239
```
226
240
241
+
That's also useful for images when we expect the text to stick to the right.
242
+
227
243
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).
0 commit comments