Skip to content

Commit cf006d1

Browse files
Merge branch 'master' of github.com:vuejs/docs-next
2 parents 67ac409 + dd2bf86 commit cf006d1

File tree

13 files changed

+223
-80
lines changed

13 files changed

+223
-80
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ See the [Vue Docs Writing Guide](https://v3.vuejs.org/guide/writing-guide.html)
1111
1. Clone repository
1212

1313
```bash
14-
git clone git@github.com:vuejs/docs-next.git
14+
git clone git@github.com:vuejs/docs.git
1515
```
1616

1717
2. Install dependencies

src/.vuepress/components/community/themes/theme-data.js

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,51 +127,79 @@ export default [
127127
},
128128
{
129129
name: 'PrimeVue',
130-
description: `The open-source UI component library [PrimeVue](https://www.primefaces.org/primevue/#/?af_id=4218) offers over 50 flexible components to build your apps with! They have a ton of different component themes and Vue-CLI application templates available to get the look&feel that suits you best.`,
130+
description: `The open-source UI component library [PrimeVue](https://www.primefaces.org/primevue/#/?af_id=4218) offers over 80 flexible components to build your apps with! They have a ton of different component themes and Vue-CLI application templates available to get the look&feel that suits you best.`,
131131
seeMoreUrl: 'https://www.primefaces.org/primevue/#/?af_id=4218',
132132
products: [
133133
{
134-
name: 'Sapphire',
134+
name: 'Freya',
135+
price: 59,
136+
description: 'Premium Admin Template',
137+
url: 'https://www.primefaces.org/layouts/freya-vue?af_id=4218',
138+
image: 'https://www.primefaces.org/vue-templates/freya.jpg'
139+
},
140+
{
141+
name: 'Diamond',
142+
price: 59,
143+
description: 'PrimeOne Design Admin Template',
144+
url: 'https://www.primefaces.org/layouts/diamond-vue?af_id=4218',
145+
image: 'https://www.primefaces.org/vue-templates/diamond.jpg'
146+
},
147+
{
148+
name: 'Ultima',
135149
price: 79,
136150
description: 'Material Design Admin Template',
151+
url: 'https://www.primefaces.org/layouts/ultima-vue?af_id=4218',
152+
image: 'https://www.primefaces.org/vue-templates/ultima.jpg'
153+
},
154+
{
155+
name: 'Sapphire',
156+
price: 49,
157+
description: 'Material Design Admin Template',
137158
url: 'https://www.primefaces.org/layouts/sapphire-vue?af_id=4218',
138159
image: 'https://www.primefaces.org/vue-templates/sapphire.jpg'
139160
},
140161
{
141162
name: 'Avalon',
142-
price: 79,
163+
price: 49,
143164
description: 'Bootstrap Inspired Admin Template',
144165
url: 'https://www.primefaces.org/layouts/avalon-vue?af_id=4218',
145166
image: 'https://www.primefaces.org/vue-templates/avalon.jpg'
146167
},
147168
{
148169
name: 'Serenity',
149-
price: 79,
170+
price: 49,
150171
description: 'Material Design Admin Template',
151172
url: 'https://www.primefaces.org/layouts/serenity-vue?af_id=4218',
152173
image: 'https://www.primefaces.org/vue-templates/serenity.jpg'
153174
},
154175
{
155176
name: 'Apollo',
156-
price: 79,
177+
price: 49,
157178
description: 'Admin Template with a Dark Mode',
158179
url: 'https://www.primefaces.org/layouts/apollo-vue?af_id=4218',
159180
image: 'https://www.primefaces.org/vue-templates/apollo.jpg'
160181
},
161182
{
162183
name: 'Babylon',
163-
price: 79,
184+
price: 49,
164185
description: 'Admin Template with Extensive Options',
165186
url: 'https://www.primefaces.org/layouts/babylon-vue?af_id=4218',
166187
image: 'https://www.primefaces.org/vue-templates/babylon.jpg'
167188
},
168189
{
169190
name: 'Roma',
170-
price: 59,
191+
price: 39,
171192
description: 'Admin Template with a Clean Design System',
172193
url: 'https://www.primefaces.org/layouts/roma-vue?af_id=4218',
173194
image: 'https://www.primefaces.org/vue-templates/roma.jpg'
174195
},
196+
{
197+
name: 'Prestige',
198+
price: 39,
199+
description: 'Highly Customizable Admin Template',
200+
url: 'https://www.primefaces.org/layouts/prestige-vue?af_id=4218',
201+
image: 'https://www.primefaces.org/vue-templates/prestige.jpg'
202+
},
175203
{
176204
name: 'Sigma',
177205
price: 0,

src/.vuepress/components/guide/contributing/translations-data.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const labels = {
1111
// Repos are in alphabetical order by the language code
1212
// You may need to clear your sessionStorage when adding a new item to this list
1313
export const repos = [
14-
{ lang: 'en-us', owner: 'vuejs', repo: 'docs-next', branch: 'master', url: 'https://v3.vuejs.org/' },
14+
{ lang: 'en-us', owner: 'vuejs', repo: 'docs', branch: 'master', url: 'https://v3.vuejs.org/' },
1515
{ lang: 'fr', owner: 'demahom18', repo: 'docs-next', branch: 'master', url: 'https://vue3-fr.netlify.app' },
1616
{ lang: 'id', owner: 'vuejs-id', repo: 'docs-next', branch: 'indonesian' },
1717
{ lang: 'ja', owner: 'vuejs-jp', repo: 'ja.vuejs.org', branch: 'lang-ja', url: 'https://v3.ja.vuejs.org/' },

src/.vuepress/config.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -423,23 +423,28 @@ module.exports = {
423423
// Translation maintainers: Please include the link below to the English documentation
424424
// {
425425
// text: 'English',
426-
// link: 'https://v3.vuejs.org/'
426+
// link: 'https://v3.vuejs.org/',
427+
// isTranslation: true
427428
// },
428429
{
429430
text: '中文',
430-
link: 'https://v3.cn.vuejs.org/'
431+
link: 'https://v3.cn.vuejs.org/',
432+
isTranslation: true
431433
},
432434
{
433435
text: '한국어',
434-
link: 'https://v3.ko.vuejs.org/'
436+
link: 'https://v3.ko.vuejs.org/',
437+
isTranslation: true
435438
},
436439
{
437440
text: '日本語',
438-
link: 'https://v3.ja.vuejs.org/'
441+
link: 'https://v3.ja.vuejs.org/',
442+
isTranslation: true
439443
},
440444
{
441445
text: 'Русский',
442-
link: 'https://v3.ru.vuejs.org/'
446+
link: 'https://v3.ru.vuejs.org/ru/',
447+
isTranslation: true
443448
},
444449
{
445450
text: 'More Translations',
@@ -448,7 +453,7 @@ module.exports = {
448453
]
449454
}
450455
],
451-
repo: 'vuejs/docs-next',
456+
repo: 'vuejs/docs',
452457
editLinks: false,
453458
editLinkText: 'Edit this on GitHub!',
454459
lastUpdated: 'Last updated',

src/.vuepress/theme/components/NavLink.vue

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,26 @@
2222
</template>
2323

2424
<script>
25+
import Vue from 'vue'
2526
import { isExternal, isMailto, isTel, ensureExt } from '../util'
2627
28+
const pageLocation = Vue.observable({ path: '/' })
29+
30+
let initPath = () => {
31+
initPath = () => {}
32+
33+
const updatePath = () => {
34+
pageLocation.path = location.pathname
35+
}
36+
37+
updatePath()
38+
39+
// There is no event for detecting navigation but these cover most cases
40+
for (const event of ['focusin', 'scroll', 'mouseover', 'keydown']) {
41+
window.addEventListener(event, updatePath)
42+
}
43+
}
44+
2745
export default {
2846
name: 'NavLink',
2947
@@ -35,7 +53,13 @@ export default {
3553
3654
computed: {
3755
link () {
38-
return ensureExt(this.item.link)
56+
let link = ensureExt(this.item.link)
57+
58+
if (this.item.isTranslation) {
59+
link = link.replace(/\/$/, '') + pageLocation.path
60+
}
61+
62+
return link
3963
},
4064
4165
exact () {
@@ -68,7 +92,7 @@ export default {
6892
},
6993
7094
rel () {
71-
if (this.isNonHttpURI) {
95+
if (this.isNonHttpURI || this.item.isTranslation) {
7296
return null
7397
}
7498
if (this.item.rel) {
@@ -82,6 +106,10 @@ export default {
82106
focusoutAction () {
83107
this.$emit('focusout')
84108
}
109+
},
110+
111+
mounted () {
112+
initPath()
85113
}
86114
}
87115
</script>

src/.vuepress/theme/layouts/404.vue

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
<div class="theme-default-content">
44
<h1>404</h1>
55

6-
<blockquote>{{ getMsg() }}</blockquote>
6+
<blockquote>
7+
<p>Whoops! This page doesn't exist.</p>
8+
</blockquote>
9+
10+
<p v-show="isTranslation">
11+
New pages are added to the documentation all the time. This page might not be included in all of the translations yet.
12+
</p>
713

814
<RouterLink to="/">
915
Take me home.
@@ -13,17 +19,22 @@
1319
</template>
1420

1521
<script>
16-
const msgs = [
17-
`There's nothing here.`,
18-
`How did we get here?`,
19-
`That's a Four-Oh-Four.`,
20-
`Looks like we've got some broken links.`
21-
]
22+
import { repos } from '../../components/guide/contributing/translations-data.js'
2223
2324
export default {
24-
methods: {
25-
getMsg () {
26-
return msgs[Math.floor(Math.random() * msgs.length)]
25+
data () {
26+
return {
27+
isTranslation: false
28+
}
29+
},
30+
31+
mounted () {
32+
const toOrigin = url => (String(url).match(/https?:\/\/[^/]+/) || [])[0]
33+
const referrer = toOrigin(document.referrer)
34+
35+
// Did we get here from a translation?
36+
if (referrer && referrer !== location.origin && repos.some(({ url }) => toOrigin(url) === referrer)) {
37+
this.isTranslation = true
2738
}
2839
}
2940
}

src/api/global-api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ const app = createApp(
6363
</div>
6464
```
6565

66+
The root props are raw props, much like those passed to [`h`](#h) to create a VNode. In addition to component props, they can also include attributes and event listeners to be applied to the root component.
67+
6668
### Typing
6769

6870
```ts

src/guide/contributing/translations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Thank you to everyone who has contributed to these translations. Your hard work
1616

1717
## How can I get involved with translations?
1818

19-
The first step is to check whether there is an existing translation for the relevant language. In addition to the table above, a good place to start is [this pinned issue](https://github.com/vuejs/docs-next/issues/478), which is used to keep track of the various translation initiatives happening in the community.
19+
The first step is to check whether there is an existing translation for the relevant language. In addition to the table above, a good place to start is [this pinned issue](https://github.com/vuejs/docs/issues/478), which is used to keep track of the various translation initiatives happening in the community.
2020

2121
If there's already an active translation then there are various ways you can help out. The GitHub repository should be a good place to start gathering information about how a particular translation is managed and who does what. All translation repositories should allow you to file issues and open Pull Requests if you have suggestions for improving the translation.
2222

@@ -32,7 +32,7 @@ The documentation is constantly being updated. Many changes are small and don't
3232

3333
When you first start a translation, you may want to use a personal GitHub repository. That's fine, so long as it's publicly accessible and open to contributions from others. Make sure the *Issues* tab is enabled in the repository's settings. You can migrate the repository to a shared organization at a later stage.
3434

35-
Once you start a translation, be sure to add it to [the pinned issue](https://github.com/vuejs/docs-next/issues/478) so that the rest of the community can find it.
35+
Once you start a translation, be sure to add it to [the pinned issue](https://github.com/vuejs/docs/issues/478) so that the rest of the community can find it.
3636

3737
We also encourage you to update the root-level `README.md` at an early stage. Most translations add extra information to help potential contributors get involved.
3838

0 commit comments

Comments
 (0)