From 5fec89ea55cfe1dfdf56680cab1ab6baf14cba31 Mon Sep 17 00:00:00 2001
From: Miepee <38186597+Miepee@users.noreply.github.com>
Date: Fri, 7 Jan 2022 08:22:15 +0100
Subject: [PATCH] Push localization and fix error crash on messageBox show
---
.../AM2RLauncher/CrossPlatformOperations.cs | 3 ++-
.../AM2RLauncher/Language/Text.es.resx | 2 +-
.../AM2RLauncher/Language/Text.fr.resx | 3 +++
.../AM2RLauncher/Language/Text.ja.resx | 3 +++
.../AM2RLauncher/Language/Text.pt.resx | 3 +++
.../AM2RLauncher/Language/Text.ru.resx | 3 +++
.../AM2RLauncher/Language/Text.zh-Hans.resx | 3 +++
.../AM2RLauncher/MainForm/MainForm.Events.cs | 21 ++++++++++---------
8 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/AM2RLauncher/AM2RLauncher/CrossPlatformOperations.cs b/AM2RLauncher/AM2RLauncher/CrossPlatformOperations.cs
index 766a021..5b4e638 100644
--- a/AM2RLauncher/AM2RLauncher/CrossPlatformOperations.cs
+++ b/AM2RLauncher/AM2RLauncher/CrossPlatformOperations.cs
@@ -44,7 +44,8 @@ namespace AM2RLauncher
// Config for mac systems will be saved in ~/Library/Preferences/AM2RLauncher
///
/// Path to the Config file folder on *nix based systems.
- /// Linux: Will point to XDG_CONFIG_HOME/AM2RLauncher
+ /// Linux: Will point to XDG_CONFIG_HOME/AM2RLauncher
+ /// Mac: Will point to ~/Library/Preferences/AM2RLauncher
///
public static readonly string NIXLAUNCHERCONFIGPATH = currentPlatform.IsGtk ? ((String.IsNullOrWhiteSpace(LINUXXDGCONFIG) ? (NIXHOME + "/.config")
: LINUXXDGCONFIG) + "/AM2RLauncher")
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.es.resx b/AM2RLauncher/AM2RLauncher/Language/Text.es.resx
index 5f58a73..e3a91d5 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.es.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.es.resx
@@ -220,7 +220,7 @@
¡No se puede establecer conexión a internet! ¡Reinténtalo más tarde!
- $NAME es un enlace de Git no válido!
+ ¡$NAME es un enlace de Git no válido!
¡Java no encontrado! No se puede generar un APK sin Java instalado. Por favor asegúrate de tener Java instalado y añadido a PATH
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.fr.resx b/AM2RLauncher/AM2RLauncher/Language/Text.fr.resx
index 52cbba9..7603b52 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.fr.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.fr.resx
@@ -221,6 +221,9 @@ ce profil !
Impossible d'établir une connexion internet. Réessayez plus tard.
+
+ $NAME est une URL git invalide!
+
Java non trouvé ! Impossible de générer un APK. Assurez-vous que Java est installé et est dans le PATH.
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.ja.resx b/AM2RLauncher/AM2RLauncher/Language/Text.ja.resx
index 14fc210..75b7507 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.ja.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.ja.resx
@@ -219,6 +219,9 @@
インターネットに接続できませんでした。後ほどお試しください
+
+ $NAMEは無効なGitリンクです。
+
Javaが見つかりません! APKの作成にはJavaが必要です。環境変数のPATHにJavaが追加されているかご確認下さい
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.pt.resx b/AM2RLauncher/AM2RLauncher/Language/Text.pt.resx
index c9a1183..29d2b33 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.pt.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.pt.resx
@@ -321,6 +321,9 @@
Selecione seu mod
+
+ $NAME é um link Git inválido!
+
Sucesso!
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.ru.resx b/AM2RLauncher/AM2RLauncher/Language/Text.ru.resx
index 47e5221..671b52a 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.ru.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.ru.resx
@@ -219,6 +219,9 @@
Не удалось установить интернет-соединение! Попробуйте позже!
+
+ $NAME не является ссылкой Git!
+
Не обнаружена Java! Невозможно сгенерировать APK-файл без установленной Java. Убедитесь, что Java установлена, и прописана в PATH.
diff --git a/AM2RLauncher/AM2RLauncher/Language/Text.zh-Hans.resx b/AM2RLauncher/AM2RLauncher/Language/Text.zh-Hans.resx
index 66f2836..8308588 100644
--- a/AM2RLauncher/AM2RLauncher/Language/Text.zh-Hans.resx
+++ b/AM2RLauncher/AM2RLauncher/Language/Text.zh-Hans.resx
@@ -219,6 +219,9 @@
无法连接到服务器!请稍后再试!
+
+ $NAME 不是有效的Git仓库地址!
+
未检测到 Java!必须使用 Java 才能生成 APK 文件。请确保已安装 Java 并将其路径添加至环境变量 PATH 中。
diff --git a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs
index c780d20..0b4244a 100644
--- a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs
+++ b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs
@@ -338,19 +338,20 @@ namespace AM2RLauncher
UpdateApkState();
UpdateProfileState();
- await Task.Run(() =>
+ // If the file cannot be launched due to anti-virus shenanigans or any other reason, we try catch here
+ try
{
- // If the file cannot be launched due to anti-virus shenanigans or any other reason, we try catch here
- try
+
+ await Task.Run(() =>
{
InstallProfile(profileList[profileIndex.Value]);
- }
- catch (Exception ex)
- {
- log.Error(ex.Message + "\n*****Stack Trace*****\n\n" + ex.StackTrace);
- MessageBox.Show(ex.Message + "\n*****Stack Trace*****\n\n" + ex.StackTrace, Language.Text.ErrorWindowTitle, MessageBoxType.Error);
- }
- });
+ });
+ }
+ catch (Exception ex)
+ {
+ log.Error(ex.Message + "\n*****Stack Trace*****\n\n" + ex.StackTrace);
+ MessageBox.Show(ex.Message + "\n*****Stack Trace*****\n\n" + ex.StackTrace, Language.Text.ErrorWindowTitle, MessageBoxType.Error);
+ }
progressBar.Visible = false;
progressBar.Value = 0;