@diplodoc/cli-tests 0.0.0-rc-toc-translation-202506261401 → 0.0.0-rc-fix-translate-openapi-includer-202507171205

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/e2e/__snapshots__/load-custom-resources.spec.ts.snap +7 -0
  2. package/e2e/__snapshots__/metadata.spec.ts.snap +3 -0
  3. package/e2e/__snapshots__/regression.test.ts.snap +20 -0
  4. package/e2e/__snapshots__/rtl.spec.ts.snap +7 -0
  5. package/e2e/__snapshots__/search.test.ts.snap +71 -0
  6. package/e2e/__snapshots__/translation.spec.ts.snap +1692 -1096
  7. package/e2e/search.test.ts +15 -0
  8. package/e2e/translation.spec.ts +33 -8
  9. package/fixtures/utils/test.ts +1 -0
  10. package/mocks/search/input/index.md +3 -0
  11. package/mocks/search/input/toc.yaml +1 -0
  12. package/mocks/translation/dir-files/input/ru/aboba.md +4 -2
  13. package/mocks/translation/dir-files/input/ru/nested/toc.yaml +0 -1
  14. package/mocks/translation/dir-files/input/ru/toc.yaml +1 -7
  15. package/mocks/translation/no-translate/input/index.md +7 -0
  16. package/mocks/translation/no-translate/input/no-translate.md +57 -0
  17. package/mocks/translation/no-translate/input/openapi-spec.yaml +37 -0
  18. package/mocks/translation/no-translate/input/toc.yaml +11 -0
  19. package/mocks/translation/openapi/input/openapi-spec.yaml +42 -0
  20. package/mocks/translation/openapi/input/toc.yaml +8 -0
  21. package/package.json +1 -1
  22. package/mocks/translation/dir-files/input/.yfm +0 -6
  23. package/mocks/translation/dir-files/input/ru/nested/a1.md +0 -3
  24. package/mocks/translation/dir-files/input/ru/nested/folder1/a1.md +0 -3
  25. package/mocks/translation/dir-files/input/ru/nested/folder1/toc-i.yaml +0 -3
  26. package/mocks/translation/dir-files/input/ru/no-var-page.md +0 -3
  27. package/mocks/translation/dir-files/input/ru/to-be-excluded.md +0 -1
@@ -1,564 +1,672 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
- exports[`Translate command > extract yaml scheme files > filelist 1`] = `
3
+ exports[`Translate command > build translated md files and remove no-translate directives > filelist 1`] = `
4
4
  "[
5
- "en/index-direct.yaml.skl",
6
- "en/index-direct.yaml.xliff",
7
- "en/index.yaml.skl",
8
- "en/index.yaml.xliff",
9
- "en/toc.yaml.skl",
10
- "en/toc.yaml.xliff"
5
+ "index.md",
6
+ "no-translate.md",
7
+ "openapi/index.md",
8
+ "openapi/test-controller/getWithPayloadResponse.md",
9
+ "openapi/test-controller/index.md",
10
+ "toc.yaml"
11
11
  ]"
12
12
  `;
13
13
 
14
- exports[`Translate command > extract yaml scheme files 1`] = `
15
- "meta:
16
- title: '%%%0%%%'
17
- description: '%%%1%%%'
18
- fullScreen: true
19
- blocks:
20
- - type: header-block
21
- title: <div class="u-breadcrumbs"></div>
22
- breadcrumbs:
23
- items:
24
- - text: '%%%2%%%'
25
- url: https://site.ru/support/
26
- - text: '%%%3%%%'
27
- url: https://site.ru/support/adv/
28
- - type: filter-block
29
- centered: false
30
- title:
31
- text: '%%%4%%%'
32
- tags:
33
- - id: one
34
- label: '%%%5%%%'
35
- - id: two
36
- label: '%%%6%%%'
37
- colSizes:
38
- all: 12
39
- xl: 4
40
- sm: 6
41
- md: 4
42
- items:
43
- - tags:
44
- - one
45
- card:
46
- type: image-card
47
- image: https://site.ru/img/orig
48
- title: '%%%7%%%'
49
- text: <div>%%%8%%%</div><div class="u-card__more">%%%9%%%
50
- margins: m
51
- border: shadow
52
- url: unified-performance-campaign/about.md
53
- urlTitle: '%%%10%%%'
54
- - tags:
55
- - one
56
- card:
57
- type: image-card
58
- image: https://site.ru/img2/orig
59
- title: '%%%11%%%'
60
- text: <div>%%%12%%%</div><div class="u-card__more">%%%13%%%
61
- margins: m
62
- border: shadow
63
- url: campaign-master/product-campaign.md
64
- urlTitle: '%%%14%%%'
65
- - tags:
66
- - one
67
- card:
68
- type: image-card
69
- image: https://site.ru/img2/orig
70
- title: '%%%15%%%'
71
- text: <div>%%%16%%%</div><div class="u-card__more">%%%17%%%
72
- margins: m
73
- border: shadow
74
- url: efficiency/telegram-ads.md
75
- urlTitle: '%%%18%%%'
76
- - tags:
77
- - one
78
- card:
79
- type: background-card
80
- title: '%%%19%%%'
81
- text: ''
82
- backgroundColor: '#F3F6FC'
83
- border: line
84
- links:
85
- - text: '%%%20%%%'
86
- url: statistics.md
87
- arrow: true
88
- theme: normal
89
- - text: '%%%21%%%'
90
- url: feeds/about.md
91
- arrow: true
92
- theme: normal
93
- - tags:
94
- - one
95
- card:
96
- type: background-card
97
- title: '%%%22%%%'
98
- text: ''
99
- backgroundColor: '#F3F6FC'
100
- border: line
101
- links:
102
- - text: '%%%23%%%'
103
- url: moderation/adv-rules.md
104
- arrow: true
105
- theme: normal
106
- - text: '%%%24%%%'
107
- url: technologies-and-services/technologies-and-services.md
108
- arrow: true
109
- theme: normal
110
- - text: '%%%25%%%'
111
- url: troubleshooting/other.md
112
- arrow: true
113
- theme: normal
114
- - tags:
115
- - one
116
- card:
117
- type: background-card
118
- title: '%%%26%%%'
119
- text: ''
120
- backgroundColor: '#F3F6FC'
121
- border: line
122
- links:
123
- - text: '%%%27%%%'
124
- url: glossary.md
125
- arrow: true
126
- theme: normal
127
- - tags:
128
- - two
129
- card:
130
- type: image-card
131
- image: https://site.ru/img4/orig
132
- title: '%%%28%%%'
133
- text: <div>%%%29%%%</div><div class="u-card__more">%%%30%%%
134
- margins: m
135
- border: shadow
136
- url: products-automatic/about.md
137
- urlTitle: '%%%31%%%'
138
- animated: false
139
- "
140
- `;
14
+ exports[`Translate command > build translated md files and remove no-translate directives 1`] = `
15
+ "---
16
+ metadata:
17
+ - name: generator
18
+ content: Diplodoc Platform vDIPLODOC-VERSION
19
+ ---
20
+ ## Index header
141
21
 
142
- exports[`Translate command > extract yaml scheme files 2`] = `
143
- "<?xml version="1.0" encoding="UTF-8"?>
144
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
145
- <file original="file.ext" source-language="ru-RU" target-language="en-US" datatype="markdown">
146
- <header>
147
- <skeleton>
148
- <external-file href="file.skl"></external-file>
149
- </skeleton>
150
- </header>
151
- <body>
152
- <trans-unit id="0">
153
- <source xml:space="preserve">Справка Сервиса</source>
154
- </trans-unit>
155
- <trans-unit id="1">
156
- <source xml:space="preserve">В Справке Сервиса собрали всю необходимую информацию.</source>
157
- </trans-unit>
158
- <trans-unit id="2">
159
- <source xml:space="preserve">Справка</source>
160
- </trans-unit>
161
- <trans-unit id="3">
162
- <source xml:space="preserve">Реклама</source>
163
- </trans-unit>
164
- <trans-unit id="4">
165
- <source xml:space="preserve">Сервис</source>
166
- </trans-unit>
167
- <trans-unit id="5">
168
- <source xml:space="preserve">Для специалистов</source>
169
- </trans-unit>
170
- <trans-unit id="6">
171
- <source xml:space="preserve">Для предпринимателей</source>
172
- </trans-unit>
173
- <trans-unit id="7">
174
- <source xml:space="preserve">Единая перфоманс-кампания</source>
175
- </trans-unit>
176
- <trans-unit id="8">
177
- <source xml:space="preserve">Комплексно решайте любые перфоманс-задачи в рамках одной кампании</source>
178
- </trans-unit>
179
- <trans-unit id="9">
180
- <source xml:space="preserve">Подробнее&lt;/&gt;</source>
181
- </trans-unit>
182
- <trans-unit id="10">
183
- <source xml:space="preserve">Подробнее</source>
184
- </trans-unit>
185
- <trans-unit id="11">
186
- <source xml:space="preserve">Товарная кампания</source>
187
- </trans-unit>
188
- <trans-unit id="12">
189
- <source xml:space="preserve">Используйте простой инструмент для продвижения товаров интернете</source>
190
- </trans-unit>
191
- <trans-unit id="13">
192
- <source xml:space="preserve">Подробнее&lt;/&gt;</source>
193
- </trans-unit>
194
- <trans-unit id="14">
195
- <source xml:space="preserve">Подробнее</source>
196
- </trans-unit>
197
- <trans-unit id="15">
198
- <source xml:space="preserve">Реклама в Telegram</source>
199
- </trans-unit>
200
- <trans-unit id="16">
201
- <source xml:space="preserve">Покажите релевантную рекламу в телеграм-каналах партнеров РСЯ</source>
202
- </trans-unit>
203
- <trans-unit id="17">
204
- <source xml:space="preserve">Подробнее&lt;/&gt;</source>
205
- </trans-unit>
206
- <trans-unit id="18">
207
- <source xml:space="preserve">Подробнее</source>
208
- </trans-unit>
209
- <trans-unit id="19">
210
- <source xml:space="preserve">Часто ищут</source>
211
- </trans-unit>
212
- <trans-unit id="20">
213
- <source xml:space="preserve">Статистика</source>
214
- </trans-unit>
215
- <trans-unit id="21">
216
- <source xml:space="preserve">Управление фидами</source>
217
- </trans-unit>
218
- <trans-unit id="22">
219
- <source xml:space="preserve">Сервисные функции</source>
220
- </trans-unit>
221
- <trans-unit id="23">
222
- <source xml:space="preserve">Правила и модерация</source>
223
- </trans-unit>
224
- <trans-unit id="24">
225
- <source xml:space="preserve">Технологии и сервисы</source>
226
- </trans-unit>
227
- <trans-unit id="25">
228
- <source xml:space="preserve">Поддержка 24/7</source>
229
- </trans-unit>
230
- <trans-unit id="26">
231
- <source xml:space="preserve">Полезные ссылки</source>
232
- </trans-unit>
233
- <trans-unit id="27">
234
- <source xml:space="preserve">Глоссарий</source>
235
- </trans-unit>
236
- <trans-unit id="28">
237
- <source xml:space="preserve">Простой старт</source>
238
- </trans-unit>
239
- <trans-unit id="29">
240
- <source xml:space="preserve">Минимум ручных настроек: достаточно указать ссылку на сайт</source>
241
- </trans-unit>
242
- <trans-unit id="30">
243
- <source xml:space="preserve">Подробнее&lt;/&gt;</source>
244
- </trans-unit>
245
- <trans-unit id="31">
246
- <source xml:space="preserve">Подробнее</source>
247
- </trans-unit>
248
- </body>
249
- </file>
250
- </xliff>"
22
+ adsfasdfasdfasdfasdf
23
+
24
+ lorem
25
+
26
+ asdfasdfasdf"
251
27
  `;
252
28
 
253
- exports[`Translate command > extract yaml scheme files 3`] = `
254
- "blocks:
255
- - type: content-layout-block
256
- textWidth: l
257
- textContent:
258
- title: '%%%0%%%'
259
- text: |2-
260
- %%%1%%%
261
- - %%%2%%%
262
- - %%%3%%%
263
-
264
- - type: card-layout-block
265
- colSizes:
266
- all: 12
267
- lg: 4
268
- md: 6
269
- sm: 12
270
- xl: 4
271
- indent:
272
- bottom: xs
273
- title: '%%%4%%%'
274
- animated: false
275
- children:
276
- - type: basic-card
277
- title: '%%%5%%%'
278
- text: '%%%6%%%'
279
- urlTitle: '%%%7%%%'
280
- border: shadow
281
- controlPosition: content
282
- url: management/index
283
- target: ''
284
- animated: false
29
+ exports[`Translate command > build translated md files and remove no-translate directives 2`] = `
30
+ "---
31
+ metadata:
32
+ - name: generator
33
+ content: Diplodoc Platform vDIPLODOC-VERSION
34
+ ---
35
+ # No-translate directive
36
+
37
+ ## Block directive
38
+ ### No-translate header
39
+
40
+ :::html-block
41
+ testsetsets
42
+ :::
43
+
44
+ ::: any-other-directive
45
+ content test
46
+ :::
47
+
48
+ Should not be translated.
49
+ Can use **markup** inside.
50
+
51
+
52
+ ::: some-other-directive
53
+ content here
54
+ :::
55
+ content here
56
+ ::: some-other-directive
57
+ nested content
58
+ :::
59
+
60
+ ## Leaf directive
61
+
62
+ ## /usr/local/bin/application
63
+ **C:/Program Files/Application/config.ini**
64
+ ~/Documents/project/src/main.rs
65
+
66
+
67
+ - GET /api/v1/users — get all users
68
+ - POST /api/v1/auth/login — authorization
69
+ - PUT /api/v1/users/{id} — update users data
70
+
71
+ ## Simple case leaf
72
+ Install using command.
73
+ The default port is unless specified. Next sentence.
74
+ Set NODE_ENV=production for production builds.
75
+
76
+ ## Simple case inline
77
+ Install using npm install @company/package command.
78
+ The default port is 8080 unless specified.
79
+ Set NODE_ENV=production for production builds.
80
+
81
+ ## Few inline directives
82
+ Use **GET /api/v1/users** to list users and POST /api/v1/users to create.
83
+
84
+ ## Empty inline directive
85
+ This is text with empty directive.
86
+
87
+
285
88
  "
