Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(fa): start Persian docs #2087

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
189 changes: 189 additions & 0 deletions packages/docs/.vitepress/config/fa.ts
@@ -0,0 +1,189 @@
import type { DefaultTheme, LocaleSpecificConfig } from 'vitepress'

export const META_URL = 'https://router.vuejs.org'
export const META_TITLE = 'Vue Router'
export const META_DESCRIPTION = 'مسیریاب رسمی برای Vue.js'

export const faConfig: LocaleSpecificConfig<DefaultTheme.Config> = {
description: META_DESCRIPTION,
head: [
['meta', { property: 'og:url', content: META_URL }],
['meta', { property: 'og:description', content: META_DESCRIPTION }],
['meta', { property: 'twitter:url', content: META_URL }],
['meta', { property: 'twitter:title', content: META_TITLE }],
['meta', { property: 'twitter:description', content: META_DESCRIPTION }],
],

themeConfig: {
editLink: {
pattern: 'https://github.com/vuejs/router/edit/main/packages/docs/:path',
text: 'پیشنهاد تغییرات در این صفحه',
},

nav: [
// { text: 'Config', link: '/config/' },
// { text: 'Plugins', link: '/plugins/' },
{
text: 'راهنما',
link: '/fa/guide/',
activeMatch: '^/fa/guide/',
},
{ text: 'API', link: '/fa/api/', activeMatch: '^/fa/api/' },
{
text: 'v4.x',
items: [{ text: 'v3.x', link: 'https://v3.router.vuejs.org/fa' }],
},
{
text: 'پیوند‌ها',
items: [
{
text: 'Discussions',
link: 'https://github.com/vuejs/router/discussions',
},
{
text: 'Changelog',
link: 'https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md',
},
{
text: 'Vue.js Certification',
link: 'https://certification.vuejs.org/?friend=VUEROUTER',
},
],
},
],

sidebar: {
// catch-all fallback
'/': [
{
text: 'آغاز',
items: [
{
text: 'معرفی',
link: '/fa/introduction.html',
},
{
text: 'نصب',
link: '/fa/installation.html',
},
],
},
{
text: 'الزامات',
collapsible: false,
items: [
{
text: 'شروع شدن',
link: '/fa/guide/',
},
{
text: 'تطبیق مسیر به صورت پویا',
link: '/fa/guide/essentials/dynamic-matching.html',
},
{
text: 'نحو تطبیق مسیرها',
link: '/fa/guide/essentials/route-matching-syntax.html',
},
{
text: 'مسیرهای تو در تو',
link: '/fa/guide/essentials/nested-routes.html',
},
{
text: 'مسیریابی به صورت برنامه‌ای',
link: '/fa/guide/essentials/navigation.html',
},
{
text: 'مسیرهای نام‌گذاری‌شده',
link: '/fa/guide/essentials/named-routes.html',
},
{
text: 'View های نام‌گذاری‌شده',
link: '/fa/guide/essentials/named-views.html',
},
{
text: 'ریدایرکت و مخفف',
link: '/fa/guide/essentials/redirect-and-alias.html',
},
{
text: 'ارسال پراپ‌ها به کامپوننت مسیرها',
link: '/fa/guide/essentials/passing-props.html',
},
{
text: 'حالت‌های متفاوت هیستوری',
link: '/fa/guide/essentials/history-mode.html',
},
],
},
{
text: 'پیشرفته',
collapsible: false,
items: [
{
text: 'گاردهای مسیریابی',
link: '/fa/guide/advanced/navigation-guards.html',
},
{
text: 'فیلدهای متا',
link: '/fa/guide/advanced/meta.html',
},
{
text: 'واکشی داده (Data Fetching)',
link: '/fa/guide/advanced/data-fetching.html',
},
{
text: 'Composition API',
link: '/fa/guide/advanced/composition-api.html',
},
{
text: 'RouterView اسلات',
link: '/fa/guide/advanced/router-view-slot.html',
},
{
text: 'ترنزیشن‌ها',
link: '/fa/guide/advanced/transitions.html',
},
{
text: 'رفتار اسکرول',
link: '/fa/guide/advanced/scroll-behavior.html',
},
{
text: 'مسیرهای تنبل(Lazy Loading)',
link: '/fa/guide/advanced/lazy-loading.html',
},
{
text: 'مسیرهای تایپ‌گذاری‌شده',
link: '/fa/guide/advanced/typed-routes.html',
},
{
text: 'گسترش RouterLink',
link: '/fa/guide/advanced/extending-router-link.html',
},
{
text: 'خطاهای Navigation',
link: '/fa/guide/advanced/navigation-failures.html',
},
{
text: 'مسیریابی پویا',
link: '/fa/guide/advanced/dynamic-routing.html',
},
],
},
{
items: [
{
text: 'مهاجرت از Vue 2',
link: '/fa/guide/migration/index.html',
},
],
},
],

'/fa/api/': [
{
text: 'packages',
items: [{ text: 'vue-router', link: '/fa/api/' }],
},
],
},
},
}
2 changes: 2 additions & 0 deletions packages/docs/.vitepress/config/index.ts
Expand Up @@ -2,6 +2,7 @@ import { defineConfig } from 'vitepress'
import { enConfig } from './en'
import { sharedConfig } from './shared'
import { zhConfig } from './zh'
import { faConfig } from './fa'

export default defineConfig({
...sharedConfig,
Expand All @@ -12,5 +13,6 @@ export default defineConfig({
ko: { label: '한국어', lang: 'ko-KR', link: 'https://router.vuejs.kr/' },
pt: { label: 'Português', lang: 'pt-PT', link: 'https://vue-router-docs-pt.netlify.app/' },
ru: { label: 'Русский', lang: 'ru-RU', link: 'https://vue-router-ru.netlify.app' },
fa: { label: 'فارسی', lang: 'fa-IR', link: '/fa/', ...faConfig },
},
})
1 change: 1 addition & 0 deletions packages/docs/.vitepress/theme/components/HomeSponsors.vue
Expand Up @@ -34,6 +34,7 @@ const translations = {
en: 'Become a sponsor',
'en-US': 'Become a Sponsor!',
'zh-CN': '成为赞助者!',
'fa-IR': 'حامی شوید!',
}
</script>

Expand Down
@@ -1,5 +1,5 @@
<template>
<h3>{{ name }} Sponsors</h3>
<h3>{{ name }} اسپانسرهای</h3>

<p>
<a
Expand Down
4 changes: 4 additions & 0 deletions packages/docs/.vitepress/translation-status.json
Expand Up @@ -2,5 +2,9 @@
"zh": {
"hash": "35a9c1b",
"date": "2023-12-16"
},
"fa": {
"hash": "11ce2139d4020919366b4567a08caece994760cd",
"date": "2023-12-21"
}
}
37 changes: 37 additions & 0 deletions packages/docs/fa/api/enums/NavigationFailureType.md
@@ -0,0 +1,37 @@
---
editLink: false
---

[API Documentation](../index.md) / NavigationFailureType

# Enumeration: NavigationFailureType

Enumeration with all possible types for navigation failures. Can be passed to
[isNavigationFailure](../index.md#isNavigationFailure) to check for specific failures.

## Enumeration Members

### aborted

• **aborted** = ``4``

An aborted navigation is a navigation that failed because a navigation
guard returned `false` or called `next(false)`

___

### cancelled

• **cancelled** = ``8``

A cancelled navigation is a navigation that failed because a more recent
navigation finished started (not necessarily finished).

___

### duplicated

• **duplicated** = ``16``

A duplicated navigation is a navigation that failed because it was
initiated while already being at the exact same location.