@diplodoc/cli-tests 0.0.0-rc-toc-translation-202506261401 → 0.0.0-rc-liquid-conditions-saving-202509050811

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 (106) hide show
  1. package/e2e/__snapshots__/generate-map.spec.ts.snap +345 -0
  2. package/e2e/__snapshots__/include-toc.test.ts.snap +8 -0
  3. package/e2e/__snapshots__/load-custom-resources.spec.ts.snap +68 -56
  4. package/e2e/__snapshots__/metadata.spec.ts.snap +31 -23
  5. package/e2e/__snapshots__/preprocess.test.ts.snap +549 -0
  6. package/e2e/__snapshots__/regression.test.ts.snap +197 -142
  7. package/e2e/__snapshots__/rtl.spec.ts.snap +51 -41
  8. package/e2e/__snapshots__/search.test.ts.snap +86 -0
  9. package/e2e/__snapshots__/skip-html-extension.spec.ts.snap +211 -0
  10. package/e2e/__snapshots__/translation.spec.ts.snap +2138 -1026
  11. package/e2e/errors.spec.ts +33 -2
  12. package/e2e/generate-map.spec.ts +9 -3
  13. package/e2e/preprocess.test.ts +33 -0
  14. package/e2e/redirects-validation.spec.ts +61 -0
  15. package/e2e/search.test.ts +15 -0
  16. package/e2e/skip-html-extension.spec.ts +15 -0
  17. package/e2e/translation.spec.ts +73 -3
  18. package/fixtures/cliAdapter.ts +23 -0
  19. package/fixtures/globals.d.ts +4 -0
  20. package/fixtures/runners/binary.ts +4 -3
  21. package/fixtures/runners/types.ts +1 -2
  22. package/fixtures/utils/file.ts +5 -5
  23. package/fixtures/utils/test.ts +18 -8
  24. package/mocks/docs-viewer-interface/input/.yfm +6 -0
  25. package/mocks/docs-viewer-interface/input/index.md +3 -0
  26. package/mocks/docs-viewer-interface/input/toc.yaml +5 -0
  27. package/mocks/errors/extract-filtered-link/input/filtered.md +1 -0
  28. package/mocks/errors/extract-filtered-link/input/filtered2.md +0 -0
  29. package/mocks/errors/extract-filtered-link/input/index.md +7 -0
  30. package/mocks/errors/extract-filtered-link/input/toc.yaml +1 -0
  31. package/mocks/load-custom-resources/md2html-with-resources/input/page.md +9 -2
  32. package/mocks/load-custom-resources/md2md-with-resources/input/page.md +9 -2
  33. package/mocks/load-custom-resources/single-page-with-resources/input/page.md +9 -2
  34. package/mocks/metadata/md2html-with-metadata/input/page.md +8 -1
  35. package/mocks/metadata/md2md-with-metadata/input/page.md +7 -0
  36. package/mocks/preprocess/input/.yfm +1 -0
  37. package/mocks/preprocess/input/1.md +29 -0
  38. package/mocks/preprocess/input/_assets/1.png +0 -0
  39. package/mocks/preprocess/input/_assets/1.svg +0 -0
  40. package/mocks/preprocess/input/autotitle.md +23 -0
  41. package/mocks/preprocess/input/commented-include.md +3 -0
  42. package/mocks/preprocess/input/images.md +5 -0
  43. package/mocks/preprocess/input/included-item.md +12 -0
  44. package/mocks/preprocess/input/includes/deep.md +1 -0
  45. package/mocks/preprocess/input/includes/deepWithIndent.md +6 -0
  46. package/mocks/preprocess/input/includes/presets.yaml +2 -0
  47. package/mocks/preprocess/input/includes/sub/user.md +1 -0
  48. package/mocks/preprocess/input/includes/sub/userWithIndent.md +5 -0
  49. package/mocks/preprocess/input/includes/test.md +1 -0
  50. package/mocks/preprocess/input/includes/user.md +1 -0
  51. package/mocks/preprocess/input/includes.md +18 -0
  52. package/mocks/preprocess/input/latex.md +3 -0
  53. package/mocks/preprocess/input/mermaid.md +13 -0
  54. package/mocks/preprocess/input/presets.yaml +8 -0
  55. package/mocks/preprocess/input/sub/folder/item-1.md +7 -0
  56. package/mocks/preprocess/input/sub/toc.yaml +5 -0
  57. package/mocks/preprocess/input/toc-i.yaml +3 -0
  58. package/mocks/preprocess/input/toc.yaml +16 -0
  59. package/mocks/redirects-validation/extensions-deprecation/input/blah.md +0 -0
  60. package/mocks/redirects-validation/extensions-deprecation/input/redirects.yaml +5 -0
  61. package/mocks/redirects-validation/extensions-deprecation/input/toc.yaml +4 -0
  62. package/mocks/redirects-validation/invalid-regex/input/blah.md +0 -0
  63. package/mocks/redirects-validation/invalid-regex/input/redirects.yaml +3 -0
  64. package/mocks/redirects-validation/invalid-regex/input/toc.yaml +4 -0
  65. package/mocks/redirects-validation/malformed-redirect/input/blah.md +0 -0
  66. package/mocks/redirects-validation/malformed-redirect/input/redirects.yaml +6 -0
  67. package/mocks/redirects-validation/malformed-redirect/input/toc.yaml +4 -0
  68. package/mocks/redirects-validation/same-path/input/blah.md +0 -0
  69. package/mocks/redirects-validation/same-path/input/redirects.yaml +3 -0
  70. package/mocks/redirects-validation/same-path/input/toc.yaml +4 -0
  71. package/mocks/redirects-validation/unparseable/input/blah.md +0 -0
  72. package/mocks/redirects-validation/unparseable/input/redirects.yaml +11 -0
  73. package/mocks/redirects-validation/unparseable/input/toc.yaml +4 -0
  74. package/mocks/regression/input/.yfm +2 -0
  75. package/mocks/regression/input/images.md +2 -0
  76. package/mocks/regression/input/includes/deep.md +2 -0
  77. package/mocks/regression/input/includes/presets.yaml +1 -0
  78. package/mocks/regression/input/includes/tools.md +1 -0
  79. package/mocks/regression/input/includes.md +5 -0
  80. package/mocks/regression/input/merge/merge.md +2 -0
  81. package/mocks/regression/input/merge/presets.yaml +1 -0
  82. package/mocks/regression/input/merge/toc.yaml +2 -0
  83. package/mocks/regression/input/presets.yaml +1 -0
  84. package/mocks/regression/input/toc.yaml +2 -0
  85. package/mocks/search/input/.yfm +12 -0
  86. package/mocks/search/input/index.md +3 -0
  87. package/mocks/search/input/toc.yaml +1 -0
  88. package/mocks/skip-html-extension/input/.yfm +1 -0
  89. package/mocks/skip-html-extension/input/folder/index.md +1 -0
  90. package/mocks/skip-html-extension/input/index-test-html/index.md +4 -0
  91. package/mocks/skip-html-extension/input/index.md +6 -0
  92. package/mocks/skip-html-extension/input/page1.md +3 -0
  93. package/mocks/skip-html-extension/input/page2.md +6 -0
  94. package/mocks/skip-html-extension/input/toc.yaml +13 -0
  95. package/mocks/translation/conditions/input/index.md +37 -0
  96. package/mocks/translation/dir-files/input/ru/nested/syntax/base.md +2 -0
  97. package/mocks/translation/no-translate/input/index.md +7 -0
  98. package/mocks/translation/no-translate/input/no-translate.md +57 -0
  99. package/mocks/translation/no-translate/input/openapi-spec.yaml +37 -0
  100. package/mocks/translation/no-translate/input/toc.yaml +11 -0
  101. package/mocks/translation/openapi/input/openapi-spec.yaml +42 -0
  102. package/mocks/translation/openapi/input/toc.yaml +8 -0
  103. package/mocks/warning/unreachable-autotitle/input/index.md +1 -0
  104. package/mocks/warning/unreachable-autotitle/input/link.md +0 -0
  105. package/mocks/warning/unreachable-autotitle/input/toc.yaml +4 -0
  106. package/package.json +5 -5
@@ -1,494 +1,713 @@
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
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
21
+
22
+ adsfasdfasdfasdfasdf
23
+
24
+ lorem
25
+
26
+ asdfasdfasdf"
27
+ `;
28
+
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
+
88
+ "
89
+ `;
90
+
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."
272
+ `;
273
+
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
292
+ items:
293
+ - name: Не переводить
294
+ href: no-translate.md
295
+ - name: openapi
42
296
  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
297
+ - name: Overview
298
+ href: openapi/index.md
299
+ - name: test-controller
300
+ items:
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
139
306
  "
140
307
  `;
141
308
 
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>"
309
+ exports[`Translate command > build translated static files and remove no-translate directives > filelist 1`] = `
310
+ "[
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"
317
+ ]"
318
+ `;
319
+
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
327
+
328
+ adsfasdfasdfasdfasdf
329
+
330
+ lorem
331
+
332
+ asdfasdfasdf"
251
333
  `;
252
334
 
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
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
342
+
343
+ ## Block directive
344
+ ### No-translate header
345
+
346
+ :::html-block
347
+ testsetsets
348
+ :::
349
+
350
+ ::: any-other-directive
351
+ content test
352
+ :::
353
+
354
+ Should not be translated.
355
+ Can use **markup** inside.
356
+
357
+
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
+
285
394
  "
286
395
  `;
287
396
 
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>"
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
+
490
+
491
+ {% endcut %}
492
+
493
+ <!-- markdownlint-disable-file -->"
325
494
  `;
326
495
 
327
- exports[`Translate command > extract yaml scheme files 5`] = `
328
- "title: '%%%0%%%'
329
- href: index.yaml
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."
578
+ `;
579
+
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
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
330
598
  items:
331
- - name: '%%%4%%%'
332
- - href: index-direct.yaml
333
- navigation:
334
- header:
335
- leftItems:
336
- - text: '%%%2%%%'
337
- type: dropdown
599
+ - name: Не переводить
600
+ href: no-translate.md
601
+ - name: openapi
602
+ items:
603
+ - name: Overview
604
+ href: openapi/index.md
605
+ - name: test-controller
338
606
  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%%%'
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
347
612
  "
348
613
  `;
349
614
 
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`] = `
615
+ exports[`Translate command > do not filter files on extract > filelist 1`] = `
381
616
  "[
382
617
  "es/_includes/test.md.skl",
383
618
  "es/_includes/test.md.xliff",
619
+ "es/_no-translate/exclude.md.skl",
620
+ "es/_no-translate/exclude.md.xliff",
384
621
  "es/aboba.md.skl",
385
622
  "es/aboba.md.xliff",
386
623
  "es/index.md.skl",
387
624
  "es/index.md.xliff",
388
625
  "es/nested/a1.md.skl",
389
626
  "es/nested/a1.md.xliff",
627
+ "es/nested/folder1/a1.md.skl",
628
+ "es/nested/folder1/a1.md.xliff",
629
+ "es/nested/folder1/toc-i.yaml.skl",
630
+ "es/nested/folder1/toc-i.yaml.xliff",
390
631
  "es/nested/index-yfm.md.skl",
391
632
  "es/nested/index-yfm.md.xliff",
392
633
  "es/nested/index.yaml.skl",
393
634
  "es/nested/index.yaml.xliff",
635
+ "es/nested/not-in-toc.md.skl",
636
+ "es/nested/not-in-toc.md.xliff",
394
637
  "es/nested/syntax/base.md.skl",
395
638
  "es/nested/syntax/base.md.xliff",
639
+ "es/nested/syntax/index.md.skl",
640
+ "es/nested/syntax/index.md.xliff",
396
641
  "es/nested/syntax/lists.md.skl",
397
642
  "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"
406
- ]"
407
- `;
408
-
409
- exports[`Translate command > filter files on extract 1`] = `"## %%%0%%%"`;
410
-
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>"
427
- `;
428
-
429
- exports[`Translate command > filter files on extract 3`] = `
430
- "## %%%0%%%
431
-
432
- <!-- [ссылка на файл не в toc.yaml](./aboba-not-in-toc.md) -->
433
-
434
- {% include [%%%1%%%](./_includes/test.md) %}"
435
- `;
436
-
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
- `;
457
-
458
- exports[`Translate command > filter files on extract 5`] = `
459
- "## %%%0%%%
460
-
461
- %%%1%%%"
462
- `;
463
-
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>"
643
+ "es/nested/toc.yaml.skl",
644
+ "es/nested/toc.yaml.xliff",
645
+ "es/no-var-page.md.skl",
646
+ "es/no-var-page.md.xliff",
647
+ "es/not-in-toc.md.skl",
648
+ "es/not-in-toc.md.xliff",
649
+ "es/to-be-excluded.md.skl",
650
+ "es/to-be-excluded.md.xliff",
651
+ "es/toc.yaml.skl",
652
+ "es/toc.yaml.xliff"
653
+ ]"
483
654
  `;
484
655
 
485
- exports[`Translate command > filter files on extract 7`] = `
486
- "## %%%0%%%
656
+ exports[`Translate command > extract openapi spec files > filelist 1`] = `
657
+ "[
658
+ "openapi-spec.yaml.skl",
659
+ "openapi-spec.yaml.xliff",
660
+ "toc.yaml.skl",
661
+ "toc.yaml.xliff"
662
+ ]"
663
+ `;
487
664
 