286
89
  `;
287
90
 
288
- exports[`Translate command > extract yaml scheme files 4`] = `
289
- "<?xml version="1.0" encoding="UTF-8"?>
290
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
291
- <file original="file.ext" source-language="ru-RU" target-language="en-US" datatype="markdown">
292
- <header>
293
- <skeleton>
294
- <external-file href="file.skl"></external-file>
295
- </skeleton>
296
- </header>
297
- <body>
298
- <trans-unit id="0">
299
- <source xml:space="preserve">Введение</source>
300
- </trans-unit>
301
- <trans-unit id="1">
302
- <source xml:space="preserve">API сервиса: - Управлять счетчиками, их настройками и правами доступа, не используя веб-интерфейс.</source>
303
- </trans-unit>
304
- <trans-unit id="2">
305
- <source xml:space="preserve">Получать информацию о посещаемости сайта и другие данные.</source>
306
- </trans-unit>
307
- <trans-unit id="3">
308
- <source xml:space="preserve">Формировать отчеты, в том числе с помощью сегментации и параметризации.</source>
309
- </trans-unit>
310
- <trans-unit id="4">
311
- <source xml:space="preserve">Виды API</source>
312
- </trans-unit>
313
- <trans-unit id="5">
314
- <source xml:space="preserve">API управления</source>
315
- </trans-unit>
316
- <trans-unit id="6">
317
- <source xml:space="preserve">Управление счетчиками, целями, фильтрами и другими объектами Сервиса (например, создать счетчик, отредактировать его настройки, создать цель, выдать права доступа).</source>
318
- </trans-unit>
319
- <trans-unit id="7">
320
- <source xml:space="preserve">API управления</source>
321
- </trans-unit>
322
- </body>
323
- </file>
324
- </xliff>"
91
+ exports[`Translate command > build translated md files and remove no-translate directives 3`] = `
92
+ "---
93
+ metadata:
94
+ - name: generator
95
+ content: Diplodoc Platform vDIPLODOC-VERSION
96
+ ---
97
+ # OpenAPI definition
98
+
99
+ ##version: v0##
100
+
101
+ ## Sections
102
+
103
+ - [test-controller](test-controller/index.md)
104
+
105
+
106
+ ## Specification
107
+
108
+ {% cut "Open API" %}
109
+
110
+
111
+ \`\`\`text translate=no
112
+ {
113
+ "openapi": "3.0.1",
114
+ "info": {
115
+ "title": "OpenAPI definition",
116
+ "version": "v0"
117
+ },
118
+ "servers": [
119
+ {
120
+ "url": "http://localhost:8080",
121
+ "description": "Generated server url"
122
+ }
123
+ ],
124
+ "paths": {
125
+ "/test": {
126
+ "get": {
127
+ "tags": [
128
+ "test-controller"
129
+ ],
130
+ "summary": "Simple get operation. тест новой верстки 3",
131
+ "description": "Defines a simple get skip this operation with no inputs and a complex",
132
+ "operationId": "getWithPayloadResponse",
133
+ "responses": {
134
+ "200": {
135
+ "description": "200!!!!",
136
+ "content": {
137
+ "application/json": {
138
+ "schema": {
139
+ "type": "object",
140
+ "properties": {
141
+ "A": {
142
+ "type": "string"
143
+ }
144
+ }
145
+ }
146
+ }
147
+ }
148
+ }
149
+ }
150
+ }
151
+ }
152
+ },
153
+ "components": {
154
+ "schemas": {
155
+ "RecurceTop": {
156
+ "type": "object",
157
+ "properties": {
158
+ "A": {
159
+ "type": "string"
160
+ }
161
+ }
162
+ },
163
+ "RecurceMiddle": {
164
+ "type": "object",
165
+ "properties": {
166
+ "B": {
167
+ "type": "array",
168
+ "items": {
169
+ "type": "object",
170
+ "properties": {
171
+ "A": {
172
+ "type": "string"
173
+ }
174
+ }
175
+ }
176
+ }
177
+ }
178
+ }
179
+ }
180
+ }
181
+ }
182
+ \`\`\`
183
+
184
+
185
+ {% endcut %}
186
+
187
+ <!-- markdownlint-disable-file -->"
188
+ `;
189
+
190
+ exports[`Translate command > build translated md files and remove no-translate directives 4`] = `
191
+ "---
192
+ metadata:
193
+ - name: generator
194
+ content: Diplodoc Platform vDIPLODOC-VERSION
195
+ ---
196
+ <div class="openapi">
197
+
198
+ # Simple get operation. тест новой верстки 3
199
+
200
+ Defines a simple get skip this operation with no inputs and a complex
201
+
202
+ ## Request
203
+
204
+ <div class="openapi__requests">
205
+
206
+ <div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-get);margin-bottom: 12px">
207
+
208
+ <div class="openapi__request">
209
+
210
+ GET {.openapi__method}
211
+ \`\`\`text translate=no
212
+ http://localhost:8080/test
213
+ \`\`\`
214
+
215
+
216
+
217
+ </div>
218
+
219
+ Generated server url
220
+
221
+ </div>
222
+
223
+ </div>
224
+
225
+ ## Responses
226
+
227
+ <div class="openapi__response__code__200">
228
+
229
+ ## 200 OK
230
+
231
+ 200!!!!
232
+
233
+ <div class="openapi-entity">
234
+
235
+ ### Body
236
+
237
+ {% cut "application/json" %}
238
+
239
+
240
+ \`\`\`json translate=no
241
+ {
242
+ "A": "string"
243
+ }
244
+ \`\`\`
245
+
246
+
247
+ {% endcut %}
248
+
249
+
250
+ #|||
251
+ **Name**
252
+ |
253
+ **Description**
254
+ ||
255
+
256
+ ||
257
+ A {.openapi-table-parameter-name}
258
+ |
259
+ **Type:** string
260
+ |||#
261
+
262
+ </div>
263
+
264
+ </div>
265
+ <!-- markdownlint-disable-file -->
266
+
267
+ </div>
268
+
269
+
270
+
271
+ [*Deprecated]: No longer supported, please use an alternative and newer version."
325
272
  `;
326
273
 
327
- exports[`Translate command > extract yaml scheme files 5`] = `
328
- "title: '%%%0%%%'
329
- href: index.yaml
274
+ exports[`Translate command > build translated md files and remove no-translate directives 5`] = `
275
+ "---
276
+ metadata:
277
+ - name: generator
278
+ content: Diplodoc Platform vDIPLODOC-VERSION
279
+ ---
280
+ # test-controller
281
+
282
+ ## Endpoints
283
+
284
+ - [Simple get operation. тест новой верстки 3](getWithPayloadResponse.md)
285
+
286
+ <!-- markdownlint-disable-file -->"
287
+ `;
288
+
289
+ exports[`Translate command > build translated md files and remove no-translate directives 6`] = `
290
+ "title: Test123
291
+ href: index.md
330
292
  items:
331
- - name: '%%%4%%%'
332
- - href: index-direct.yaml
333
- navigation:
334
- header:
335
- leftItems:
336
- - text: '%%%2%%%'
337
- type: dropdown
293
+ - name: Не переводить
294
+ href: no-translate.md
295
+ - name: openapi
296
+ items:
297
+ - name: Overview
298
+ href: openapi/index.md
299
+ - name: test-controller
338
300
  items:
339
- - text: '%%%3%%%'
340
- type: link
341
- href: menu/item
342
- logo:
343
- light:
344
- icon: https://icon.link/logo.svg
345
- url: https://site.ru
346
- urlTitle: '%%%1%%%'
301
+ - name: Overview
302
+ href: openapi/test-controller/index.md
303
+ - href: openapi/test-controller/getWithPayloadResponse.md
304
+ name: Simple get operation. тест новой верстки 3
305
+ path: toc.yaml
347
306
  "
348
307
  `;
349
308
 
350
- exports[`Translate command > extract yaml scheme files 6`] = `
351
- "<?xml version="1.0" encoding="UTF-8"?>
352
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
353
- <file original="file.ext" source-language="ru-RU" target-language="en-US" datatype="markdown">
354
- <header>
355
- <skeleton>
356
- <external-file href="file.skl"></external-file>
357
- </skeleton>
358
- </header>
359
- <body>
360
- <trans-unit id="0">
361
- <source xml:space="preserve">Заголовок</source>
362
- </trans-unit>
363
- <trans-unit id="1">
364
- <source xml:space="preserve">На сайт сервиса</source>
365
- </trans-unit>
366
- <trans-unit id="2">
367
- <source xml:space="preserve">Инструменты</source>
368
- </trans-unit>
369
- <trans-unit id="3">
370
- <source xml:space="preserve">Пункт меню</source>
371
- </trans-unit>
372
- <trans-unit id="4">
373
- <source xml:space="preserve">Дочерняя страница</source>
374
- </trans-unit>
375
- </body>
376
- </file>
377
- </xliff>"
378
- `;
379
-
380
- exports[`Translate command > filter files on extract > filelist 1`] = `
309
+ exports[`Translate command > build translated static files and remove no-translate directives > filelist 1`] = `
381
310
  "[
382
- "es/_includes/test.md.skl",
383
- "es/_includes/test.md.xliff",
384
- "es/aboba.md.skl",
385
- "es/aboba.md.xliff",
386
- "es/index.md.skl",
387
- "es/index.md.xliff",
388
- "es/nested/a1.md.skl",
389
- "es/nested/a1.md.xliff",
390
- "es/nested/index-yfm.md.skl",
391
- "es/nested/index-yfm.md.xliff",
392
- "es/nested/index.yaml.skl",
393
- "es/nested/index.yaml.xliff",
394
- "es/nested/syntax/base.md.skl",
395
- "es/nested/syntax/base.md.xliff",
396
- "es/nested/syntax/lists.md.skl",
397
- "es/nested/syntax/lists.md.xliff",
398
- "es/nested/toc.yaml.skl",
399
- "es/nested/toc.yaml.xliff",
400
- "es/no-var-page.md.skl",
401
- "es/no-var-page.md.xliff",
402
- "es/to-be-excluded.md.skl",
403
- "es/to-be-excluded.md.xliff",
404
- "es/toc.yaml.skl",
405
- "es/toc.yaml.xliff"
311
+ "index.md",
312
+ "no-translate.md",
313
+ "openapi/index.md",
314
+ "openapi/test-controller/getWithPayloadResponse.md",
315
+ "openapi/test-controller/index.md",
316
+ "toc.yaml"
406
317
  ]"
407
318
  `;
408
319
 
409
- exports[`Translate command > filter files on extract 1`] = `"## %%%0%%%"`;
320
+ exports[`Translate command > build translated static files and remove no-translate directives 1`] = `
321
+ "---
322
+ metadata:
323
+ - name: generator
324
+ content: Diplodoc Platform vDIPLODOC-VERSION
325
+ ---
326
+ ## Index header
410
327
 
411
- exports[`Translate command > filter files on extract 2`] = `
412
- "<?xml version="1.0" encoding="UTF-8"?>
413
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
414
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
415
- <header>
416
- <skeleton>
417
- <external-file href="file.skl"></external-file>
418
- </skeleton>
419
- </header>
420
- <body>
421
- <trans-unit id="0">
422
- <source xml:space="preserve">Заголовок include</source>
423
- </trans-unit>
424
- </body>
425
- </file>
426
- </xliff>"
328
+ adsfasdfasdfasdfasdf
329
+
330
+ lorem
331
+
332
+ asdfasdfasdf"
427
333
  `;
428
334
 
429
- exports[`Translate command > filter files on extract 3`] = `
430
- "## %%%0%%%
335
+ exports[`Translate command > build translated static files and remove no-translate directives 2`] = `
336
+ "---
337
+ metadata:
338
+ - name: generator
339
+ content: Diplodoc Platform vDIPLODOC-VERSION
340
+ ---
341
+ # No-translate directive
431
342
 
432
- <!-- [ссылка на файл не в toc.yaml](./aboba-not-in-toc.md) -->
343
+ ## Block directive
344
+ ### No-translate header
433
345
 
434
- {% include [%%%1%%%](./_includes/test.md) %}"
435
- `;
346
+ :::html-block
347
+ testsetsets
348
+ :::
436
349
 
437
- exports[`Translate command > filter files on extract 4`] = `
438
- "<?xml version="1.0" encoding="UTF-8"?>
439
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
440
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
441
- <header>
442
- <skeleton>
443
- <external-file href="file.skl"></external-file>
444
- </skeleton>
445
- </header>
446
- <body>
447
- <trans-unit id="0">
448
- <source xml:space="preserve">Заголовок include</source>
449
- </trans-unit>
450
- <trans-unit id="1">
451
- <source xml:space="preserve">Описание</source>
452
- </trans-unit>
453
- </body>
454
- </file>
455
- </xliff>"
456
- `;
350
+ ::: any-other-directive
351
+ content test
352
+ :::
457
353
 
458
- exports[`Translate command > filter files on extract 5`] = `
459
- "## %%%0%%%
354
+ Should not be translated.
355
+ Can use **markup** inside.
460
356
 
461
- %%%1%%%"
462
- `;
463
357
 
464
- exports[`Translate command > filter files on extract 6`] = `
465
- "<?xml version="1.0" encoding="UTF-8"?>
466
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
467
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
468
- <header>
469
- <skeleton>
470
- <external-file href="file.skl"></external-file>
471
- </skeleton>
472
- </header>
473
- <body>
474
- <trans-unit id="0">
475
- <source xml:space="preserve">Заголовок index</source>
476
- </trans-unit>
477
- <trans-unit id="1">
478
- <source xml:space="preserve">lorem</source>
479
- </trans-unit>
480
- </body>
481
- </file>
482
- </xliff>"
358
+ ::: some-other-directive
359
+ content here
360
+ :::
361
+ content here
362
+ ::: some-other-directive
363
+ nested content
364
+ :::
365
+
366
+ ## Leaf directive
367
+
368
+ ## /usr/local/bin/application
369
+ **C:/Program Files/Application/config.ini**
370
+ ~/Documents/project/src/main.rs
371
+
372
+
373
+ - GET /api/v1/users — get all users
374
+ - POST /api/v1/auth/login — authorization
375
+ - PUT /api/v1/users/{id} — update users data
376
+
377
+ ## Simple case leaf
378
+ Install using command.
379
+ The default port is unless specified. Next sentence.
380
+ Set NODE_ENV=production for production builds.
381
+
382
+ ## Simple case inline
383
+ Install using npm install @company/package command.
384
+ The default port is 8080 unless specified.
385
+ Set NODE_ENV=production for production builds.
386
+
387
+ ## Few inline directives
388
+ Use **GET /api/v1/users** to list users and POST /api/v1/users to create.
389
+
390
+ ## Empty inline directive
391
+ This is text with empty directive.
392
+
393
+
394
+ "
483
395
  `;
484
396
 
485
- exports[`Translate command > filter files on extract 7`] = `
486
- "## %%%0%%%
397
+ exports[`Translate command > build translated static files and remove no-translate directives 3`] = `
398
+ "---
399
+ metadata:
400
+ - name: generator
401
+ content: Diplodoc Platform vDIPLODOC-VERSION
402
+ ---
403
+ # OpenAPI definition
404
+
405
+ ##version: v0##
406
+
407
+ ## Sections
408
+
409
+ - [test-controller](test-controller/index.md)
410
+
411
+
412
+ ## Specification
413
+
414
+ {% cut "Open API" %}
415
+
416
+
417
+ \`\`\`text translate=no
418
+ {
419
+ "openapi": "3.0.1",
420
+ "info": {
421
+ "title": "OpenAPI definition",
422
+ "version": "v0"
423
+ },
424
+ "servers": [
425
+ {
426
+ "url": "http://localhost:8080",
427
+ "description": "Generated server url"
428
+ }
429
+ ],
430
+ "paths": {
431
+ "/test": {
432
+ "get": {
433
+ "tags": [
434
+ "test-controller"
435
+ ],
436
+ "summary": "Simple get operation. тест новой верстки 3",
437
+ "description": "Defines a simple get skip this operation with no inputs and a complex",
438
+ "operationId": "getWithPayloadResponse",
439
+ "responses": {
440
+ "200": {
441
+ "description": "200!!!!",
442
+ "content": {
443
+ "application/json": {
444
+ "schema": {
445
+ "type": "object",
446
+ "properties": {
447
+ "A": {
448
+ "type": "string"
449
+ }
450
+ }
451
+ }
452
+ }
453
+ }
454
+ }
455
+ }
456
+ }
457
+ }
458
+ },
459
+ "components": {
460
+ "schemas": {
461
+ "RecurceTop": {
462
+ "type": "object",
463
+ "properties": {
464
+ "A": {
465
+ "type": "string"
466
+ }
467
+ }
468
+ },
469
+ "RecurceMiddle": {
470
+ "type": "object",
471
+ "properties": {
472
+ "B": {
473
+ "type": "array",
474
+ "items": {
475
+ "type": "object",
476
+ "properties": {
477
+ "A": {
478
+ "type": "string"
479
+ }
480
+ }
481
+ }
482
+ }
483
+ }
484
+ }
485
+ }
486
+ }
487
+ }
488
+ \`\`\`
489
+
487
490
 
488
- %%%1%%%"
491
+ {% endcut %}
492
+
493
+ <!-- markdownlint-disable-file -->"
489
494
  `;
