@diplodoc/cli-tests 0.0.0-rc-resolve-codeblock-md2md-18994893059 → 0.0.0-rc-extract-openapi-test-19462171581
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.
- package/e2e/__snapshots__/pdf-page.spec.ts.snap +56 -4
- package/e2e/__snapshots__/regression.test.ts.snap +2 -2
- package/e2e/__snapshots__/translation.spec.ts.snap +208 -2
- package/e2e/pdf-page.spec.ts +26 -3
- package/e2e/translation.spec.ts +16 -0
- package/fixtures/cliAdapter.ts +1 -1
- package/mocks/pdf-page/title-pages/input/__images/mountain.jpg +0 -0
- package/mocks/pdf-page/title-pages/input/__includes/include1.md +1 -0
- package/mocks/pdf-page/title-pages/input/index.md +1 -0
- package/mocks/pdf-page/title-pages/input/page1.md +3 -0
- package/mocks/pdf-page/title-pages/input/page2.md +3 -0
- package/mocks/pdf-page/title-pages/input/pdf-titles/pdf-title-page1.md +13 -0
- package/mocks/pdf-page/title-pages/input/pdf-titles/pdf-title-page2.md +18 -0
- package/mocks/pdf-page/title-pages/input/presets.yaml +2 -0
- package/mocks/pdf-page/title-pages/input/toc.yaml +12 -0
- package/mocks/translation/compose/input/openapi-spec.yaml.skl +41 -0
- package/mocks/translation/compose/input/openapi-spec.yaml.xliff +52 -0
- package/mocks/translation/compose/input/toc.yaml.skl +8 -0
- package/mocks/translation/compose/input/toc.yaml.xliff +16 -0
- package/mocks/translation/custom-schema/custom-openapi-schema-30.yaml +1054 -0
- package/mocks/translation/custom-schema/input/openapi-spec.yaml +42 -0
- package/mocks/translation/custom-schema/input/toc.yaml +8 -0
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ exports[`Pdf page mode > creates a pdf folder when the .yfm option is specified
|
|
|
24
24
|
<body class="g-root g-root_theme_light">
|
|
25
25
|
<div id="root"></div>
|
|
26
26
|
<script type="application/json" id="diplodoc-state">
|
|
27
|
-
{"data":{"leading":false,"html":"<h2 data-original-article=\\"index.html\\">Header<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#index\\" id=\\"index\\"></a></h2><p>Content</p>/n<p><a href=\\"#page1\\">Link 1</a><br>/n<a href=\\"page2.html\\">Link 2</a></p>/n<hr class=\\"yfm-page__delimeter\\"><h2 data-original-article=\\"page1.html\\">Page 1<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page1\\" id=\\"page1\\"></a></h2><p><a href=\\"page2.html#hash\\">Link</a></p>/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Skip html extension"},"router":{"pathname":"pdf-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
|
|
27
|
+
{"data":{"leading":false,"pdfTitlePages":{"content":"","pageCount":0},"html":"<h2 data-original-article=\\"index.html\\">Header<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#index\\" id=\\"index\\"></a></h2><p>Content</p>/n<p><a href=\\"#page1\\">Link 1</a><br>/n<a href=\\"page2.html\\">Link 2</a></p>/n<hr class=\\"yfm-page__delimeter\\"><h2 data-original-article=\\"page1.html\\">Page 1<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page1\\" id=\\"page1\\"></a></h2><p><a href=\\"page2.html#hash\\">Link</a></p>/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Skip html extension"},"router":{"pathname":"pdf-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
|
|
28
28
|
</script>
|
|
29
29
|
<script type="application/javascript">
|
|
30
30
|
const data = document.querySelector('script#diplodoc-state');
|
|
@@ -38,7 +38,7 @@ exports[`Pdf page mode > creates a pdf folder when the .yfm option is specified
|
|
|
38
38
|
</html>"
|
|
39
39
|
`;
|
|
40
40
|
|
|
41
|
-
exports[`Pdf page mode > creates a pdf folder when the .yfm option is specified 3`] = `"{"data":{"leading":false,"html":"<h2 data-original-article=\\"index.html\\">Header<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#index\\" id=\\"index\\"></a></h2><p>Content</p>/n<p><a href=\\"#page1\\">Link 1</a><br>/n<a href=\\"page2.html\\">Link 2</a></p>/n<hr class=\\"yfm-page__delimeter\\"><h2 data-original-article=\\"page1.html\\">Page 1<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page1\\" id=\\"page1\\"></a></h2><p><a href=\\"page2.html#hash\\">Link</a></p>/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Skip html extension","toc":{"title":"Skip html extension","href":"index.html","items":[{"name":"Title 1","href":"page1.html","id":"UUID"}],"path":"toc.yaml","id":"UUID"}},"router":{"pathname":"pdf-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}"`;
|
|
41
|
+
exports[`Pdf page mode > creates a pdf folder when the .yfm option is specified 3`] = `"{"data":{"leading":false,"pdfTitlePages":{"content":"","pageCount":0},"html":"<h2 data-original-article=\\"index.html\\">Header<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#index\\" id=\\"index\\"></a></h2><p>Content</p>/n<p><a href=\\"#page1\\">Link 1</a><br>/n<a href=\\"page2.html\\">Link 2</a></p>/n<hr class=\\"yfm-page__delimeter\\"><h2 data-original-article=\\"page1.html\\">Page 1<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page1\\" id=\\"page1\\"></a></h2><p><a href=\\"page2.html#hash\\">Link</a></p>/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Skip html extension","toc":{"title":"Skip html extension","href":"index.html","items":[{"name":"Title 1","href":"page1.html","id":"UUID"}],"path":"toc.yaml","id":"UUID"}},"router":{"pathname":"pdf-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}"`;
|
|
42
42
|
|
|
43
43
|
exports[`Pdf page mode > creates a pdf folder when the --pdf flag is specified > filelist 1`] = `
|
|
44
44
|
"[
|
|
@@ -64,7 +64,7 @@ exports[`Pdf page mode > creates a pdf folder when the --pdf flag is specified 2
|
|
|
64
64
|
<body class="g-root g-root_theme_light">
|
|
65
65
|
<div id="root"></div>
|
|
66
66
|
<script type="application/json" id="diplodoc-state">
|
|
67
|
-
{"data":{"leading":false,"html":"<h2 data-original-article=\\"index.html\\">Header<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#index\\" id=\\"index\\"></a></h2><p>Content</p>/n<p><a href=\\"#page1\\">Link 1</a><br>/n<a href=\\"page2.html\\">Link 2</a></p>/n<hr class=\\"yfm-page__delimeter\\"><h2 id=\\"syntax_test_syntax-page\\" data-original-article=\\"syntax/test.html\\"><a href=\\"#syntax_test_syntax-page\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Syntax page</span></a>Syntax page<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#syntax_test\\" id=\\"syntax_test\\"></a></h2>/n<hr class=\\"yfm-page__delimeter\\"><h2 data-original-article=\\"page1.html\\">Page 1<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page1\\" id=\\"page1\\"></a></h2><p><a href=\\"page2.html#hash\\">Link</a></p>/n<h4 id=\\"page1_include-link-page\\"><a href=\\"#page1_include-link-page\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Include link page</span></a>Include link page</h4>/n<p><a href=\\"#syntax_test\\">link</a></p>/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Skip html extension"},"router":{"pathname":"pdf-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
|
|
67
|
+
{"data":{"leading":false,"pdfTitlePages":{"content":"","pageCount":0},"html":"<h2 data-original-article=\\"index.html\\">Header<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#index\\" id=\\"index\\"></a></h2><p>Content</p>/n<p><a href=\\"#page1\\">Link 1</a><br>/n<a href=\\"page2.html\\">Link 2</a></p>/n<hr class=\\"yfm-page__delimeter\\"><h2 id=\\"syntax_test_syntax-page\\" data-original-article=\\"syntax/test.html\\"><a href=\\"#syntax_test_syntax-page\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Syntax page</span></a>Syntax page<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#syntax_test\\" id=\\"syntax_test\\"></a></h2>/n<hr class=\\"yfm-page__delimeter\\"><h2 data-original-article=\\"page1.html\\">Page 1<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page1\\" id=\\"page1\\"></a></h2><p><a href=\\"page2.html#hash\\">Link</a></p>/n<h4 id=\\"page1_include-link-page\\"><a href=\\"#page1_include-link-page\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Include link page</span></a>Include link page</h4>/n<p><a href=\\"#syntax_test\\">link</a></p>/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Skip html extension"},"router":{"pathname":"pdf-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
|
|
68
68
|
</script>
|
|
69
69
|
<script type="application/javascript">
|
|
70
70
|
const data = document.querySelector('script#diplodoc-state');
|
|
@@ -78,4 +78,56 @@ exports[`Pdf page mode > creates a pdf folder when the --pdf flag is specified 2
|
|
|
78
78
|
</html>"
|
|
79
79
|
`;
|
|
80
80
|
|
|
81
|
-
exports[`Pdf page mode > creates a pdf folder when the --pdf flag is specified 3`] = `"{"data":{"leading":false,"html":"<h2 data-original-article=\\"index.html\\">Header<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#index\\" id=\\"index\\"></a></h2><p>Content</p>/n<p><a href=\\"#page1\\">Link 1</a><br>/n<a href=\\"page2.html\\">Link 2</a></p>/n<hr class=\\"yfm-page__delimeter\\"><h2 id=\\"syntax_test_syntax-page\\" data-original-article=\\"syntax/test.html\\"><a href=\\"#syntax_test_syntax-page\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Syntax page</span></a>Syntax page<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#syntax_test\\" id=\\"syntax_test\\"></a></h2>/n<hr class=\\"yfm-page__delimeter\\"><h2 data-original-article=\\"page1.html\\">Page 1<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page1\\" id=\\"page1\\"></a></h2><p><a href=\\"page2.html#hash\\">Link</a></p>/n<h4 id=\\"page1_include-link-page\\"><a href=\\"#page1_include-link-page\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Include link page</span></a>Include link page</h4>/n<p><a href=\\"#syntax_test\\">link</a></p>/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Skip html extension","toc":{"title":"Skip html extension","href":"index.html","items":[{"name":"Syntax","href":"syntax/test.html","id":"UUID"},{"name":"Title 1","href":"page1.html","id":"UUID"}],"path":"toc.yaml","id":"UUID"}},"router":{"pathname":"pdf-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}"`;
|
|
81
|
+
exports[`Pdf page mode > creates a pdf folder when the --pdf flag is specified 3`] = `"{"data":{"leading":false,"pdfTitlePages":{"content":"","pageCount":0},"html":"<h2 data-original-article=\\"index.html\\">Header<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#index\\" id=\\"index\\"></a></h2><p>Content</p>/n<p><a href=\\"#page1\\">Link 1</a><br>/n<a href=\\"page2.html\\">Link 2</a></p>/n<hr class=\\"yfm-page__delimeter\\"><h2 id=\\"syntax_test_syntax-page\\" data-original-article=\\"syntax/test.html\\"><a href=\\"#syntax_test_syntax-page\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Syntax page</span></a>Syntax page<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#syntax_test\\" id=\\"syntax_test\\"></a></h2>/n<hr class=\\"yfm-page__delimeter\\"><h2 data-original-article=\\"page1.html\\">Page 1<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page1\\" id=\\"page1\\"></a></h2><p><a href=\\"page2.html#hash\\">Link</a></p>/n<h4 id=\\"page1_include-link-page\\"><a href=\\"#page1_include-link-page\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Include link page</span></a>Include link page</h4>/n<p><a href=\\"#syntax_test\\">link</a></p>/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Skip html extension","toc":{"title":"Skip html extension","href":"index.html","items":[{"name":"Syntax","href":"syntax/test.html","id":"UUID"},{"name":"Title 1","href":"page1.html","id":"UUID"}],"path":"toc.yaml","id":"UUID"}},"router":{"pathname":"pdf-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}"`;
|
|
82
|
+
|
|
83
|
+
exports[`Pdf page with titles > Generates content for pdf genrator with title pages > filelist 1`] = `
|
|
84
|
+
"[
|
|
85
|
+
"pdf-page-toc.js",
|
|
86
|
+
"pdf-page.html",
|
|
87
|
+
"pdf-page.json"
|
|
88
|
+
]"
|
|
89
|
+
`;
|
|
90
|
+
|
|
91
|
+
exports[`Pdf page with titles > Generates content for pdf genrator with title pages 1`] = `"window.__DATA__.data.toc = {"title":"Pdf title pages","href":"#index","pdf":{"startPages":["./pdf-titles/pdf-title-page1.md","./pdf-titles/pdf-title-page2.md"]},"items":[{"name":"Title 1","href":"#page1","id":"UUID"},{"name":"Title 2","href":"#page2","id":"UUID"}],"path":"toc.yaml","id":"UUID"};"`;
|
|
92
|
+
|
|
93
|
+
exports[`Pdf page with titles > Generates content for pdf genrator with title pages 2`] = `
|
|
94
|
+
"<!DOCTYPE html>
|
|
95
|
+
<html lang="ru" dir="ltr">
|
|
96
|
+
<head>
|
|
97
|
+
<meta charset="utf-8">
|
|
98
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
99
|
+
<base href="./" />
|
|
100
|
+
<title>Pdf title pages | Pdf title pages</title>
|
|
101
|
+
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
|
|
102
|
+
<style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
|
|
103
|
+
</head>
|
|
104
|
+
<body class="g-root g-root_theme_light">
|
|
105
|
+
<div id="root"></div>
|
|
106
|
+
<script type="application/json" id="diplodoc-state">
|
|
107
|
+
{"data":{"leading":false,"pdfTitlePages":{"content":"<h2 id=\\"pdf-titles_pdf-title-page1_pdf-title-page-1\\" data-original-article=\\"./pdf-titles/pdf-title-page1.html\\"><a href=\\"#pdf-titles_pdf-title-page1_pdf-title-page-1\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Pdf title page 1</span></a>Pdf title page 1<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#pdf-titles_pdf-title-page1\\" id=\\"pdf-titles_pdf-title-page1\\"></a></h2>/n<p>Should be able to use variables pdf</p>/n<p>Should be able to use link to other pages <a href=\\"#page1\\">test</a></p>/n<p>Should be able to use inlcudes</p>/n<h4 id=\\"pdf-titles_pdf-title-page1_include-pdf-title\\"><a href=\\"#pdf-titles_pdf-title-page1_include-pdf-title\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Include Pdf title</span></a>Include Pdf title</h4>/n<p>Should be able to resolve liquid syntax</p>/n<p>should be visible</p>/n<hr class=\\"yfm-page__delimeter\\"><h2 id=\\"pdf-titles_pdf-title-page2_pdf-title-page-2\\" data-original-article=\\"./pdf-titles/pdf-title-page2.html\\"><a href=\\"#pdf-titles_pdf-title-page2_pdf-title-page-2\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Pdf title page 2</span></a>Pdf title page 2<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#pdf-titles_pdf-title-page2\\" id=\\"pdf-titles_pdf-title-page2\\"></a></h2>/n<style>.pdf-title-page-wrapper {/n height: 400px;/n background-color: grey;/n}/n/nimg {/n width: 100px;/n height: 100px;/n}</style>/n<p><img src=\\"../__images/mountain.jpg\\" alt></p>/n<div class=\\"pdf-title-page-wrapper\\">/n <p>Lorem ipsum title page with var pdf</p>/n</div>","pageCount":2},"html":"<h2 data-original-article=\\"page1.html\\">Page 1<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page1\\" id=\\"page1\\"></a></h2><p>Page 1 content</p>/n<hr class=\\"yfm-page__delimeter\\"><h2 data-original-article=\\"page2.html\\">Page 2<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page2\\" id=\\"page2\\"></a></h2><p>Page 2 content</p>/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Pdf title pages"},"router":{"pathname":"pdf-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
|
|
108
|
+
</script>
|
|
109
|
+
<script type="application/javascript">
|
|
110
|
+
const data = document.querySelector('script#diplodoc-state');
|
|
111
|
+
window.__DATA__ = JSON.parse((function unescape(string) {
|
|
112
|
+
return string.replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
113
|
+
})(data.innerText));
|
|
114
|
+
window.STATIC_CONTENT = false;
|
|
115
|
+
</script>
|
|
116
|
+
<script type="application/javascript" defer src="pdf-page.html"></script>
|
|
117
|
+
</body>
|
|
118
|
+
</html>"
|
|
119
|
+
`;
|
|
120
|
+
|
|
121
|
+
exports[`Pdf page with titles > Generates content for pdf genrator with title pages 3`] = `"{"data":{"leading":false,"pdfTitlePages":{"content":"<h2 id=\\"pdf-titles_pdf-title-page1_pdf-title-page-1\\" data-original-article=\\"./pdf-titles/pdf-title-page1.html\\"><a href=\\"#pdf-titles_pdf-title-page1_pdf-title-page-1\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Pdf title page 1</span></a>Pdf title page 1<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#pdf-titles_pdf-title-page1\\" id=\\"pdf-titles_pdf-title-page1\\"></a></h2>/n<p>Should be able to use variables pdf</p>/n<p>Should be able to use link to other pages <a href=\\"#page1\\">test</a></p>/n<p>Should be able to use inlcudes</p>/n<h4 id=\\"pdf-titles_pdf-title-page1_include-pdf-title\\"><a href=\\"#pdf-titles_pdf-title-page1_include-pdf-title\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Include Pdf title</span></a>Include Pdf title</h4>/n<p>Should be able to resolve liquid syntax</p>/n<p>should be visible</p>/n<hr class=\\"yfm-page__delimeter\\"><h2 id=\\"pdf-titles_pdf-title-page2_pdf-title-page-2\\" data-original-article=\\"./pdf-titles/pdf-title-page2.html\\"><a href=\\"#pdf-titles_pdf-title-page2_pdf-title-page-2\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Pdf title page 2</span></a>Pdf title page 2<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#pdf-titles_pdf-title-page2\\" id=\\"pdf-titles_pdf-title-page2\\"></a></h2>/n<style>.pdf-title-page-wrapper {/n height: 400px;/n background-color: grey;/n}/n/nimg {/n width: 100px;/n height: 100px;/n}</style>/n<p><img src=\\"../__images/mountain.jpg\\" alt></p>/n<div class=\\"pdf-title-page-wrapper\\">/n <p>Lorem ipsum title page with var pdf</p>/n</div>","pageCount":2},"html":"<h2 data-original-article=\\"page1.html\\">Page 1<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page1\\" id=\\"page1\\"></a></h2><p>Page 1 content</p>/n<hr class=\\"yfm-page__delimeter\\"><h2 data-original-article=\\"page2.html\\">Page 2<a class=\\"yfm-anchor\\" aria-hidden=\\"true\\" href=\\"#page2\\" id=\\"page2\\"></a></h2><p>Page 2 content</p>/n","headings":[],"meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}]},"title":"Pdf title pages","toc":{"title":"Pdf title pages","href":"index.html","pdf":{"startPages":["./pdf-titles/pdf-title-page1.md","./pdf-titles/pdf-title-page2.md"]},"items":[{"name":"Title 1","href":"page1.html","id":"UUID"},{"name":"Title 2","href":"page2.html","id":"UUID"}],"path":"toc.yaml","id":"UUID"}},"router":{"pathname":"pdf-page","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}"`;
|
|
122
|
+
|
|
123
|
+
exports[`Pdf page with titles > Generates pdf title pages as regular entries for debug purpose > filelist 1`] = `
|
|
124
|
+
"[
|
|
125
|
+
"__images/mountain.jpg",
|
|
126
|
+
"index.html",
|
|
127
|
+
"page1.html",
|
|
128
|
+
"page2.html",
|
|
129
|
+
"pdf-titles/pdf-title-page1.html",
|
|
130
|
+
"pdf-titles/pdf-title-page2.html",
|
|
131
|
+
"toc.js"
|
|
132
|
+
]"
|
|
133
|
+
`;
|
|
@@ -593,7 +593,7 @@ Generated server url
|
|
|
593
593
|
A {.openapi-table-parameter-name}
|
|
594
594
|
|
|
|
595
595
|
**Type:** string
|
|
596
|
-
|||#
|
|
596
|
+
|||#{.openapi-table}
|
|
597
597
|
|
|
598
598
|
</div>
|
|
599
599
|
|
|
@@ -1206,7 +1206,7 @@ exports[`Regression > internal 48`] = `
|
|
|
1206
1206
|
<body class="g-root g-root_theme_light">
|
|
1207
1207
|
<div id="root"></div>
|
|
1208
1208
|
<script type="application/json" id="diplodoc-state">
|
|
1209
|
-
{"data":{"leading":false,"html":"<div class=\\"openapi\\">/n<h1>Simple get operation. тест новой верстки 3</h1>/n<p>Defines a simple get operation with no inputs and a complex</p>/n<h2 id=\\"request\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#request\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Request</span></a>Request</h2>/n<div class=\\"openapi__requests\\">/n<div class=\\"openapi__request__wrapper\\" style=\\"--method:var(--dc-openapi-methods-get);margin-bottom:12px\\">/n<div class=\\"openapi__request\\">/n<p class=\\"openapi__method\\">GET</p>/n/n <div class=\\"yfm-clipboard\\">/n <pre><code class=\\"hljs text\\">http://localhost:8080/test/n</code></pre>/n/n <button class=\\"yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-clipboard-icon\\" data-animation=\\"16\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-16\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-16\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-16.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n</div>/n<p>Generated server url</p>/n</div>/n</div>/n<h2 id=\\"responses\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#responses\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Responses</span></a>Responses</h2>/n<div class=\\"openapi__response__code__200\\">/n<h2 id=\\"200-ok\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#200-ok\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">200 OK</span></a>200 OK</h2>/n<p>200!!!!</p>/n<div class=\\"openapi-entity\\">/n<h3 id=\\"body\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#body\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Body</span></a>Body</h3>/n<details class=\\"yfm-cut\\"><summary class=\\"yfm-cut-title\\">application/json</summary><div class=\\"yfm-cut-content\\">/n <div class=\\"yfm-clipboard\\">/n <pre><code class=\\"hljs json\\"><span class=\\"hljs-punctuation\\">{</span>/n <span class=\\"hljs-attr\\">\\"A\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"string\\"</span>/n<span class=\\"hljs-punctuation\\">}</span>/n</code></pre>/n/n <button class=\\"yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-clipboard-icon\\" data-animation=\\"42\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-42\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-42\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-42.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n</div></details><table>/n<tbody>/n<tr>/n<td>/n<p><strong>Name</strong></p>/n</td>/n<td>/n<p><strong>Description</strong></p>/n</td>/n</tr>/n<tr>/n<td class=\\"openapi-table-parameter-name\\">/n<p>A</p>/n</td>/n<td>/n<p><strong>Type:</strong> string</p>/n</td>/n</tr>/n</tbody>/n</table>/n</div>/n</div>/n/n</div>/n<dfn class=\\"yfm yfm-term_dfn\\" id=\\":Deprecated_element\\" role=\\"dialog\\"><p>No longer supported, please use an alternative and newer version.</p>/n</dfn>","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"style":["_assets/cut-extension.css"],"script":["_assets/cut-extension.js"],"vcsPath":"openapi/test-controller/getWithPayloadResponse.md"},"headings":[{"title":"Request","href":"openapi/test-controller/getWithPayloadResponse.html#request","level":2},{"title":"Responses","href":"openapi/test-controller/getWithPayloadResponse.html#responses","level":2},{"title":"200 OK","href":"openapi/test-controller/getWithPayloadResponse.html#200-ok","level":2,"items":[{"title":"Body","href":"openapi/test-controller/getWithPayloadResponse.html#body","level":3}]}],"title":""},"router":{"pathname":"openapi/test-controller/getWithPayloadResponse","depth":3,"base":"../../"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
|
|
1209
|
+
{"data":{"leading":false,"html":"<div class=\\"openapi\\">/n<h1>Simple get operation. тест новой верстки 3</h1>/n<p>Defines a simple get operation with no inputs and a complex</p>/n<h2 id=\\"request\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#request\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Request</span></a>Request</h2>/n<div class=\\"openapi__requests\\">/n<div class=\\"openapi__request__wrapper\\" style=\\"--method:var(--dc-openapi-methods-get);margin-bottom:12px\\">/n<div class=\\"openapi__request\\">/n<p class=\\"openapi__method\\">GET</p>/n/n <div class=\\"yfm-clipboard\\">/n <pre><code class=\\"hljs text\\">http://localhost:8080/test/n</code></pre>/n/n <button class=\\"yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-clipboard-icon\\" data-animation=\\"16\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-16\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-16\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-16.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n</div>/n<p>Generated server url</p>/n</div>/n</div>/n<h2 id=\\"responses\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#responses\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Responses</span></a>Responses</h2>/n<div class=\\"openapi__response__code__200\\">/n<h2 id=\\"200-ok\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#200-ok\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">200 OK</span></a>200 OK</h2>/n<p>200!!!!</p>/n<div class=\\"openapi-entity\\">/n<h3 id=\\"body\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#body\\" class=\\"yfm-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Body</span></a>Body</h3>/n<details class=\\"yfm-cut\\"><summary class=\\"yfm-cut-title\\">application/json</summary><div class=\\"yfm-cut-content\\">/n <div class=\\"yfm-clipboard\\">/n <pre><code class=\\"hljs json\\"><span class=\\"hljs-punctuation\\">{</span>/n <span class=\\"hljs-attr\\">\\"A\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"string\\"</span>/n<span class=\\"hljs-punctuation\\">}</span>/n</code></pre>/n/n <button class=\\"yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-clipboard-icon\\" data-animation=\\"42\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-42\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-42\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-42.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n</div></details><table class=\\"openapi-table\\">/n<tbody>/n<tr>/n<td>/n<p><strong>Name</strong></p>/n</td>/n<td>/n<p><strong>Description</strong></p>/n</td>/n</tr>/n<tr>/n<td class=\\"openapi-table-parameter-name\\">/n<p>A</p>/n</td>/n<td>/n<p><strong>Type:</strong> string</p>/n</td>/n</tr>/n</tbody>/n</table>/n</div>/n</div>/n/n</div>/n<dfn class=\\"yfm yfm-term_dfn\\" id=\\":Deprecated_element\\" role=\\"dialog\\"><p>No longer supported, please use an alternative and newer version.</p>/n</dfn>","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"style":["_assets/cut-extension.css"],"script":["_assets/cut-extension.js"],"vcsPath":"openapi/test-controller/getWithPayloadResponse.md"},"headings":[{"title":"Request","href":"openapi/test-controller/getWithPayloadResponse.html#request","level":2},{"title":"Responses","href":"openapi/test-controller/getWithPayloadResponse.html#responses","level":2},{"title":"200 OK","href":"openapi/test-controller/getWithPayloadResponse.html#200-ok","level":2,"items":[{"title":"Body","href":"openapi/test-controller/getWithPayloadResponse.html#body","level":3}]}],"title":""},"router":{"pathname":"openapi/test-controller/getWithPayloadResponse","depth":3,"base":"../../"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
|
|
1210
1210
|
</script>
|
|
1211
1211
|
<script type="application/javascript">
|
|
1212
1212
|
const data = document.querySelector('script#diplodoc-state');
|
|
@@ -261,7 +261,7 @@ Generated server url
|
|
|
261
261
|
A {.openapi-table-parameter-name}
|
|
262
262
|
|
|
|
263
263
|
**Type:** string
|
|
264
|
-
|||#
|
|
264
|
+
|||#{.openapi-table}
|
|
265
265
|
|
|
266
266
|
</div>
|
|
267
267
|
|
|
@@ -572,7 +572,7 @@ Generated server url
|
|
|
572
572
|
A {.openapi-table-parameter-name}
|
|
573
573
|
|
|
|
574
574
|
**Type:** string
|
|
575
|
-
|||#
|
|
575
|
+
|||#{.openapi-table}
|
|
576
576
|
|
|
577
577
|
</div>
|
|
578
578
|
|
|
@@ -622,6 +622,86 @@ path: toc.yaml
|
|
|
622
622
|
"
|
|
623
623
|
`;
|
|
624
624
|
|
|
625
|
+
exports[`Translate command > compose openapi spec files > filelist 1`] = `
|
|
626
|
+
"[
|
|
627
|
+
"openapi-spec.yaml",
|
|
628
|
+
"toc.yaml"
|
|
629
|
+
]"
|
|
630
|
+
`;
|
|
631
|
+
|
|
632
|
+
exports[`Translate command > compose openapi spec files 1`] = `
|
|
633
|
+
"openapi: 3.0.1
|
|
634
|
+
info:
|
|
635
|
+
title: Перевод 1
|
|
636
|
+
version: v0
|
|
637
|
+
servers:
|
|
638
|
+
- url: http://localhost:8080
|
|
639
|
+
description: Перевод 2
|
|
640
|
+
paths:
|
|
641
|
+
/test:
|
|
642
|
+
get:
|
|
643
|
+
tags:
|
|
644
|
+
- Перевод 3
|
|
645
|
+
summary: Перевод 4
|
|
646
|
+
description: Перевод 5
|
|
647
|
+
operationId: getWithPayloadResponse
|
|
648
|
+
responses:
|
|
649
|
+
'200':
|
|
650
|
+
description: Перевод 6
|
|
651
|
+
content:
|
|
652
|
+
application/json:
|
|
653
|
+
schema:
|
|
654
|
+
type: object
|
|
655
|
+
properties:
|
|
656
|
+
A:
|
|
657
|
+
type: string
|
|
658
|
+
description: |
|
|
659
|
+
Перевод 7
|
|
660
|
+
- Перевод 8
|
|
661
|
+
- Перевод 9
|
|
662
|
+
- Перевод 10
|
|
663
|
+
components:
|
|
664
|
+
schemas:
|
|
665
|
+
RecurceTop:
|
|
666
|
+
type: object
|
|
667
|
+
properties:
|
|
668
|
+
A:
|
|
669
|
+
type: string
|
|
670
|
+
description: |
|
|
671
|
+
Перевод 7
|
|
672
|
+
- Перевод 8
|
|
673
|
+
- Перевод 9
|
|
674
|
+
- Перевод 10
|
|
675
|
+
RecurceMiddle:
|
|
676
|
+
type: object
|
|
677
|
+
properties:
|
|
678
|
+
B:
|
|
679
|
+
type: array
|
|
680
|
+
items:
|
|
681
|
+
type: object
|
|
682
|
+
properties:
|
|
683
|
+
A:
|
|
684
|
+
type: string
|
|
685
|
+
description: |
|
|
686
|
+
Перевод 7
|
|
687
|
+
- Перевод 8
|
|
688
|
+
- Перевод 9
|
|
689
|
+
- Перевод 10
|
|
690
|
+
"
|
|
691
|
+
`;
|
|
692
|
+
|
|
693
|
+
exports[`Translate command > compose openapi spec files 2`] = `
|
|
694
|
+
"items:
|
|
695
|
+
- name: Перевод 1
|
|
696
|
+
include:
|
|
697
|
+
path: openapi
|
|
698
|
+
includers:
|
|
699
|
+
- name: openapi
|
|
700
|
+
input: openapi-spec.yaml
|
|
701
|
+
mode: link
|
|
702
|
+
"
|
|
703
|
+
`;
|
|
704
|
+
|
|
625
705
|
exports[`Translate command > do not filter files on extract > filelist 1`] = `
|
|
626
706
|
"[
|
|
627
707
|
"es/_includes/test.md.skl",
|
|
@@ -862,6 +942,132 @@ exports[`Translate command > extract openapi spec files 4`] = `
|
|
|
862
942
|
</xliff>"
|
|
863
943
|
`;
|
|
864
944
|
|
|
945
|
+
exports[`Translate command > extract openapi spec files with custom openapi schema provided > filelist 1`] = `
|
|
946
|
+
"[
|
|
947
|
+
"openapi-spec.yaml.skl",
|
|
948
|
+
"openapi-spec.yaml.xliff",
|
|
949
|
+
"toc.yaml.skl",
|
|
950
|
+
"toc.yaml.xliff"
|
|
951
|
+
]"
|
|
952
|
+
`;
|
|
953
|
+
|
|
954
|
+
exports[`Translate command > extract openapi spec files with custom openapi schema provided 1`] = `
|
|
955
|
+
"openapi: 3.0.1
|
|
956
|
+
info:
|
|
957
|
+
title: '%%%0%%%'
|
|
958
|
+
version: v0
|
|
959
|
+
servers:
|
|
960
|
+
- url: http://localhost:8080
|
|
961
|
+
description: '%%%1%%%'
|
|
962
|
+
paths:
|
|
963
|
+
/test:
|
|
964
|
+
get:
|
|
965
|
+
tags:
|
|
966
|
+
- test-controller
|
|
967
|
+
summary: '%%%2%%%'
|
|
968
|
+
description: '%%%3%%%'
|
|
969
|
+
operationId: getWithPayloadResponse
|
|
970
|
+
responses:
|
|
971
|
+
'200':
|
|
972
|
+
description: '%%%4%%%'
|
|
973
|
+
content:
|
|
974
|
+
application/json:
|
|
975
|
+
schema:
|
|
976
|
+
$ref: '#/components/schemas/RecurceTop'
|
|
977
|
+
components:
|
|
978
|
+
schemas:
|
|
979
|
+
RecurceTop:
|
|
980
|
+
type: object
|
|
981
|
+
properties:
|
|
982
|
+
A:
|
|
983
|
+
type: string
|
|
984
|
+
description: |
|
|
985
|
+
%%%5%%%
|
|
986
|
+
- %%%6%%%
|
|
987
|
+
- %%%7%%%
|
|
988
|
+
- %%%8%%%
|
|
989
|
+
RecurceMiddle:
|
|
990
|
+
type: object
|
|
991
|
+
properties:
|
|
992
|
+
B:
|
|
993
|
+
type: array
|
|
994
|
+
items:
|
|
995
|
+
$ref: '#/components/schemas/RecurceTop'
|
|
996
|
+
"
|
|
997
|
+
`;
|
|
998
|
+
|
|
999
|
+
exports[`Translate command > extract openapi spec files with custom openapi schema provided 2`] = `
|
|
1000
|
+
"<?xml version="1.0" encoding="UTF-8"?>
|
|
1001
|
+
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
|
1002
|
+
<file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
|
|
1003
|
+
<header>
|
|
1004
|
+
<skeleton>
|
|
1005
|
+
<external-file href="file.skl"></external-file>
|
|
1006
|
+
</skeleton>
|
|
1007
|
+
</header>
|
|
1008
|
+
<body>
|
|
1009
|
+
<trans-unit id="0">
|
|
1010
|
+
<source xml:space="preserve">OpenAPI definition</source>
|
|
1011
|
+
</trans-unit>
|
|
1012
|
+
<trans-unit id="1">
|
|
1013
|
+
<source xml:space="preserve">Generated server url</source>
|
|
1014
|
+
</trans-unit>
|
|
1015
|
+
<trans-unit id="2">
|
|
1016
|
+
<source xml:space="preserve">Simple get operation. тест новой верстки 3</source>
|
|
1017
|
+
</trans-unit>
|
|
1018
|
+
<trans-unit id="3">
|
|
1019
|
+
<source xml:space="preserve">Defines a simple get operation with no inputs and a complex</source>
|
|
1020
|
+
</trans-unit>
|
|
1021
|
+
<trans-unit id="4">
|
|
1022
|
+
<source xml:space="preserve">200!!!!</source>
|
|
1023
|
+
</trans-unit>
|
|
1024
|
+
<trans-unit id="5">
|
|
1025
|
+
<source xml:space="preserve">Статус загрузки:</source>
|
|
1026
|
+
</trans-unit>
|
|
1027
|
+
<trans-unit id="6">
|
|
1028
|
+
<source xml:space="preserve"><x ctype="code_open" equiv-text="\`" id="x-1"/>UPLOADED<x ctype="code_close" equiv-text="\`" id="x-2"/> — загрузка завершена.</source>
|
|
1029
|
+
</trans-unit>
|
|
1030
|
+
<trans-unit id="7">
|
|
1031
|
+
<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>
|
|
1032
|
+
</trans-unit>
|
|
1033
|
+
<trans-unit id="8">
|
|
1034
|
+
<source xml:space="preserve"><x ctype="code_open" equiv-text="\`" id="x-5"/>PROCESSED<x ctype="code_close" equiv-text="\`" id="x-6"/> — загрузка успешно обработана.</source>
|
|
1035
|
+
</trans-unit>
|
|
1036
|
+
</body>
|
|
1037
|
+
</file>
|
|
1038
|
+
</xliff>"
|
|
1039
|
+
`;
|
|
1040
|
+
|
|
1041
|
+
exports[`Translate command > extract openapi spec files with custom openapi schema provided 3`] = `
|
|
1042
|
+
"items:
|
|
1043
|
+
- name: '%%%0%%%'
|
|
1044
|
+
include:
|
|
1045
|
+
path: openapi
|
|
1046
|
+
includers:
|
|
1047
|
+
- name: openapi
|
|
1048
|
+
input: openapi-spec.yaml
|
|
1049
|
+
mode: link
|
|
1050
|
+
"
|
|
1051
|
+
`;
|
|
1052
|
+
|
|
1053
|
+
exports[`Translate command > extract openapi spec files with custom openapi schema provided 4`] = `
|
|
1054
|
+
"<?xml version="1.0" encoding="UTF-8"?>
|
|
1055
|
+
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
|
1056
|
+
<file original="file.ext" source-language="ru-RU" target-language="es-ES" datatype="markdown">
|
|
1057
|
+
<header>
|
|
1058
|
+
<skeleton>
|
|
1059
|
+
<external-file href="file.skl"></external-file>
|
|
1060
|
+
</skeleton>
|
|
1061
|
+
</header>
|
|
1062
|
+
<body>
|
|
1063
|
+
<trans-unit id="0">
|
|
1064
|
+
<source xml:space="preserve">openapi</source>
|
|
1065
|
+
</trans-unit>
|
|
1066
|
+
</body>
|
|
1067
|
+
</file>
|
|
1068
|
+
</xliff>"
|
|
1069
|
+
`;
|
|
1070
|
+
|
|
865
1071
|
exports[`Translate command > extract yaml scheme files > filelist 1`] = `
|
|
866
1072
|
"[
|
|
867
1073
|
"en/index-direct.yaml.skl",
|
package/e2e/pdf-page.spec.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import {describe, test} from 'vitest';
|
|
2
2
|
|
|
3
|
-
import {TestAdapter, compareDirectories, getTestPaths} from '../fixtures';
|
|
3
|
+
import {TestAdapter, cleanupDirectory, compareDirectories, getTestPaths} from '../fixtures';
|
|
4
4
|
|
|
5
|
-
const generateMapTestTemplate = (
|
|
5
|
+
const generateMapTestTemplate = (
|
|
6
|
+
testTitle: string,
|
|
7
|
+
testRootPath: string,
|
|
8
|
+
args: string,
|
|
9
|
+
folder = 'pdf',
|
|
10
|
+
ignoreFileContent = false,
|
|
11
|
+
) => {
|
|
6
12
|
test(testTitle, async () => {
|
|
7
13
|
const {inputPath, outputPath} = getTestPaths(testRootPath);
|
|
8
14
|
|
|
@@ -12,7 +18,8 @@ const generateMapTestTemplate = (testTitle: string, testRootPath: string, args:
|
|
|
12
18
|
args,
|
|
13
19
|
});
|
|
14
20
|
|
|
15
|
-
await compareDirectories(`${outputPath}
|
|
21
|
+
await compareDirectories(`${outputPath}/${folder}`, ignoreFileContent);
|
|
22
|
+
await cleanupDirectory(outputPath);
|
|
16
23
|
});
|
|
17
24
|
};
|
|
18
25
|
|
|
@@ -29,3 +36,19 @@ describe('Pdf page mode', () => {
|
|
|
29
36
|
'-j2',
|
|
30
37
|
);
|
|
31
38
|
});
|
|
39
|
+
|
|
40
|
+
describe('Pdf page with titles', () => {
|
|
41
|
+
generateMapTestTemplate(
|
|
42
|
+
'Generates content for pdf genrator with title pages',
|
|
43
|
+
'mocks/pdf-page/title-pages',
|
|
44
|
+
'--pdf',
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
generateMapTestTemplate(
|
|
48
|
+
'Generates pdf title pages as regular entries for debug purpose',
|
|
49
|
+
'mocks/pdf-page/title-pages',
|
|
50
|
+
'--pdf-debug',
|
|
51
|
+
'',
|
|
52
|
+
true,
|
|
53
|
+
);
|
|
54
|
+
});
|
package/e2e/translation.spec.ts
CHANGED
|
@@ -67,6 +67,22 @@ describe('Translate command', () => {
|
|
|
67
67
|
target: 'es-ES',
|
|
68
68
|
});
|
|
69
69
|
|
|
70
|
+
generateFilesYamlTestTemplate(
|
|
71
|
+
'extract openapi spec files with custom openapi schema provided',
|
|
72
|
+
'mocks/translation/custom-schema',
|
|
73
|
+
{
|
|
74
|
+
subcommand: 'extract',
|
|
75
|
+
source: 'ru-RU',
|
|
76
|
+
target: 'es-ES',
|
|
77
|
+
},
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
generateFilesYamlTestTemplate('compose openapi spec files', 'mocks/translation/compose', {
|
|
81
|
+
subcommand: 'compose',
|
|
82
|
+
source: 'ru-RU',
|
|
83
|
+
target: 'es-ES',
|
|
84
|
+
});
|
|
85
|
+
|
|
70
86
|
generateMapTestTemplate('do not filter files on extract', 'mocks/translation/dir-files', {
|
|
71
87
|
subcommand: 'extract',
|
|
72
88
|
source: 'ru-RU',
|
package/fixtures/cliAdapter.ts
CHANGED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
### Include Pdf title
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# PDF mock index
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
### Pdf title page 1
|
|
2
|
+
|
|
3
|
+
Should be able to use variables {{test}}
|
|
4
|
+
|
|
5
|
+
Should be able to use link to other pages [test](../page1.md)
|
|
6
|
+
|
|
7
|
+
Should be able to use inlcudes
|
|
8
|
+
|
|
9
|
+
{% include [test-include](../__includes/include1.md) %}
|
|
10
|
+
|
|
11
|
+
Should be able to resolve liquid syntax
|
|
12
|
+
|
|
13
|
+
{% if test == "pdf" %} should be visible {% endif %}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
### Pdf title page 2
|
|
2
|
+
|
|
3
|
+
<style>
|
|
4
|
+
.pdf-title-page-wrapper {
|
|
5
|
+
height: 400px;
|
|
6
|
+
background-color: grey
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
img {
|
|
10
|
+
width: 100px;
|
|
11
|
+
height: 100px;
|
|
12
|
+
}
|
|
13
|
+
</style>
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
<div class="pdf-title-page-wrapper">
|
|
17
|
+
<p>Lorem ipsum title page with var {{test}}</p>
|
|
18
|
+
</div>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
openapi: 3.0.1
|
|
2
|
+
info:
|
|
3
|
+
title: '%%%0%%%'
|
|
4
|
+
version: v0
|
|
5
|
+
servers:
|
|
6
|
+
- url: http://localhost:8080
|
|
7
|
+
description: '%%%1%%%'
|
|
8
|
+
paths:
|
|
9
|
+
/test:
|
|
10
|
+
get:
|
|
11
|
+
tags:
|
|
12
|
+
- '%%%2%%%'
|
|
13
|
+
summary: '%%%3%%%'
|
|
14
|
+
description: '%%%4%%%'
|
|
15
|
+
operationId: getWithPayloadResponse
|
|
16
|
+
responses:
|
|
17
|
+
'200':
|
|
18
|
+
description: '%%%5%%%'
|
|
19
|
+
content:
|
|
20
|
+
application/json:
|
|
21
|
+
schema:
|
|
22
|
+
$ref: '#/components/schemas/RecurceTop'
|
|
23
|
+
components:
|
|
24
|
+
schemas:
|
|
25
|
+
RecurceTop:
|
|
26
|
+
type: object
|
|
27
|
+
properties:
|
|
28
|
+
A:
|
|
29
|
+
type: string
|
|
30
|
+
description: |
|
|
31
|
+
%%%6%%%
|
|
32
|
+
- %%%7%%%
|
|
33
|
+
- %%%8%%%
|
|
34
|
+
- %%%9%%%
|
|
35
|
+
RecurceMiddle:
|
|
36
|
+
type: object
|
|
37
|
+
properties:
|
|
38
|
+
B:
|
|
39
|
+
type: array
|
|
40
|
+
items:
|
|
41
|
+
$ref: '#/components/schemas/RecurceTop'
|