488
- %%%1%%%"
665
+ exports[`Translate command > extract openapi spec files 1`] = `
666
+ "openapi: 3.0.1
667
+ info:
668
+ title: '%%%0%%%'
669
+ version: v0
670
+ servers:
671
+ - url: http://localhost:8080
672
+ description: '%%%1%%%'
673
+ paths:
674
+ /test:
675
+ get:
676
+ tags:
677
+ - test-controller
678
+ summary: '%%%2%%%'
679
+ description: '%%%3%%%'
680
+ operationId: getWithPayloadResponse
681
+ responses:
682
+ '200':
683
+ description: '%%%4%%%'
684
+ content:
685
+ application/json:
686
+ schema:
687
+ $ref: '#/components/schemas/RecurceTop'
688
+ components:
689
+ schemas:
690
+ RecurceTop:
691
+ type: object
692
+ properties:
693
+ A:
694
+ type: string
695
+ description: |
696
+ %%%5%%%
697
+ - %%%6%%%
698
+ - %%%7%%%
699
+ - %%%8%%%
700
+ RecurceMiddle:
701
+ type: object
702
+ properties:
703
+ B:
704
+ type: array
705
+ items:
706
+ $ref: '#/components/schemas/RecurceTop'
707
+ "
489
708
  `;
490
709
 
491
- exports[`Translate command > filter files on extract 8`] = `
710
+ exports[`Translate command > extract openapi spec files 2`] = `
492
711
  "<?xml version="1.0" encoding="UTF-8"?>
493
712
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
494
713
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -499,23 +718,50 @@ exports[`Translate command > filter files on extract 8`] = `
499
718
  </header>
500
719
  <body>
501
720
  <trans-unit id="0">
502
- <source xml:space="preserve">Included A1</source>
721
+ <source xml:space="preserve">OpenAPI definition</source>
503
722
  </trans-unit>
504
723
  <trans-unit id="1">
505
- <source xml:space="preserve">TEST</source>
724
+ <source xml:space="preserve">Generated server url</source>
725
+ </trans-unit>
726
+ <trans-unit id="2">
727
+ <source xml:space="preserve">Simple get operation. тест новой верстки 3</source>
728
+ </trans-unit>
729
+ <trans-unit id="3">
730
+ <source xml:space="preserve">Defines a simple get operation with no inputs and a complex</source>
731
+ </trans-unit>
732
+ <trans-unit id="4">
733
+ <source xml:space="preserve">200!!!!</source>
734
+ </trans-unit>
735
+ <trans-unit id="5">
736
+ <source xml:space="preserve">Статус загрузки:</source>
737
+ </trans-unit>
738
+ <trans-unit id="6">
739
+ <source xml:space="preserve"><x ctype="code_open" equiv-text="\`" id="x-1"/>UPLOADED<x ctype="code_close" equiv-text="\`" id="x-2"/> — загрузка завершена.</source>
740
+ </trans-unit>
741
+ <trans-unit id="7">
742
+ <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>
743
+ </trans-unit>
744
+ <trans-unit id="8">
745
+ <source xml:space="preserve"><x ctype="code_open" equiv-text="\`" id="x-5"/>PROCESSED<x ctype="code_close" equiv-text="\`" id="x-6"/> — загрузка успешно обработана.</source>
506
746
  </trans-unit>
507
747
  </body>
508
748
  </file>
509
749
  </xliff>"
510
750
  `;
511
751
 
512
- exports[`Translate command > filter files on extract 9`] = `
513
- "# %%%0%%%
514
-
752
+ exports[`Translate command > extract openapi spec files 3`] = `
753
+ "items:
754
+ - name: '%%%0%%%'
755
+ include:
756
+ path: openapi
757
+ includers:
758
+ - name: openapi
759
+ input: openapi-spec.yaml
760
+ mode: link
515
761
  "
516
762
  `;
517
763
 
518
- exports[`Translate command > filter files on extract 10`] = `
764
+ exports[`Translate command > extract openapi spec files 4`] = `
519
765
  "<?xml version="1.0" encoding="UTF-8"?>
520
766
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
521
767
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -526,39 +772,93 @@ exports[`Translate command > filter files on extract 10`] = `
526
772
  </header>
527
773
  <body>
528
774
  <trans-unit id="0">
529
- <source xml:space="preserve">Yandex Flavored Markdown</source>
775
+ <source xml:space="preserve">openapi</source>
530
776
  </trans-unit>
531
777
  </body>
532
778
  </file>
533
779
  </xliff>"
534
780
  `;
535
781
 
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
558
- "
782
+ exports[`Translate command > extract openapi spec files 5`] = `
783
+ "<div class="openapi">
784
+
785
+ # %%%0%%%
786
+
787
+ %%%1%%%
788
+
789
+ ## %%%2%%%
790
+
791
+ <div class="openapi__requests">
792
+
793
+ <div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-get);margin-bottom: 12px">
794
+
795
+ <div class="openapi__request">
796
+
797
+ %%%3%%% {.openapi__method}
798
+ \`\`\`text translate=no
799
+ http://localhost:8080/test
800
+ \`\`\`
801
+
802
+
803
+
804
+ </div>
805
+
806
+ %%%4%%%
807
+
808
+ </div>
809
+
810
+ </div>
811
+
812
+ ## %%%5%%%
813
+
814
+ <div class="openapi__response__code__200">
815
+
816
+ ## %%%6%%%
817
+
818
+ %%%7%%%
819
+
820
+ <div class="openapi-entity">
821
+
822
+ ### %%%8%%%
823
+
824
+ {% cut "%%%9%%%" %}
825
+
826
+
827
+ \`\`\`json translate=no
828
+ {
829
+ "A": "string"
830
+ }
831
+ \`\`\`
832
+
833
+
834
+ {% endcut %}
835
+
836
+
837
+ #|||
838
+ %%%10%%%
839
+ |
840
+ %%%11%%%
841
+ ||
842
+
843
+ ||
844
+ %%%12%%% {.openapi-table-parameter-name}
845
+ |
846
+ %%%13%%%
847
+ |||#
848
+
849
+ </div>
850
+
851
+ </div>
852
+ <!-- markdownlint-disable-file -->
853
+
854
+ </div>
855
+
856
+
857
+
858
+ [*Deprecated]: %%%14%%%"
559
859
  `;
560
860
 
561
- exports[`Translate command > filter files on extract 12`] = `
861
+ exports[`Translate command > extract openapi spec files 6`] = `
562
862
  "<?xml version="1.0" encoding="UTF-8"?>
563
863
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
564
864
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -569,55 +869,66 @@ exports[`Translate command > filter files on extract 12`] = `
569
869
  </header>
570
870
  <body>
571
871
  <trans-unit id="0">
572
- <source xml:space="preserve">Diplodoc</source>
872
+ <source xml:space="preserve">Simple get operation. тест новой верстки 3</source>
573
873
  </trans-unit>
574
874
  <trans-unit id="1">
575
- <source xml:space="preserve">Diplodoc - платформа работы с документацией в парадигме Documentation as a Code.</source>
875
+ <source xml:space="preserve">Defines a simple get operation with no inputs and a complex</source>
576
876
  </trans-unit>
577
877
  <trans-unit id="2">
578
- <source xml:space="preserve">Метаданные</source>
878
+ <source xml:space="preserve">Request</source>
579
879
  </trans-unit>
580
880
  <trans-unit id="3">
581
- <source xml:space="preserve">API Yandex Cloud</source>
881
+ <source xml:space="preserve">GET</source>
582
882
  </trans-unit>
583
883
  <trans-unit id="4">
584
- <source xml:space="preserve">Архитектура API Yandex Cloud (урезанная)</source>
884
+ <source xml:space="preserve">Generated server url</source>
585
885
  </trans-unit>
586
886
  <trans-unit id="5">
587
- <source xml:space="preserve">API Yandex Cloud Абсолют</source>
887
+ <source xml:space="preserve">Responses</source>
588
888
  </trans-unit>
589
889
  <trans-unit id="6">
590
- <source xml:space="preserve">Архитектура API Yandex Cloud (урезанная) с абсолютным путем</source>
890
+ <source xml:space="preserve">200 OK</source>
591
891
  </trans-unit>
592
892
  <trans-unit id="7">
593
- <source xml:space="preserve">Обзор системы</source>
893
+ <source xml:space="preserve">200!!!!</source>
594
894
  </trans-unit>
595
895
  <trans-unit id="8">
596
- <source xml:space="preserve">Описание платформы, ее основные возможности, особенности и преимущества.</source>
896
+ <source xml:space="preserve">Body</source>
597
897
  </trans-unit>
598
898
  <trans-unit id="9">
599
- <source xml:space="preserve">Как попробовать</source>
899
+ <source xml:space="preserve">application/json</source>
600
900
  </trans-unit>
601
901
  <trans-unit id="10">
602
- <source xml:space="preserve" чего начать работу</source>
902
+ <source xml:space="preserve"><g ctype="bold" equiv-text="**{{text}}**" id="g-4" x-begin="**" x-end="**">Name</g></source>
603
903
  </trans-unit>
604
904
  <trans-unit id="11">
605
- <source xml:space="preserve">Yandex Flavored Markdown</source>
905
+ <source xml:space="preserve"><g ctype="bold" equiv-text="**{{text}}**" id="g-5" x-begin="**" x-end="**">Description</g></source>
606
906
  </trans-unit>
607
907
  <trans-unit id="12">
608
- <source xml:space="preserve">Описание языка Yandex Flavored Markdown.</source>
908
+ <source xml:space="preserve">A</source>
909
+ </trans-unit>
910
+ <trans-unit id="13">
911
+ <source xml:space="preserve"><g ctype="bold" equiv-text="**{{text}}**" id="g-6" x-begin="**" x-end="**">Type:</g> string</source>
912
+ </trans-unit>
913
+ <trans-unit id="14">
914
+ <source xml:space="preserve">No longer supported, please use an alternative and newer version.</source>
609
915
  </trans-unit>
610
916
  </body>
611
917
  </file>
612
918
  </xliff>"
613
919
  `;
614
920
 
615
- exports[`Translate command > filter files on extract 13`] = `
921
+ exports[`Translate command > extract openapi spec files 7`] = `
616
922
  "# %%%0%%%
617
- "
923
+
924
+ ## %%%1%%%
925
+
926
+ - %%%2%%%
927
+
928
+ <!-- markdownlint-disable-file -->"
618
929
  `;
619
930
 
620
- exports[`Translate command > filter files on extract 14`] = `
931
+ exports[`Translate command > extract openapi spec files 8`] = `
621
932
  "<?xml version="1.0" encoding="UTF-8"?>
622
933
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
623
934
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -628,16 +939,31 @@ exports[`Translate command > filter files on extract 14`] = `
628
939
  </header>
629
940
  <body>
630
941
  <trans-unit id="0">
631
- <source xml:space="preserve">Базовая разметка</source>
942
+ <source xml:space="preserve">test-controller</source>
943
+ </trans-unit>
944
+ <trans-unit id="1">
945
+ <source xml:space="preserve">Endpoints</source>
946
+ </trans-unit>
947
+ <trans-unit id="2">
948
+ <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>
632
949
  </trans-unit>
633
950
  </body>
634
951
  </file>
635
952
  </xliff>"
636
953
  `;
637
954
 
638
- exports[`Translate command > filter files on extract 15`] = `"# %%%0%%%"`;
955
+ exports[`Translate command > extract openapi spec files 9`] = `
956
+ "items:
957
+ - name: '%%%0%%%'
958
+ include:
959
+ path: openapi
960
+ includers:
961
+ - name: openapi
962
+ input: openapi-spec.yaml
963
+ "
964
+ `;
639
965
 
640
- exports[`Translate command > filter files on extract 16`] = `
966
+ exports[`Translate command > extract openapi spec files 10`] = `
641
967
  "<?xml version="1.0" encoding="UTF-8"?>
642
968
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
643
969
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -648,38 +974,219 @@ exports[`Translate command > filter files on extract 16`] = `
648
974
  </header>
649
975
  <body>
650
976
  <trans-unit id="0">
651
- <source xml:space="preserve">Списки</source>
977
+ <source xml:space="preserve">openapi</source>
652
978
  </trans-unit>
653
979
  </body>
654
980
  </file>
655
981
  </xliff>"