490
495
 
491
- exports[`Translate command > filter files on extract 8`] = `
492
- "<?xml version="1.0" encoding="UTF-8"?>
493
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
494
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
495
- <header>
496
- <skeleton>
497
- <external-file href="file.skl"></external-file>
498
- </skeleton>
499
- </header>
500
- <body>
501
- <trans-unit id="0">
502
- <source xml:space="preserve">Included A1</source>
503
- </trans-unit>
504
- <trans-unit id="1">
505
- <source xml:space="preserve">TEST</source>
506
- </trans-unit>
507
- </body>
508
- </file>
509
- </xliff>"
496
+ exports[`Translate command > build translated static files and remove no-translate directives 4`] = `
497
+ "---
498
+ metadata:
499
+ - name: generator
500
+ content: Diplodoc Platform vDIPLODOC-VERSION
501
+ ---
502
+ <div class="openapi">
503
+
504
+ # Simple get operation. тест новой верстки 3
505
+
506
+ Defines a simple get skip this operation with no inputs and a complex
507
+
508
+ ## Request
509
+
510
+ <div class="openapi__requests">
511
+
512
+ <div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-get);margin-bottom: 12px">
513
+
514
+ <div class="openapi__request">
515
+
516
+ GET {.openapi__method}
517
+ \`\`\`text translate=no
518
+ http://localhost:8080/test
519
+ \`\`\`
520
+
521
+
522
+
523
+ </div>
524
+
525
+ Generated server url
526
+
527
+ </div>
528
+
529
+ </div>
530
+
531
+ ## Responses
532
+
533
+ <div class="openapi__response__code__200">
534
+
535
+ ## 200 OK
536
+
537
+ 200!!!!
538
+
539
+ <div class="openapi-entity">
540
+
541
+ ### Body
542
+
543
+ {% cut "application/json" %}
544
+
545
+
546
+ \`\`\`json translate=no
547
+ {
548
+ "A": "string"
549
+ }
550
+ \`\`\`
551
+
552
+
553
+ {% endcut %}
554
+
555
+
556
+ #|||
557
+ **Name**
558
+ |
559
+ **Description**
560
+ ||
561
+
562
+ ||
563
+ A {.openapi-table-parameter-name}
564
+ |
565
+ **Type:** string
566
+ |||#
567
+
568
+ </div>
569
+
570
+ </div>
571
+ <!-- markdownlint-disable-file -->
572
+
573
+ </div>
574
+
575
+
576
+
577
+ [*Deprecated]: No longer supported, please use an alternative and newer version."
510
578
  `;
511
579
 
512
- exports[`Translate command > filter files on extract 9`] = `
513
- "# %%%0%%%
580
+ exports[`Translate command > build translated static files and remove no-translate directives 5`] = `
581
+ "---
582
+ metadata:
583
+ - name: generator
584
+ content: Diplodoc Platform vDIPLODOC-VERSION
585
+ ---
586
+ # test-controller
587
+
588
+ ## Endpoints
514
589
 
590
+ - [Simple get operation. тест новой верстки 3](getWithPayloadResponse.md)
591
+
592
+ <!-- markdownlint-disable-file -->"
593
+ `;
594
+
595
+ exports[`Translate command > build translated static files and remove no-translate directives 6`] = `
596
+ "title: Test123
597
+ href: index.md
598
+ items:
599
+ - name: Не переводить
600
+ href: no-translate.md
601
+ - name: openapi
602
+ items:
603
+ - name: Overview
604
+ href: openapi/index.md
605
+ - name: test-controller
606
+ items:
607
+ - name: Overview
608
+ href: openapi/test-controller/index.md
609
+ - href: openapi/test-controller/getWithPayloadResponse.md
610
+ name: Simple get operation. тест новой верстки 3
611
+ path: toc.yaml
515
612
  "
516
613
  `;
517
614
 
518
- exports[`Translate command > filter files on extract 10`] = `
519
- "<?xml version="1.0" encoding="UTF-8"?>
520
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
521
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
522
- <header>
523
- <skeleton>
524
- <external-file href="file.skl"></external-file>
525
- </skeleton>
526
- </header>
527
- <body>
528
- <trans-unit id="0">
529
- <source xml:space="preserve">Yandex Flavored Markdown</source>
530
- </trans-unit>
531
- </body>
532
- </file>
533
- </xliff>"
615
+ exports[`Translate command > extract openapi spec files > filelist 1`] = `
616
+ "[
617
+ "openapi-spec.yaml.skl",
618
+ "openapi-spec.yaml.xliff",
619
+ "toc.yaml.skl",
620
+ "toc.yaml.xliff"
621
+ ]"
534
622
  `;
535
623
 
536
- exports[`Translate command > filter files on extract 11`] = `
537
- "title: '%%%0%%%'
538
- description: '%%%1%%%'
539
- meta:
540
- title: '%%%2%%%'
541
- noIndex: true
542
- links:
543
- - title: '%%%3%%%'
544
- description: '%%%4%%%'
545
- href: api-design-guide
546
- - title: '%%%5%%%'
547
- description: '%%%6%%%'
548
- href: /api-design-guide
549
- - title: '%%%7%%%'
550
- description: '%%%8%%%'
551
- href: about.md
552
- - title: '%%%9%%%'
553
- description: '%%%10%%%'
554
- href: how-it-work.md
555
- - title: '%%%11%%%'
556
- description: '%%%12%%%'
557
- href: index-yfm.md
624
+ exports[`Translate command > extract openapi spec files 1`] = `
625
+ "openapi: 3.0.1
626
+ info:
627
+ title: '%%%0%%%'
628
+ version: v0
629
+ servers:
630
+ - url: http://localhost:8080
631
+ description: '%%%1%%%'
632
+ paths:
633
+ /test:
634
+ get:
635
+ tags:
636
+ - test-controller
637
+ summary: '%%%2%%%'
638
+ description: '%%%3%%%'
639
+ operationId: getWithPayloadResponse
640
+ responses:
641
+ '200':
642
+ description: '%%%4%%%'
643
+ content:
644
+ application/json:
645
+ schema:
646
+ $ref: '#/components/schemas/RecurceTop'
647
+ components:
648
+ schemas:
649
+ RecurceTop:
650
+ type: object
651
+ properties:
652
+ A:
653
+ type: string
654
+ description: |
655
+ %%%5%%%
656
+ - %%%6%%%
657
+ - %%%7%%%
658
+ - %%%8%%%
659
+ RecurceMiddle:
660
+ type: object
661
+ properties:
662
+ B:
663
+ type: array
664
+ items:
665
+ $ref: '#/components/schemas/RecurceTop'
558
666
  "
559
667
  `;
560
668
 
561
- exports[`Translate command > filter files on extract 12`] = `
669
+ exports[`Translate command > extract openapi spec files 2`] = `
562
670
  "<?xml version="1.0" encoding="UTF-8"?>
563
671
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
564
672
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -569,55 +677,49 @@ exports[`Translate command > filter files on extract 12`] = `
569
677
  </header>
570
678
  <body>
571
679
  <trans-unit id="0">
572
- <source xml:space="preserve">Diplodoc</source>
680
+ <source xml:space="preserve">OpenAPI definition</source>
573
681
  </trans-unit>
574
682
  <trans-unit id="1">
575
- <source xml:space="preserve">Diplodoc - платформа работы с документацией в парадигме Documentation as a Code.</source>
683
+ <source xml:space="preserve">Generated server url</source>
576
684
  </trans-unit>
577
685
  <trans-unit id="2">
578
- <source xml:space="preserve">Метаданные</source>
686
+ <source xml:space="preserve">Simple get operation. тест новой верстки 3</source>
579
687
  </trans-unit>
580
688
  <trans-unit id="3">
581
- <source xml:space="preserve">API Yandex Cloud</source>
689
+ <source xml:space="preserve">Defines a simple get operation with no inputs and a complex</source>
582
690
  </trans-unit>
583
691
  <trans-unit id="4">
584
- <source xml:space="preserve">Архитектура API Yandex Cloud (урезанная)</source>
692
+ <source xml:space="preserve">200!!!!</source>
585
693
  </trans-unit>
586
694
  <trans-unit id="5">
587
- <source xml:space="preserve">API Yandex Cloud Абсолют</source>
695
+ <source xml:space="preserve">Статус загрузки:</source>
588
696
  </trans-unit>
589
697
  <trans-unit id="6">
590
- <source xml:space="preserve">Архитектура API Yandex Cloud (урезанная) с абсолютным путем</source>
698
+ <source xml:space="preserve"><x ctype="code_open" equiv-text="\`" id="x-1"/>UPLOADED<x ctype="code_close" equiv-text="\`" id="x-2"/> — загрузка завершена.</source>
591
699
  </trans-unit>
592
700
  <trans-unit id="7">
593
- <source xml:space="preserve">Обзор системы</source>
701
+ <source xml:space="preserve"><x ctype="code_open" equiv-text="\`" id="x-3"/>IN_PROGRESS<x ctype="code_close" equiv-text="\`" id="x-4"/> — загрузка находится в процессе обработки.</source>
594
702
  </trans-unit>
595
703
  <trans-unit id="8">
596
- <source xml:space="preserve">Описание платформы, ее основные возможности, особенности и преимущества.</source>
597
- </trans-unit>
598
- <trans-unit id="9">
599
- <source xml:space="preserve">Как попробовать</source>
600
- </trans-unit>
601
- <trans-unit id="10">
602
- <source xml:space="preserve">С чего начать работу</source>
603
- </trans-unit>
604
- <trans-unit id="11">
605
- <source xml:space="preserve">Yandex Flavored Markdown</source>
606
- </trans-unit>
607
- <trans-unit id="12">
608
- <source xml:space="preserve">Описание языка Yandex Flavored Markdown.</source>
704
+ <source xml:space="preserve"><x ctype="code_open" equiv-text="\`" id="x-5"/>PROCESSED<x ctype="code_close" equiv-text="\`" id="x-6"/> — загрузка успешно обработана.</source>
609
705
  </trans-unit>
610
706
  </body>
611
707
  </file>
612
708
  </xliff>"
613
709
  `;
614
710
 
615
- exports[`Translate command > filter files on extract 13`] = `
616
- "# %%%0%%%
711
+ exports[`Translate command > extract openapi spec files 3`] = `
712
+ "items:
713
+ - name: '%%%0%%%'
714
+ include:
715
+ path: openapi
716
+ includers:
717
+ - name: openapi
718
+ input: openapi-spec.yaml
617
719
  "
618
720
  `;
619
721
 
620
- exports[`Translate command > filter files on extract 14`] = `
722
+ exports[`Translate command > extract openapi spec files 4`] = `
621
723
  "<?xml version="1.0" encoding="UTF-8"?>
622
724
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
623
725
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -628,55 +730,93 @@ exports[`Translate command > filter files on extract 14`] = `
628
730
  </header>
629
731
  <body>
630
732
  <trans-unit id="0">
631
- <source xml:space="preserve">Базовая разметка</source>
733
+ <source xml:space="preserve">openapi</source>
632
734
  </trans-unit>
633
735
  </body>
634
736
  </file>
635
737
  </xliff>"
636
738
  `;
637
739
 
638
- exports[`Translate command > filter files on extract 15`] = `"# %%%0%%%"`;
740
+ exports[`Translate command > extract openapi spec files 5`] = `
741
+ "<div class="openapi">
742
+
743
+ # %%%0%%%
744
+
745
+ %%%1%%%
746
+
747
+ ## %%%2%%%
748
+
749
+ <div class="openapi__requests">
750
+
751
+ <div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-get);margin-bottom: 12px">
752
+
753
+ <div class="openapi__request">
754
+
755
+ %%%3%%% {.openapi__method}
756
+ \`\`\`text translate=no
757
+ http://localhost:8080/test
758
+ \`\`\`
759
+
760
+
761
+
762
+ </div>
763
+
764
+ %%%4%%%
765
+
766
+ </div>
767
+
768
+ </div>
769
+
770
+ ## %%%5%%%
771
+
772
+ <div class="openapi__response__code__200">
773
+
774
+ ## %%%6%%%
775
+
776
+ %%%7%%%
777
+
778
+ <div class="openapi-entity">
779
+
780
+ ### %%%8%%%
781
+
782
+ {% cut "%%%9%%%" %}
783
+
784
+
785
+ \`\`\`json translate=no
786
+ {
787
+ "A": "string"
788
+ }
789
+ \`\`\`
790
+
791
+
792
+ {% endcut %}
793
+
794
+
795
+ #|||
796
+ %%%10%%%
797
+ |
798
+ %%%11%%%
799
+ ||
639
800
 
640
- exports[`Translate command > filter files on extract 16`] = `
641
- "<?xml version="1.0" encoding="UTF-8"?>
642
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
643
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
644
- <header>
645
- <skeleton>
646
- <external-file href="file.skl"></external-file>
647
- </skeleton>
648
- </header>
649
- <body>
650
- <trans-unit id="0">
651
- <source xml:space="preserve">Списки</source>
652
- </trans-unit>
653
- </body>
654
- </file>
655
- </xliff>"
656
- `;
801
+ ||
802
+ %%%12%%% {.openapi-table-parameter-name}
803
+ |
804
+ %%%13%%%
805
+ |||#
657
806
 
658
- exports[`Translate command > filter files on extract 17`] = `
659
- "title: '%%%0%%%'
660
- href: index.yaml
661
- items:
662
- - name: '%%%1%%%'
663
- href: index.yaml
664
- - name: '%%%2%%%'
665
- href: a1.md
666
- - name: '%%%3%%%'
667
- href: index-yfm.md
668
- items:
669
- - name: '%%%4%%%'
670
- items:
671
- - name: '%%%5%%%'
672
- href: syntax/base.md
673
- - name: '%%%6%%%'
674
- href: syntax/lists.md
675
- - name: '%%%7%%%'
676
- "
807
+ </div>
808
+
809
+ </div>
810
+ <!-- markdownlint-disable-file -->
811
+
812
+ </div>
813
+
814
+
815
+
816
+ [*Deprecated]: %%%14%%%"
677
817
  `;
678
818
 
679
- exports[`Translate command > filter files on extract 18`] = `
819
+ exports[`Translate command > extract openapi spec files 6`] = `
680
820
  "<?xml version="1.0" encoding="UTF-8"?>
681
821
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
682
822
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -687,41 +827,66 @@ exports[`Translate command > filter files on extract 18`] = `
687
827
  </header>
688
828
  <body>
689
829
  <trans-unit id="0">
690
- <source xml:space="preserve">Diplodoc</source>
830
+ <source xml:space="preserve">Simple get operation. тест новой верстки 3</source>
691
831
  </trans-unit>
692
832
  <trans-unit id="1">
693
- <source xml:space="preserve">API Yandex Cloud</source>
833
+ <source xml:space="preserve">Defines a simple get operation with no inputs and a complex</source>
694
834
  </trans-unit>
695
835
  <trans-unit id="2">
696
- <source xml:space="preserve">A1</source>
836
+ <source xml:space="preserve">Request</source>
697
837
  </trans-unit>
698
838
  <trans-unit id="3">
699
- <source xml:space="preserve">Yandex Flavored Markdown</source>
839
+ <source xml:space="preserve">GET</source>
700
840
  </trans-unit>
701
841
  <trans-unit id="4">
702
- <source xml:space="preserve">Синтаксис</source>
842
+ <source xml:space="preserve">Generated server url</source>
703
843
  </trans-unit>
704
844
  <trans-unit id="5">
705
- <source xml:space="preserve">Базовая разметка</source>
845
+ <source xml:space="preserve">Responses</source>
706
846
  </trans-unit>
