Skip to content

Commit

Permalink
fix: rename en.ts to en_us.ts (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
Broken-Deer authored Aug 23, 2024
1 parent 2100853 commit 7e1542e
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
9 changes: 5 additions & 4 deletions core/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async fn main() {
std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
initialize_application().await;
info!("Amethyst Launcher is open source, You can view the source code on Github: https://github.com/Conic-Sections/Amethyst-Launcher");
let result = tauri::Builder::default()
tauri::Builder::default()
.plugin(tauri_plugin_http::init())
.plugin(tauri_plugin_shell::init())
.invoke_handler(tauri::generate_handler![
Expand Down Expand Up @@ -104,7 +104,7 @@ async fn main() {
return;
};
match event {
tauri::WindowEvent::CloseRequested { api, .. } => {
tauri::WindowEvent::CloseRequested { .. } => {
match std::fs::remove_dir_all(&DATA_LOCATION.get().unwrap().temp) {
Ok(_) => info!("Temporary files cleared"),
Err(_) => {
Expand All @@ -116,7 +116,8 @@ async fn main() {
_ => {}
}
})
.run(tauri::generate_context!());
.run(tauri::generate_context!())
.expect("Failed to run app");
}

fn initialize_logger() {
Expand Down Expand Up @@ -219,7 +220,7 @@ async fn initialize_application() {
tokio::fs::write(&launch_profiles_path, DEFAULT_LAUNCHER_PROFILE)
.await
.expect("C");
instance::update_latest_instance().await;
tokio::spawn(instance::update_latest_instance());
}

async fn initialize_application_data() {
Expand Down
11 changes: 10 additions & 1 deletion core/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
],
"createUpdaterArtifacts": true
},
"plugins": {
"updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDIwNUJDMDNBRjA2ODE1RjgKUldUNEZXandPc0JiSUNEUHhDeDloVUp5ZmJMVnp2VWVZZi9lM2o4Rmc3TnUvbnJEZk1Fc2duWS8K",
"endpoints": [
"https://aml.btlcraft.top/latest.json"
]
}
}
}
4 changes: 2 additions & 2 deletions src/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createPinia } from "pinia";
import App from "./Main.vue";
import { event } from "@tauri-apps/api";
import { createI18n } from "vue-i18n";
import en from "./i18n/en";
import en_us from "./i18n/en_us";
import zh_cn from "./i18n/zh_cn";
import ru_ru from "./i18n/ru_ru";

Expand All @@ -13,7 +13,7 @@ const i18n = createI18n({
locale: "zh_cn",
fallbackLocale: "en",
messages: {
en,
en_us,
zh_cn,
ru_ru,
},
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions src/pages/settings/General.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<keep-alive>
<div>
<setting-group>
<setting-item :title="$t('settings.general.language')" :description="$t('settings.general.languageDesc')" icon="language">
<select-vue :display-name="['English', '简体中文', 'Русский']" :options="['en', 'zh_cn', 'ru_ru']"
<setting-item :title="$t('settings.general.language')" :description="$t('settings.general.languageDesc')"
icon="language">
<select-vue :display-name="['English', '简体中文', 'Русский']" :options="['en_us', 'zh_cn', 'ru_ru']"
v-model="config.language" :default="1"></select-vue>
</setting-item>
<setting-item :title="$t('settings.general.updateChannel')"
Expand Down

0 comments on commit 7e1542e

Please sign in to comment.