656
982
  `;
657
983
 
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
984
+ exports[`Translate command > extract yaml scheme files > en/index.yaml.skl 1`] = `
985
+ "blocks:
986
+ - type: content-layout-block
987
+ textWidth: l
988
+ textContent:
989
+ title: '%%%0%%%'
990
+ text: |2-
991
+ %%%1%%%
992
+ - %%%2%%%
993
+ - %%%3%%%
994
+
995
+ - type: card-layout-block
996
+ colSizes:
997
+ all: 12
998
+ lg: 4
999
+ md: 6
1000
+ sm: 12
1001
+ xl: 4
1002
+ indent:
1003
+ bottom: xs
1004
+ title: '%%%4%%%'
1005
+ animated: false
1006
+ children:
1007
+ - type: basic-card
1008
+ title: '%%%5%%%'
1009
+ text: '%%%6%%%'
1010
+ urlTitle: '%%%7%%%'
1011
+ border: shadow
1012
+ controlPosition: content
1013
+ url: management/index
1014
+ target: ''
1015
+ animated: false
1016
+ "
1017
+ `;
1018
+
1019
+ exports[`Translate command > extract yaml scheme files > en/index.yaml.xliff 1`] = `
1020
+ "<?xml version="1.0" encoding="UTF-8"?>
1021
+ <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1022
+ <file original="file.ext" source-language="ru-RU" target-language="en-US" datatype="markdown">
1023
+ <header>
1024
+ <skeleton>
1025
+ <external-file href="file.skl"></external-file>
1026
+ </skeleton>
1027
+ </header>
1028
+ <body>
1029
+ <trans-unit id="0">
1030
+ <source xml:space="preserve">Введение</source>
1031
+ </trans-unit>
1032
+ <trans-unit id="1">
1033
+ <source xml:space="preserve">API сервиса: - Управлять счетчиками, их настройками и правами доступа, не используя веб-интерфейс.</source>
1034
+ </trans-unit>
1035
+ <trans-unit id="2">
1036
+ <source xml:space="preserve">Получать информацию о посещаемости сайта и другие данные.</source>
1037
+ </trans-unit>
1038
+ <trans-unit id="3">
1039
+ <source xml:space="preserve">Формировать отчеты, в том числе с помощью сегментации и параметризации.</source>
1040
+ </trans-unit>
1041
+ <trans-unit id="4">
1042
+ <source xml:space="preserve">Виды API</source>
1043
+ </trans-unit>
1044
+ <trans-unit id="5">
1045
+ <source xml:space="preserve">API управления</source>
1046
+ </trans-unit>
1047
+ <trans-unit id="6">
1048
+ <source xml:space="preserve">Управление счетчиками, целями, фильтрами и другими объектами Сервиса (например, создать счетчик, отредактировать его настройки, создать цель, выдать права доступа).</source>
1049
+ </trans-unit>
1050
+ <trans-unit id="7">
1051
+ <source xml:space="preserve">API управления</source>
1052
+ </trans-unit>
1053
+ </body>
1054
+ </file>
1055
+ </xliff>"
1056
+ `;
1057
+
1058
+ exports[`Translate command > extract yaml scheme files > en/index-direct.yaml.skl 1`] = `
1059
+ "meta:
1060
+ title: '%%%0%%%'
1061
+ description: '%%%1%%%'
1062
+ fullScreen: true
1063
+ blocks:
1064
+ - type: header-block
1065
+ title: <div class="u-breadcrumbs"></div>
1066
+ breadcrumbs:
1067
+ items:
1068
+ - text: '%%%2%%%'
1069
+ url: https://site.ru/support/
1070
+ - text: '%%%3%%%'
1071
+ url: https://site.ru/support/adv/
1072
+ - type: filter-block
1073
+ centered: false
1074
+ title:
1075
+ text: '%%%4%%%'
1076
+ tags:
1077
+ - id: one
1078
+ label: '%%%5%%%'
1079
+ - id: two
1080
+ label: '%%%6%%%'
1081
+ colSizes:
1082
+ all: 12
1083
+ xl: 4
1084
+ sm: 6
1085
+ md: 4
668
1086
  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%%%'
1087
+ - tags:
1088
+ - one
1089
+ card:
1090
+ type: image-card
1091
+ image: https://site.ru/img/orig
1092
+ title: '%%%7%%%'
1093
+ text: <div>%%%8%%%</div><div class="u-card__more">%%%9%%%
1094
+ margins: m
1095
+ border: shadow
1096
+ url: unified-performance-campaign/about.md
1097
+ urlTitle: '%%%10%%%'
1098
+ - tags:
1099
+ - one
1100
+ card:
1101
+ type: image-card
1102
+ image: https://site.ru/img2/orig
1103
+ title: '%%%11%%%'
1104
+ text: <div>%%%12%%%</div><div class="u-card__more">%%%13%%%
1105
+ margins: m
1106
+ border: shadow
1107
+ url: campaign-master/product-campaign.md
1108
+ urlTitle: '%%%14%%%'
1109
+ - tags:
1110
+ - one
1111
+ card:
1112
+ type: image-card
1113
+ image: https://site.ru/img2/orig
1114
+ title: '%%%15%%%'
1115
+ text: <div>%%%16%%%</div><div class="u-card__more">%%%17%%%
1116
+ margins: m
1117
+ border: shadow
1118
+ url: efficiency/telegram-ads.md
1119
+ urlTitle: '%%%18%%%'
1120
+ - tags:
1121
+ - one
1122
+ card:
1123
+ type: background-card
1124
+ title: '%%%19%%%'
1125
+ text: ''
1126
+ backgroundColor: '#F3F6FC'
1127
+ border: line
1128
+ links:
1129
+ - text: '%%%20%%%'
1130
+ url: statistics.md
1131
+ arrow: true
1132
+ theme: normal
1133
+ - text: '%%%21%%%'
1134
+ url: feeds/about.md
1135
+ arrow: true
1136
+ theme: normal
1137
+ - tags:
1138
+ - one
1139
+ card:
1140
+ type: background-card
1141
+ title: '%%%22%%%'
1142
+ text: ''
1143
+ backgroundColor: '#F3F6FC'
1144
+ border: line
1145
+ links:
1146
+ - text: '%%%23%%%'
1147
+ url: moderation/adv-rules.md
1148
+ arrow: true
1149
+ theme: normal
1150
+ - text: '%%%24%%%'
1151
+ url: technologies-and-services/technologies-and-services.md
1152
+ arrow: true
1153
+ theme: normal
1154
+ - text: '%%%25%%%'
1155
+ url: troubleshooting/other.md
1156
+ arrow: true
1157
+ theme: normal
1158
+ - tags:
1159
+ - one
1160
+ card:
1161
+ type: background-card
1162
+ title: '%%%26%%%'
1163
+ text: ''
1164
+ backgroundColor: '#F3F6FC'
1165
+ border: line
1166
+ links:
1167
+ - text: '%%%27%%%'
1168
+ url: glossary.md
1169
+ arrow: true
1170
+ theme: normal
1171
+ - tags:
1172
+ - two
1173
+ card:
1174
+ type: image-card
1175
+ image: https://site.ru/img4/orig
1176
+ title: '%%%28%%%'
1177
+ text: <div>%%%29%%%</div><div class="u-card__more">%%%30%%%
1178
+ margins: m
1179
+ border: shadow
1180
+ url: products-automatic/about.md
1181
+ urlTitle: '%%%31%%%'
1182
+ animated: false
676
1183
  "
677
1184
  `;
678
1185
 
679
- exports[`Translate command > filter files on extract 18`] = `
1186
+ exports[`Translate command > extract yaml scheme files > en/index-direct.yaml.xliff 1`] = `
680
1187
  "<?xml version="1.0" encoding="UTF-8"?>
681
1188
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
682
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1189
+ <file original="file.ext" source-language="ru-RU" target-language="en-US" datatype="markdown">
683
1190
  <header>
684
1191
  <skeleton>
685
1192
  <external-file href="file.skl"></external-file>
@@ -687,264 +1194,133 @@ exports[`Translate command > filter files on extract 18`] = `
687
1194
  </header>
688
1195
  <body>
689
1196
  <trans-unit id="0">
690
- <source xml:space="preserve">Diplodoc</source>
1197
+ <source xml:space="preserve">Справка Сервиса</source>
691
1198
  </trans-unit>
692
1199
  <trans-unit id="1">
693
- <source xml:space="preserve">API Yandex Cloud</source>
1200
+ <source xml:space="preserve" Справке Сервиса собрали всю необходимую информацию.</source>
694
1201
  </trans-unit>
695
1202
  <trans-unit id="2">
696
- <source xml:space="preserve">A1</source>
1203
+ <source xml:space="preserve">Справка</source>
697
1204
  </trans-unit>
698
1205
  <trans-unit id="3">
699
- <source xml:space="preserve">Yandex Flavored Markdown</source>
1206
+ <source xml:space="preserve">Реклама</source>
700
1207
  </trans-unit>
701
1208
  <trans-unit id="4">
702
- <source xml:space="preserve">Синтаксис</source>
1209
+ <source xml:space="preserve">Сервис</source>
703
1210
  </trans-unit>
704
1211
  <trans-unit id="5">
705
- <source xml:space="preserve">Базовая разметка</source>
1212
+ <source xml:space="preserve">Для специалистов</source>
706
1213
  </trans-unit>
707
1214
  <trans-unit id="6">
708
- <source xml:space="preserve">Списки</source>
1215
+ <source xml:space="preserve">Для предпринимателей</source>
709
1216
  </trans-unit>
710
1217
  <trans-unit id="7">
711
- <source xml:space="preserve">Таблицы</source>
1218
+ <source xml:space="preserve">Единая перфоманс-кампания</source>
712
1219
  </trans-unit>
713
- </body>
714
- </file>
715
- </xliff>"
716
- `;
717
-
718
- exports[`Translate command > filter files on extract 19`] = `
719
- "## %%%0%%%
720
-
721
- %%%1%%% %%%2%%%"
722
- `;
723
-
724
- exports[`Translate command > filter files on extract 20`] = `
725
- "<?xml version="1.0" encoding="UTF-8"?>
726
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
727
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
728
- <header>
729
- <skeleton>
730
- <external-file href="file.skl"></external-file>
731
- </skeleton>
732
- </header>
733
- <body>
734
- <trans-unit id="0">
735
- <source xml:space="preserve">No var page</source>
1220
+ <trans-unit id="8">
1221
+ <source xml:space="preserve">Комплексно решайте любые перфоманс-задачи в рамках одной кампании</source>
736
1222
  </trans-unit>
737
- <trans-unit id="1">
738
- <source xml:space="preserve">This page might be translated or not.</source>
1223
+ <trans-unit id="9">
1224
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
739
1225
  </trans-unit>
740
- <trans-unit id="2">
741
- <source xml:space="preserve">Depends on --strict-vars option.</source>
1226
+ <trans-unit id="10">
1227
+ <source xml:space="preserve">Подробнее</source>
742
1228
  </trans-unit>
743
- </body>
744
- </file>
745
- </xliff>"
746
- `;
747
-
748
- exports[`Translate command > filter files on extract 21`] = `"## %%%0%%%"`;
749
-
750
- exports[`Translate command > filter files on extract 22`] = `
751
- "<?xml version="1.0" encoding="UTF-8"?>
752
- <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
753
- <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
754
- <header>
755
- <skeleton>
756
- <external-file href="file.skl"></external-file>
757
- </skeleton>
758
- </header>
759
- <body>
760
- <trans-unit id="0">
761
- <source xml:space="preserve">Excluded title</source>
1229
+ <trans-unit id="11">
1230
+ <source xml:space="preserve">Товарная кампания</source>
762
1231
  </trans-unit>
763
- </body>
764
- </file>
765
- </xliff>"
766
- `;
767
-
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
778
- "
779
- `;
780
-
781
- exports[`Translate command > filter files on extract 24`] = `
782
- "<?xml version="1.0" encoding="UTF-8"?>
783
- <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">
785
- <header>
786
- <skeleton>
787
- <external-file href="file.skl"></external-file>
788
- </skeleton>
789
- </header>
790
- <body>
791
- <trans-unit id="0">
792
- <source xml:space="preserve">Test123</source>
1232
+ <trans-unit id="12">
1233
+ <source xml:space="preserve">Используйте простой инструмент для продвижения товаров интернете</source>
793
1234
  </trans-unit>
794
- <trans-unit id="1">
795
- <source xml:space="preserve">Aboba</source>
1235
+ <trans-unit id="13">
1236
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
796
1237
  </trans-unit>
797
- <trans-unit id="2">
798
- <source xml:space="preserve">Нет переменной в vars</source>
1238
+ <trans-unit id="14">
1239
+ <source xml:space="preserve">Подробнее</source>
799
1240
  </trans-unit>
800
- <trans-unit id="3">
801
- <source xml:space="preserve">exclude-test</source>
1241
+ <trans-unit id="15">
1242
+ <source xml:space="preserve">Реклама в Telegram</source>
802
1243
  </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>
1244
+ <trans-unit id="16">
1245
+ <source xml:space="preserve">Покажите релевантную рекламу в телеграм-каналах партнеров РСЯ</source>
849
1246
  </trans-unit>
850
- </body>
851
- </file>
852
- </xliff>"
853
- `;
854
-
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) %}"
861
- `;
862
-
863
- exports[`Translate command > filter files on extract with extra exclude option 4`] = `
864
- "<?xml version="1.0" encoding="UTF-8"?>
865
- <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">
867
- <header>
868
- <skeleton>
869
- <external-file href="file.skl"></external-file>
870
- </skeleton>
871
- </header>
872
- <body>
873
- <trans-unit id="0">
874
- <source xml:space="preserve">Заголовок include</source>
1247
+ <trans-unit id="17">
1248
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
875
1249
  </trans-unit>
876
- <trans-unit id="1">
877
- <source xml:space="preserve">Описание</source>
1250
+ <trans-unit id="18">
1251
+ <source xml:space="preserve">Подробнее</source>
878
1252
  </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>
1253
+ <trans-unit id="19">
1254
+ <source xml:space="preserve">Часто ищут</source>
902
1255
  </trans-unit>
903
- <trans-unit id="1">
904
- <source xml:space="preserve">lorem</source>
1256
+ <trans-unit id="20">
1257
+ <source xml:space="preserve">Статистика</source>
905
1258
  </trans-unit>
