Skip to content

Commit e024236

Browse files
committed
refactor: use $t
1 parent 58b1b43 commit e024236

4 files changed

Lines changed: 6 additions & 13 deletions

File tree

app/components/ColumnPicker.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ onUnmounted(() => {
4646
// Columns that can be toggled (name is always visible)
4747
const toggleableColumns = computed(() => props.columns.filter(col => col.id !== 'name'))
4848
49-
const { t } = useI18n()
50-
5149
// Map column IDs to i18n keys
5250
const columnLabelKey: Record<string, string> = {
5351
name: 'filters.columns.name',
@@ -66,7 +64,7 @@ const columnLabelKey: Record<string, string> = {
6664
6765
function getColumnLabel(id: string): string {
6866
const key = columnLabelKey[id]
69-
return key ? t(key) : id
67+
return key ? $t(key) : id
7068
}
7169
7270
function handleReset() {

app/components/FilterPanel.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const emit = defineEmits<{
2929
3030
const isExpanded = ref(false)
3131
const showAllKeywords = ref(false)
32-
const { t } = useI18n()
3332
3433
const displayedKeywords = computed(() => {
3534
const keywords = props.availableKeywords ?? []
@@ -39,15 +38,15 @@ const displayedKeywords = computed(() => {
3938
const searchPlaceholder = computed(() => {
4039
switch (props.filters.searchScope) {
4140
case 'name':
42-
return t('filters.search_placeholder_name')
41+
return $t('filters.search_placeholder_name')
4342
case 'description':
44-
return t('filters.search_placeholder_description')
43+
return $t('filters.search_placeholder_description')
4544
case 'keywords':
46-
return t('filters.search_placeholder_keywords')
45+
return $t('filters.search_placeholder_keywords')
4746
case 'all':
48-
return t('filters.search_placeholder_all')
47+
return $t('filters.search_placeholder_all')
4948
default:
50-
return t('filters.search_placeholder_name')
49+
return $t('filters.search_placeholder_name')
5150
}
5251
})
5352

app/components/PackageListToolbar.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ const viewMode = computed({
5959
6060
const showingFiltered = computed(() => props.filteredCount !== props.totalCount)
6161
62-
const { t } = useI18n()
63-
6462
// Parse current sort option into key and direction
6563
const currentSort = computed(() => parseSortOption(props.sortOption))
6664

app/components/PackageTable.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ function toggleSort(id: string) {
8181
}
8282
}
8383
84-
const { t } = useI18n()
85-
8684
// Map column IDs to i18n keys
8785
const columnLabelKeys: Record<ColumnId, string> = {
8886
name: 'filters.columns.name',

0 commit comments

Comments
 (0)