-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
664 additions
and
45 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<template> | ||
<div class="locale active" @click="edit = !edit" v-show="!edit"> | ||
{{ locale }} | ||
</div> | ||
<div class="locale choose" v-if="edit"> | ||
<span | ||
v-for="loc in locales" | ||
@click=" | ||
changeLocale(loc); | ||
edit = false; | ||
" | ||
:key="loc" | ||
:class="{ active: loc == locale }" | ||
class="locale" | ||
>{{ loc }}</span | ||
> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent, ref } from "vue"; | ||
import { useI18n } from "vue-i18n"; | ||
import { changeLocale, locales } from "../../locales/i18n"; | ||
export default defineComponent({ | ||
setup() { | ||
const edit = ref(false); | ||
const { locale } = useI18n(); | ||
return { | ||
edit, | ||
locale, | ||
locales, | ||
changeLocale, | ||
}; | ||
}, | ||
}); | ||
</script> | ||
|
||
<style scoped> | ||
.locale { | ||
padding: 0.5em; | ||
cursor: pointer; | ||
} | ||
.active { | ||
font-weight: bold; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
app: | ||
title: Project app | ||
type: | ||
user: User | Users | ||
design: Design | Designs | ||
project: Project | Projects | ||
object: Object | Objects | ||
event: Event | Events | ||
task: Task | Tasks | ||
purchase: Purchase | Purchases | ||
result: Result | Results | ||
thing: Thing | Things | ||
status: | ||
new: New | ||
dev: Development | ||
process: Process | ||
product: Product | ||
pause: Paused | ||
ondemand: On demand | ||
finish: Finished | ||
null: no status | ||
date: | ||
start: Start date | ||
finish: Finish date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { createI18n } from 'vue-i18n' | ||
import en from './en.yaml' | ||
import ru from './ru.yaml' | ||
|
||
export const i18n = createI18n({ | ||
legacy: true, | ||
locale: 'en', | ||
fallbackLocale: 'en', | ||
messages: { | ||
en, | ||
ru, | ||
}, | ||
}) | ||
|
||
export const locale = i18n.global.locale | ||
|
||
export const locales = ['en', 'ru'] | ||
|
||
export function changeLocale(loc) { | ||
i18n.global.locale = loc | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
app: | ||
title: 'Ленты' | ||
type: | ||
user: 'Участник | Участники' | ||
design: 'Программа | Программы' | ||
project: 'Проект | Проекты' | ||
object: 'Объект | Объекты' | ||
event: 'Событие | События' | ||
task: 'Задача | Задачи' | ||
purchase: 'Покупка | Покупки' | ||
result: 'Результат | Результаты' | ||
thing: 'Вещь | Вещи' | ||
status: | ||
new: 'Новинка' | ||
dev: 'Разработка' | ||
process: 'Процесс' | ||
product: 'Продукт' | ||
pause: 'На паузе' | ||
ondemand: 'По запросу' | ||
finish: 'Завершено' | ||
null: 'Без статуса' | ||
date: | ||
start: 'Дата начала' | ||
finish: 'Дата окончания' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
import { router } from './router' | ||
import { i18n } from './locales/i18n' | ||
import './index.css' | ||
|
||
import '@iconify/iconify' | ||
import '@purge-icons/generated' | ||
|
||
const projectApp = createApp(App) | ||
projectApp.use(router) | ||
projectApp.use(i18n) | ||
projectApp.mount('#app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.