906
- </body>
907
- </file>
908
- </xliff>"
909
- `;
910
-
911
- exports[`Translate command > filter files on extract with extra exclude option 7`] = `
912
- "## %%%0%%%
913
-
914
- %%%1%%%"
915
- `;
916
-
917
- exports[`Translate command > filter files on extract with extra exclude option 8`] = `
918
- "<?xml version="1.0" encoding="UTF-8"?>
919
- <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">
921
- <header>
922
- <skeleton>
923
- <external-file href="file.skl"></external-file>
924
- </skeleton>
925
- </header>
926
- <body>
927
- <trans-unit id="0">
928
- <source xml:space="preserve">Included A1</source>
1259
+ <trans-unit id="21">
1260
+ <source xml:space="preserve">Управление фидами</source>
1261
+ </trans-unit>
1262
+ <trans-unit id="22">
1263
+ <source xml:space="preserve">Сервисные функции</source>
1264
+ </trans-unit>
1265
+ <trans-unit id="23">
1266
+ <source xml:space="preserve">Правила и модерация</source>
1267
+ </trans-unit>
1268
+ <trans-unit id="24">
1269
+ <source xml:space="preserve">Технологии и сервисы</source>
1270
+ </trans-unit>
1271
+ <trans-unit id="25">
1272
+ <source xml:space="preserve">Поддержка 24/7</source>
1273
+ </trans-unit>
1274
+ <trans-unit id="26">
1275
+ <source xml:space="preserve">Полезные ссылки</source>
1276
+ </trans-unit>
1277
+ <trans-unit id="27">
1278
+ <source xml:space="preserve">Глоссарий</source>
1279
+ </trans-unit>
1280
+ <trans-unit id="28">
1281
+ <source xml:space="preserve">Простой старт</source>
1282
+ </trans-unit>
1283
+ <trans-unit id="29">
1284
+ <source xml:space="preserve">Минимум ручных настроек: достаточно указать ссылку на сайт</source>
1285
+ </trans-unit>
1286
+ <trans-unit id="30">
1287
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
929
1288
  </trans-unit>
930
- <trans-unit id="1">
931
- <source xml:space="preserve">TEST</source>
1289
+ <trans-unit id="31">
1290
+ <source xml:space="preserve">Подробнее</source>
932
1291
  </trans-unit>
933
1292
  </body>
934
1293
  </file>
935
1294
  </xliff>"
936
1295
  `;
937
1296
 
938
- exports[`Translate command > filter files on extract with extra exclude option 9`] = `
939
- "# %%%0%%%
940
-
1297
+ exports[`Translate command > extract yaml scheme files > en/toc.yaml.skl 1`] = `
1298
+ "title: '%%%0%%%'
1299
+ href: index.yaml
1300
+ items:
1301
+ - name: '%%%4%%%'
1302
+ - href: index-direct.yaml
1303
+ navigation:
1304
+ header:
1305
+ leftItems:
1306
+ - text: '%%%2%%%'
1307
+ type: dropdown
1308
+ items:
1309
+ - text: '%%%3%%%'
1310
+ type: link
1311
+ href: menu/item
1312
+ logo:
1313
+ light:
1314
+ icon: https://icon.link/logo.svg
1315
+ url: https://site.ru
1316
+ urlTitle: '%%%1%%%'
941
1317
  "
942
1318
  `;
943
1319
 
944
- exports[`Translate command > filter files on extract with extra exclude option 10`] = `
1320
+ exports[`Translate command > extract yaml scheme files > en/toc.yaml.xliff 1`] = `
945
1321
  "<?xml version="1.0" encoding="UTF-8"?>
946
1322
  <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">
1323
+ <file original="file.ext" source-language="ru-RU" target-language="en-US" datatype="markdown">
948
1324
  <header>
949
1325
  <skeleton>
950
1326
  <external-file href="file.skl"></external-file>
