aboutsummaryrefslogtreecommitdiff
path: root/src-vue/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src-vue/src/plugins')
-rw-r--r--src-vue/src/plugins/store.ts26
1 files changed, 13 insertions, 13 deletions
diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts
index caa46bee..08f9b85f 100644
--- a/src-vue/src/plugins/store.ts
+++ b/src-vue/src/plugins/store.ts
@@ -16,8 +16,8 @@ import { ReleaseInfo } from "../../../src-tauri/bindings/ReleaseInfo";
import { ThunderstoreMod } from "../../../src-tauri/bindings/ThunderstoreMod";
import { NorthstarMod } from "../../../src-tauri/bindings/NorthstarMod";
import { searchModule } from './modules/search';
+import { i18n } from '../main';
import { pullRequestModule } from './modules/pull_requests';
-import { PullsApiResponseElement } from "../../../src-tauri/bindings/PullsApiResponseElement";
const persistentStore = new Store('flight-core-settings.json');
@@ -123,8 +123,8 @@ export const store = createStore<FlightCoreStore>({
if (is_valid_titanfall2_install) {
state.game_path = selected;
ElNotification({
- title: 'New game folder',
- message: "Game folder was successfully updated.",
+ title: i18n.global.tc('notification.game_folder.new.title'),
+ message: i18n.global.tc('notification.game_folder.new.text'),
type: 'success',
position: 'bottom-right'
});
@@ -151,8 +151,8 @@ export const store = createStore<FlightCoreStore>({
else {
// Not valid Titanfall2 install
ElNotification({
- title: 'Wrong folder',
- message: "Selected folder is not a valid Titanfall2 install.",
+ title: i18n.global.tc('notification.game_folder.wrong.title'),
+ message: i18n.global.tc('notification.game_folder.wrong.text'),
type: 'error',
position: 'bottom-right'
});
@@ -224,7 +224,7 @@ export const store = createStore<FlightCoreStore>({
.catch((error) => {
console.error(error);
ElNotification({
- title: 'Error',
+ title: i18n.global.tc('generic.error'),
message: error,
type: 'error',
position: 'bottom-right'
@@ -293,7 +293,7 @@ export const store = createStore<FlightCoreStore>({
.catch((error) => {
console.error(error);
ElNotification({
- title: 'Error',
+ title: i18n.global.tc('generic.error'),
message: error,
type: 'error',
position: 'bottom-right'
@@ -315,8 +315,8 @@ export const store = createStore<FlightCoreStore>({
// Display notification to highlight change
ElNotification({
- title: `${state.northstar_release_canal}`,
- message: `Switched release channel to: "${state.northstar_release_canal}"`,
+ title: i18n.global.tc(`channels.names.${state.northstar_release_canal}`),
+ message: i18n.global.tc('channels.release.switch.text', {canal: state.northstar_release_canal}),
type: 'success',
position: 'bottom-right'
});
@@ -394,8 +394,8 @@ async function _initializeApp(state: any) {
// Gamepath not found or other error
console.error(err);
notification_handle = ElNotification({
- title: 'Titanfall2 not found!',
- message: "Please manually select install location",
+ title: i18n.global.tc('notification.game_folder.not_found.title'),
+ message: i18n.global.tc('notification.game_folder.not_found.text'),
type: 'error',
position: 'bottom-right',
duration: 0 // Duration `0` means the notification will not auto-vanish
@@ -437,8 +437,8 @@ async function _checkForFlightCoreUpdates(state: FlightCoreStore) {
if (flightcore_is_outdated) {
let newest_flightcore_version = await invoke("get_newest_flightcore_version") as FlightCoreVersion;
ElNotification({
- title: 'FlightCore outdated!',
- message: `Please update FlightCore.\nRunning outdated version ${state.flightcore_version}.\nNewest is ${newest_flightcore_version.tag_name}!`,
+ title: i18n.global.tc('notification.flightcore_outdated.title'),
+ message: i18n.global.tc('notification.flightcore_outdated.text', {oldVersion: state.flightcore_version, newVersion: newest_flightcore_version.tag_name}),
type: 'warning',
position: 'bottom-right',
duration: 0 // Duration `0` means the notification will not auto-vanish