diff --git a/src/js/components/splatoon/SalmonRunBox.vue b/src/js/components/splatoon/SalmonRunBox.vue index 5a63535..71403ad 100644 --- a/src/js/components/splatoon/SalmonRunBox.vue +++ b/src/js/components/splatoon/SalmonRunBox.vue @@ -40,7 +40,7 @@ - {{ currentSchedule.end_time - now | durationHours }} remaining + {{ currentSchedule.end_time - now | durationHours | time.remaining }} @@ -52,7 +52,7 @@ {{ currentSchedule.end_time | time }} - {{ currentSchedule.end_time - now | duration }} remaining + {{ currentSchedule.end_time - now | duration | time.remaining }} @@ -86,7 +86,7 @@ - {{ event.start_time - now | duration(true) | timeIn }} + {{ event.start_time - now | duration(true) | time.in }} @@ -120,11 +120,6 @@ export default { gearDialogOpen: false, }; }, - filters: { - timeIn(time) { - return Vue.i18n.translate('time.in', { time }); - }, - }, computed: { allSchedules() { // Combine the "schedules" and "details" sections into one list of schedules diff --git a/src/js/filters.js b/src/js/filters.js index 1cf7023..9907b07 100644 --- a/src/js/filters.js +++ b/src/js/filters.js @@ -74,3 +74,11 @@ Vue.filter('durationHours', function (value) { hours += 24 * days; return $t('time.hours', { hours: negative + hours }, hours); }); + +Vue.filter('time.in', function(time) { + return $t('time.in', { time }); +}); + +Vue.filter('time.remaining', function (time) { + return $t('time.remaining', { time }); +});