Skip to content

Commit 9235462

Browse files
committed
Prepare localization
1 parent e7f3c0e commit 9235462

File tree

3 files changed

+40
-13
lines changed

3 files changed

+40
-13
lines changed

src/_locales/en/messages.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,16 @@
55
"extDescription": {
66
"message": "Track, limit and block the time of your web activity. Monitor how much time you spend on websites and review your web analytics."
77
},
8-
"settings": "Settings",
9-
"today": "Today",
10-
"allTime": "All The Time",
11-
"byDays": "By Days"
8+
"settings": {
9+
"message": "Settings"
10+
},
11+
"today": {
12+
"message": "Today"
13+
},
14+
"allTime": {
15+
"message": "All The Time"
16+
},
17+
"byDays": {
18+
"message": "By Days"
19+
}
1220
}

src/_locales/ru/messages.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
{
22
"extName": {
3-
"message": "Web Activity Time Tracker - Веб аналитика"
3+
"message": "Web Activity Time Tracker - \u0412\u0435\u0431 аналитика"
44
},
55
"extDescription": {
66
"message": "Отслеживайте, ограничивайте и блокируйте время вашей веб-активности. Следите за тем, сколько времени вы проводите на сайтах."
77
},
8-
"settings": "Настройки",
9-
"today": "Сегодня",
10-
"allTime": "За все время",
11-
"byDays": "По дням"
8+
"settings": {
9+
"message": "Настройки"
10+
},
11+
"today": {
12+
"message": "Сегодня"
13+
},
14+
"allTime": {
15+
"message": "\u0417\u0430 все время"
16+
},
17+
"byDays": {
18+
"message": "По дням"
19+
}
1220
}

src/pages/Popup.vue

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
</div>
77
<div class="icons-block">
88
<!-- <img height="17" src="../assets/icons/dark-mode.svg" /> -->
9-
<a @click="openDashboard()">Settings<img height="22" src="../assets/icons/settings.svg" /></a>
9+
<a @click="openDashboard()"
10+
>{{ t('settings.message') }}<img height="22" src="../assets/icons/settings.svg"
11+
/></a>
1012
</div>
1113
</div>
1214
<div class="tabs">
@@ -31,13 +33,19 @@
3133
/>
3234
<ul>
3335
<li title="Today">
34-
<label for="todayTab" role="button"><span>Today</span></label>
36+
<label for="todayTab" role="button"
37+
><span>{{ t('today.message') }}</span></label
38+
>
3539
</li>
3640
<li title="All The Time">
37-
<label for="allTimeTab" role="button"><span>All The Time</span></label>
41+
<label for="allTimeTab" role="button"
42+
><span>{{ t('allTime.message') }}</span></label
43+
>
3844
</li>
3945
<li title="By Days">
40-
<label for="byDaysTab" role="button"><span>By Days</span></label>
46+
<label for="byDaysTab" role="button"
47+
><span>{{ t('byDays.message') }}</span></label
48+
>
4149
</li>
4250
</ul>
4351

@@ -62,11 +70,14 @@
6270

6371
<script lang="ts" setup>
6472
import { onMounted, ref } from 'vue';
73+
import { useI18n } from 'vue-i18n';
6574
import Browser from 'webextension-polyfill';
6675
import TabList from '../components/TabList.vue';
6776
import ByDays from '../components/ByDays.vue';
6877
import { TypeOfList } from '../utils/enums';
6978
79+
const { t } = useI18n();
80+
7081
async function openDashboard() {
7182
await Browser.tabs.create({
7283
url: Browser.runtime.getURL('src/dashboard.html'),

0 commit comments

Comments
 (0)