Commit f3117536 authored by Richard Blechinger's avatar Richard Blechinger
Browse files

Minor localization fixes. Use JavaScript locale formatting

parent fe3ea9da
...@@ -71,11 +71,6 @@ ...@@ -71,11 +71,6 @@
slug: 'settings', slug: 'settings',
title: this.$t('navigation.settings'), title: this.$t('navigation.settings'),
}, },
{
slug: 'help',
title: this.$t('navigation.help'),
}
] ]
} }
// Regular user // Regular user
...@@ -94,10 +89,6 @@ ...@@ -94,10 +89,6 @@
], ],
footer: [ footer: [
{
slug: 'help',
title: this.$t('navigation.help'),
}
] ]
} }
} }
......
...@@ -55,10 +55,10 @@ ...@@ -55,10 +55,10 @@
<em>{{ user.name }}</em> <em>{{ user.name }}</em>
</template> </template>
<b-dropdown-item to="settings"> <b-dropdown-item to="settings">
{{ $t('settings') }} {{ $t('navigation.settings') }}
</b-dropdown-item> </b-dropdown-item>
<b-dropdown-item href="#"> <b-dropdown-item href="#">
{{ $t('profile') }} {{ $t('navigation.profile') }}
</b-dropdown-item> </b-dropdown-item>
<b-dropdown-item @click="$parent.signOut"> <b-dropdown-item @click="$parent.signOut">
{{ $t('auth.signOut') }} {{ $t('auth.signOut') }}
......
...@@ -8,7 +8,7 @@ export default { ...@@ -8,7 +8,7 @@ export default {
// Layout // Layout
'loading': 'Lädt..', 'loading': 'Lädt..',
'profile': 'Profil',
'auth': { 'auth': {
'signOut': 'Abmelden', 'signOut': 'Abmelden',
'signIn': 'Anmelden', 'signIn': 'Anmelden',
...@@ -21,6 +21,7 @@ export default { ...@@ -21,6 +21,7 @@ export default {
'filesPlaylists': 'Dateien & Playlists', 'filesPlaylists': 'Dateien & Playlists',
'calendar': 'Kalender', 'calendar': 'Kalender',
'settings': 'Einstellungen', 'settings': 'Einstellungen',
'profile': 'Profil',
'help': 'Hilfe' 'help': 'Hilfe'
}, },
...@@ -49,21 +50,6 @@ export default { ...@@ -49,21 +50,6 @@ export default {
'saturday': 'Samstag', 'saturday': 'Samstag',
}, },
'month': {
'january': 'Januar',
'february': 'Februar',
'march': 'März',
'april': 'April',
'may': 'Mai',
'june': 'Juni',
'july': 'Juli',
'august': 'August',
'september': 'September',
'october': 'Oktober',
'november': 'November',
'december': 'Dezember',
},
'rule': { 'rule': {
'1': 'einmalig', '1': 'einmalig',
'2': 'täglich', '2': 'täglich',
......
...@@ -22,6 +22,7 @@ export default { ...@@ -22,6 +22,7 @@ export default {
'filesPlaylists': 'Files & Playlists', 'filesPlaylists': 'Files & Playlists',
'calendar': 'Calendar', 'calendar': 'Calendar',
'settings': 'Settings', 'settings': 'Settings',
'profile': 'Profile',
'help': 'Help' 'help': 'Help'
}, },
...@@ -50,21 +51,6 @@ export default { ...@@ -50,21 +51,6 @@ export default {
'saturday': 'Saturday', 'saturday': 'Saturday',
}, },
'month': {
'january': 'January',
'february': 'February',
'march': 'March',
'april': 'April',
'may': 'May',
'june': 'June',
'july': 'July',
'august': 'August',
'september': 'September',
'october': 'October',
'november': 'November',
'december': 'December',
},
'rule': { 'rule': {
'1': 'once', '1': 'once',
'2': 'daily', '2': 'daily',
......
...@@ -8,21 +8,6 @@ var day = [ ...@@ -8,21 +8,6 @@ var day = [
'rrule.day.saturday' 'rrule.day.saturday'
] ]
var month = [
'rrule.month.january',
'rrule.month.february',
'rrule.month.march',
'rrule.month.april',
'rrule.month.may',
'rrule.month.june',
'rrule.month.july',
'rrule.month.august',
'rrule.month.september',
'rrule.month.october',
'rrule.month.november',
'rrule.month.december'
]
export default { export default {
methods: { methods: {
leadingZero (num) { leadingZero (num) {
...@@ -43,27 +28,32 @@ export default { ...@@ -43,27 +28,32 @@ export default {
}, },
prettyDate: function (date) { prettyDate: function (date) {
var d = new Date(date) var d = new Date(date)
var dstring = ''
dstring += this.$t(day[d.getDay()]) + ', ' return d.toLocaleString(
dstring += this.leadingZero(d.getDate()) + '. ' this.$activeLocale(),
dstring += this.$t(month[d.getMonth()]) + ' ' {
dstring += d.getFullYear() weekday: 'long',
return dstring day: 'numeric',
month: 'long',
year: 'numeric',
}
)
}, },
prettyDateTime: function (date) { prettyDateTime: function (date) {
var d = new Date(date) var d = new Date(date)
/*
// This is a simple numbered representation - have to decide which one to use in final design return d.toLocaleString(
// note: Date.getMonth() returns the month as an index from 0 to 11 this.$activeLocale(),
return this.leadingZero(d.getDate()) + '.' + this.leadingZero(d.getMonth() + 1) + '.' + d.getFullYear() + ' ' + this.leadingZero(d.getHours()) + ':' + this.leadingZero(d.getMinutes()) {
*/ weekday: 'long',
var dstring = '' day: 'numeric',
dstring += this.$t(day[d.getDay()]) + ', ' month: 'long',
dstring += this.leadingZero(d.getDate()) + '. ' year: 'numeric',
dstring += this.$t(month[d.getMonth()]) + ' ' hour: '2-digit',
dstring += d.getFullYear() + ', ' minute: '2-digit',
dstring += this.leadingZero(d.getHours()) + ':' + this.leadingZero(d.getMinutes()) + ':' + this.leadingZero(d.getSeconds()) second: '2-digit'
return dstring }
)
}, },
prettyHours(hours) { prettyHours(hours) {
return hours.replace(/:00$/, ''); return hours.replace(/:00$/, '');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment