Skip to content

Commit 4a24c09

Browse files
committed
#39 add langs
1 parent acdbcfc commit 4a24c09

File tree

4 files changed

+87
-4
lines changed

4 files changed

+87
-4
lines changed

src/App.vue

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,78 @@
1616
:steps="steps"
1717
:options="{ highlight: true }"
1818
:callbacks="tourCallbacks"
19-
></v-tour>
19+
>
20+
<template slot-scope="tour">
21+
<v-step
22+
v-for="(step, index) of tour.steps"
23+
v-if="tour.currentStep === index"
24+
:key="index"
25+
:step="step"
26+
:previous-step="tour.previousStep"
27+
:next-step="tour.nextStep"
28+
:stop="tour.stop"
29+
:is-first="tour.isFirst"
30+
:is-last="tour.isLast"
31+
:labels="tour.labels"
32+
:highlight="tour.highlight"
33+
>
34+
<template v-if="tour.isFirst">
35+
<div slot="actions">
36+
<button
37+
@click="tour.stop"
38+
class="v-step__button v-step__button-skip"
39+
>
40+
{{ $t('buttons.skipTutorial') }}
41+
</button>
42+
<button
43+
@click="tour.nextStep"
44+
class="v-step__button v-step__button-next"
45+
>
46+
{{ $t('buttons.nextStep') }}
47+
</button>
48+
</div>
49+
</template>
50+
<template v-if="!tour.isFirst && !tour.isLast">
51+
<div slot="actions">
52+
<button
53+
@click="tour.stop"
54+
class="v-step__button v-step__button-skip"
55+
>
56+
{{ $t('buttons.skipTutorial') }}
57+
</button>
58+
<button
59+
@click="tour.previousStep"
60+
class="v-step__button v-step__button-previous"
61+
>
62+
{{ $t('buttons.previousStep') }}
63+
</button>
64+
<button
65+
@click="tour.nextStep"
66+
class="v-step__button v-step__button-next"
67+
>
68+
{{ $t('buttons.nextStep') }}
69+
</button>
70+
</div>
71+
</template>
72+
<template v-if="tour.isLast">
73+
<div slot="actions">
74+
<button
75+
@click="tour.previousStep"
76+
class="v-step__button v-step__button-previous"
77+
>
78+
{{ $t('buttons.previousStep') }}
79+
</button>
80+
<button
81+
@click="tour.stop"
82+
class="v-step__button v-step__button-stop"
83+
>
84+
{{ $t('buttons.finishTour') }}
85+
</button>
86+
</div>
87+
</template>
88+
</v-step>
89+
</template>
90+
</v-tour>
2091
</div>
2192
</template>
2293
<script lang="ts">

src/LogicCore/Languages/Languages.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ export interface LangFile extends LocaleMessageObject{
5959
},
6060
buttons: {
6161
yes: string
62-
no: string
62+
no: string
63+
skipTutorial: string
64+
previousStep: string
65+
nextStep: string
66+
finishTour: string
6367
}
6468
alerts: {
6569
successfulSync: string

src/LogicCore/Languages/_eng.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ export const eng: LangFile = {
6666
},
6767
buttons: {
6868
yes: 'Yes',
69-
no: 'No'
69+
no: 'No',
70+
skipTutorial: 'Skip tutorial',
71+
previousStep: 'Previous',
72+
nextStep: 'Next',
73+
finishTour: 'Finish',
7074
},
7175
alerts: {
7276
successfulSync: 'Synced successfully!',

src/LogicCore/Languages/_rus.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ export const rus: LangFile = {
6767
},
6868
buttons: {
6969
yes: 'Да',
70-
no: 'Нет'
70+
no: 'Нет',
71+
skipTutorial: 'Пропустить обучение',
72+
previousStep: 'Назад',
73+
nextStep: 'Дальше',
74+
finishTour: 'Завершить',
7175
},
7276
alerts: {
7377
successfulSync: 'Успешно синхронизировано!',

0 commit comments

Comments
 (0)