Skip to content

Commit 2e587a2

Browse files
authored
chore: retire outdate multiple languages and update it test snap (#2546)
1 parent 2d090ef commit 2e587a2

File tree

5 files changed

+7
-25
lines changed

5 files changed

+7
-25
lines changed

build/release.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
1717

1818
# test
1919
npm run test
20+
# update snapshot
21+
npm run test:update:snapshot
2022

2123
# commit
2224
git add -A

docs/_navbar.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@
44

55
- [English](/)
66
- [简体中文](/zh-cn/)
7-
- [Deutsch](/de-de/)
8-
- [Español](/es/)
9-
- [Русский](/ru-ru/)

docs/index.html

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
<script>
8282
// Set html "lang" attribute based on URL
8383
(function () {
84-
const lang = location.hash.match(/#\/(de-de|es|ru-ru|zh-cn)\//);
84+
const lang = location.hash.match(/#\/(zh-cn)\//);
8585

8686
if (lang) {
8787
document.documentElement.setAttribute('lang', lang[1]);
@@ -102,12 +102,6 @@
102102
'.*?/changelog':
103103
'https://raw.githubusercontent.com/docsifyjs/docsify/master/CHANGELOG.md',
104104
'/.*/_navbar.md': '/_navbar.md',
105-
'/es/(.*)':
106-
'https://raw.githubusercontent.com/docsifyjs/docs-es/master/$1',
107-
'/de-de/(.*)':
108-
'https://raw.githubusercontent.com/docsifyjs/docs-de/master/$1',
109-
'/ru-ru/(.*)':
110-
'https://raw.githubusercontent.com/docsifyjs/docs-ru/master/$1',
111105
'/zh-cn/(.*)':
112106
'https://cdn.jsdelivr.net/gh/docsifyjs/docs-zh@master/$1',
113107
},
@@ -129,36 +123,24 @@
129123
},
130124
name: 'docsify',
131125
nameLink: {
132-
'/es/': '#/es/',
133-
'/de-de/': '#/de-de/',
134-
'/ru-ru/': '#/ru-ru/',
135126
'/zh-cn/': '#/zh-cn/',
136127
'/': '#/',
137128
},
138129
search: {
139130
// insertAfter: '.app-name',
140131
// insertBefore: '.sidebar-nav',
141132
noData: {
142-
'/es/': '¡No hay resultados!',
143-
'/de-de/': 'Keine Ergebnisse!',
144-
'/ru-ru/': 'Никаких результатов!',
145133
'/zh-cn/': '没有结果!',
146134
'/': 'No results!',
147135
},
148136
paths: 'auto',
149137
placeholder: {
150-
'/es/': 'Buscar',
151-
'/de-de/': 'Suche',
152-
'/ru-ru/': 'Поиск',
153138
'/zh-cn/': '搜索',
154139
'/': 'Search',
155140
},
156-
pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn'],
141+
pathNamespaces: ['/zh-cn'],
157142
},
158143
skipLink: {
159-
'/es/': 'Saltar al contenido principal',
160-
'/de-de/': 'Ga naar de hoofdinhoud',
161-
'/ru-ru/': 'Перейти к основному содержанию',
162144
'/zh-cn/': '跳到主要内容',
163145
},
164146
vueComponents: {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
"test:integration": "npm run test:jest -- --selectProjects integration",
116116
"test:jest": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
117117
"test:unit": "npm run test:jest -- --selectProjects unit",
118+
"test:update:snapshot": "npm run test:jest -- --updateSnapshot",
118119
"test": "run-s test:jest test:e2e",
119120
"watch:css": "run-p 'build:css -- --watch' 'build:css:min -- --watch'",
120121
"watch:js": "npm run build:js -- --watch"

test/integration/__snapshots__/docs.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`Docs Site coverpage renders and is unchanged 1`] = `
55
<div class="mask"></div>
66
<div class="cover-main"><!-- markdownlint-disable first-line-h1 -->
77
8-
<p><img src="http://127.0.0.1:4000/_media/icon.svg" data-origin="_media/icon.svg" alt="logo"></p><h1 id="docsify-4130" tabindex="-1"><a href="#/?id=docsify-4130" data-id="docsify-4130" class="anchor"><span>docsify <small>4.13.0</small></span></a></h1><blockquote>
8+
<p><img src="http://127.0.0.1:4000/_media/icon.svg" data-origin="_media/icon.svg" alt="logo"></p><h1 id="docsify-4131" tabindex="-1"><a href="#/?id=docsify-4131" data-id="docsify-4131" class="anchor"><span>docsify <small>4.13.1</small></span></a></h1><blockquote>
99
<p>A magical documentation site generator</p></blockquote>
1010
<ul><li>Simple and lightweight</li><li>No statically built HTML files</li><li>Multiple themes</li></ul><p><a href="#/?id=docsify" class="button primary">Get Started</a>
1111
<a href="https://github.com/docsifyjs/docsify/" target="_blank" rel="noopener" class="button secondary">GitHub</a></p><!-- ![color](#f0f0f0) -->
@@ -17,7 +17,7 @@ exports[`Docs Site coverpage renders and is unchanged 1`] = `
1717
exports[`Docs Site navbar renders and is unchanged 1`] = `
1818
"<nav class="app-nav" aria-label="secondary"><!-- markdownlint-disable first-line-h1 -->
1919
20-
<ul><li><p>Translations</p><ul><li><a href="#/">English</a></li><li><a href="#/zh-cn/">简体中文</a></li><li><a href="#/de-de/">Deutsch</a></li><li><a href="#/es/">Español</a></li><li><a href="#/ru-ru/">Русский</a></li></ul></li></ul></nav>"
20+
<ul><li><p>Translations</p><ul><li><a href="#/">English</a></li><li><a href="#/zh-cn/">简体中文</a></li></ul></li></ul></nav>"
2121
`;
2222
2323
exports[`Docs Site sidebar renders and is unchanged 1`] = `

0 commit comments

Comments
 (0)