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
+21-8Lines changed: 21 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,28 +171,41 @@ If your translated string absolutely must be longer and doesn't fit, let me know
171
171
172
172
## Positioning
173
173
174
+
By default, the translated string replaces the original one, starting in exactly the same place of the image.
174
175
175
-
By default, the translated string replaces the original one, starting in exactly the same place of the image:
176
+
Before the translation:
176
177
177
178
```
178
-
| hello world (before)
179
-
| 你好世界 (after translation)
179
+
| hello world
180
180
```
181
181
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:
183
189
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:
185
190
```
186
191
|
187
192
hello world
188
-
你好世界
189
193
|
190
194
```
191
195
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
+
192
205
The `position: "right"` makes sure that the translated string sticks to the same right edge:
193
206
```
194
-
hello world |
195
-
你好世界 |
207
+
hello world 🦊
208
+
你好世界 🦊
196
209
```
197
210
198
211
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