707
847
  <trans-unit id="6">
708
- <source xml:space="preserve">Списки</source>
848
+ <source xml:space="preserve">200 OK</source>
709
849
  </trans-unit>
710
850
  <trans-unit id="7">
711
- <source xml:space="preserve">Таблицы</source>
851
+ <source xml:space="preserve">200!!!!</source>
852
+ </trans-unit>
853
+ <trans-unit id="8">
854
+ <source xml:space="preserve">Body</source>
855
+ </trans-unit>
856
+ <trans-unit id="9">
857
+ <source xml:space="preserve">application/json</source>
858
+ </trans-unit>
859
+ <trans-unit id="10">
860
+ <source xml:space="preserve"><g ctype="bold" equiv-text="**{{text}}**" id="g-4" x-begin="**" x-end="**">Name</g></source>
861
+ </trans-unit>
862
+ <trans-unit id="11">
863
+ <source xml:space="preserve"><g ctype="bold" equiv-text="**{{text}}**" id="g-5" x-begin="**" x-end="**">Description</g></source>
864
+ </trans-unit>
865
+ <trans-unit id="12">
866
+ <source xml:space="preserve">A</source>
867
+ </trans-unit>
868
+ <trans-unit id="13">
869
+ <source xml:space="preserve"><g ctype="bold" equiv-text="**{{text}}**" id="g-6" x-begin="**" x-end="**">Type:</g> string</source>
870
+ </trans-unit>
871
+ <trans-unit id="14">
872
+ <source xml:space="preserve">No longer supported, please use an alternative and newer version.</source>
712
873
  </trans-unit>
713
874
  </body>
714
875
  </file>
715
876
  </xliff>"
716
877
  `;
717
878
 
718
- exports[`Translate command > filter files on extract 19`] = `
719
- "## %%%0%%%
879
+ exports[`Translate command > extract openapi spec files 7`] = `
880
+ "# %%%0%%%
720
881
 
721
- %%%1%%% %%%2%%%"
882
+ ## %%%1%%%
883
+
884
+ - %%%2%%%
885
+
886
+ <!-- markdownlint-disable-file -->"
722
887
  `;
723
888
 
724
- exports[`Translate command > filter files on extract 20`] = `
889
+ exports[`Translate command > extract openapi spec files 8`] = `
725
890
  "<?xml version="1.0" encoding="UTF-8"?>
726
891
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
727
892
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -732,22 +897,31 @@ exports[`Translate command > filter files on extract 20`] = `
732
897
  </header>
733
898
  <body>
734
899
  <trans-unit id="0">
735
- <source xml:space="preserve">No var page</source>
900
+ <source xml:space="preserve">test-controller</source>
736
901
  </trans-unit>
737
902
  <trans-unit id="1">
738
- <source xml:space="preserve">This page might be translated or not.</source>
903
+ <source xml:space="preserve">Endpoints</source>
739
904
  </trans-unit>
740
905
  <trans-unit id="2">
741
- <source xml:space="preserve">Depends on --strict-vars option.</source>
906
+ <source xml:space="preserve"><g ctype="link" equiv-text="[{{text}}](getWithPayloadResponse.md)" id="g-3" x-begin="[" x-end="](getWithPayloadResponse.md)">Simple get operation. тест новой верстки 3</g></source>
742
907
  </trans-unit>
743
908
  </body>
744
909
  </file>
745
910
  </xliff>"
746
911
  `;
747
912
 
748
- exports[`Translate command > filter files on extract 21`] = `"## %%%0%%%"`;
913
+ exports[`Translate command > extract openapi spec files 9`] = `
914
+ "items:
915
+ - name: '%%%0%%%'
916
+ include:
917
+ path: openapi
918
+ includers:
919
+ - name: openapi
920
+ input: openapi-spec.yaml
921
+ "
922
+ `;
749
923
 
750
- exports[`Translate command > filter files on extract 22`] = `
924
+ exports[`Translate command > extract openapi spec files 10`] = `
751
925
  "<?xml version="1.0" encoding="UTF-8"?>
752
926
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
753
927
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -758,30 +932,52 @@ exports[`Translate command > filter files on extract 22`] = `
758
932
  </header>
759
933
  <body>
760
934
  <trans-unit id="0">
761
- <source xml:space="preserve">Excluded title</source>
935
+ <source xml:space="preserve">openapi</source>
762
936
  </trans-unit>
763
937
  </body>
764
938
  </file>
765
939
  </xliff>"
766
940
  `;
767
941
 
768
- exports[`Translate command > filter files on extract 23`] = `
769
- "title: '%%%0%%%'
770
- href: index.md
771
- items:
772
- - name: '%%%1%%%'
773
- href: aboba.md
774
- - name: '%%%2%%%'
775
- href: no-var-page.md
776
- - name: '%%%3%%%'
777
- href: to-be-excluded.md
942
+ exports[`Translate command > extract yaml scheme files > en/index.yaml.skl 1`] = `
943
+ "blocks:
944
+ - type: content-layout-block
945
+ textWidth: l
946
+ textContent:
947
+ title: '%%%0%%%'
948
+ text: |2-
949
+ %%%1%%%
950
+ - %%%2%%%
951
+ - %%%3%%%
952
+
953
+ - type: card-layout-block
954
+ colSizes:
955
+ all: 12
956
+ lg: 4
957
+ md: 6
958
+ sm: 12
959
+ xl: 4
960
+ indent:
961
+ bottom: xs
962
+ title: '%%%4%%%'
963
+ animated: false
964
+ children:
965
+ - type: basic-card
966
+ title: '%%%5%%%'
967
+ text: '%%%6%%%'
968
+ urlTitle: '%%%7%%%'
969
+ border: shadow
970
+ controlPosition: content
971
+ url: management/index
972
+ target: ''
973
+ animated: false
778
974
  "
779
975
  `;
780
976
 
781
- exports[`Translate command > filter files on extract 24`] = `
977
+ exports[`Translate command > extract yaml scheme files > en/index.yaml.xliff 1`] = `
782
978
  "<?xml version="1.0" encoding="UTF-8"?>
783
979
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
784
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
980
+ <file original="file.ext" source-language="ru-RU" target-language="en-US" datatype="markdown">
785
981
  <header>
786
982
  <skeleton>
787
983
  <external-file href="file.skl"></external-file>
@@ -789,81 +985,166 @@ exports[`Translate command > filter files on extract 24`] = `
789
985
  </header>
790
986
  <body>
791
987
  <trans-unit id="0">
792
- <source xml:space="preserve">Test123</source>
988
+ <source xml:space="preserve">Введение</source>
793
989
  </trans-unit>
794
990
  <trans-unit id="1">
795
- <source xml:space="preserve">Aboba</source>
991
+ <source xml:space="preserve">API сервиса: - Управлять счетчиками, их настройками и правами доступа, не используя веб-интерфейс.</source>
796
992
  </trans-unit>
797
993
  <trans-unit id="2">
798
- <source xml:space="preserve">Нет переменной в vars</source>
994
+ <source xml:space="preserve">Получать информацию о посещаемости сайта и другие данные.</source>
799
995
  </trans-unit>
800
996
  <trans-unit id="3">
801
- <source xml:space="preserve">exclude-test</source>
997
+ <source xml:space="preserve">Формировать отчеты, в том числе с помощью сегментации и параметризации.</source>
802
998
  </trans-unit>
803
- </body>
804
- </file>
805
- </xliff>"
806
- `;
807
-
808
- exports[`Translate command > filter files on extract with extra exclude option > filelist 1`] = `
809
- "[
810
- "es/_includes/test.md.skl",
811
- "es/_includes/test.md.xliff",
812
- "es/aboba.md.skl",
813
- "es/aboba.md.xliff",
814
- "es/index.md.skl",
815
- "es/index.md.xliff",
816
- "es/nested/a1.md.skl",
817
- "es/nested/a1.md.xliff",
818
- "es/nested/index-yfm.md.skl",
819
- "es/nested/index-yfm.md.xliff",
820
- "es/nested/index.yaml.skl",
821
- "es/nested/index.yaml.xliff",
822
- "es/nested/syntax/base.md.skl",
823
- "es/nested/syntax/base.md.xliff",
824
- "es/nested/syntax/lists.md.skl",
825
- "es/nested/syntax/lists.md.xliff",
826
- "es/nested/toc.yaml.skl",
827
- "es/nested/toc.yaml.xliff",
828
- "es/no-var-page.md.skl",
829
- "es/no-var-page.md.xliff",
830
- "es/toc.yaml.skl",
831
- "es/toc.yaml.xliff"
832
- ]"
833
- `;
834
-
835
- exports[`Translate command > filter files on extract with extra exclude option 1`] = `"## %%%0%%%"`;
836
-
837
- exports[`Translate command > filter files on extract with extra exclude option 2`] = `
838
- "<?xml version="1.0" encoding="UTF-8"?>
839
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
840
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
841
- <header>
842
- <skeleton>
843
- <external-file href="file.skl"></external-file>
844
- </skeleton>
845
- </header>
846
- <body>
847
- <trans-unit id="0">
848
- <source xml:space="preserve">Заголовок include</source>
999
+ <trans-unit id="4">
1000
+ <source xml:space="preserve">Виды API</source>
1001
+ </trans-unit>
1002
+ <trans-unit id="5">
1003
+ <source xml:space="preserve">API управления</source>
1004
+ </trans-unit>
1005
+ <trans-unit id="6">
1006
+ <source xml:space="preserve">Управление счетчиками, целями, фильтрами и другими объектами Сервиса (например, создать счетчик, отредактировать его настройки, создать цель, выдать права доступа).</source>
1007
+ </trans-unit>
1008
+ <trans-unit id="7">
1009
+ <source xml:space="preserve">API управления</source>
849
1010
  </trans-unit>
850
1011
  </body>
851
1012
  </file>
852
1013
  </xliff>"
853
1014
  `;
854
1015
 
855
- exports[`Translate command > filter files on extract with extra exclude option 3`] = `
856
- "## %%%0%%%
857
-
858
- <!-- [ссылка на файл не в toc.yaml](./aboba-not-in-toc.md) -->
859
-
860
- {% include [%%%1%%%](./_includes/test.md) %}"
1016
+ exports[`Translate command > extract yaml scheme files > en/index-direct.yaml.skl 1`] = `
1017
+ "meta:
1018
+ title: '%%%0%%%'
1019
+ description: '%%%1%%%'
1020
+ fullScreen: true
1021
+ blocks:
1022
+ - type: header-block
1023
+ title: <div class="u-breadcrumbs"></div>
1024
+ breadcrumbs:
1025
+ items:
1026
+ - text: '%%%2%%%'
1027
+ url: https://site.ru/support/
1028
+ - text: '%%%3%%%'
1029
+ url: https://site.ru/support/adv/
1030
+ - type: filter-block
1031
+ centered: false
1032
+ title:
1033
+ text: '%%%4%%%'
1034
+ tags:
1035
+ - id: one
1036
+ label: '%%%5%%%'
1037
+ - id: two
1038
+ label: '%%%6%%%'
1039
+ colSizes:
1040
+ all: 12
1041
+ xl: 4
1042
+ sm: 6
1043
+ md: 4
1044
+ items:
1045
+ - tags:
1046
+ - one
1047
+ card:
1048
+ type: image-card
1049
+ image: https://site.ru/img/orig
1050
+ title: '%%%7%%%'
1051
+ text: <div>%%%8%%%</div><div class="u-card__more">%%%9%%%
1052
+ margins: m
1053
+ border: shadow
1054
+ url: unified-performance-campaign/about.md
1055
+ urlTitle: '%%%10%%%'
1056
+ - tags:
1057
+ - one
1058
+ card:
1059
+ type: image-card
1060
+ image: https://site.ru/img2/orig
1061
+ title: '%%%11%%%'
1062
+ text: <div>%%%12%%%</div><div class="u-card__more">%%%13%%%
1063
+ margins: m
1064
+ border: shadow
1065
+ url: campaign-master/product-campaign.md
1066
+ urlTitle: '%%%14%%%'
1067
+ - tags:
1068
+ - one
1069
+ card:
1070
+ type: image-card
1071
+ image: https://site.ru/img2/orig
1072
+ title: '%%%15%%%'
1073
+ text: <div>%%%16%%%</div><div class="u-card__more">%%%17%%%
1074
+ margins: m
1075
+ border: shadow
1076
+ url: efficiency/telegram-ads.md
1077
+ urlTitle: '%%%18%%%'
1078
+ - tags:
1079
+ - one
1080
+ card:
1081
+ type: background-card
1082
+ title: '%%%19%%%'
1083
+ text: ''
1084
+ backgroundColor: '#F3F6FC'
1085
+ border: line
1086
+ links:
1087
+ - text: '%%%20%%%'
1088
+ url: statistics.md
1089
+ arrow: true
1090
+ theme: normal
1091
+ - text: '%%%21%%%'
1092
+ url: feeds/about.md
1093
+ arrow: true
1094
+ theme: normal
1095
+ - tags:
1096
+ - one
1097
+ card:
1098
+ type: background-card
1099
+ title: '%%%22%%%'
1100
+ text: ''
1101
+ backgroundColor: '#F3F6FC'
1102
+ border: line
1103
+ links:
1104
+ - text: '%%%23%%%'
1105
+ url: moderation/adv-rules.md
1106
+ arrow: true
1107
+ theme: normal
1108
+ - text: '%%%24%%%'
1109
+ url: technologies-and-services/technologies-and-services.md
1110
+ arrow: true
1111
+ theme: normal
1112
+ - text: '%%%25%%%'
1113
+ url: troubleshooting/other.md
1114
+ arrow: true
1115
+ theme: normal
1116
+ - tags:
1117
+ - one
1118
+ card:
1119
+ type: background-card
1120
+ title: '%%%26%%%'
1121
+ text: ''
1122
+ backgroundColor: '#F3F6FC'
1123
+ border: line
1124
+ links:
1125
+ - text: '%%%27%%%'
1126
+ url: glossary.md
1127
+ arrow: true
1128
+ theme: normal
1129
+ - tags:
1130
+ - two
1131
+ card:
1132
+ type: image-card
1133
+ image: https://site.ru/img4/orig
1134
+ title: '%%%28%%%'
1135
+ text: <div>%%%29%%%</div><div class="u-card__more">%%%30%%%
1136
+ margins: m
1137
+ border: shadow
1138
+ url: products-automatic/about.md
1139
+ urlTitle: '%%%31%%%'
1140
+ animated: false
1141
+ "
861
1142
  `;
862
1143
 
863
- exports[`Translate command > filter files on extract with extra exclude option 4`] = `
1144
+ exports[`Translate command > extract yaml scheme files > en/index-direct.yaml.xliff 1`] = `
864
1145
  "<?xml version="1.0" encoding="UTF-8"?>
865
1146
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
866
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1147
+ <file original="file.ext" source-language="ru-RU" target-language="en-US" datatype="markdown">
867
1148
  <header>
868
1149
  <skeleton>
869
1150
  <external-file href="file.skl"></external-file>
