Skip to content

Commit

Permalink
added i18n for months
Browse files Browse the repository at this point in the history
  • Loading branch information
Yehor Podporinov authored and Yehor Podporinov committed Apr 8, 2024
1 parent ba1bb80 commit 64cb1f9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/common/InfoDashboard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
</template>

<script lang="ts" setup>
import { useI18n } from '@/composables'
import { SelectField } from '@/fields'
import { ErrorHandler } from '@/helpers'
import { useWeb3ProvidersStore } from '@/store'
Expand Down Expand Up @@ -97,17 +98,21 @@ const props = withDefaults(
},
)
const { t } = useI18n()
const web3ProvidersStore = useWeb3ProvidersStore()
const monthOptions: FieldOption<number>[] = [
{
title: 'February',
title: t('months.february'),
value: 2,
},
{
title: 'March',
title: t('months.march'),
value: 3,
},
{
title: 'April',
title: t('months.april'),
value: 4,
},
]
Expand All @@ -118,8 +123,6 @@ const isChartDataUpdating = ref(false)
const chartConfig = reactive<ChartConfig>({ ...CHART_CONFIG })
const web3ProvidersStore = useWeb3ProvidersStore()
const updateChartData = async (month: number) => {
if (!props.poolData) throw new Error('poolData unavailable')
Expand Down
14 changes: 14 additions & 0 deletions src/localization/resources/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,19 @@
"default-message-warning": "Something you are doing is not recommended",
"default-message-info": "Something is happening. Just want you to know that",
"default-message-default": "Just a message"
},
"months": {
"january": "January",
"february": "February",
"march": "March",
"april": "April",
"may": "May",
"june": "June",
"july": "July",
"august": "August",
"september": "September",
"october": "October",
"november": "November",
"december": "December"
}
}

0 comments on commit 64cb1f9

Please sign in to comment.