Skip to content

Commit 88cdabd

Browse files
committed
i18n: Replace $t with t in Explore component
1 parent 5614afd commit 88cdabd

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/explore/Explore.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
>
1818
<span class="chart-icon" v-html="icons[category]"></span>
1919
<span class="chart-name">{{
20-
$t('chartTypes.' + category)
20+
t('chartTypes.' + category)
2121
}}</span>
2222
</a>
2323
</li>
@@ -32,7 +32,7 @@
3232
class="chart-type-head"
3333
:id="'chart-type-' + categoryObj.category"
3434
>
35-
{{ $t('chartTypes.' + categoryObj.category) }}
35+
{{ t('chartTypes.' + categoryObj.category) }}
3636
<span>{{ categoryObj.category }}</span>
3737
</h3>
3838

@@ -52,7 +52,7 @@
5252
<el-switch
5353
v-model="shared.darkMode"
5454
active-color="#181432"
55-
:active-text="$t('editor.darkMode')"
55+
:active-text="t('editor.darkMode')"
5656
:inactive-text="''"
5757
>
5858
</el-switch>
@@ -62,14 +62,17 @@
6262

6363
<script setup>
6464
import LazyLoad from 'vanilla-lazyload/dist/lazyload.esm';
65-
import { computed, onMounted, reactive, ref, watch, useTemplateRef } from 'vue';
65+
import { computed, onMounted, reactive, ref, useTemplateRef, watch } from 'vue';
66+
import { useI18n } from 'vue-i18n';
6667
import { BLACK_MAP, EXAMPLE_CATEGORIES } from '../common/config';
6768
import { store } from '../common/store';
6869
import CHART_LIST from '../data/chart-list-data';
6970
import CHART_LIST_GL from '../data/chart-list-data-gl';
7071
import ExampleCard from './ExampleCard.vue';
7172
import ScrollSpy from './ScrollSpy.vue';
7273
74+
const { t } = useI18n();
75+
7376
const icons = {};
7477
7578
[

0 commit comments

Comments
 (0)