@@ -17,13 +17,17 @@ import { computed, onMounted, ref, watch } from 'vue';
17
17
import { getStore } from ' ../../providers/generic/store/StoreProvider' ;
18
18
import { State } from ' ../../store' ;
19
19
import {useRouter } from ' vue-router' ;
20
- import {getLaunchType , LaunchType } from " ../../model/real_enums/launch/LaunchType" ;
20
+ import {getLaunchType } from " ../../model/real_enums/launch/LaunchType" ;
21
21
import {LaunchTypeModalOpen } from " ../../components/modals/launch-type/LaunchTypeRefs" ;
22
22
import {useI18n } from " vue-i18n" ;
23
23
24
24
const store = getStore <State >();
25
25
let router = useRouter ();
26
- const { t } = useI18n ();
26
+ const { t, d, messages, locale } = useI18n ();
27
+
28
+ function getLocaleMessages() {
29
+ return messages .value [locale .value ];
30
+ }
27
31
28
32
const activeTab = ref <string >(' All' );
29
33
const tabs = ref <string []>([' All' , ' Profile' , ' Locations' , ' Debugging' , ' Modpacks' , ' Other' ]);
@@ -230,7 +234,7 @@ let settingsList = [
230
234
() => emitInvoke (' UpdateAllMods' )
231
235
),
232
236
new SettingsRow (
233
- ' Other ' ,
237
+ ' other ' ,
234
238
' Toggle funky mode' ,
235
239
' Enable/disable funky mode.' ,
236
240
async () => {
@@ -242,7 +246,7 @@ let settingsList = [
242
246
() => emitInvoke (' ToggleFunkyMode' )
243
247
),
244
248
new SettingsRow (
245
- ' Other ' ,
249
+ ' other ' ,
246
250
' Switch theme' ,
247
251
' Switch between light and dark themes.' ,
248
252
async () => {
@@ -254,7 +258,7 @@ let settingsList = [
254
258
() => emitInvoke (' SwitchTheme' )
255
259
),
256
260
new SettingsRow (
257
- ' Other ' ,
261
+ ' other ' ,
258
262
' Switch card display type' ,
259
263
' Switch between expanded or collapsed cards.' ,
260
264
async () => {
@@ -266,29 +270,31 @@ let settingsList = [
266
270
() => emitInvoke (' SwitchCard' )
267
271
),
268
272
new SettingsRow (
269
- ' Other ' ,
273
+ ' other ' ,
270
274
' Refresh online mod list' ,
271
275
' Check for any new mod releases.' ,
272
276
async () => {
273
277
if (store .state .tsMods .isThunderstoreModListUpdateInProgress ) {
274
- return store .state .tsMods .thunderstoreModListUpdateStatus || " Refreshing..." ;
278
+ return store .state .tsMods .thunderstoreModListUpdateStatus
279
+ ? t (` translations.pages.profileSelection.importProfileModal.states.refresh.refreshStatus.${store .state .tsMods .thunderstoreModListUpdateStatus } ` )
280
+ : t (' translations.pages.settings.other.refreshOnlineModList.states.refreshing' );
275
281
}
276
282
if (store .state .tsMods .thunderstoreModListUpdateError ) {
277
- return ` Error refreshing the mod list: ${ store .state .tsMods .thunderstoreModListUpdateError .message } ` ;
283
+ return t ( ' translations.pages.settings.other.refreshOnlineModList.states.errorRefreshing ' , { errorText: store .state .tsMods .thunderstoreModListUpdateError .message }) ;
278
284
}
279
285
if (store .getters [' download/activeDownloadCount' ] > 0 ) {
280
- return " Refreshing the mod list is disabled while there are active downloads. " ;
286
+ return t ( ' translations.pages.settings.other.refreshOnlineModList.states.disabledWhilstDownloading ' ) ;
281
287
}
282
288
if (store .state .tsMods .modsLastUpdated !== undefined ) {
283
- return " Cache date: " + moment (store .state .tsMods .modsLastUpdated ).format ( " MMMM Do YYYY, h:mm:ss a " );
289
+ return t ( ' translations.pages.settings.other.refreshOnlineModList.states.cacheDate ' , { formattedDate: d ( moment (store .state .tsMods .modsLastUpdated ).toDate (), ' long ' , getLocaleMessages (). metadata . locale ) } );
284
290
}
285
291
return " No API information available" ;
286
292
},
287
293
' fa-exchange-alt' ,
288
294
async () => await store .dispatch (" tsMods/syncPackageList" )
289
295
),
290
296
new SettingsRow (
291
- ' Other ' ,
297
+ ' other ' ,
292
298
' Change game' ,
293
299
' Change the current game' ,
294
300
async () => " " ,
@@ -334,7 +340,7 @@ onMounted(async () => {
334
340
return directory ;
335
341
}
336
342
}
337
- return t (' translations.pages.settings.locations.changeSteamFolder.state .setManually' );
343
+ return t (' translations.pages.settings.locations.changeSteamFolder.states .setManually' );
338
344
},
339
345
' fa-folder-open' ,
340
346
() => emitInvoke (' ChangeSteamDirectory' )
0 commit comments