Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit

Permalink
i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
shgtkshruch committed Mar 19, 2020
1 parent 2687f16 commit 12f3b23
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 27 deletions.
18 changes: 5 additions & 13 deletions components/DataSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
mandatory
@change="$emit('input', $event)"
>
<v-btn
v-for="(dataType, i) in dataTypes"
:key="i"
v-ripple="false"
:value="dataType.value"
class="DataSelector-Button"
>
{{ $t(dataType.tKey) }}
<v-btn v-ripple="false" value="transition" class="DataSelector-Button">
{{ $t('日別') }}
</v-btn>
<v-btn v-ripple="false" value="cumulative" class="DataSelector-Button">
{{ $t('累計') }}
</v-btn>
</v-btn-toggle>
</template>
Expand Down Expand Up @@ -52,11 +49,6 @@ export default {
type: String,
required: false,
default: ''
},
dataTypes: {
type: Array,
required: false,
default: () => []
}
}
}
Expand Down
16 changes: 10 additions & 6 deletions components/ShinjukuBarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
<data-view :title="title" :title-id="titleId" :date="date">
<template v-slot:button>
<p :class="$style.ShinjukuDesc">
2月3日~2月7日の来訪者数 (※1) の平均値 (※2) を 基準としたときの相対値
{{
$t(
'2月3日~2月7日の来訪者数 (※1) の平均値 (※2) を 基準としたときの相対値'
)
}}
<br />
※1) ヤフーに蓄積された位置情報データなどを元に算出した参考値
{{ $t('※1) ヤフーに蓄積された位置情報データなどを元に算出した参考値') }}
<br />
※2) 土・日・祝日を除く7:30~8:30の1週間平均値
{{ $t('※2) 土・日・祝日を除く7:30~8:30の1週間平均値') }}
</p>
</template>
<bar
Expand All @@ -16,15 +20,15 @@
:height="240"
/>
<p :class="$style.ShinjukuDesc">
※本データは2020年3月31日までの掲載となります
{{ $t('※本データは2020年3月31日までの掲載となります') }}
</p>
<p :class="$style.ShinjukuDesc">
出典:
{{ $t('出典:') }}
<a
href="https://ds.yahoo.co.jp/datapolicy/"
target="_blank"
rel="noopenner"
>ヤフー・データソリューション</a
>{{ $t('ヤフー・データソリューション') }}</a
>
</p>
</data-view>
Expand Down
8 changes: 2 additions & 6 deletions components/TimeBarChart.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<data-view :title="title" :title-id="titleId" :date="date" :url="url">
<template v-slot:button>
<data-selector v-model="dataKind" :data-types="dataTypes" />
<data-selector v-model="dataKind" />
</template>
<bar
:chart-id="chartId"
Expand Down Expand Up @@ -69,11 +69,7 @@ export default {
},
data() {
return {
dataKind: 'transition',
dataTypes: [
{ value: 'transition', tKey: '日別' },
{ value: 'cumulative', tKey: '累計' }
]
dataKind: 'transition'
}
},
computed: {
Expand Down
2 changes: 1 addition & 1 deletion components/cards/ShinjukuCard.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<v-col cols="12" md="6" class="DataCard">
<shinjuku-bar-chart
:title="'新宿区エリアの来訪者推移(参考値)'"
:title="$t('新宿区エリアの来訪者推移(参考値)')"
:title-id="'shinjuku-visitors'"
:chart-id="'shinjuku-visitors'"
:standard-date="'2020-02-03'"
Expand Down
2 changes: 1 addition & 1 deletion pages/cards/_card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export default {
updatedAt = agencyData.date
break
case 'shinjuku-visitors':
title = '新宿区の来訪者数の推移'
title = this.$t('新宿区の来訪者数の推移')
updatedAt = ShinjukuData.date
break
}
Expand Down

0 comments on commit 12f3b23

Please sign in to comment.