Skip to content

Commit 5afcd97

Browse files
committed
Added i18n support for settings tabs
1 parent 565d1f5 commit 5afcd97

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/components/settings-components/SettingsView.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ function getLocaleMessages() {
2929
return messages.value[locale.value];
3030
}
3131
32-
const activeTab = ref<string>('All');
33-
const tabs = ref<string[]>(['All', 'Profile', 'Locations', 'Debugging', 'Modpacks', 'Other']);
32+
const activeTab = ref<string>('all');
33+
const tabs = ref<string[]>(['all', 'profile', 'locations', 'debugging', 'modpacks', 'other']);
3434
const logOutput = ref<LogOutputProvider>(LogOutputProvider.instance);
3535
const search = ref<string>('');
3636
const managerVersionNumber = ref<VersionNumber>(ManagerInformation.VERSION);
@@ -418,12 +418,12 @@ function emitInvoke(invoked: string) {
418418
<li v-for="(key, index) in tabs" :key="`tab-${key}`"
419419
:class="[{'is-active': activeTab === key}]"
420420
@click="changeTab(key)">
421-
<a>{{key}}</a>
421+
<a>{{ t(`translations.pages.settings.groups.${key}`) }}</a>
422422
</li>
423423
</ul>
424424
</div>
425425
</div>
426-
<template v-if="activeTab === 'All'">
426+
<template v-if="activeTab === 'all'">
427427
<SettingsItem v-for="(key, _) in searchableSettings" :key="`setting-${key.action}`"
428428
:action="key.action"
429429
:description="key.description"

src/i18n/en/pages/SettingsTranslation.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ import {SettingsMessageFormat} from "../../base/pages/SettingsMessageFormat";
22

33
export const SettingsTranslation: SettingsMessageFormat = {
44
groups: {
5+
all: 'All',
6+
profile: 'Profile',
57
locations: 'Locations',
68
debugging: 'Debugging',
9+
other: 'Other',
10+
modpacks: 'Modpacks',
711
},
812
locations: {
913
browseDataFolder: {

0 commit comments

Comments
 (0)