@@ -871,53 +1152,133 @@ exports[`Translate command > filter files on extract with extra exclude option 4
871
1152
  </header>
872
1153
  <body>
873
1154
  <trans-unit id="0">
874
- <source xml:space="preserve">Заголовок include</source>
1155
+ <source xml:space="preserve">Справка Сервиса</source>
875
1156
  </trans-unit>
876
1157
  <trans-unit id="1">
877
- <source xml:space="preserve">Описание</source>
1158
+ <source xml:space="preserve">В Справке Сервиса собрали всю необходимую информацию.</source>
878
1159
  </trans-unit>
879
- </body>
880
- </file>
881
- </xliff>"
882
- `;
883
-
884
- exports[`Translate command > filter files on extract with extra exclude option 5`] = `
885
- "## %%%0%%%
886
-
887
- %%%1%%%"
888
- `;
889
-
890
- exports[`Translate command > filter files on extract with extra exclude option 6`] = `
891
- "<?xml version="1.0" encoding="UTF-8"?>
892
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
893
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
894
- <header>
895
- <skeleton>
896
- <external-file href="file.skl"></external-file>
897
- </skeleton>
898
- </header>
899
- <body>
900
- <trans-unit id="0">
901
- <source xml:space="preserve">Заголовок index</source>
1160
+ <trans-unit id="2">
1161
+ <source xml:space="preserve">Справка</source>
902
1162
  </trans-unit>
903
- <trans-unit id="1">
904
- <source xml:space="preserve">lorem</source>
1163
+ <trans-unit id="3">
1164
+ <source xml:space="preserve">Реклама</source>
1165
+ </trans-unit>
1166
+ <trans-unit id="4">
1167
+ <source xml:space="preserve">Сервис</source>
1168
+ </trans-unit>
1169
+ <trans-unit id="5">
1170
+ <source xml:space="preserve">Для специалистов</source>
1171
+ </trans-unit>
1172
+ <trans-unit id="6">
1173
+ <source xml:space="preserve">Для предпринимателей</source>
1174
+ </trans-unit>
1175
+ <trans-unit id="7">
1176
+ <source xml:space="preserve">Единая перфоманс-кампания</source>
1177
+ </trans-unit>
1178
+ <trans-unit id="8">
1179
+ <source xml:space="preserve">Комплексно решайте любые перфоманс-задачи в рамках одной кампании</source>
1180
+ </trans-unit>
1181
+ <trans-unit id="9">
1182
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
1183
+ </trans-unit>
1184
+ <trans-unit id="10">
1185
+ <source xml:space="preserve">Подробнее</source>
1186
+ </trans-unit>
1187
+ <trans-unit id="11">
1188
+ <source xml:space="preserve">Товарная кампания</source>
1189
+ </trans-unit>
1190
+ <trans-unit id="12">
1191
+ <source xml:space="preserve">Используйте простой инструмент для продвижения товаров интернете</source>
1192
+ </trans-unit>
1193
+ <trans-unit id="13">
1194
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
1195
+ </trans-unit>
1196
+ <trans-unit id="14">
1197
+ <source xml:space="preserve">Подробнее</source>
1198
+ </trans-unit>
1199
+ <trans-unit id="15">
1200
+ <source xml:space="preserve">Реклама в Telegram</source>
1201
+ </trans-unit>
1202
+ <trans-unit id="16">
1203
+ <source xml:space="preserve">Покажите релевантную рекламу в телеграм-каналах партнеров РСЯ</source>
1204
+ </trans-unit>
1205
+ <trans-unit id="17">
1206
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
1207
+ </trans-unit>
1208
+ <trans-unit id="18">
1209
+ <source xml:space="preserve">Подробнее</source>
1210
+ </trans-unit>
1211
+ <trans-unit id="19">
1212
+ <source xml:space="preserve">Часто ищут</source>
1213
+ </trans-unit>
1214
+ <trans-unit id="20">
1215
+ <source xml:space="preserve">Статистика</source>
1216
+ </trans-unit>
1217
+ <trans-unit id="21">
1218
+ <source xml:space="preserve">Управление фидами</source>
1219
+ </trans-unit>
1220
+ <trans-unit id="22">
1221
+ <source xml:space="preserve">Сервисные функции</source>
1222
+ </trans-unit>
1223
+ <trans-unit id="23">
1224
+ <source xml:space="preserve">Правила и модерация</source>
1225
+ </trans-unit>
1226
+ <trans-unit id="24">
1227
+ <source xml:space="preserve">Технологии и сервисы</source>
1228
+ </trans-unit>
1229
+ <trans-unit id="25">
1230
+ <source xml:space="preserve">Поддержка 24/7</source>
1231
+ </trans-unit>
1232
+ <trans-unit id="26">
1233
+ <source xml:space="preserve">Полезные ссылки</source>
1234
+ </trans-unit>
1235
+ <trans-unit id="27">
1236
+ <source xml:space="preserve">Глоссарий</source>
1237
+ </trans-unit>
1238
+ <trans-unit id="28">
1239
+ <source xml:space="preserve">Простой старт</source>
1240
+ </trans-unit>
1241
+ <trans-unit id="29">
1242
+ <source xml:space="preserve">Минимум ручных настроек: достаточно указать ссылку на сайт</source>
1243
+ </trans-unit>
1244
+ <trans-unit id="30">
1245
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
1246
+ </trans-unit>
1247
+ <trans-unit id="31">
1248
+ <source xml:space="preserve">Подробнее</source>
905
1249
  </trans-unit>
906
1250
  </body>
907
1251
  </file>
908
1252
  </xliff>"
909
1253
  `;
910
1254
 
911
- exports[`Translate command > filter files on extract with extra exclude option 7`] = `
912
- "## %%%0%%%
913
-
914
- %%%1%%%"
1255
+ exports[`Translate command > extract yaml scheme files > en/toc.yaml.skl 1`] = `
1256
+ "title: '%%%0%%%'
1257
+ href: index.yaml
1258
+ items:
1259
+ - name: '%%%4%%%'
1260
+ - href: index-direct.yaml
1261
+ navigation:
1262
+ header:
1263
+ leftItems:
1264
+ - text: '%%%2%%%'
1265
+ type: dropdown
1266
+ items:
1267
+ - text: '%%%3%%%'
1268
+ type: link
1269
+ href: menu/item
1270
+ logo:
1271
+ light:
1272
+ icon: https://icon.link/logo.svg
1273
+ url: https://site.ru
1274
+ urlTitle: '%%%1%%%'
1275
+ "
915
1276
  `;
916
1277
 
917
- exports[`Translate command > filter files on extract with extra exclude option 8`] = `
1278
+ exports[`Translate command > extract yaml scheme files > en/toc.yaml.xliff 1`] = `
918
1279
  "<?xml version="1.0" encoding="UTF-8"?>
919
1280
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
920
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1281
+ <file original="file.ext" source-language="ru-RU" target-language="en-US" datatype="markdown">
921
1282
  <header>
922
1283
  <skeleton>
923
1284
  <external-file href="file.skl"></external-file>
@@ -925,69 +1286,168 @@ exports[`Translate command > filter files on extract with extra exclude option 8
925
1286
  </header>
926
1287
  <body>
927
1288
  <trans-unit id="0">
928
- <source xml:space="preserve">Included A1</source>
1289
+ <source xml:space="preserve">Заголовок</source>
929
1290
  </trans-unit>
930
1291
  <trans-unit id="1">
931
- <source xml:space="preserve">TEST</source>
1292
+ <source xml:space="preserve">На сайт сервиса</source>
1293
+ </trans-unit>
1294
+ <trans-unit id="2">
1295
+ <source xml:space="preserve">Инструменты</source>
1296
+ </trans-unit>
1297
+ <trans-unit id="3">
1298
+ <source xml:space="preserve">Пункт меню</source>
1299
+ </trans-unit>
1300
+ <trans-unit id="4">
1301
+ <source xml:space="preserve">Дочерняя страница</source>
932
1302
  </trans-unit>
933
1303
  </body>
934
1304
  </file>
935
1305
  </xliff>"
936
1306
  `;
937
1307
 
938
- exports[`Translate command > filter files on extract with extra exclude option 9`] = `
939
- "# %%%0%%%
940
-
941
- "
942
- `;
943
-
944
- exports[`Translate command > filter files on extract with extra exclude option 10`] = `
945
- "<?xml version="1.0" encoding="UTF-8"?>
946
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
947
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
948
- <header>
949
- <skeleton>
950
- <external-file href="file.skl"></external-file>
951
- </skeleton>
952
- </header>
953
- <body>
954
- <trans-unit id="0">
955
- <source xml:space="preserve">Yandex Flavored Markdown</source>
956
- </trans-unit>
957
- </body>
958
- </file>
959
- </xliff>"
1308
+ exports[`Translate command > extract yaml scheme files > filelist 1`] = `
1309
+ "[
1310
+ "en/index-direct.yaml.skl",
1311
+ "en/index-direct.yaml.xliff",
1312
+ "en/index.yaml.skl",
1313
+ "en/index.yaml.xliff",
1314
+ "en/toc.yaml.skl",
1315
+ "en/toc.yaml.xliff"
1316
+ ]"
960
1317
  `;
961
1318
 
962
- exports[`Translate command > filter files on extract with extra exclude option 11`] = `
963
- "title: '%%%0%%%'
964
- description: '%%%1%%%'
965
- meta:
966
- title: '%%%2%%%'
967
- noIndex: true
968
- links:
969
- - title: '%%%3%%%'
970
- description: '%%%4%%%'
971
- href: api-design-guide
972
- - title: '%%%5%%%'
973
- description: '%%%6%%%'
974
- href: /api-design-guide
975
- - title: '%%%7%%%'
976
- description: '%%%8%%%'
977
- href: about.md
978
- - title: '%%%9%%%'
979
- description: '%%%10%%%'
980
- href: how-it-work.md
981
- - title: '%%%11%%%'
982
- description: '%%%12%%%'
983
- href: index-yfm.md
1319
+ exports[`Translate command > extract yaml scheme files 1`] = `
1320
+ "meta:
1321
+ title: '%%%0%%%'
1322
+ description: '%%%1%%%'
1323
+ fullScreen: true
1324
+ blocks:
1325
+ - type: header-block
1326
+ title: <div class="u-breadcrumbs"></div>
1327
+ breadcrumbs:
1328
+ items:
1329
+ - text: '%%%2%%%'
1330
+ url: https://site.ru/support/
1331
+ - text: '%%%3%%%'
1332
+ url: https://site.ru/support/adv/
1333
+ - type: filter-block
1334
+ centered: false
1335
+ title:
1336
+ text: '%%%4%%%'
1337
+ tags:
1338
+ - id: one
1339
+ label: '%%%5%%%'
1340
+ - id: two
1341
+ label: '%%%6%%%'
1342
+ colSizes:
1343
+ all: 12
1344
+ xl: 4
1345
+ sm: 6
1346
+ md: 4
1347
+ items:
1348
+ - tags:
1349
+ - one
1350
+ card:
1351
+ type: image-card
1352
+ image: https://site.ru/img/orig
1353
+ title: '%%%7%%%'
1354
+ text: <div>%%%8%%%</div><div class="u-card__more">%%%9%%%
1355
+ margins: m
1356
+ border: shadow
1357
+ url: unified-performance-campaign/about.md
1358
+ urlTitle: '%%%10%%%'
1359
+ - tags:
1360
+ - one
1361
+ card:
1362
+ type: image-card
1363
+ image: https://site.ru/img2/orig
1364
+ title: '%%%11%%%'
1365
+ text: <div>%%%12%%%</div><div class="u-card__more">%%%13%%%
1366
+ margins: m
1367
+ border: shadow
1368
+ url: campaign-master/product-campaign.md
1369
+ urlTitle: '%%%14%%%'
1370
+ - tags:
1371
+ - one
1372
+ card:
1373
+ type: image-card
1374
+ image: https://site.ru/img2/orig
1375
+ title: '%%%15%%%'
1376
+ text: <div>%%%16%%%</div><div class="u-card__more">%%%17%%%
1377
+ margins: m
1378
+ border: shadow
1379
+ url: efficiency/telegram-ads.md
1380
+ urlTitle: '%%%18%%%'
1381
+ - tags:
1382
+ - one
1383
+ card:
1384
+ type: background-card
1385
+ title: '%%%19%%%'
1386
+ text: ''
1387
+ backgroundColor: '#F3F6FC'
1388
+ border: line
1389
+ links:
1390
+ - text: '%%%20%%%'
1391
+ url: statistics.md
1392
+ arrow: true
1393
+ theme: normal
1394
+ - text: '%%%21%%%'
1395
+ url: feeds/about.md
1396
+ arrow: true
1397
+ theme: normal
1398
+ - tags:
1399
+ - one
1400
+ card:
1401
+ type: background-card
1402
+ title: '%%%22%%%'
1403
+ text: ''
1404
+ backgroundColor: '#F3F6FC'
1405
+ border: line
1406
+ links:
1407
+ - text: '%%%23%%%'
1408
+ url: moderation/adv-rules.md
1409
+ arrow: true
1410
+ theme: normal
1411
+ - text: '%%%24%%%'
1412
+ url: technologies-and-services/technologies-and-services.md
1413
+ arrow: true
1414
+ theme: normal
1415
+ - text: '%%%25%%%'
1416
+ url: troubleshooting/other.md
1417
+ arrow: true
1418
+ theme: normal
1419
+ - tags:
1420
+ - one
1421
+ card:
1422
+ type: background-card
1423
+ title: '%%%26%%%'
1424
+ text: ''
1425
+ backgroundColor: '#F3F6FC'
1426
+ border: line
1427
+ links:
1428
+ - text: '%%%27%%%'
1429
+ url: glossary.md
1430
+ arrow: true
1431
+ theme: normal
1432
+ - tags:
1433
+ - two
1434
+ card:
1435
+ type: image-card
1436
+ image: https://site.ru/img4/orig
1437
+ title: '%%%28%%%'
1438
+ text: <div>%%%29%%%</div><div class="u-card__more">%%%30%%%
1439
+ margins: m
1440
+ border: shadow
1441
+ url: products-automatic/about.md
1442
+ urlTitle: '%%%31%%%'
1443
+ animated: false
984
1444
  "
985
1445
  `;
986
1446
 
987
- exports[`Translate command > filter files on extract with extra exclude option 12`] = `
1447
+ exports[`Translate command > extract yaml scheme files 2`] = `
988
1448
  "<?xml version="1.0" encoding="UTF-8"?>
989
1449
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
990
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1450
+ <file original="file.ext" source-language="ru-RU" target-language="en-US" datatype="markdown">
991
1451
  <header>
992
1452
  <skeleton>
993
1453
  <external-file href="file.skl"></external-file>
@@ -995,117 +1455,145 @@ exports[`Translate command > filter files on extract with extra exclude option 1
995
1455
  </header>
996
1456
  <body>
997
1457
  <trans-unit id="0">
998
- <source xml:space="preserve">Diplodoc</source>
1458
+ <source xml:space="preserve">Справка Сервиса</source>
999
1459
  </trans-unit>
1000
1460
  <trans-unit id="1">
1001
- <source xml:space="preserve">Diplodoc - платформа работы с документацией в парадигме Documentation as a Code.</source>
1461
+ <source xml:space="preserve" Справке Сервиса собрали всю необходимую информацию.</source>
1002
1462
  </trans-unit>
1003
1463
  <trans-unit id="2">
1004
- <source xml:space="preserve">Метаданные</source>
1464
+ <source xml:space="preserve">Справка</source>
1005
1465
  </trans-unit>
1006
1466
  <trans-unit id="3">
1007
- <source xml:space="preserve">API Yandex Cloud</source>
1467
+ <source xml:space="preserve">Реклама</source>
1008
1468
  </trans-unit>
1009
1469
  <trans-unit id="4">
1010
- <source xml:space="preserve">Архитектура API Yandex Cloud (урезанная)</source>
1470
+ <source xml:space="preserve">Сервис</source>
1011
1471
  </trans-unit>
1012
1472
  <trans-unit id="5">
1013
- <source xml:space="preserve">API Yandex Cloud Абсолют</source>
1473
+ <source xml:space="preserve">Для специалистов</source>
1014
1474
  </trans-unit>
1015
1475
  <trans-unit id="6">
1016
- <source xml:space="preserve">Архитектура API Yandex Cloud (урезанная) с абсолютным путем</source>
1476
+ <source xml:space="preserve">Для предпринимателей</source>
1017
1477
  </trans-unit>
1018
1478
  <trans-unit id="7">
1019
- <source xml:space="preserve">Обзор системы</source>
1479
+ <source xml:space="preserve">Единая перфоманс-кампания</source>
1020
1480
  </trans-unit>
1021
1481
  <trans-unit id="8">
1022
- <source xml:space="preserve">Описание платформы, ее основные возможности, особенности и преимущества.</source>
1482
+ <source xml:space="preserve">Комплексно решайте любые перфоманс-задачи в рамках одной кампании</source>
1023
1483
  </trans-unit>
1024
1484
  <trans-unit id="9">
1025
- <source xml:space="preserve">Как попробовать</source>
1485
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
1026
1486
  </trans-unit>
1027
1487
  <trans-unit id="10">
1028
- <source xml:space="preserve">С чего начать работу</source>
1488
+ <source xml:space="preserve">Подробнее</source>
1029
1489
  </trans-unit>
1030
1490
  <trans-unit id="11">
1031
- <source xml:space="preserve">Yandex Flavored Markdown</source>
1491
+ <source xml:space="preserve">Товарная кампания</source>
1032
1492
  </trans-unit>
1033
1493
  <trans-unit id="12">
1034
- <source xml:space="preserve">Описание языка Yandex Flavored Markdown.</source>
1494
+ <source xml:space="preserve">Используйте простой инструмент для продвижения товаров интернете</source>
1035
1495
  </trans-unit>
1036
- </body>
1037
- </file>
1038
- </xliff>"
1039
- `;
1040
-
1041
- exports[`Translate command > filter files on extract with extra exclude option 13`] = `
1042
- "# %%%0%%%
1043
- "
1044
- `;
1045
-
1046
- exports[`Translate command > filter files on extract with extra exclude option 14`] = `
1047
- "<?xml version="1.0" encoding="UTF-8"?>
1048
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1049
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1050
- <header>
1051
- <skeleton>
1052
- <external-file href="file.skl"></external-file>
1053
- </skeleton>
1054
- </header>
1055
- <body>
1056
- <trans-unit id="0">
1057
- <source xml:space="preserve">Базовая разметка</source>
1496
+ <trans-unit id="13">
1497
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
1058
1498
  </trans-unit>
1059
- </body>
1060
- </file>
1061
- </xliff>"
1062
- `;
1063
-
1064
- exports[`Translate command > filter files on extract with extra exclude option 15`] = `"# %%%0%%%"`;
1065
-
1066
- exports[`Translate command > filter files on extract with extra exclude option 16`] = `
1067
- "<?xml version="1.0" encoding="UTF-8"?>
1068
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1069
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1070
- <header>
1071
- <skeleton>
1072
- <external-file href="file.skl"></external-file>
1073
- </skeleton>
1074
- </header>
1075
- <body>
1076
- <trans-unit id="0">
1077
- <source xml:space="preserve">Списки</source>
1499
+ <trans-unit id="14">
1500
+ <source xml:space="preserve">Подробнее</source>
1501
+ </trans-unit>
1502
+ <trans-unit id="15">
1503
+ <source xml:space="preserve">Реклама в Telegram</source>
1504
+ </trans-unit>
1505
+ <trans-unit id="16">
1506
+ <source xml:space="preserve">Покажите релевантную рекламу в телеграм-каналах партнеров РСЯ</source>
1507
+ </trans-unit>
1508
+ <trans-unit id="17">
1509
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
1510
+ </trans-unit>
1511
+ <trans-unit id="18">
1512
+ <source xml:space="preserve">Подробнее</source>
1513
+ </trans-unit>
1514
+ <trans-unit id="19">
1515
+ <source xml:space="preserve">Часто ищут</source>
1516
+ </trans-unit>
1517
+ <trans-unit id="20">
1518
+ <source xml:space="preserve">Статистика</source>
1519
+ </trans-unit>
1520
+ <trans-unit id="21">
1521
+ <source xml:space="preserve">Управление фидами</source>
1522
+ </trans-unit>
1523
+ <trans-unit id="22">
1524
+ <source xml:space="preserve">Сервисные функции</source>
1525
+ </trans-unit>
1526
+ <trans-unit id="23">
1527
+ <source xml:space="preserve">Правила и модерация</source>
1528
+ </trans-unit>
1529
+ <trans-unit id="24">
1530
+ <source xml:space="preserve">Технологии и сервисы</source>
1531
+ </trans-unit>
1532
+ <trans-unit id="25">
1533
+ <source xml:space="preserve">Поддержка 24/7</source>
1534
+ </trans-unit>
1535
+ <trans-unit id="26">
1536
+ <source xml:space="preserve">Полезные ссылки</source>
1537
+ </trans-unit>
1538
+ <trans-unit id="27">
1539
+ <source xml:space="preserve">Глоссарий</source>
1540
+ </trans-unit>
1541
+ <trans-unit id="28">
1542
+ <source xml:space="preserve">Простой старт</source>
1543
+ </trans-unit>
1544
+ <trans-unit id="29">
1545
+ <source xml:space="preserve">Минимум ручных настроек: достаточно указать ссылку на сайт</source>
1546
+ </trans-unit>
1547
+ <trans-unit id="30">
1548
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
1549
+ </trans-unit>
1550
+ <trans-unit id="31">
1551
+ <source xml:space="preserve">Подробнее</source>
1078
1552
  </trans-unit>
1079
1553
  </body>
1080
1554
  </file>
1081
1555
  </xliff>"
1082
1556
  `;
1083
1557
 
1084
- exports[`Translate command > filter files on extract with extra exclude option 17`] = `
1085
- "title: '%%%0%%%'
1086
- href: index.yaml
1087
- items:
1088
- - name: '%%%1%%%'
1089
- href: index.yaml
1090
- - name: '%%%2%%%'
1091
- href: a1.md
1092
- - name: '%%%3%%%'
1093
- href: index-yfm.md
1094
- items:
1095
- - name: '%%%4%%%'
1096
- items:
1097
- - name: '%%%5%%%'
1098
- href: syntax/base.md
1099
- - name: '%%%6%%%'
1100
- href: syntax/lists.md
1101
- - name: '%%%7%%%'
1558
+ exports[`Translate command > extract yaml scheme files 3`] = `
1559
+ "blocks:
1560
+ - type: content-layout-block
1561
+ textWidth: l
1562
+ textContent:
1563
+ title: '%%%0%%%'
1564
+ text: |2-
1565
+ %%%1%%%
1566
+ - %%%2%%%
1567
+ - %%%3%%%
1568
+
1569
+ - type: card-layout-block
1570
+ colSizes:
1571
+ all: 12
1572
+ lg: 4
1573
+ md: 6
1574
+ sm: 12
1575
+ xl: 4
1576
+ indent:
1577
+ bottom: xs
1578
+ title: '%%%4%%%'
1579
+ animated: false
1580
+ children:
1581
+ - type: basic-card
1582
+ title: '%%%5%%%'
1583
+ text: '%%%6%%%'
1584
+ urlTitle: '%%%7%%%'
1585
+ border: shadow
1586
+ controlPosition: content
1587
+ url: management/index
1588
+ target: ''
1589
+ animated: false
1102
1590
  "
1103
1591
  `;
1104
1592
 
1105
- exports[`Translate command > filter files on extract with extra exclude option 18`] = `
1593
+ exports[`Translate command > extract yaml scheme files 4`] = `
1106
1594
  "<?xml version="1.0" encoding="UTF-8"?>
1107
1595
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1108
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1596
+ <file original="file.ext" source-language="ru-RU" target-language="en-US" datatype="markdown">
1109
1597
  <header>
1110
1598
  <skeleton>
1111
1599
  <external-file href="file.skl"></external-file>
@@ -1113,81 +1601,61 @@ exports[`Translate command > filter files on extract with extra exclude option 1
1113
1601
  </header>
1114
1602
  <body>
1115
1603
  <trans-unit id="0">
1116
- <source xml:space="preserve">Diplodoc</source>
1604
+ <source xml:space="preserve">Введение</source>
1117
1605
  </trans-unit>
1118
1606
  <trans-unit id="1">
1119
- <source xml:space="preserve">API Yandex Cloud</source>
1607
+ <source xml:space="preserve">API сервиса: - Управлять счетчиками, их настройками и правами доступа, не используя веб-интерфейс.</source>
1120
1608
  </trans-unit>
1121
1609
  <trans-unit id="2">
1122
- <source xml:space="preserve">A1</source>
1610
+ <source xml:space="preserve">Получать информацию о посещаемости сайта и другие данные.</source>
1123
1611
  </trans-unit>
1124
1612
  <trans-unit id="3">
1125
- <source xml:space="preserve">Yandex Flavored Markdown</source>
1613
+ <source xml:space="preserve">Формировать отчеты, в том числе с помощью сегментации и параметризации.</source>
1126
1614
  </trans-unit>
1127
1615
  <trans-unit id="4">
1128
- <source xml:space="preserve">Синтаксис</source>
1616
+ <source xml:space="preserve">Виды API</source>
1129
1617
  </trans-unit>
1130
1618
  <trans-unit id="5">
1131
- <source xml:space="preserve">Базовая разметка</source>
1619
+ <source xml:space="preserve">API управления</source>
1132
1620
  </trans-unit>
1133
1621
  <trans-unit id="6">
1134
- <source xml:space="preserve">Списки</source>
1622
+ <source xml:space="preserve">Управление счетчиками, целями, фильтрами и другими объектами Сервиса (например, создать счетчик, отредактировать его настройки, создать цель, выдать права доступа).</source>
1135
1623
  </trans-unit>
1136
1624
  <trans-unit id="7">
1137
- <source xml:space="preserve">Таблицы</source>
1138
- </trans-unit>
1139
- </body>
1140
- </file>
1141
- </xliff>"
1142
- `;
1143
-
1144
- exports[`Translate command > filter files on extract with extra exclude option 19`] = `
1145
- "## %%%0%%%
1146
-
1147
- %%%1%%% %%%2%%%"
1148
- `;
1149
-
1150
- exports[`Translate command > filter files on extract with extra exclude option 20`] = `
1151
- "<?xml version="1.0" encoding="UTF-8"?>
1152
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1153
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1154
- <header>
1155
- <skeleton>
1156
- <external-file href="file.skl"></external-file>
1157
- </skeleton>
1158
- </header>
1159
- <body>
1160
- <trans-unit id="0">
1161
- <source xml:space="preserve">No var page</source>
1162
- </trans-unit>
1163
- <trans-unit id="1">
1164
- <source xml:space="preserve">This page might be translated or not.</source>
1165
- </trans-unit>
1166
- <trans-unit id="2">
1167
- <source xml:space="preserve">Depends on --strict-vars option.</source>
1625
+ <source xml:space="preserve">API управления</source>
1168
1626
  </trans-unit>
1169
1627
  </body>
1170
1628
  </file>
1171
1629
  </xliff>"
1172
1630
  `;
1173
1631
 
1174
- exports[`Translate command > filter files on extract with extra exclude option 21`] = `
1632
+ exports[`Translate command > extract yaml scheme files 5`] = `
1175
1633
  "title: '%%%0%%%'
1176
- href: index.md
1634
+ href: index.yaml
1177
1635
  items:
1178
- - name: '%%%1%%%'
1179
- href: aboba.md
1180
- - name: '%%%2%%%'
1181
- href: no-var-page.md
1182
- - name: '%%%3%%%'
1183
- href: to-be-excluded.md
1636
+ - name: '%%%4%%%'
1637
+ - href: index-direct.yaml
1638
+ navigation:
1639
+ header:
1640
+ leftItems:
1641
+ - text: '%%%2%%%'
1642
+ type: dropdown
1643
+ items:
1644
+ - text: '%%%3%%%'
1645
+ type: link
1646
+ href: menu/item
1647
+ logo:
1648
+ light:
1649
+ icon: https://icon.link/logo.svg
1650
+ url: https://site.ru
1651
+ urlTitle: '%%%1%%%'
1184
1652
  "
1185
1653
  `;
1186
1654
 
1187
- exports[`Translate command > filter files on extract with extra exclude option 22`] = `
1655
+ exports[`Translate command > extract yaml scheme files 6`] = `
1188
1656
  "<?xml version="1.0" encoding="UTF-8"?>
1189
1657
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1190
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1658
+ <file original="file.ext" source-language="ru-RU" target-language="en-US" datatype="markdown">
1191
1659
  <header>
1192
1660
  <skeleton>
1193
1661
  <external-file href="file.skl"></external-file>
@@ -1195,23 +1663,26 @@ exports[`Translate command > filter files on extract with extra exclude option 2
1195
1663
  </header>
1196
1664
  <body>
1197
1665
  <trans-unit id="0">
1198
- <source xml:space="preserve">Test123</source>
1666
+ <source xml:space="preserve">Заголовок</source>
1199
1667
  </trans-unit>
1200
1668
  <trans-unit id="1">
1201
- <source xml:space="preserve">Aboba</source>
1669
+ <source xml:space="preserve">На сайт сервиса</source>
1202
1670
  </trans-unit>
1203
1671
  <trans-unit id="2">
1204
- <source xml:space="preserve">Нет переменной в vars</source>
1672
+ <source xml:space="preserve">Инструменты</source>
1205
1673
  </trans-unit>
1206
1674
  <trans-unit id="3">
1207
- <source xml:space="preserve">exclude-test</source>
1675
+ <source xml:space="preserve">Пункт меню</source>
1676
+ </trans-unit>
1677
+ <trans-unit id="4">
1678
+ <source xml:space="preserve">Дочерняя страница</source>
1208
1679
  </trans-unit>
1209
1680
  </body>
1210
1681
  </file>
1211
1682
  </xliff>"
1212
1683
  `;
1213
1684
 
1214
- exports[`Translate command > filter files on extract with extra vars option > filelist 1`] = `
1685
+ exports[`Translate command > filter files on extract > filelist 1`] = `
1215
1686
  "[
1216
1687
  "es/_includes/test.md.skl",
1217
1688
  "es/_includes/test.md.xliff",
@@ -1221,8 +1692,6 @@ exports[`Translate command > filter files on extract with extra vars option > fi
1221
1692
  "es/aboba.md.xliff",
1222
1693
  "es/index.md.skl",
1223
1694
  "es/index.md.xliff",
1224
- "es/nested/a1.md.skl",
1225
- "es/nested/a1.md.xliff",
1226
1695
  "es/nested/index-yfm.md.skl",
1227
1696
  "es/nested/index-yfm.md.xliff",
1228
1697
  "es/nested/index.yaml.skl",
@@ -1233,64 +1702,58 @@ exports[`Translate command > filter files on extract with extra vars option > fi
1233
1702
  "es/nested/syntax/lists.md.xliff",
1234
1703
  "es/nested/toc.yaml.skl",
1235
1704
  "es/nested/toc.yaml.xliff",
1236
- "es/no-var-page.md.skl",
1237
- "es/no-var-page.md.xliff",
1238
- "es/to-be-excluded.md.skl",
1239
- "es/to-be-excluded.md.xliff",
1240
1705
  "es/toc.yaml.skl",
1241
1706
  "es/toc.yaml.xliff"
1242
1707
  ]"
1243
1708
  `;
1244
1709
 
1245
- exports[`Translate command > filter files on extract with extra vars option 1`] = `"## %%%0%%%"`;
1246
-
1247
- exports[`Translate command > filter files on extract with extra vars option 2`] = `
1248
- "<?xml version="1.0" encoding="UTF-8"?>
1249
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1250
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1251
- <header>
1252
- <skeleton>
1253
- <external-file href="file.skl"></external-file>
1254
- </skeleton>
1255
- </header>
1256
- <body>
1257
- <trans-unit id="0">
1258
- <source xml:space="preserve">Заголовок include</source>
1259
- </trans-unit>
1260
- </body>
1261
- </file>
1262
- </xliff>"
1710
+ exports[`Translate command > filter files on extract with extra exclude option > filelist 1`] = `
1711
+ "[
1712
+ "es/_includes/test.md.skl",
1713
+ "es/_includes/test.md.xliff",
1714
+ "es/aboba.md.skl",
1715
+ "es/aboba.md.xliff",
1716
+ "es/index.md.skl",
1717
+ "es/index.md.xliff",
1718
+ "es/nested/index-yfm.md.skl",
1719
+ "es/nested/index-yfm.md.xliff",
1720
+ "es/nested/index.yaml.skl",
1721
+ "es/nested/index.yaml.xliff",
1722
+ "es/nested/syntax/base.md.skl",
1723
+ "es/nested/syntax/base.md.xliff",
1724
+ "es/nested/syntax/lists.md.skl",
1725
+ "es/nested/syntax/lists.md.xliff",
1726
+ "es/nested/toc.yaml.skl",
1727
+ "es/nested/toc.yaml.xliff",
1728
+ "es/toc.yaml.skl",
1729
+ "es/toc.yaml.xliff"
1730
+ ]"
1263
1731
  `;
1264
1732
 
1265
- exports[`Translate command > filter files on extract with extra vars option 3`] = `"## %%%0%%%"`;
1266
-
1267
- exports[`Translate command > filter files on extract with extra vars option 4`] = `
1268
- "<?xml version="1.0" encoding="UTF-8"?>
1269
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1270
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1271
- <header>
1272
- <skeleton>
1273
- <external-file href="file.skl"></external-file>
1274
- </skeleton>
1275
- </header>
1276
- <body>
1277
- <trans-unit id="0">
1278
- <source xml:space="preserve">Не переводить</source>
1279
- </trans-unit>
1280
- </body>
1281
- </file>
1282
- </xliff>"
1733
+ exports[`Translate command > removes no-translate directive and leaves content as is > filelist 1`] = `
1734
+ "[
1735
+ "index.md.skl",
1736
+ "index.md.xliff",
1737
+ "no-translate.md.skl",
1738
+ "no-translate.md.xliff",
1739
+ "openapi-spec.yaml.skl",
1740
+ "openapi-spec.yaml.xliff",
1741
+ "toc.yaml.skl",
1742
+ "toc.yaml.xliff"
1743
+ ]"
1283
1744
  `;
1284
1745
 
1285
- exports[`Translate command > filter files on extract with extra vars option 5`] = `
1746
+ exports[`Translate command > removes no-translate directive and leaves content as is 1`] = `
1286
1747
  "## %%%0%%%
1287
1748
 
1288
- <!-- [ссылка на файл не в toc.yaml](./aboba-not-in-toc.md) -->
1749
+ ::no-translate [adsfasdfasdfasdfasdf]
1289
1750
 
1290
- {% include [%%%1%%%](./_includes/test.md) %}"
1751
+ %%%1%%%
1752
+
1753
+ %%%2%%%"
1291
1754
  `;
1292
1755
 
1293
- exports[`Translate command > filter files on extract with extra vars option 6`] = `
1756
+ exports[`Translate command > removes no-translate directive and leaves content as is 2`] = `
1294
1757
  "<?xml version="1.0" encoding="UTF-8"?>
1295
1758
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1296
1759
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1301,120 +1764,61 @@ exports[`Translate command > filter files on extract with extra vars option 6`]
1301
1764
  </header>
1302
1765
  <body>
1303
1766
  <trans-unit id="0">
1304
- <source xml:space="preserve">Заголовок include</source>
1767
+ <source xml:space="preserve">Index header</source>
1305
1768
  </trans-unit>
1306
1769
  <trans-unit id="1">
1307
- <source xml:space="preserve">Описание</source>
1770
+ <source xml:space="preserve">lorem</source>
1771
+ </trans-unit>
1772
+ <trans-unit id="2">
1773
+ <source xml:space="preserve">asdfasdfasdf</source>
1308
1774
  </trans-unit>
1309
1775
  </body>
1310
1776
  </file>
1311
1777
  </xliff>"
1312
1778
  `;
1313
1779
 
1314
- exports[`Translate command > filter files on extract with extra vars option 7`] = `
1315
- "## %%%0%%%
1780
+ exports[`Translate command > removes no-translate directive and leaves content as is 3`] = `
1781
+ "# %%%0%%%
1316
1782
 
1317
- %%%1%%%"
1318
- `;
1783
+ ## %%%1%%%
1784
+ :::no-translate
1785
+ ### No-translate header
1786
+ Should not be translated.
1787
+ Can use **markup** inside.
1788
+ :::
1319
1789
 
1320
- exports[`Translate command > filter files on extract with extra vars option 8`] = `
1321
- "<?xml version="1.0" encoding="UTF-8"?>
1322
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1323
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1324
- <header>
1325
- <skeleton>
1326
- <external-file href="file.skl"></external-file>
1327
- </skeleton>
1328
- </header>
1329
- <body>
1330
- <trans-unit id="0">
1331
- <source xml:space="preserve">Заголовок index</source>
1332
- </trans-unit>
1333
- <trans-unit id="1">
1334
- <source xml:space="preserve">lorem</source>
1335
- </trans-unit>
1336
- </body>
1337
- </file>
1338
- </xliff>"
1339
- `;
1790
+ ## %%%2%%%
1340
1791
 
1341
- exports[`Translate command > filter files on extract with extra vars option 9`] = `
1342
- "## %%%0%%%
1792
+ ::no-translate [## /usr/local/bin/application]
1793
+ ::no-translate[**C:/Program Files/Application/config.ini**]
1794
+ ::no-translate [~/Documents/project/src/main.rs]
1343
1795
 
1344
- %%%1%%%"
1345
- `;
1346
1796
 
1347
- exports[`Translate command > filter files on extract with extra vars option 10`] = `
1348
- "<?xml version="1.0" encoding="UTF-8"?>
1349
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1350
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1351
- <header>
1352
- <skeleton>
1353
- <external-file href="file.skl"></external-file>
1354
- </skeleton>
1355
- </header>
1356
- <body>
1357
- <trans-unit id="0">
1358
- <source xml:space="preserve">Included A1</source>
1359
- </trans-unit>
1360
- <trans-unit id="1">
1361
- <source xml:space="preserve">TEST</source>
1362
- </trans-unit>
1363
- </body>
1364
- </file>
1365
- </xliff>"
1366
- `;
1797
+ - :no-translate[GET /api/v1/users] %%%3%%%
1798
+ - :no-translate[POST /api/v1/auth/login] %%%4%%%
1799
+ - :no-translate[PUT /api/v1/users/{id}] %%%5%%%
1367
1800
 
1368
- exports[`Translate command > filter files on extract with extra vars option 11`] = `
1369
- "# %%%0%%%
1801
+ ## %%%6%%%
1802
+ %%%7%%%
1803
+ :no-translate[The default port is unless specified.] %%%8%%%
1804
+ %%%9%%%
1370
1805
 
1371
- "
1372
- `;
1806
+ ## %%%10%%%
1807
+ %%%11%%%
1808
+ %%%12%%%
1809
+ %%%13%%%
1810
+
1811
+ ## %%%14%%%
1812
+ %%%15%%%
1813
+
1814
+ ## %%%16%%%
1815
+ %%%17%%%
1373
1816
 
1374
- exports[`Translate command > filter files on extract with extra vars option 12`] = `
1375
- "<?xml version="1.0" encoding="UTF-8"?>
1376
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1377
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1378
- <header>
1379
- <skeleton>
1380
- <external-file href="file.skl"></external-file>
1381
- </skeleton>
1382
- </header>
1383
- <body>
1384
- <trans-unit id="0">
1385
- <source xml:space="preserve">Yandex Flavored Markdown</source>
1386
- </trans-unit>
1387
- </body>
1388
- </file>
1389
- </xliff>"
1390
- `;
1391
1817
 
1392
- exports[`Translate command > filter files on extract with extra vars option 13`] = `
1393
- "title: '%%%0%%%'
1394
- description: '%%%1%%%'
1395
- meta:
1396
- title: '%%%2%%%'
1397
- noIndex: true
1398
- links:
1399
- - title: '%%%3%%%'
1400
- description: '%%%4%%%'
1401
- href: api-design-guide
1402
- - title: '%%%5%%%'
1403
- description: '%%%6%%%'
1404
- href: /api-design-guide
1405
- - title: '%%%7%%%'
1406
- description: '%%%8%%%'
1407
- href: about.md
1408
- - title: '%%%9%%%'
1409
- description: '%%%10%%%'
1410
- href: how-it-work.md
1411
- - title: '%%%11%%%'
1412
- description: '%%%12%%%'
1413
- href: index-yfm.md
1414
1818
  "
1415
1819
  `;
1416
1820
 
1417
- exports[`Translate command > filter files on extract with extra vars option 14`] = `
1821
+ exports[`Translate command > removes no-translate directive and leaves content as is 4`] = `
1418
1822
  "<?xml version="1.0" encoding="UTF-8"?>
1419
1823
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1420
1824
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1425,55 +1829,105 @@ exports[`Translate command > filter files on extract with extra vars option 14`]
1425
1829
  </header>
1426
1830
  <body>
1427
1831
  <trans-unit id="0">
1428
- <source xml:space="preserve">Diplodoc</source>
1832
+ <source xml:space="preserve">No-translate directive</source>
1429
1833
  </trans-unit>
1430
1834
  <trans-unit id="1">
1431
- <source xml:space="preserve">Diplodoc - платформа работы с документацией в парадигме Documentation as a Code.</source>
1835
+ <source xml:space="preserve">Block directive</source>
1432
1836
  </trans-unit>
1433
1837
  <trans-unit id="2">
1434
- <source xml:space="preserve">Метаданные</source>
1838
+ <source xml:space="preserve">Leaf directive</source>
1435
1839
  </trans-unit>
1436
1840
  <trans-unit id="3">
1437
- <source xml:space="preserve">API Yandex Cloud</source>
1841
+ <source xml:space="preserve">— get all users</source>
1438
1842
  </trans-unit>
1439
1843
  <trans-unit id="4">
1440
- <source xml:space="preserve">Архитектура API Yandex Cloud (урезанная)</source>
1844
+ <source xml:space="preserve">— authorization</source>
1441
1845
  </trans-unit>
1442
1846
  <trans-unit id="5">
1443
- <source xml:space="preserve">API Yandex Cloud Абсолют</source>
1847
+ <source xml:space="preserve">— update users data</source>
1444
1848
  </trans-unit>
1445
1849
  <trans-unit id="6">
1446
- <source xml:space="preserve">Архитектура API Yandex Cloud (урезанная) с абсолютным путем</source>
1850
+ <source xml:space="preserve">Simple case leaf</source>
1447
1851
  </trans-unit>
1448
1852
  <trans-unit id="7">
1449
- <source xml:space="preserve">Обзор системы</source>
1853
+ <source xml:space="preserve">Install using command.</source>
1450
1854
  </trans-unit>
1451
1855
  <trans-unit id="8">
1452
- <source xml:space="preserve">Описание платформы, ее основные возможности, особенности и преимущества.</source>
1856
+ <source xml:space="preserve">Next sentence.</source>
1453
1857
  </trans-unit>
1454
1858
  <trans-unit id="9">
1455
- <source xml:space="preserve">Как попробовать</source>
1859
+ <source xml:space="preserve">Set NODE_ENV=production for production builds.</source>
1456
1860
  </trans-unit>
1457
1861
  <trans-unit id="10">
1458
- <source xml:space="preserve" чего начать работу</source>
1862
+ <source xml:space="preserve">Simple case inline</source>
1459
1863
  </trans-unit>
1460
1864
  <trans-unit id="11">
1461
- <source xml:space="preserve">Yandex Flavored Markdown</source>
1865
+ <source xml:space="preserve">Install using <x ctype="no_translate_inline" equiv-text=":no-translate[npm install @company/package]" id="x-2"/> command.</source>
1462
1866
  </trans-unit>
1463
1867
  <trans-unit id="12">
1464
- <source xml:space="preserve">Описание языка Yandex Flavored Markdown.</source>
1868
+ <source xml:space="preserve">The default port is <x ctype="no_translate_inline" equiv-text=":no-translate[8080]" id="x-3"/> unless specified.</source>
1869
+ </trans-unit>
1870
+ <trans-unit id="13">
1871
+ <source xml:space="preserve">Set <x ctype="no_translate_inline" equiv-text=":no-translate[NODE_ENV=production]" id="x-4"/> for production builds.</source>
1872
+ </trans-unit>
1873
+ <trans-unit id="14">
1874
+ <source xml:space="preserve">Few inline directives</source>
1875
+ </trans-unit>
1876
+ <trans-unit id="15">
1877
+ <source xml:space="preserve">Use <x ctype="no_translate_inline" equiv-text=":no-translate[**GET /api/v1/users**]" id="x-5"/> to list users and <x ctype="no_translate_inline" equiv-text=":no-translate[POST /api/v1/users]" id="x-6"/> to create.</source>
1878
+ </trans-unit>
1879
+ <trans-unit id="16">
1880
+ <source xml:space="preserve">Empty inline directive</source>
1881
+ </trans-unit>
1882
+ <trans-unit id="17">
1883
+ <source xml:space="preserve">This is text with empty <x ctype="no_translate_inline" equiv-text=":no-translate[]" id="x-7"/> directive.</source>
1465
1884
  </trans-unit>
1466
1885
  </body>
1467
1886
  </file>
1468
1887
  </xliff>"
1469
1888
  `;
1470
1889
 
1471
- exports[`Translate command > filter files on extract with extra vars option 15`] = `
1472
- "# %%%0%%%
1890
+ exports[`Translate command > removes no-translate directive and leaves content as is 5`] = `
1891
+ "openapi: 3.0.1
1892
+ info:
1893
+ title: '%%%0%%%'
1894
+ version: v0
1895
+ servers:
1896
+ - url: http://localhost:8080
1897
+ description: '%%%1%%%'
1898
+ paths:
1899
+ /test:
1900
+ get:
1901
+ tags:
1902
+ - test-controller
1903
+ summary: '%%%2%%%'
1904
+ description: '%%%3%%%'
1905
+ operationId: getWithPayloadResponse
1906
+ responses:
1907
+ '200':
1908
+ description: '%%%4%%%'
1909
+ content:
1910
+ application/json:
1911
+ schema:
1912
+ $ref: '#/components/schemas/RecurceTop'
1913
+ components:
1914
+ schemas:
1915
+ RecurceTop:
1916
+ type: object
1917
+ properties:
1918
+ A:
1919
+ type: string
1920
+ RecurceMiddle:
1921
+ type: object
1922
+ properties:
1923
+ B:
1924
+ type: array
1925
+ items:
1926
+ $ref: '#/components/schemas/RecurceTop'
1473
1927
  "
1474
1928
  `;
1475
1929
 
1476
- exports[`Translate command > filter files on extract with extra vars option 16`] = `
1930
+ exports[`Translate command > removes no-translate directive and leaves content as is 6`] = `
1477
1931
  "<?xml version="1.0" encoding="UTF-8"?>
1478
1932
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1479
1933
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1484,16 +1938,41 @@ exports[`Translate command > filter files on extract with extra vars option 16`]
1484
1938
  </header>
1485
1939
  <body>
1486
1940
  <trans-unit id="0">
1487
- <source xml:space="preserve">Базовая разметка</source>
1941
+ <source xml:space="preserve">OpenAPI definition</source>
1942
+ </trans-unit>
1943
+ <trans-unit id="1">
1944
+ <source xml:space="preserve">Generated server url</source>
1945
+ </trans-unit>
1946
+ <trans-unit id="2">
1947
+ <source xml:space="preserve">Simple get operation. тест новой верстки 3</source>
1948
+ </trans-unit>
1949
+ <trans-unit id="3">
1950
+ <source xml:space="preserve">Defines a simple get <x ctype="no_translate_inline" equiv-text=":no-translate[skip this]" id="x-1"/> operation with no inputs and a complex</source>
1951
+ </trans-unit>
1952
+ <trans-unit id="4">
1953
+ <source xml:space="preserve">200!!!!</source>
1488
1954
  </trans-unit>
1489
1955
  </body>
1490
1956
  </file>
1491
1957
  </xliff>"
1492
1958
  `;
1493
1959
 
1494
- exports[`Translate command > filter files on extract with extra vars option 17`] = `"# %%%0%%%"`;
1960
+ exports[`Translate command > removes no-translate directive and leaves content as is 7`] = `
1961
+ "title: '%%%0%%%'
1962
+ href: index.md
1963
+ items:
1964
+ - name: '%%%1%%%'
1965
+ href: no-translate.md
1966
+ - name: '%%%2%%%'
1967
+ include:
1968
+ path: openapi
1969
+ includers:
1970
+ - name: openapi
1971
+ input: openapi-spec.yaml
1972
+ "
1973
+ `;
1495
1974
 
1496
- exports[`Translate command > filter files on extract with extra vars option 18`] = `
1975
+ exports[`Translate command > removes no-translate directive and leaves content as is 8`] = `
1497
1976
  "<?xml version="1.0" encoding="UTF-8"?>
1498
1977
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1499
1978
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1504,35 +1983,43 @@ exports[`Translate command > filter files on extract with extra vars option 18`]
1504
1983
  </header>
1505
1984
  <body>
1506
1985
  <trans-unit id="0">
1507
- <source xml:space="preserve">Списки</source>
1986
+ <source xml:space="preserve">Test123</source>
1987
+ </trans-unit>
1988
+ <trans-unit id="1">
1989
+ <source xml:space="preserve">Не переводить</source>
1990
+ </trans-unit>
1991
+ <trans-unit id="2">
1992
+ <source xml:space="preserve">openapi</source>
1508
1993
  </trans-unit>
1509
1994
  </body>
1510
1995
  </file>
1511
1996
  </xliff>"
1512
1997
  `;
1513
1998
 
1514
- exports[`Translate command > filter files on extract with extra vars option 19`] = `
1515
- "title: '%%%0%%%'
1516
- href: index.yaml
1517
- items:
1518
- - name: '%%%1%%%'
1519
- href: index.yaml
1520
- - name: '%%%2%%%'
1521
- href: a1.md
1522
- - name: '%%%3%%%'
1523
- href: index-yfm.md
1524
- items:
1525
- - name: '%%%4%%%'
1526
- items:
1527
- - name: '%%%5%%%'
1528
- href: syntax/base.md
1529
- - name: '%%%6%%%'
1530
- href: syntax/lists.md
1531
- - name: '%%%7%%%'
1532
- "
1999
+ exports[`Translate command > skip no-translate marked content > filelist 1`] = `
2000
+ "[
2001
+ "index.md.skl",
2002
+ "index.md.xliff",
2003
+ "no-translate.md.skl",
2004
+ "no-translate.md.xliff",
2005
+ "openapi-spec.yaml.skl",
2006
+ "openapi-spec.yaml.xliff",
2007
+ "toc.yaml.skl",
2008
+ "toc.yaml.xliff"
2009
+ ]"
2010
+ `;
2011
+
2012
+ exports[`Translate command > skip no-translate marked content 1`] = `
2013
+ "## %%%0%%%
2014
+
2015
+ ::no-translate [adsfasdfasdfasdfasdf]
2016
+
2017
+ %%%1%%%
2018
+
2019
+ %%%2%%%"
1533
2020
  `;
1534
2021
 
1535
- exports[`Translate command > filter files on extract with extra vars option 20`] = `
2022
+ exports[`Translate command > skip no-translate marked content 2`] = `
1536
2023
  "<?xml version="1.0" encoding="UTF-8"?>
1537
2024
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1538
2025
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1543,41 +2030,61 @@ exports[`Translate command > filter files on extract with extra vars option 20`]
1543
2030
  </header>
1544
2031
  <body>
1545
2032
  <trans-unit id="0">
1546
- <source xml:space="preserve">Diplodoc</source>
2033
+ <source xml:space="preserve">Index header</source>
1547
2034
  </trans-unit>
1548
2035
  <trans-unit id="1">
1549
- <source xml:space="preserve">API Yandex Cloud</source>
2036
+ <source xml:space="preserve">lorem</source>
1550
2037
  </trans-unit>
1551
2038
  <trans-unit id="2">
1552
- <source xml:space="preserve">A1</source>
1553
- </trans-unit>
1554
- <trans-unit id="3">
1555
- <source xml:space="preserve">Yandex Flavored Markdown</source>
1556
- </trans-unit>
1557
- <trans-unit id="4">
1558
- <source xml:space="preserve">Синтаксис</source>
1559
- </trans-unit>
1560
- <trans-unit id="5">
1561
- <source xml:space="preserve">Базовая разметка</source>
1562
- </trans-unit>
1563
- <trans-unit id="6">
1564
- <source xml:space="preserve">Списки</source>
1565
- </trans-unit>
1566
- <trans-unit id="7">
1567
- <source xml:space="preserve">Таблицы</source>
2039
+ <source xml:space="preserve">asdfasdfasdf</source>
1568
2040
  </trans-unit>
1569
2041
  </body>
1570
2042
  </file>
1571
2043
  </xliff>"
1572
2044
  `;
1573
2045
 
1574
- exports[`Translate command > filter files on extract with extra vars option 21`] = `
1575
- "## %%%0%%%
2046
+ exports[`Translate command > skip no-translate marked content 3`] = `
2047
+ "# %%%0%%%
2048
+
2049
+ ## %%%1%%%
2050
+ :::no-translate
2051
+ ### No-translate header
2052
+ Should not be translated.
2053
+ Can use **markup** inside.
2054
+ :::
2055
+
2056
+ ## %%%2%%%
2057
+
2058
+ ::no-translate [## /usr/local/bin/application]
2059
+ ::no-translate[**C:/Program Files/Application/config.ini**]
2060
+ ::no-translate [~/Documents/project/src/main.rs]
1576
2061
 
1577
- %%%1%%% %%%2%%%"
2062
+
2063
+ - :no-translate[GET /api/v1/users] %%%3%%%
2064
+ - :no-translate[POST /api/v1/auth/login] %%%4%%%
2065
+ - :no-translate[PUT /api/v1/users/{id}] %%%5%%%
2066
+
2067
+ ## %%%6%%%
2068
+ %%%7%%%
2069
+ :no-translate[The default port is unless specified.] %%%8%%%
2070
+ %%%9%%%
2071
+
2072
+ ## %%%10%%%
2073
+ %%%11%%%
2074
+ %%%12%%%
2075
+ %%%13%%%
2076
+
2077
+ ## %%%14%%%
2078
+ %%%15%%%
2079
+
2080
+ ## %%%16%%%
2081
+ %%%17%%%
2082
+
2083
+
2084
+ "
1578
2085
  `;
1579
2086
 
1580
- exports[`Translate command > filter files on extract with extra vars option 22`] = `
2087
+ exports[`Translate command > skip no-translate marked content 4`] = `
1581
2088
  "<?xml version="1.0" encoding="UTF-8"?>
1582
2089
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1583
2090
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1588,22 +2095,105 @@ exports[`Translate command > filter files on extract with extra vars option 22`]
1588
2095
  </header>
1589
2096
  <body>
1590
2097
  <trans-unit id="0">
1591
- <source xml:space="preserve">No var page</source>
2098
+ <source xml:space="preserve">No-translate directive</source>
1592
2099
  </trans-unit>
1593
2100
  <trans-unit id="1">
1594
- <source xml:space="preserve">This page might be translated or not.</source>
2101
+ <source xml:space="preserve">Block directive</source>
1595
2102
  </trans-unit>
1596
2103
  <trans-unit id="2">
1597
- <source xml:space="preserve">Depends on --strict-vars option.</source>
2104
+ <source xml:space="preserve">Leaf directive</source>
2105
+ </trans-unit>
2106
+ <trans-unit id="3">
2107
+ <source xml:space="preserve">— get all users</source>
2108
+ </trans-unit>
2109
+ <trans-unit id="4">
2110
+ <source xml:space="preserve">— authorization</source>
2111
+ </trans-unit>
2112
+ <trans-unit id="5">
2113
+ <source xml:space="preserve">— update users data</source>
2114
+ </trans-unit>
2115
+ <trans-unit id="6">
2116
+ <source xml:space="preserve">Simple case leaf</source>
2117
+ </trans-unit>
2118
+ <trans-unit id="7">
2119
+ <source xml:space="preserve">Install using command.</source>
2120
+ </trans-unit>
2121
+ <trans-unit id="8">
2122
+ <source xml:space="preserve">Next sentence.</source>
2123
+ </trans-unit>
2124
+ <trans-unit id="9">
2125
+ <source xml:space="preserve">Set NODE_ENV=production for production builds.</source>
2126
+ </trans-unit>
2127
+ <trans-unit id="10">
2128
+ <source xml:space="preserve">Simple case inline</source>
2129
+ </trans-unit>
2130
+ <trans-unit id="11">
2131
+ <source xml:space="preserve">Install using <x ctype="no_translate_inline" equiv-text=":no-translate[npm install @company/package]" id="x-2"/> command.</source>
2132
+ </trans-unit>
2133
+ <trans-unit id="12">
2134
+ <source xml:space="preserve">The default port is <x ctype="no_translate_inline" equiv-text=":no-translate[8080]" id="x-3"/> unless specified.</source>
2135
+ </trans-unit>
2136
+ <trans-unit id="13">
2137
+ <source xml:space="preserve">Set <x ctype="no_translate_inline" equiv-text=":no-translate[NODE_ENV=production]" id="x-4"/> for production builds.</source>
2138
+ </trans-unit>
2139
+ <trans-unit id="14">
2140
+ <source xml:space="preserve">Few inline directives</source>
2141
+ </trans-unit>
2142
+ <trans-unit id="15">
2143
+ <source xml:space="preserve">Use <x ctype="no_translate_inline" equiv-text=":no-translate[**GET /api/v1/users**]" id="x-5"/> to list users and <x ctype="no_translate_inline" equiv-text=":no-translate[POST /api/v1/users]" id="x-6"/> to create.</source>
2144
+ </trans-unit>
2145
+ <trans-unit id="16">
2146
+ <source xml:space="preserve">Empty inline directive</source>
2147
+ </trans-unit>
2148
+ <trans-unit id="17">
2149
+ <source xml:space="preserve">This is text with empty <x ctype="no_translate_inline" equiv-text=":no-translate[]" id="x-7"/> directive.</source>
1598
2150
  </trans-unit>
1599
2151
  </body>
1600
2152
  </file>
1601
2153
  </xliff>"
1602
2154
  `;
1603
2155
 
1604
- exports[`Translate command > filter files on extract with extra vars option 23`] = `"## %%%0%%%"`;
2156
+ exports[`Translate command > skip no-translate marked content 5`] = `
2157
+ "openapi: 3.0.1
2158
+ info:
2159
+ title: '%%%0%%%'
2160
+ version: v0
2161
+ servers:
2162
+ - url: http://localhost:8080
2163
+ description: '%%%1%%%'
2164
+ paths:
2165
+ /test:
2166
+ get:
2167
+ tags:
2168
+ - test-controller
2169
+ summary: '%%%2%%%'
2170
+ description: '%%%3%%%'
2171
+ operationId: getWithPayloadResponse
2172
+ responses:
2173
+ '200':
2174
+ description: '%%%4%%%'
2175
+ content:
2176
+ application/json:
2177
+ schema:
2178
+ $ref: '#/components/schemas/RecurceTop'
2179
+ components:
2180
+ schemas:
2181
+ RecurceTop:
2182
+ type: object
2183
+ properties:
2184
+ A:
2185
+ type: string
2186
+ RecurceMiddle:
2187
+ type: object
2188
+ properties:
2189
+ B:
2190
+ type: array
2191
+ items:
2192
+ $ref: '#/components/schemas/RecurceTop'
2193
+ "
2194
+ `;
1605
2195
 
1606
- exports[`Translate command > filter files on extract with extra vars option 24`] = `
2196
+ exports[`Translate command > skip no-translate marked content 6`] = `
1607
2197
  "<?xml version="1.0" encoding="UTF-8"?>
1608
2198
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1609
2199
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1614,29 +2204,41 @@ exports[`Translate command > filter files on extract with extra vars option 24`]
1614
2204
  </header>
1615
2205
  <body>
1616
2206
  <trans-unit id="0">
1617
- <source xml:space="preserve">Excluded title</source>
2207
+ <source xml:space="preserve">OpenAPI definition</source>
2208
+ </trans-unit>
2209
+ <trans-unit id="1">
2210
+ <source xml:space="preserve">Generated server url</source>
2211
+ </trans-unit>
2212
+ <trans-unit id="2">
2213
+ <source xml:space="preserve">Simple get operation. тест новой верстки 3</source>
2214
+ </trans-unit>
2215
+ <trans-unit id="3">
2216
+ <source xml:space="preserve">Defines a simple get <x ctype="no_translate_inline" equiv-text=":no-translate[skip this]" id="x-1"/> operation with no inputs and a complex</source>
2217
+ </trans-unit>
2218
+ <trans-unit id="4">
2219
+ <source xml:space="preserve">200!!!!</source>
1618
2220
  </trans-unit>
1619
2221
  </body>
1620
2222
  </file>
1621
2223
  </xliff>"
1622
2224
  `;
1623
2225
 
1624
- exports[`Translate command > filter files on extract with extra vars option 25`] = `
2226
+ exports[`Translate command > skip no-translate marked content 7`] = `
1625
2227
  "title: '%%%0%%%'
1626
2228
  href: index.md
1627
2229
  items:
1628
2230
  - name: '%%%1%%%'
1629
- href: aboba.md
2231
+ href: no-translate.md
1630
2232
  - name: '%%%2%%%'
1631
- href: _no-translate/exclude.md
1632
- - name: '%%%3%%%'
1633
- href: no-var-page.md
1634
- - name: '%%%4%%%'
1635
- href: to-be-excluded.md
2233
+ include:
2234
+ path: openapi
2235
+ includers:
2236
+ - name: openapi
2237
+ input: openapi-spec.yaml
1636
2238
  "
1637
2239
  `;
1638
2240
 
1639
- exports[`Translate command > filter files on extract with extra vars option 26`] = `
2241
+ exports[`Translate command > skip no-translate marked content 8`] = `
1640
2242
  "<?xml version="1.0" encoding="UTF-8"?>
1641
2243
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1642
2244
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1650,16 +2252,10 @@ exports[`Translate command > filter files on extract with extra vars option 26`]
1650
2252
  <source xml:space="preserve">Test123</source>
1651
2253
  </trans-unit>
1652
2254
  <trans-unit id="1">
1653
- <source xml:space="preserve">Aboba</source>
1654
- </trans-unit>
1655
- <trans-unit id="2">
1656
2255
  <source xml:space="preserve">Не переводить</source>
1657
2256
  </trans-unit>
1658
- <trans-unit id="3">
1659
- <source xml:space="preserve">Нет переменной в vars</source>
1660
- </trans-unit>
1661
- <trans-unit id="4">
1662
- <source xml:space="preserve">exclude-test</source>
2257
+ <trans-unit id="2">
2258
+ <source xml:space="preserve">openapi</source>
1663
2259
  </trans-unit>
1664
2260
  </body>
1665
2261
  </file>