diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue
index cc2f3978..a9b8b602 100644
--- a/src/components/user_card/user_card.vue
+++ b/src/components/user_card/user_card.vue
@@ -10,7 +10,7 @@
{{ user.name }}
- Follows you!
+ {{ $t('user_card.follows_you') }}
@{{ user.screen_name }}
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index baa71cd0..4895f36f 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -19,27 +19,31 @@
- Follows you!
+ {{ $t('user_card.follows_you') }}
-
+
-
+
-
Statuses
-
Statuses
-
{{user.statuses_count}}
{{dailyAvg}} per day
+
{{ $t('user_card.statuses') }}
+
{{ $t('user_card.statuses') }}
+
{{user.statuses_count}}
{{dailyAvg}} {{ $t('user_card.per_day') }}
diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue
index 11da79e4..003ee3bd 100644
--- a/src/components/user_settings/user_settings.vue
+++ b/src/components/user_settings/user_settings.vue
@@ -1,53 +1,53 @@
- User Settings
+ {{$t('settings.user_settings')}}
-
Name & Bio
-
Name
+
{{$t('settings.name_bio')}}
+
{{$t('settings.name')}}
-
Bio
+
{{$t('settings.bio')}}
-
+
-
Avatar
-
Your current avatar:
+
{{$t('settings.avatar')}}
+
{{$t('settings.current_avatar')}}
-
Set new avatar:
+
{{$t('settings.set_new_avatar')}}
-
+
-
Profile Banner
-
Your current profile banner:
+
{{$t('settings.profile_banner')}}
+
{{$t('settings.current_profile_banner')}}
-
Set new profile banner:
+
{{$t('settings.set_new_profile_banner')}}
-
+
-
Profile Background
-
Set new profile background:
+
{{$t('settings.profile_background')}}
+
{{$t('settings.set_new_profile_background')}}
-
+
diff --git a/src/i18n/messages.js b/src/i18n/messages.js
new file mode 100644
index 00000000..b39c57de
--- /dev/null
+++ b/src/i18n/messages.js
@@ -0,0 +1,70 @@
+const de = {
+ nav: {
+ timeline: 'Zeitleiste'
+ }
+}
+
+const en = {
+ nav: {
+ timeline: 'Timeline',
+ mentions: 'Mentions',
+ public_tl: 'Public Timeline',
+ twkn: 'The Whole Known Network'
+ },
+ user_card: {
+ follows_you: 'Follows you!',
+ following: 'Following!',
+ follow: 'Follow',
+ statuses: 'Statuses',
+ mute: 'Mute',
+ muted: 'Muted',
+ followers: 'Followers',
+ followees: 'Following',
+ per_day: 'per day'
+ },
+ timeline: {
+ show_new: 'Show new',
+ error_fetching: 'Error fetching updates',
+ up_to_date: 'Up-to-date',
+ load_older: 'Load older statuses'
+ },
+ settings: {
+ user_settings: 'User Settings',
+ name_bio: 'Name & Bio',
+ name: 'Name',
+ bio: 'Bio',
+ avatar: 'Avatar',
+ current_avatar: 'Your current avatar',
+ set_new_avatar: 'Set new avatar',
+ profile_banner: 'Profile Banner',
+ current_profile_banner: 'Your current profile banner',
+ set_new_profile_banner: 'Set new profile banner',
+ profile_background: 'Profile Background',
+ set_new_profile_background: 'Set new profile background',
+ settings: 'Settings',
+ theme: 'Theme',
+ filtering: 'Filtering',
+ filtering_explanation: 'All notices containing these words will be muted, one per line',
+ attachments: 'Attachments',
+ hide_attachments_in_tl: 'Hide attachments in timeline',
+ hide_attachments_in_convo: 'Hide attachments in conversations',
+ nsfw_clickthrough: 'Enable clickthrough NSFW attachment hiding',
+ autoload: 'Enable automatic loading when scrolled to the bottom',
+ reply_link_preview: 'Enable reply-link preview on mouse hover'
+ },
+ notifications: {
+ notifications: 'Notfications',
+ read: 'Read!',
+ followed_you: 'followed you'
+ },
+ general: {
+ submit: 'Submit'
+ }
+}
+
+const messages = {
+ de,
+ en
+}
+
+export default messages
diff --git a/src/main.js b/src/main.js
index b994e154..ce941ee1 100644
--- a/src/main.js
+++ b/src/main.js
@@ -19,9 +19,12 @@ import apiModule from './modules/api.js'
import configModule from './modules/config.js'
import VueTimeago from 'vue-timeago'
+import VueI18n from 'vue-i18n'
import createPersistedState from './lib/persisted_state.js'
+import messages from './i18n/messages.js'
+
Vue.use(Vuex)
Vue.use(VueRouter)
Vue.use(VueTimeago, {
@@ -30,6 +33,7 @@ Vue.use(VueTimeago, {
'en-US': require('../static/timeago.json')
}
})
+Vue.use(VueI18n)
const persistedStateOptions = {
paths: [
@@ -79,10 +83,17 @@ const router = new VueRouter({
}
})
+const i18n = new VueI18n({
+ locale: 'en',
+ fallbackLocale: 'en',
+ messages
+})
+
/* eslint-disable no-new */
new Vue({
router,
store,
+ i18n,
el: '#app',
render: h => h(App)
})
diff --git a/yarn.lock b/yarn.lock
index 965f6f31..d0d2dde9 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5696,6 +5696,10 @@ vue-hot-reload-api@^2.0.1:
version "2.0.9"
resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.0.9.tgz#2e8cfbfc8e531eea57d8c1f0bd761047c7e11b56"
+vue-i18n@^7.3.2:
+ version "7.3.2"
+ resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-7.3.2.tgz#1205bb8811323fd5c44e57e4fd619beaf2f7a9a1"
+
vue-loader@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-11.1.0.tgz#8f3fcdd8a233ce96b3e99bd3d56e83cc0f2050f2"