@@ -952,42 +1328,168 @@ exports[`Translate command > filter files on extract with extra exclude option 1
952
1328
  </header>
953
1329
  <body>
954
1330
  <trans-unit id="0">
955
- <source xml:space="preserve">Yandex Flavored Markdown</source>
1331
+ <source xml:space="preserve">Заголовок</source>
1332
+ </trans-unit>
1333
+ <trans-unit id="1">
1334
+ <source xml:space="preserve">На сайт сервиса</source>
1335
+ </trans-unit>
1336
+ <trans-unit id="2">
1337
+ <source xml:space="preserve">Инструменты</source>
1338
+ </trans-unit>
1339
+ <trans-unit id="3">
1340
+ <source xml:space="preserve">Пункт меню</source>
1341
+ </trans-unit>
1342
+ <trans-unit id="4">
1343
+ <source xml:space="preserve">Дочерняя страница</source>
956
1344
  </trans-unit>
957
1345
  </body>
958
1346
  </file>
959
1347
  </xliff>"
960
1348
  `;
961
1349
 
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
1350
+ exports[`Translate command > extract yaml scheme files > filelist 1`] = `
1351
+ "[
1352
+ "en/index-direct.yaml.skl",
1353
+ "en/index-direct.yaml.xliff",
1354
+ "en/index.yaml.skl",
1355
+ "en/index.yaml.xliff",
1356
+ "en/toc.yaml.skl",
1357
+ "en/toc.yaml.xliff"
1358
+ ]"
1359
+ `;
1360
+
1361
+ exports[`Translate command > extract yaml scheme files 1`] = `
1362
+ "meta:
1363
+ title: '%%%0%%%'
1364
+ description: '%%%1%%%'
1365
+ fullScreen: true
1366
+ blocks:
1367
+ - type: header-block
1368
+ title: <div class="u-breadcrumbs"></div>
1369
+ breadcrumbs:
1370
+ items:
1371
+ - text: '%%%2%%%'
1372
+ url: https://site.ru/support/
1373
+ - text: '%%%3%%%'
1374
+ url: https://site.ru/support/adv/
1375
+ - type: filter-block
1376
+ centered: false
1377
+ title:
1378
+ text: '%%%4%%%'
1379
+ tags:
1380
+ - id: one
1381
+ label: '%%%5%%%'
1382
+ - id: two
1383
+ label: '%%%6%%%'
1384
+ colSizes:
1385
+ all: 12
1386
+ xl: 4
1387
+ sm: 6
1388
+ md: 4
1389
+ items:
1390
+ - tags:
1391
+ - one
1392
+ card:
1393
+ type: image-card
1394
+ image: https://site.ru/img/orig
1395
+ title: '%%%7%%%'
1396
+ text: <div>%%%8%%%</div><div class="u-card__more">%%%9%%%
1397
+ margins: m
1398
+ border: shadow
1399
+ url: unified-performance-campaign/about.md
1400
+ urlTitle: '%%%10%%%'
1401
+ - tags:
1402
+ - one
1403
+ card:
1404
+ type: image-card
1405
+ image: https://site.ru/img2/orig
1406
+ title: '%%%11%%%'
1407
+ text: <div>%%%12%%%</div><div class="u-card__more">%%%13%%%
1408
+ margins: m
1409
+ border: shadow
1410
+ url: campaign-master/product-campaign.md
1411
+ urlTitle: '%%%14%%%'
1412
+ - tags:
1413
+ - one
1414
+ card:
1415
+ type: image-card
1416
+ image: https://site.ru/img2/orig
1417
+ title: '%%%15%%%'
1418
+ text: <div>%%%16%%%</div><div class="u-card__more">%%%17%%%
1419
+ margins: m
1420
+ border: shadow
1421
+ url: efficiency/telegram-ads.md
1422
+ urlTitle: '%%%18%%%'
1423
+ - tags:
1424
+ - one
1425
+ card:
1426
+ type: background-card
1427
+ title: '%%%19%%%'
1428
+ text: ''
1429
+ backgroundColor: '#F3F6FC'
1430
+ border: line
1431
+ links:
1432
+ - text: '%%%20%%%'
1433
+ url: statistics.md
1434
+ arrow: true
1435
+ theme: normal
1436
+ - text: '%%%21%%%'
1437
+ url: feeds/about.md
1438
+ arrow: true
1439
+ theme: normal
1440
+ - tags:
1441
+ - one
1442
+ card:
1443
+ type: background-card
1444
+ title: '%%%22%%%'
1445
+ text: ''
1446
+ backgroundColor: '#F3F6FC'
1447
+ border: line
1448
+ links:
1449
+ - text: '%%%23%%%'
1450
+ url: moderation/adv-rules.md
1451
+ arrow: true
1452
+ theme: normal
1453
+ - text: '%%%24%%%'
1454
+ url: technologies-and-services/technologies-and-services.md
1455
+ arrow: true
1456
+ theme: normal
1457
+ - text: '%%%25%%%'
1458
+ url: troubleshooting/other.md
1459
+ arrow: true
1460
+ theme: normal
1461
+ - tags:
1462
+ - one
1463
+ card:
1464
+ type: background-card
1465
+ title: '%%%26%%%'
1466
+ text: ''
1467
+ backgroundColor: '#F3F6FC'
1468
+ border: line
1469
+ links:
1470
+ - text: '%%%27%%%'
1471
+ url: glossary.md
1472
+ arrow: true
1473
+ theme: normal
1474
+ - tags:
1475
+ - two
1476
+ card:
1477
+ type: image-card
1478
+ image: https://site.ru/img4/orig
1479
+ title: '%%%28%%%'
1480
+ text: <div>%%%29%%%</div><div class="u-card__more">%%%30%%%
1481
+ margins: m
1482
+ border: shadow
1483
+ url: products-automatic/about.md
1484
+ urlTitle: '%%%31%%%'
1485
+ animated: false
984
1486
  "
985
1487
  `;
986
1488
 
987
- exports[`Translate command > filter files on extract with extra exclude option 12`] = `
1489
+ exports[`Translate command > extract yaml scheme files 2`] = `
988
1490
  "<?xml version="1.0" encoding="UTF-8"?>
989
1491
  <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">
1492
+ <file original="file.ext" source-language="ru-RU" target-language="en-US" datatype="markdown">
991
1493
  <header>
992
1494
  <skeleton>
993
1495
  <external-file href="file.skl"></external-file>
@@ -995,117 +1497,145 @@ exports[`Translate command > filter files on extract with extra exclude option 1
995
1497
  </header>
996
1498
  <body>
997
1499
  <trans-unit id="0">
998
- <source xml:space="preserve">Diplodoc</source>
1500
+ <source xml:space="preserve">Справка Сервиса</source>
999
1501
  </trans-unit>
1000
1502
  <trans-unit id="1">
1001
- <source xml:space="preserve">Diplodoc - платформа работы с документацией в парадигме Documentation as a Code.</source>
1503
+ <source xml:space="preserve" Справке Сервиса собрали всю необходимую информацию.</source>
1002
1504
  </trans-unit>
1003
1505
  <trans-unit id="2">
1004
- <source xml:space="preserve">Метаданные</source>
1506
+ <source xml:space="preserve">Справка</source>
1005
1507
  </trans-unit>
1006
1508
  <trans-unit id="3">
1007
- <source xml:space="preserve">API Yandex Cloud</source>
1509
+ <source xml:space="preserve">Реклама</source>
1008
1510
  </trans-unit>
1009
1511
  <trans-unit id="4">
1010
- <source xml:space="preserve">Архитектура API Yandex Cloud (урезанная)</source>
1512
+ <source xml:space="preserve">Сервис</source>
1011
1513
  </trans-unit>
1012
1514
  <trans-unit id="5">
1013
- <source xml:space="preserve">API Yandex Cloud Абсолют</source>
1515
+ <source xml:space="preserve">Для специалистов</source>
1014
1516
  </trans-unit>
1015
1517
  <trans-unit id="6">
1016
- <source xml:space="preserve">Архитектура API Yandex Cloud (урезанная) с абсолютным путем</source>
1518
+ <source xml:space="preserve">Для предпринимателей</source>
1017
1519
  </trans-unit>
1018
1520
  <trans-unit id="7">
1019
- <source xml:space="preserve">Обзор системы</source>
1521
+ <source xml:space="preserve">Единая перфоманс-кампания</source>
1020
1522
  </trans-unit>
1021
1523
  <trans-unit id="8">
1022
- <source xml:space="preserve">Описание платформы, ее основные возможности, особенности и преимущества.</source>
1524
+ <source xml:space="preserve">Комплексно решайте любые перфоманс-задачи в рамках одной кампании</source>
1023
1525
  </trans-unit>
1024
1526
  <trans-unit id="9">
1025
- <source xml:space="preserve">Как попробовать</source>
1527
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
1026
1528
  </trans-unit>
1027
1529
  <trans-unit id="10">
1028
- <source xml:space="preserve">С чего начать работу</source>
1530
+ <source xml:space="preserve">Подробнее</source>
1029
1531
  </trans-unit>
1030
1532
  <trans-unit id="11">
1031
- <source xml:space="preserve">Yandex Flavored Markdown</source>
1533
+ <source xml:space="preserve">Товарная кампания</source>
1032
1534
  </trans-unit>
1033
1535
  <trans-unit id="12">
1034
- <source xml:space="preserve">Описание языка Yandex Flavored Markdown.</source>
1536
+ <source xml:space="preserve">Используйте простой инструмент для продвижения товаров интернете</source>
1035
1537
  </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>
1538
+ <trans-unit id="13">
1539
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
1540
+ </trans-unit>
1541
+ <trans-unit id="14">
1542
+ <source xml:space="preserve">Подробнее</source>
1543
+ </trans-unit>
1544
+ <trans-unit id="15">
1545
+ <source xml:space="preserve">Реклама в Telegram</source>
1546
+ </trans-unit>
1547
+ <trans-unit id="16">
1548
+ <source xml:space="preserve">Покажите релевантную рекламу в телеграм-каналах партнеров РСЯ</source>
1549
+ </trans-unit>
1550
+ <trans-unit id="17">
1551
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
1552
+ </trans-unit>
1553
+ <trans-unit id="18">
1554
+ <source xml:space="preserve">Подробнее</source>
1555
+ </trans-unit>
1556
+ <trans-unit id="19">
1557
+ <source xml:space="preserve">Часто ищут</source>
1558
+ </trans-unit>
1559
+ <trans-unit id="20">
1560
+ <source xml:space="preserve">Статистика</source>
1561
+ </trans-unit>
1562
+ <trans-unit id="21">
1563
+ <source xml:space="preserve">Управление фидами</source>
1564
+ </trans-unit>
1565
+ <trans-unit id="22">
1566
+ <source xml:space="preserve">Сервисные функции</source>
1567
+ </trans-unit>
1568
+ <trans-unit id="23">
1569
+ <source xml:space="preserve">Правила и модерация</source>
1570
+ </trans-unit>
1571
+ <trans-unit id="24">
1572
+ <source xml:space="preserve">Технологии и сервисы</source>
1573
+ </trans-unit>
1574
+ <trans-unit id="25">
1575
+ <source xml:space="preserve">Поддержка 24/7</source>
1576
+ </trans-unit>
1577
+ <trans-unit id="26">
1578
+ <source xml:space="preserve">Полезные ссылки</source>
1579
+ </trans-unit>
1580
+ <trans-unit id="27">
1581
+ <source xml:space="preserve">Глоссарий</source>
1058
1582
  </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>
1583
+ <trans-unit id="28">
1584
+ <source xml:space="preserve">Простой старт</source>
1585
+ </trans-unit>
1586
+ <trans-unit id="29">
1587
+ <source xml:space="preserve">Минимум ручных настроек: достаточно указать ссылку на сайт</source>
1588
+ </trans-unit>
1589
+ <trans-unit id="30">
1590
+ <source xml:space="preserve">Подробнее&lt;/&gt;</source>
1591
+ </trans-unit>
1592
+ <trans-unit id="31">
1593
+ <source xml:space="preserve">Подробнее</source>
1078
1594
  </trans-unit>
1079
1595
  </body>
1080
1596
  </file>
1081
1597
  </xliff>"
1082
1598
  `;
1083
1599
 
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%%%'
1600
+ exports[`Translate command > extract yaml scheme files 3`] = `
1601
+ "blocks:
1602
+ - type: content-layout-block
1603
+ textWidth: l
1604
+ textContent:
1605
+ title: '%%%0%%%'
1606
+ text: |2-
1607
+ %%%1%%%
1608
+ - %%%2%%%
1609
+ - %%%3%%%
1610
+
1611
+ - type: card-layout-block
1612
+ colSizes:
1613
+ all: 12
1614
+ lg: 4
1615
+ md: 6
1616
+ sm: 12
1617
+ xl: 4
1618
+ indent:
1619
+ bottom: xs
1620
+ title: '%%%4%%%'
1621
+ animated: false
1622
+ children:
1623
+ - type: basic-card
1624
+ title: '%%%5%%%'
1625
+ text: '%%%6%%%'
1626
+ urlTitle: '%%%7%%%'
1627
+ border: shadow
1628
+ controlPosition: content
1629
+ url: management/index
1630
+ target: ''
1631
+ animated: false
1102
1632
  "
1103
1633
  `;
1104
1634
 
1105
- exports[`Translate command > filter files on extract with extra exclude option 18`] = `
1635
+ exports[`Translate command > extract yaml scheme files 4`] = `
1106
1636
  "<?xml version="1.0" encoding="UTF-8"?>
1107
1637
  <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">
1638
+ <file original="file.ext" source-language="ru-RU" target-language="en-US" datatype="markdown">
1109
1639
  <header>
1110
1640
  <skeleton>
1111
1641
  <external-file href="file.skl"></external-file>
@@ -1113,81 +1643,61 @@ exports[`Translate command > filter files on extract with extra exclude option 1
1113
1643
  </header>
1114
1644
  <body>
1115
1645
  <trans-unit id="0">
1116
- <source xml:space="preserve">Diplodoc</source>
1646
+ <source xml:space="preserve">Введение</source>
1117
1647
  </trans-unit>
1118
1648
  <trans-unit id="1">
1119
- <source xml:space="preserve">API Yandex Cloud</source>
1649
+ <source xml:space="preserve">API сервиса: - Управлять счетчиками, их настройками и правами доступа, не используя веб-интерфейс.</source>
1120
1650
  </trans-unit>
1121
1651
  <trans-unit id="2">
1122
- <source xml:space="preserve">A1</source>
1652
+ <source xml:space="preserve">Получать информацию о посещаемости сайта и другие данные.</source>
1123
1653
  </trans-unit>
1124
1654
  <trans-unit id="3">
1125
- <source xml:space="preserve">Yandex Flavored Markdown</source>
1655
+ <source xml:space="preserve">Формировать отчеты, в том числе с помощью сегментации и параметризации.</source>
1126
1656
  </trans-unit>
1127
1657
  <trans-unit id="4">
1128
- <source xml:space="preserve">Синтаксис</source>
1658
+ <source xml:space="preserve">Виды API</source>
1129
1659
  </trans-unit>
1130
1660
  <trans-unit id="5">
1131
- <source xml:space="preserve">Базовая разметка</source>
1661
+ <source xml:space="preserve">API управления</source>
1132
1662
  </trans-unit>
1133
1663
  <trans-unit id="6">
1134
- <source xml:space="preserve">Списки</source>
1664
+ <source xml:space="preserve">Управление счетчиками, целями, фильтрами и другими объектами Сервиса (например, создать счетчик, отредактировать его настройки, создать цель, выдать права доступа).</source>
1135
1665
  </trans-unit>
1136
1666
  <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>
1667
+ <source xml:space="preserve">API управления</source>
1168
1668
  </trans-unit>
1169
1669
  </body>
1170
1670
  </file>
1171
1671
  </xliff>"
1172
1672
  `;
1173
1673
 
1174
- exports[`Translate command > filter files on extract with extra exclude option 21`] = `
1674
+ exports[`Translate command > extract yaml scheme files 5`] = `
1175
1675
  "title: '%%%0%%%'
1176
- href: index.md
1676
+ href: index.yaml
1177
1677
  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
1678
+ - name: '%%%4%%%'
1679
+ - href: index-direct.yaml
1680
+ navigation:
1681
+ header:
1682
+ leftItems:
1683
+ - text: '%%%2%%%'
1684
+ type: dropdown
1685
+ items:
1686
+ - text: '%%%3%%%'
1687
+ type: link
1688
+ href: menu/item
1689
+ logo:
1690
+ light:
1691
+ icon: https://icon.link/logo.svg
1692
+ url: https://site.ru
1693
+ urlTitle: '%%%1%%%'
1184
1694
  "
1185
1695
  `;
1186
1696
 
1187
- exports[`Translate command > filter files on extract with extra exclude option 22`] = `
1697
+ exports[`Translate command > extract yaml scheme files 6`] = `
1188
1698
  "<?xml version="1.0" encoding="UTF-8"?>
1189
1699
  <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">
1700
+ <file original="file.ext" source-language="ru-RU" target-language="en-US" datatype="markdown">
1191
1701
  <header>
1192
1702
  <skeleton>
1193
1703
  <external-file href="file.skl"></external-file>
@@ -1195,22 +1705,81 @@ exports[`Translate command > filter files on extract with extra exclude option 2
1195
1705
  </header>
1196
1706
  <body>
1197
1707
  <trans-unit id="0">
1198
- <source xml:space="preserve">Test123</source>
1708
+ <source xml:space="preserve">Заголовок</source>
1199
1709
  </trans-unit>
1200
1710
  <trans-unit id="1">
1201
- <source xml:space="preserve">Aboba</source>
1711
+ <source xml:space="preserve">На сайт сервиса</source>
1202
1712
  </trans-unit>
1203
1713
  <trans-unit id="2">
1204
- <source xml:space="preserve">Нет переменной в vars</source>
1714
+ <source xml:space="preserve">Инструменты</source>
1205
1715
  </trans-unit>
1206
1716
  <trans-unit id="3">
1207
- <source xml:space="preserve">exclude-test</source>
1717
+ <source xml:space="preserve">Пункт меню</source>
1718
+ </trans-unit>
1719
+ <trans-unit id="4">
1720
+ <source xml:space="preserve">Дочерняя страница</source>
1208
1721
  </trans-unit>
1209
1722
  </body>
1210
1723
  </file>
1211
1724
  </xliff>"
1212
1725
  `;
1213
1726
 
1727
+ exports[`Translate command > filter files on extract > filelist 1`] = `
1728
+ "[
1729
+ "es/_includes/test.md.skl",
1730
+ "es/_includes/test.md.xliff",
1731
+ "es/aboba.md.skl",
1732
+ "es/aboba.md.xliff",
1733
+ "es/index.md.skl",
1734
+ "es/index.md.xliff",
1735
+ "es/nested/a1.md.skl",
1736
+ "es/nested/a1.md.xliff",
1737
+ "es/nested/index-yfm.md.skl",
1738
+ "es/nested/index-yfm.md.xliff",
1739
+ "es/nested/index.yaml.skl",
1740
+ "es/nested/index.yaml.xliff",
1741
+ "es/nested/syntax/base.md.skl",
1742
+ "es/nested/syntax/base.md.xliff",
1743
+ "es/nested/syntax/lists.md.skl",
1744
+ "es/nested/syntax/lists.md.xliff",
1745
+ "es/nested/toc.yaml.skl",
1746
+ "es/nested/toc.yaml.xliff",
1747
+ "es/no-var-page.md.skl",
1748
+ "es/no-var-page.md.xliff",
1749
+ "es/to-be-excluded.md.skl",
1750
+ "es/to-be-excluded.md.xliff",
1751
+ "es/toc.yaml.skl",
1752
+ "es/toc.yaml.xliff"
1753
+ ]"
1754
+ `;
1755
+
1756
+ exports[`Translate command > filter files on extract with extra exclude option > filelist 1`] = `
1757
+ "[
1758
+ "es/_includes/test.md.skl",
1759
+ "es/_includes/test.md.xliff",
1760
+ "es/aboba.md.skl",
1761
+ "es/aboba.md.xliff",
1762
+ "es/index.md.skl",
1763
+ "es/index.md.xliff",
1764
+ "es/nested/a1.md.skl",
1765
+ "es/nested/a1.md.xliff",
1766
+ "es/nested/index-yfm.md.skl",
1767
+ "es/nested/index-yfm.md.xliff",
1768
+ "es/nested/index.yaml.skl",
1769
+ "es/nested/index.yaml.xliff",
1770
+ "es/nested/syntax/base.md.skl",
1771
+ "es/nested/syntax/base.md.xliff",
1772
+ "es/nested/syntax/lists.md.skl",
1773
+ "es/nested/syntax/lists.md.xliff",
1774
+ "es/nested/toc.yaml.skl",
1775
+ "es/nested/toc.yaml.xliff",
1776
+ "es/no-var-page.md.skl",
1777
+ "es/no-var-page.md.xliff",
1778
+ "es/toc.yaml.skl",
1779
+ "es/toc.yaml.xliff"
1780
+ ]"
1781
+ `;
1782
+
1214
1783
  exports[`Translate command > filter files on extract with extra vars option > filelist 1`] = `
1215
1784
  "[
1216
1785
  "es/_includes/test.md.skl",
@@ -1242,9 +1811,84 @@ exports[`Translate command > filter files on extract with extra vars option > fi
1242
1811
  ]"
1243
1812
  `;
1244
1813
 
1245
- exports[`Translate command > filter files on extract with extra vars option 1`] = `"## %%%0%%%"`;
1814
+ exports[`Translate command > remove falsy liquid conditions structures > filelist 1`] = `
1815
+ "[
1816
+ "index.md.skl",
1817
+ "index.md.xliff"
1818
+ ]"
1819
+ `;
1820
+
1821
+ exports[`Translate command > remove falsy liquid conditions structures 1`] = `
1822
+ "%%%0%%%
1823
+ <!-- [missed file](./missed.md) -->
1824
+
1825
+
1826
+
1827
+
1828
+ #### %%%1%%%
1829
+
1830
+ {% if list contains "item" %}
1831
+
1832
+ %%%2%%%
1833
+
1834
+ {% endif %}
1835
+
1836
+ #### %%%3%%%
1837
+
1838
+ "
1839
+ `;
1840
+
1841
+ exports[`Translate command > remove falsy liquid conditions structures 2`] = `
1842
+ "<?xml version="1.0" encoding="UTF-8"?>
1843
+ <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1844
+ <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
1845
+ <header>
1846
+ <skeleton>
1847
+ <external-file href="file.skl"></external-file>
1848
+ </skeleton>
1849
+ </header>
1850
+ <body>
1851
+ <trans-unit id="0">
1852
+ <source xml:space="preserve"><g ctype="link" equiv-text="[{{text}}](./exists.md)" id="g-1" x-begin="[" x-end="](./exists.md)">existing file</g></source>
1853
+ </trans-unit>
1854
+ <trans-unit id="1">
1855
+ <source xml:space="preserve">Standalone contains condition</source>
1856
+ </trans-unit>
1857
+ <trans-unit id="2">
1858
+ <source xml:space="preserve">#### List</source>
1859
+ </trans-unit>
1860
+ <trans-unit id="3">
1861
+ <source xml:space="preserve">Inline contains condition</source>
1862
+ </trans-unit>
1863
+ </body>
1864
+ </file>
1865
+ </xliff>"
1866
+ `;
1867
+
1868
+ exports[`Translate command > removes no-translate directive and leaves content as is > filelist 1`] = `
1869
+ "[
1870
+ "index.md.skl",
1871
+ "index.md.xliff",
1872
+ "no-translate.md.skl",
1873
+ "no-translate.md.xliff",
1874
+ "openapi-spec.yaml.skl",
1875
+ "openapi-spec.yaml.xliff",
1876
+ "toc.yaml.skl",
1877
+ "toc.yaml.xliff"
1878
+ ]"
1879
+ `;
1880
+
1881
+ exports[`Translate command > removes no-translate directive and leaves content as is 1`] = `
1882
+ "## %%%0%%%
1883
+
1884
+ ::no-translate [adsfasdfasdfasdfasdf]
1885
+
1886
+ %%%1%%%
1887
+
1888
+ %%%2%%%"
1889
+ `;
1246
1890
 
1247
- exports[`Translate command > filter files on extract with extra vars option 2`] = `
1891
+ exports[`Translate command > removes no-translate directive and leaves content as is 2`] = `
1248
1892
  "<?xml version="1.0" encoding="UTF-8"?>
1249
1893
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1250
1894
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1255,16 +1899,61 @@ exports[`Translate command > filter files on extract with extra vars option 2`]
1255
1899
  </header>
1256
1900
  <body>
1257
1901
  <trans-unit id="0">
1258
- <source xml:space="preserve">Заголовок include</source>
1902
+ <source xml:space="preserve">Index header</source>
1903
+ </trans-unit>
1904
+ <trans-unit id="1">
1905
+ <source xml:space="preserve">lorem</source>
1906
+ </trans-unit>
1907
+ <trans-unit id="2">
1908
+ <source xml:space="preserve">asdfasdfasdf</source>
1259
1909
  </trans-unit>
1260
1910
  </body>
1261
1911
  </file>
1262
1912
  </xliff>"
1263
1913
  `;
1264
1914
 
1265
- exports[`Translate command > filter files on extract with extra vars option 3`] = `"## %%%0%%%"`;
1915
+ exports[`Translate command > removes no-translate directive and leaves content as is 3`] = `
1916
+ "# %%%0%%%
1917
+
1918
+ ## %%%1%%%
1919
+ :::no-translate
1920
+ ### No-translate header
1921
+ Should not be translated.
1922
+ Can use **markup** inside.
1923
+ :::
1924
+
1925
+ ## %%%2%%%
1926
+
1927
+ ::no-translate [## /usr/local/bin/application]
1928
+ ::no-translate[**C:/Program Files/Application/config.ini**]
1929
+ ::no-translate [~/Documents/project/src/main.rs]
1930
+
1931
+
1932
+ - :no-translate[GET /api/v1/users] %%%3%%%
1933
+ - :no-translate[POST /api/v1/auth/login] %%%4%%%
1934
+ - :no-translate[PUT /api/v1/users/{id}] %%%5%%%
1935
+
1936
+ ## %%%6%%%
1937
+ %%%7%%%
1938
+ :no-translate[The default port is unless specified.] %%%8%%%
1939
+ %%%9%%%
1940
+
1941
+ ## %%%10%%%
1942
+ %%%11%%%
1943
+ %%%12%%%
1944
+ %%%13%%%
1945
+
1946
+ ## %%%14%%%
1947
+ %%%15%%%
1948
+
1949
+ ## %%%16%%%
1950
+ %%%17%%%
1951
+
1952
+
1953
+ "
1954
+ `;
1266
1955
 
1267
- exports[`Translate command > filter files on extract with extra vars option 4`] = `
1956
+ exports[`Translate command > removes no-translate directive and leaves content as is 4`] = `
1268
1957
  "<?xml version="1.0" encoding="UTF-8"?>
1269
1958
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1270
1959
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1275,22 +1964,105 @@ exports[`Translate command > filter files on extract with extra vars option 4`]
1275
1964
  </header>
1276
1965
  <body>
1277
1966
  <trans-unit id="0">
1278
- <source xml:space="preserve">Не переводить</source>
1967
+ <source xml:space="preserve">No-translate directive</source>
1968
+ </trans-unit>
1969
+ <trans-unit id="1">
1970
+ <source xml:space="preserve">Block directive</source>
1971
+ </trans-unit>
1972
+ <trans-unit id="2">
1973
+ <source xml:space="preserve">Leaf directive</source>
1974
+ </trans-unit>
1975
+ <trans-unit id="3">
1976
+ <source xml:space="preserve">— get all users</source>
1977
+ </trans-unit>
1978
+ <trans-unit id="4">
1979
+ <source xml:space="preserve">— authorization</source>
1980
+ </trans-unit>
1981
+ <trans-unit id="5">
1982
+ <source xml:space="preserve">— update users data</source>
1983
+ </trans-unit>
1984
+ <trans-unit id="6">
1985
+ <source xml:space="preserve">Simple case leaf</source>
1986
+ </trans-unit>
1987
+ <trans-unit id="7">
1988
+ <source xml:space="preserve">Install using command.</source>
1989
+ </trans-unit>
1990
+ <trans-unit id="8">
1991
+ <source xml:space="preserve">Next sentence.</source>
1992
+ </trans-unit>
1993
+ <trans-unit id="9">
1994
+ <source xml:space="preserve">Set NODE_ENV=production for production builds.</source>
1995
+ </trans-unit>
1996
+ <trans-unit id="10">
1997
+ <source xml:space="preserve">Simple case inline</source>
1998
+ </trans-unit>
1999
+ <trans-unit id="11">
2000
+ <source xml:space="preserve">Install using <x ctype="no_translate_inline" equiv-text=":no-translate[npm install @company/package]" id="x-2"/> command.</source>
2001
+ </trans-unit>
2002
+ <trans-unit id="12">
2003
+ <source xml:space="preserve">The default port is <x ctype="no_translate_inline" equiv-text=":no-translate[8080]" id="x-3"/> unless specified.</source>
2004
+ </trans-unit>
2005
+ <trans-unit id="13">
2006
+ <source xml:space="preserve">Set <x ctype="no_translate_inline" equiv-text=":no-translate[NODE_ENV=production]" id="x-4"/> for production builds.</source>
2007
+ </trans-unit>
2008
+ <trans-unit id="14">
2009
+ <source xml:space="preserve">Few inline directives</source>
2010
+ </trans-unit>
2011
+ <trans-unit id="15">
2012
+ <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>
2013
+ </trans-unit>
2014
+ <trans-unit id="16">
2015
+ <source xml:space="preserve">Empty inline directive</source>
2016
+ </trans-unit>
2017
+ <trans-unit id="17">
2018
+ <source xml:space="preserve">This is text with empty <x ctype="no_translate_inline" equiv-text=":no-translate[]" id="x-7"/> directive.</source>
1279
2019
  </trans-unit>
1280
2020
  </body>
1281
2021
  </file>
1282
2022
  </xliff>"
1283
2023
  `;
1284
2024
 
1285
- exports[`Translate command > filter files on extract with extra vars option 5`] = `
1286
- "## %%%0%%%
1287
-
1288
- <!-- [ссылка на файл не в toc.yaml](./aboba-not-in-toc.md) -->
1289
-
1290
- {% include [%%%1%%%](./_includes/test.md) %}"
2025
+ exports[`Translate command > removes no-translate directive and leaves content as is 5`] = `
2026
+ "openapi: 3.0.1
2027
+ info:
2028
+ title: '%%%0%%%'
2029
+ version: v0
2030
+ servers:
2031
+ - url: http://localhost:8080
2032
+ description: '%%%1%%%'
2033
+ paths:
2034
+ /test:
2035
+ get:
2036
+ tags:
2037
+ - test-controller
2038
+ summary: '%%%2%%%'
2039
+ description: '%%%3%%%'
2040
+ operationId: getWithPayloadResponse
2041
+ responses:
2042
+ '200':
2043
+ description: '%%%4%%%'
2044
+ content:
2045
+ application/json:
2046
+ schema:
2047
+ $ref: '#/components/schemas/RecurceTop'
2048
+ components:
2049
+ schemas:
2050
+ RecurceTop:
2051
+ type: object
2052
+ properties:
2053
+ A:
2054
+ type: string
2055
+ RecurceMiddle:
2056
+ type: object
2057
+ properties:
2058
+ B:
2059
+ type: array
2060
+ items:
2061
+ $ref: '#/components/schemas/RecurceTop'
2062
+ "
1291
2063
  `;
1292
2064
 
1293
- exports[`Translate command > filter files on extract with extra vars option 6`] = `
2065
+ exports[`Translate command > removes no-translate directive and leaves content as is 6`] = `
1294
2066
  "<?xml version="1.0" encoding="UTF-8"?>
1295
2067
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1296
2068
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1301,23 +2073,41 @@ exports[`Translate command > filter files on extract with extra vars option 6`]
1301
2073
  </header>
1302
2074
  <body>
1303
2075
  <trans-unit id="0">
1304
- <source xml:space="preserve">Заголовок include</source>
2076
+ <source xml:space="preserve">OpenAPI definition</source>
1305
2077
  </trans-unit>
1306
2078
  <trans-unit id="1">
1307
- <source xml:space="preserve">Описание</source>
2079
+ <source xml:space="preserve">Generated server url</source>
2080
+ </trans-unit>
2081
+ <trans-unit id="2">
2082
+ <source xml:space="preserve">Simple get operation. тест новой верстки 3</source>
2083
+ </trans-unit>
2084
+ <trans-unit id="3">
2085
+ <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>
2086
+ </trans-unit>
2087
+ <trans-unit id="4">
2088
+ <source xml:space="preserve">200!!!!</source>
1308
2089
  </trans-unit>
1309
2090
  </body>
1310
2091
  </file>
1311
2092
  </xliff>"
1312
2093
  `;
1313
2094
 
1314
- exports[`Translate command > filter files on extract with extra vars option 7`] = `
1315
- "## %%%0%%%
1316
-
1317
- %%%1%%%"
2095
+ exports[`Translate command > removes no-translate directive and leaves content as is 7`] = `
2096
+ "title: '%%%0%%%'
2097
+ href: index.md
2098
+ items:
2099
+ - name: '%%%1%%%'
2100
+ href: no-translate.md
2101
+ - name: '%%%2%%%'
2102
+ include:
2103
+ path: openapi
2104
+ includers:
2105
+ - name: openapi
2106
+ input: openapi-spec.yaml
2107
+ "
1318
2108
  `;
1319
2109
 
1320
- exports[`Translate command > filter files on extract with extra vars option 8`] = `
2110
+ exports[`Translate command > removes no-translate directive and leaves content as is 8`] = `
1321
2111
  "<?xml version="1.0" encoding="UTF-8"?>
1322
2112
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1323
2113
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1328,23 +2118,68 @@ exports[`Translate command > filter files on extract with extra vars option 8`]
1328
2118
  </header>
1329
2119
  <body>
1330
2120
  <trans-unit id="0">
1331
- <source xml:space="preserve">Заголовок index</source>
2121
+ <source xml:space="preserve">Test123</source>
1332
2122
  </trans-unit>
1333
2123
  <trans-unit id="1">
1334
- <source xml:space="preserve">lorem</source>
2124
+ <source xml:space="preserve">Не переводить</source>
2125
+ </trans-unit>
2126
+ <trans-unit id="2">
2127
+ <source xml:space="preserve">openapi</source>
1335
2128
  </trans-unit>
1336
2129
  </body>
1337
2130
  </file>
1338
2131
  </xliff>"
1339
2132
  `;
1340
2133
 
1341
- exports[`Translate command > filter files on extract with extra vars option 9`] = `
1342
- "## %%%0%%%
2134
+ exports[`Translate command > save truthy liquid conditions structures > filelist 1`] = `
2135
+ "[
2136
+ "index.md.skl",
2137
+ "index.md.xliff"
2138
+ ]"
2139
+ `;
2140
+
2141
+ exports[`Translate command > save truthy liquid conditions structures 1`] = `
2142
+ "%%%0%%%
2143
+ <!-- [missed file](./missed.md) -->
2144
+ {% if prod == true %}%%%1%%%{% endif %}
1343
2145
 
1344
- %%%1%%%"
2146
+ {% if inner == true %}%%%2%%%{% endif %}
2147
+
2148
+ {% if prod == true %}%%%3%%%{% endif %}{% endif %}
2149
+
2150
+ {% if prod == true %}
2151
+
2152
+ {% if list contains "item" %}
2153
+
2154
+ %%%4%%%
2155
+
2156
+ {% if item == true %}%%%5%%% %%%6%%% {% endif %}
2157
+
2158
+ %%%7%%%
2159
+
2160
+ {% endif %}
2161
+
2162
+ {% endif %}
2163
+
2164
+ #### %%%8%%%
2165
+
2166
+ {% if list contains "item" %}
2167
+
2168
+ %%%9%%%
2169
+
2170
+ {% endif %}
2171
+
2172
+ #### %%%10%%%
2173
+
2174
+ {% if prod == true %}
2175
+
2176
+ %%%11%%% {% endif %}
2177
+
2178
+ {% endif %}
2179
+ "
1345
2180
  `;
1346
2181
 
1347
- exports[`Translate command > filter files on extract with extra vars option 10`] = `
2182
+ exports[`Translate command > save truthy liquid conditions structures 2`] = `
1348
2183
  "<?xml version="1.0" encoding="UTF-8"?>
1349
2184
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1350
2185
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1355,23 +2190,70 @@ exports[`Translate command > filter files on extract with extra vars option 10`]
1355
2190
  </header>
1356
2191
  <body>
1357
2192
  <trans-unit id="0">
1358
- <source xml:space="preserve">Included A1</source>
2193
+ <source xml:space="preserve"><g ctype="link" equiv-text="[{{text}}](./exists.md)" id="g-1" x-begin="[" x-end="](./exists.md)">existing file</g></source>
1359
2194
  </trans-unit>
1360
2195
  <trans-unit id="1">
1361
- <source xml:space="preserve">TEST</source>
2196
+ <source xml:space="preserve">Test text</source>
2197
+ </trans-unit>
2198
+ <trans-unit id="2">
2199
+ <source xml:space="preserve">inner test text</source>
2200
+ </trans-unit>
2201
+ <trans-unit id="3">
2202
+ <source xml:space="preserve">Test text<x ctype="liquid_Literal" equiv-text="{% if inner == true %}" id="x-1"/>inner test text</source>
2203
+ </trans-unit>
2204
+ <trans-unit id="4">
2205
+ <source xml:space="preserve">#### List</source>
2206
+ </trans-unit>
2207
+ <trans-unit id="5">
2208
+ <source xml:space="preserve">1.</source>
2209
+ </trans-unit>
2210
+ <trans-unit id="6">
2211
+ <source xml:space="preserve">Item</source>
2212
+ </trans-unit>
2213
+ <trans-unit id="7">
2214
+ <source xml:space="preserve">Some text</source>
2215
+ </trans-unit>
2216
+ <trans-unit id="8">
2217
+ <source xml:space="preserve">Standalone contains condition</source>
2218
+ </trans-unit>
2219
+ <trans-unit id="9">
2220
+ <source xml:space="preserve">#### List</source>
2221
+ </trans-unit>
2222
+ <trans-unit id="10">
2223
+ <source xml:space="preserve">Inline contains condition</source>
2224
+ </trans-unit>
2225
+ <trans-unit id="11">
2226
+ <source xml:space="preserve">#### List <x ctype="liquid_Literal" equiv-text="{% if list contains &quot;item&quot; %}" id="x-2"/> sub text</source>
1362
2227
  </trans-unit>
1363
2228
  </body>
1364
2229
  </file>
1365
2230
  </xliff>"
1366
2231
  `;
1367
2232
 
1368
- exports[`Translate command > filter files on extract with extra vars option 11`] = `
1369
- "# %%%0%%%
2233
+ exports[`Translate command > skip no-translate marked content > filelist 1`] = `
2234
+ "[
2235
+ "index.md.skl",
2236
+ "index.md.xliff",
2237
+ "no-translate.md.skl",
2238
+ "no-translate.md.xliff",
2239
+ "openapi-spec.yaml.skl",
2240
+ "openapi-spec.yaml.xliff",
2241
+ "toc.yaml.skl",
2242
+ "toc.yaml.xliff"
2243
+ ]"
2244
+ `;
1370
2245
 
1371
- "
2246
+ exports[`Translate command > skip no-translate marked content 1`] = `
2247
+ "## %%%0%%%
2248
+
2249
+ ::no-translate [adsfasdfasdfasdfasdf]
2250
+
2251
+ %%%1%%%
2252
+
2253
+ %%%2%%%"
1372
2254
  `;
1373
2255
 
1374
- exports[`Translate command > filter files on extract with extra vars option 12`] = `
2256
+ exports[`Translate command > skip no-translate marked content 2`] = `
1375
2257
  "<?xml version="1.0" encoding="UTF-8"?>
1376
2258
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1377
2259
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1382,39 +2264,61 @@ exports[`Translate command > filter files on extract with extra vars option 12`]
1382
2264
  </header>
1383
2265
  <body>
1384
2266
  <trans-unit id="0">
1385
- <source xml:space="preserve">Yandex Flavored Markdown</source>
2267
+ <source xml:space="preserve">Index header</source>
2268
+ </trans-unit>
2269
+ <trans-unit id="1">
2270
+ <source xml:space="preserve">lorem</source>
2271
+ </trans-unit>
2272
+ <trans-unit id="2">
2273
+ <source xml:space="preserve">asdfasdfasdf</source>
1386
2274
  </trans-unit>
1387
2275
  </body>
1388
2276
  </file>
1389
2277
  </xliff>"
1390
2278
  `;
1391
2279
 
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
2280
+ exports[`Translate command > skip no-translate marked content 3`] = `
2281
+ "# %%%0%%%
2282
+
2283
+ ## %%%1%%%
2284
+ :::no-translate
2285
+ ### No-translate header
2286
+ Should not be translated.
2287
+ Can use **markup** inside.
2288
+ :::
2289
+
2290
+ ## %%%2%%%
2291
+
2292
+ ::no-translate [## /usr/local/bin/application]
2293
+ ::no-translate[**C:/Program Files/Application/config.ini**]
2294
+ ::no-translate [~/Documents/project/src/main.rs]
2295
+
2296
+
2297
+ - :no-translate[GET /api/v1/users] %%%3%%%
2298
+ - :no-translate[POST /api/v1/auth/login] %%%4%%%
2299
+ - :no-translate[PUT /api/v1/users/{id}] %%%5%%%
2300
+
2301
+ ## %%%6%%%
2302
+ %%%7%%%
2303
+ :no-translate[The default port is unless specified.] %%%8%%%
2304
+ %%%9%%%
2305
+
2306
+ ## %%%10%%%
2307
+ %%%11%%%
2308
+ %%%12%%%
2309
+ %%%13%%%
2310
+
2311
+ ## %%%14%%%
2312
+ %%%15%%%
2313
+
2314
+ ## %%%16%%%
2315
+ %%%17%%%
2316
+
2317
+
1414
2318
  "
1415
2319
  `;
1416
2320
 
1417
- exports[`Translate command > filter files on extract with extra vars option 14`] = `
2321
+ exports[`Translate command > skip no-translate marked content 4`] = `
1418
2322
  "<?xml version="1.0" encoding="UTF-8"?>
1419
2323
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1420
2324
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1425,55 +2329,105 @@ exports[`Translate command > filter files on extract with extra vars option 14`]
1425
2329
  </header>
1426
2330
  <body>
1427
2331
  <trans-unit id="0">
1428
- <source xml:space="preserve">Diplodoc</source>
2332
+ <source xml:space="preserve">No-translate directive</source>
1429
2333
  </trans-unit>
1430
2334
  <trans-unit id="1">
1431
- <source xml:space="preserve">Diplodoc - платформа работы с документацией в парадигме Documentation as a Code.</source>
2335
+ <source xml:space="preserve">Block directive</source>
1432
2336
  </trans-unit>
1433
2337
  <trans-unit id="2">
1434
- <source xml:space="preserve">Метаданные</source>
2338
+ <source xml:space="preserve">Leaf directive</source>
1435
2339
  </trans-unit>
1436
2340
  <trans-unit id="3">
1437
- <source xml:space="preserve">API Yandex Cloud</source>
2341
+ <source xml:space="preserve">— get all users</source>
1438
2342
  </trans-unit>
1439
2343
  <trans-unit id="4">
1440
- <source xml:space="preserve">Архитектура API Yandex Cloud (урезанная)</source>
2344
+ <source xml:space="preserve">— authorization</source>
1441
2345
  </trans-unit>
1442
2346
  <trans-unit id="5">
1443
- <source xml:space="preserve">API Yandex Cloud Абсолют</source>
2347
+ <source xml:space="preserve">— update users data</source>
1444
2348
  </trans-unit>
1445
2349
  <trans-unit id="6">
1446
- <source xml:space="preserve">Архитектура API Yandex Cloud (урезанная) с абсолютным путем</source>
2350
+ <source xml:space="preserve">Simple case leaf</source>
1447
2351
  </trans-unit>
1448
2352
  <trans-unit id="7">
1449
- <source xml:space="preserve">Обзор системы</source>
2353
+ <source xml:space="preserve">Install using command.</source>
1450
2354
  </trans-unit>
1451
2355
  <trans-unit id="8">
1452
- <source xml:space="preserve">Описание платформы, ее основные возможности, особенности и преимущества.</source>
2356
+ <source xml:space="preserve">Next sentence.</source>
1453
2357
  </trans-unit>
1454
2358
  <trans-unit id="9">
1455
- <source xml:space="preserve">Как попробовать</source>
2359
+ <source xml:space="preserve">Set NODE_ENV=production for production builds.</source>
1456
2360
  </trans-unit>
1457
2361
  <trans-unit id="10">
1458
- <source xml:space="preserve" чего начать работу</source>
2362
+ <source xml:space="preserve">Simple case inline</source>
1459
2363
  </trans-unit>
1460
2364
  <trans-unit id="11">
1461
- <source xml:space="preserve">Yandex Flavored Markdown</source>
2365
+ <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
2366
  </trans-unit>
1463
2367
  <trans-unit id="12">
1464
- <source xml:space="preserve">Описание языка Yandex Flavored Markdown.</source>
2368
+ <source xml:space="preserve">The default port is <x ctype="no_translate_inline" equiv-text=":no-translate[8080]" id="x-3"/> unless specified.</source>
2369
+ </trans-unit>
2370
+ <trans-unit id="13">
2371
+ <source xml:space="preserve">Set <x ctype="no_translate_inline" equiv-text=":no-translate[NODE_ENV=production]" id="x-4"/> for production builds.</source>
2372
+ </trans-unit>
2373
+ <trans-unit id="14">
2374
+ <source xml:space="preserve">Few inline directives</source>
2375
+ </trans-unit>
2376
+ <trans-unit id="15">
2377
+ <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>
2378
+ </trans-unit>
2379
+ <trans-unit id="16">
2380
+ <source xml:space="preserve">Empty inline directive</source>
2381
+ </trans-unit>
2382
+ <trans-unit id="17">
2383
+ <source xml:space="preserve">This is text with empty <x ctype="no_translate_inline" equiv-text=":no-translate[]" id="x-7"/> directive.</source>
1465
2384
  </trans-unit>
1466
2385
  </body>
1467
2386
  </file>
1468
2387
  </xliff>"
1469
2388
  `;
1470
2389
 
1471
- exports[`Translate command > filter files on extract with extra vars option 15`] = `
1472
- "# %%%0%%%
2390
+ exports[`Translate command > skip no-translate marked content 5`] = `
2391
+ "openapi: 3.0.1
2392
+ info:
2393
+ title: '%%%0%%%'
2394
+ version: v0
2395
+ servers:
2396
+ - url: http://localhost:8080
2397
+ description: '%%%1%%%'
2398
+ paths:
2399
+ /test:
2400
+ get:
2401
+ tags:
2402
+ - test-controller
2403
+ summary: '%%%2%%%'
2404
+ description: '%%%3%%%'
2405
+ operationId: getWithPayloadResponse
2406
+ responses:
2407
+ '200':
2408
+ description: '%%%4%%%'
2409
+ content:
2410
+ application/json:
2411
+ schema:
2412
+ $ref: '#/components/schemas/RecurceTop'
2413
+ components:
2414
+ schemas:
2415
+ RecurceTop:
2416
+ type: object
2417
+ properties:
2418
+ A:
2419
+ type: string
2420
+ RecurceMiddle:
2421
+ type: object
2422
+ properties:
2423
+ B:
2424
+ type: array
2425
+ items:
2426
+ $ref: '#/components/schemas/RecurceTop'
1473
2427
  "
1474
2428
  `;
1475
2429
 
1476
- exports[`Translate command > filter files on extract with extra vars option 16`] = `
2430
+ exports[`Translate command > skip no-translate marked content 6`] = `
1477
2431
  "<?xml version="1.0" encoding="UTF-8"?>
1478
2432
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1479
2433
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1484,16 +2438,41 @@ exports[`Translate command > filter files on extract with extra vars option 16`]
1484
2438
  </header>
1485
2439
  <body>
1486
2440
  <trans-unit id="0">
1487
- <source xml:space="preserve">Базовая разметка</source>
2441
+ <source xml:space="preserve">OpenAPI definition</source>
2442
+ </trans-unit>
2443
+ <trans-unit id="1">
2444
+ <source xml:space="preserve">Generated server url</source>
2445
+ </trans-unit>
2446
+ <trans-unit id="2">
2447
+ <source xml:space="preserve">Simple get operation. тест новой верстки 3</source>
2448
+ </trans-unit>
2449
+ <trans-unit id="3">
2450
+ <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>
2451
+ </trans-unit>
2452
+ <trans-unit id="4">
2453
+ <source xml:space="preserve">200!!!!</source>
1488
2454
  </trans-unit>
1489
2455
  </body>
1490
2456
  </file>
1491
2457
  </xliff>"
1492
2458
  `;
1493
2459
 
1494
- exports[`Translate command > filter files on extract with extra vars option 17`] = `"# %%%0%%%"`;
2460
+ exports[`Translate command > skip no-translate marked content 7`] = `
2461
+ "title: '%%%0%%%'
2462
+ href: index.md
2463
+ items:
2464
+ - name: '%%%1%%%'
2465
+ href: no-translate.md
2466
+ - name: '%%%2%%%'
2467
+ include:
2468
+ path: openapi
2469
+ includers:
2470
+ - name: openapi
2471
+ input: openapi-spec.yaml
2472
+ "
2473
+ `;
1495
2474
 
1496
- exports[`Translate command > filter files on extract with extra vars option 18`] = `
2475
+ exports[`Translate command > skip no-translate marked content 8`] = `
1497
2476
  "<?xml version="1.0" encoding="UTF-8"?>
1498
2477
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1499
2478
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1504,35 +2483,43 @@ exports[`Translate command > filter files on extract with extra vars option 18`]
1504
2483
  </header>
1505
2484
  <body>
1506
2485
  <trans-unit id="0">
1507
- <source xml:space="preserve">Списки</source>
2486
+ <source xml:space="preserve">Test123</source>
2487
+ </trans-unit>
2488
+ <trans-unit id="1">
2489
+ <source xml:space="preserve">Не переводить</source>
2490
+ </trans-unit>
2491
+ <trans-unit id="2">
2492
+ <source xml:space="preserve">openapi</source>
1508
2493
  </trans-unit>
1509
2494
  </body>
1510
2495
  </file>
1511
2496
  </xliff>"
1512
2497
  `;
1513
2498
 
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
- "
2499
+ exports[`Translate command > test no-translate directive > filelist 1`] = `
2500
+ "[
2501
+ "index.md.skl",
2502
+ "index.md.xliff",
2503
+ "no-translate.md.skl",
2504
+ "no-translate.md.xliff",
2505
+ "openapi-spec.yaml.skl",
2506
+ "openapi-spec.yaml.xliff",
2507
+ "toc.yaml.skl",
2508
+ "toc.yaml.xliff"
2509
+ ]"
2510
+ `;
2511
+
2512
+ exports[`Translate command > test no-translate directive 1`] = `
2513
+ "## %%%0%%%
2514
+
2515
+ ::no-translate [adsfasdfasdfasdfasdf]
2516
+
2517
+ %%%1%%%
2518
+
2519
+ %%%2%%%"
1533
2520
  `;
1534
2521
 
1535
- exports[`Translate command > filter files on extract with extra vars option 20`] = `
2522
+ exports[`Translate command > test no-translate directive 2`] = `
1536
2523
  "<?xml version="1.0" encoding="UTF-8"?>
1537
2524
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1538
2525
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1543,41 +2530,73 @@ exports[`Translate command > filter files on extract with extra vars option 20`]
1543
2530
  </header>
1544
2531
  <body>
1545
2532
  <trans-unit id="0">
1546
- <source xml:space="preserve">Diplodoc</source>
2533
+ <source xml:space="preserve">Index header</source>
1547
2534
  </trans-unit>
1548
2535
  <trans-unit id="1">
1549
- <source xml:space="preserve">API Yandex Cloud</source>
2536
+ <source xml:space="preserve">lorem</source>
1550
2537
  </trans-unit>
1551
2538
  <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>
2539
+ <source xml:space="preserve">asdfasdfasdf</source>
1568
2540
  </trans-unit>
1569
2541
  </body>
1570
2542
  </file>
1571
2543
  </xliff>"
1572
2544
  `;
1573
2545
 
1574
- exports[`Translate command > filter files on extract with extra vars option 21`] = `
1575
- "## %%%0%%%
2546
+ exports[`Translate command > test no-translate directive 3`] = `
2547
+ "# %%%0%%%
2548
+
2549
+ ## %%%1%%%
2550
+ :::no-translate
2551
+ ### No-translate header
2552
+
2553
+ :::html-block
2554
+ testsetsets
2555
+ :::
1576
2556
 
1577
- %%%1%%% %%%2%%%"
2557
+ ::: any-other-directive
2558
+ content test
2559
+ :::
2560
+
2561
+ Should not be translated.
2562
+ Can use **markup** inside.
2563
+ :::
2564
+
2565
+
2566
+ %%%2%%%
2567
+
2568
+ ## %%%3%%%
2569
+
2570
+ ::no-translate [## /usr/local/bin/application]
2571
+ ::no-translate[**C:/Program Files/Application/config.ini**]
2572
+ ::no-translate [~/Documents/project/src/main.rs]
2573
+
2574
+
2575
+ - :no-translate[GET /api/v1/users] %%%4%%%
2576
+ - :no-translate[POST /api/v1/auth/login] %%%5%%%
2577
+ - :no-translate[PUT /api/v1/users/{id}] %%%6%%%
2578
+
2579
+ ## %%%7%%%
2580
+ %%%8%%%
2581
+ :no-translate[The default port is unless specified.] %%%9%%%
2582
+ %%%10%%%
2583
+
2584
+ ## %%%11%%%
2585
+ %%%12%%%
2586
+ %%%13%%%
2587
+ %%%14%%%
2588
+
2589
+ ## %%%15%%%
2590
+ %%%16%%%
2591
+
2592
+ ## %%%17%%%
2593
+ %%%18%%%
2594
+
2595
+
2596
+ "
1578
2597
  `;
1579
2598
 
1580
- exports[`Translate command > filter files on extract with extra vars option 22`] = `
2599
+ exports[`Translate command > test no-translate directive 4`] = `
1581
2600
  "<?xml version="1.0" encoding="UTF-8"?>
1582
2601
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1583
2602
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1588,22 +2607,108 @@ exports[`Translate command > filter files on extract with extra vars option 22`]
1588
2607
  </header>
1589
2608
  <body>
1590
2609
  <trans-unit id="0">
1591
- <source xml:space="preserve">No var page</source>
2610
+ <source xml:space="preserve">No-translate directive</source>
1592
2611
  </trans-unit>
1593
2612
  <trans-unit id="1">
1594
- <source xml:space="preserve">This page might be translated or not.</source>
2613
+ <source xml:space="preserve">Block directive</source>
1595
2614
  </trans-unit>
1596
2615
  <trans-unit id="2">
1597
- <source xml:space="preserve">Depends on --strict-vars option.</source>
2616
+ <source xml:space="preserve">::: some-other-directive<x ctype="lb" equiv-text="&amp;#10;" id="x-1"/>content here<x ctype="lb" equiv-text="&amp;#10;" id="x-2"/>:::<x ctype="lb" equiv-text="&amp;#10;" id="x-3"/>::: no-translate<x ctype="lb" equiv-text="&amp;#10;" id="x-4"/>content here<x ctype="lb" equiv-text="&amp;#10;" id="x-5"/>::: some-other-directive<x ctype="lb" equiv-text="&amp;#10;" id="x-6"/>nested content<x ctype="lb" equiv-text="&amp;#10;" id="x-7"/>:::<x ctype="lb" equiv-text="&amp;#10;" id="x-8"/>:::</source>
2617
+ </trans-unit>
2618
+ <trans-unit id="3">
2619
+ <source xml:space="preserve">Leaf directive</source>
2620
+ </trans-unit>
2621
+ <trans-unit id="4">
2622
+ <source xml:space="preserve">— get all users</source>
2623
+ </trans-unit>
2624
+ <trans-unit id="5">
2625
+ <source xml:space="preserve">— authorization</source>
2626
+ </trans-unit>
2627
+ <trans-unit id="6">
2628
+ <source xml:space="preserve">— update users data</source>
2629
+ </trans-unit>
2630
+ <trans-unit id="7">
2631
+ <source xml:space="preserve">Simple case leaf</source>
2632
+ </trans-unit>
2633
+ <trans-unit id="8">
2634
+ <source xml:space="preserve">Install using command.</source>
2635
+ </trans-unit>
2636
+ <trans-unit id="9">
2637
+ <source xml:space="preserve">Next sentence.</source>
2638
+ </trans-unit>
2639
+ <trans-unit id="10">
2640
+ <source xml:space="preserve">Set NODE_ENV=production for production builds.</source>
2641
+ </trans-unit>
2642
+ <trans-unit id="11">
2643
+ <source xml:space="preserve">Simple case inline</source>
2644
+ </trans-unit>
2645
+ <trans-unit id="12">
2646
+ <source xml:space="preserve">Install using <x ctype="no_translate_inline" equiv-text=":no-translate[npm install @company/package]" id="x-9"/> command.</source>
2647
+ </trans-unit>
2648
+ <trans-unit id="13">
2649
+ <source xml:space="preserve">The default port is <x ctype="no_translate_inline" equiv-text=":no-translate[8080]" id="x-10"/> unless specified.</source>
2650
+ </trans-unit>
2651
+ <trans-unit id="14">
2652
+ <source xml:space="preserve">Set <x ctype="no_translate_inline" equiv-text=":no-translate[NODE_ENV=production]" id="x-11"/> for production builds.</source>
2653
+ </trans-unit>
2654
+ <trans-unit id="15">
2655
+ <source xml:space="preserve">Few inline directives</source>
2656
+ </trans-unit>
2657
+ <trans-unit id="16">
2658
+ <source xml:space="preserve">Use <x ctype="no_translate_inline" equiv-text=":no-translate[**GET /api/v1/users**]" id="x-12"/> to list users and <x ctype="no_translate_inline" equiv-text=":no-translate[POST /api/v1/users]" id="x-13"/> to create.</source>
2659
+ </trans-unit>
2660
+ <trans-unit id="17">
2661
+ <source xml:space="preserve">Empty inline directive</source>
2662
+ </trans-unit>
2663
+ <trans-unit id="18">
2664
+ <source xml:space="preserve">This is text with empty <x ctype="no_translate_inline" equiv-text=":no-translate[]" id="x-14"/> directive.</source>
1598
2665
  </trans-unit>
1599
2666
  </body>
1600
2667
  </file>
1601
2668
  </xliff>"
1602
2669
  `;
1603
2670
 
1604
- exports[`Translate command > filter files on extract with extra vars option 23`] = `"## %%%0%%%"`;
2671
+ exports[`Translate command > test no-translate directive 5`] = `
2672
+ "openapi: 3.0.1
2673
+ info:
2674
+ title: '%%%0%%%'
2675
+ version: v0
2676
+ servers:
2677
+ - url: http://localhost:8080
2678
+ description: '%%%1%%%'
2679
+ paths:
2680
+ /test:
2681
+ get:
2682
+ tags:
2683
+ - test-controller
2684
+ summary: '%%%2%%%'
2685
+ description: '%%%3%%%'
2686
+ operationId: getWithPayloadResponse
2687
+ responses:
2688
+ '200':
2689
+ description: '%%%4%%%'
2690
+ content:
2691
+ application/json:
2692
+ schema:
2693
+ $ref: '#/components/schemas/RecurceTop'
2694
+ components:
2695
+ schemas:
2696
+ RecurceTop:
2697
+ type: object
2698
+ properties:
2699
+ A:
2700
+ type: string
2701
+ RecurceMiddle:
2702
+ type: object
2703
+ properties:
2704
+ B:
2705
+ type: array
2706
+ items:
2707
+ $ref: '#/components/schemas/RecurceTop'
2708
+ "
2709
+ `;
1605
2710
 
1606
- exports[`Translate command > filter files on extract with extra vars option 24`] = `
2711
+ exports[`Translate command > test no-translate directive 6`] = `
1607
2712
  "<?xml version="1.0" encoding="UTF-8"?>
1608
2713
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1609
2714
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1614,29 +2719,42 @@ exports[`Translate command > filter files on extract with extra vars option 24`]
1614
2719
  </header>
1615
2720
  <body>
1616
2721
  <trans-unit id="0">
1617
- <source xml:space="preserve">Excluded title</source>
2722
+ <source xml:space="preserve">OpenAPI definition</source>
2723
+ </trans-unit>
2724
+ <trans-unit id="1">
2725
+ <source xml:space="preserve">Generated server url</source>
2726
+ </trans-unit>
2727
+ <trans-unit id="2">
2728
+ <source xml:space="preserve">Simple get operation. тест новой верстки 3</source>
2729
+ </trans-unit>
2730
+ <trans-unit id="3">
2731
+ <source xml:space="preserve">Defines a simple get <x ctype="no_translate_inline" equiv-text=":no-translate[skip this]" id="x-15"/> operation with no inputs and a complex</source>
2732
+ </trans-unit>
2733
+ <trans-unit id="4">
2734
+ <source xml:space="preserve">200!!!!</source>
1618
2735
  </trans-unit>
1619
2736
  </body>
1620
2737
  </file>
1621
2738
  </xliff>"
1622
2739
  `;
1623
2740
 
1624
- exports[`Translate command > filter files on extract with extra vars option 25`] = `
2741
+ exports[`Translate command > test no-translate directive 7`] = `
1625
2742
  "title: '%%%0%%%'
1626
2743
  href: index.md
1627
2744
  items:
1628
2745
  - name: '%%%1%%%'
1629
- href: aboba.md
2746
+ href: no-translate.md
1630
2747
  - 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
2748
+ include:
2749
+ path: openapi
2750
+ includers:
2751
+ - name: openapi
2752
+ input: openapi-spec.yaml
2753
+ mode: link
1636
2754
  "
1637
2755
  `;
1638
2756
 
1639
- exports[`Translate command > filter files on extract with extra vars option 26`] = `
2757
+ exports[`Translate command > test no-translate directive 8`] = `
1640
2758
  "<?xml version="1.0" encoding="UTF-8"?>
1641
2759
  <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
1642
2760
  <file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
@@ -1650,16 +2768,10 @@ exports[`Translate command > filter files on extract with extra vars option 26`]
1650
2768
  <source xml:space="preserve">Test123</source>
1651
2769
  </trans-unit>
1652
2770
  <trans-unit id="1">
1653
- <source xml:space="preserve">Aboba</source>
1654
- </trans-unit>
1655
- <trans-unit id="2">
1656
2771
  <source xml:space="preserve">Не переводить</source>
1657
2772
  </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>
2773
+ <trans-unit id="2">
2774
+ <source xml:space="preserve">openapi</source>
1663
2775
  </trans-unit>
1664
2776
  </body>
1665
2777
  </file>