From 99a514b0bcb5327da2a9ccdc1cc5210abb1b40aa Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 2 Jun 2024 23:19:33 -0500 Subject: [PATCH] Update translatables --- PKHeX.WinForms/Misc/ErrorWindow.cs | 2 +- PKHeX.WinForms/Resources/text/lang_de.txt | 3 +++ PKHeX.WinForms/Resources/text/lang_en.txt | 3 +++ PKHeX.WinForms/Resources/text/lang_es.txt | 3 +++ PKHeX.WinForms/Resources/text/lang_fr.txt | 3 +++ PKHeX.WinForms/Resources/text/lang_it.txt | 3 +++ PKHeX.WinForms/Resources/text/lang_ja.txt | 3 +++ PKHeX.WinForms/Resources/text/lang_ko.txt | 3 +++ PKHeX.WinForms/Resources/text/lang_zh.txt | 3 +++ PKHeX.WinForms/Resources/text/lang_zh2.txt | 3 +++ PKHeX.WinForms/Subforms/SettingsEditor.cs | 1 + PKHeX.WinForms/Util/WinFormsTranslator.cs | 5 +++-- 12 files changed, 32 insertions(+), 3 deletions(-) diff --git a/PKHeX.WinForms/Misc/ErrorWindow.cs b/PKHeX.WinForms/Misc/ErrorWindow.cs index b72255789..1ca7a6bab 100644 --- a/PKHeX.WinForms/Misc/ErrorWindow.cs +++ b/PKHeX.WinForms/Misc/ErrorWindow.cs @@ -24,7 +24,7 @@ private static string GetDisplayLanguage() catch { return System.Threading.Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName; } } - private ErrorWindow(string? lang = GameLanguage.DefaultLanguage) + public ErrorWindow(string? lang = GameLanguage.DefaultLanguage) { InitializeComponent(); WinFormsUtil.TranslateInterface(this, lang ?? GetDisplayLanguage()); diff --git a/PKHeX.WinForms/Resources/text/lang_de.txt b/PKHeX.WinForms/Resources/text/lang_de.txt index ab8a25741..ef9332c5b 100644 --- a/PKHeX.WinForms/Resources/text/lang_de.txt +++ b/PKHeX.WinForms/Resources/text/lang_de.txt @@ -92,6 +92,7 @@ BoxExporter.label1=Namer: ErrorWindow.B_Abort=Abbrechen ErrorWindow.B_Continue=Fortfahren ErrorWindow.B_CopyToClipboard=In Zwischenablage kopieren +ErrorWindow.L_Message=An unknown error has occurred. ErrorWindow.L_ProvideInfo=Bitte gib diese Informationen an, wenn du den Fehler meldest: LocalizedDescription.AllowBoxDataDrop=Allow drag and drop of boxdata binary files from the GUI via the Box tab. LocalizedDescription.AllowGen1Tradeback=Erlaube Gen 1 Rücktausch @@ -1915,6 +1916,8 @@ SAV_ZygardeCell.B_GiveAll=Alle erhalten SAV_ZygardeCell.B_Save=Speichern SAV_ZygardeCell.L_Cells=Gelagert: SAV_ZygardeCell.L_Collected=Gesammelt: +SettingsEditor.B_Reset=Reset All +SettingsEditor.L_Blank=Blank Save Version: SuperTrainingEditor.B_All=Alle SuperTrainingEditor.B_Cancel=Abbrechen SuperTrainingEditor.B_None=Keine diff --git a/PKHeX.WinForms/Resources/text/lang_en.txt b/PKHeX.WinForms/Resources/text/lang_en.txt index c543071b6..768712f52 100644 --- a/PKHeX.WinForms/Resources/text/lang_en.txt +++ b/PKHeX.WinForms/Resources/text/lang_en.txt @@ -92,6 +92,7 @@ BoxExporter.label1=Namer: ErrorWindow.B_Abort=Abort ErrorWindow.B_Continue=Continue ErrorWindow.B_CopyToClipboard=Copy to Clipboard +ErrorWindow.L_Message=An unknown error has occurred. ErrorWindow.L_ProvideInfo=Please provide this information when reporting this error: LocalizedDescription.AllowBoxDataDrop=Allow drag and drop of boxdata binary files from the GUI via the Box tab. LocalizedDescription.AllowGen1Tradeback=GB: Allow Generation 2 tradeback learnsets @@ -1911,6 +1912,8 @@ SAV_ZygardeCell.B_GiveAll=Collect All SAV_ZygardeCell.B_Save=Save SAV_ZygardeCell.L_Cells=Stored: SAV_ZygardeCell.L_Collected=Collected: +SettingsEditor.B_Reset=Reset All +SettingsEditor.L_Blank=Blank Save Version: SuperTrainingEditor.B_All=Give All SuperTrainingEditor.B_Cancel=Cancel SuperTrainingEditor.B_None=Remove All diff --git a/PKHeX.WinForms/Resources/text/lang_es.txt b/PKHeX.WinForms/Resources/text/lang_es.txt index e1a579847..fd16de331 100644 --- a/PKHeX.WinForms/Resources/text/lang_es.txt +++ b/PKHeX.WinForms/Resources/text/lang_es.txt @@ -92,6 +92,7 @@ BoxExporter.label1=Namer: ErrorWindow.B_Abort=Abortar ErrorWindow.B_Continue=Continuar ErrorWindow.B_CopyToClipboard=Copiar al portapapeles +ErrorWindow.L_Message=An unknown error has occurred. ErrorWindow.L_ProvideInfo=Por favor, proporcione esta información cuando reporte el fallo: LocalizedDescription.AllowBoxDataDrop=Allow drag and drop of boxdata binary files from the GUI via the Box tab. LocalizedDescription.AllowGen1Tradeback=GB: Permitir intercambio de movimientos desde la Generación 2. @@ -1911,6 +1912,8 @@ SAV_ZygardeCell.B_GiveAll=Dar Todo SAV_ZygardeCell.B_Save=Guardar SAV_ZygardeCell.L_Cells=Almacenado: SAV_ZygardeCell.L_Collected=Coleccionado: +SettingsEditor.B_Reset=Reset All +SettingsEditor.L_Blank=Blank Save Version: SuperTrainingEditor.B_All=Dar todos SuperTrainingEditor.B_Cancel=Cancelar SuperTrainingEditor.B_None=Quitar todos diff --git a/PKHeX.WinForms/Resources/text/lang_fr.txt b/PKHeX.WinForms/Resources/text/lang_fr.txt index abb6e0193..aea76c3a8 100644 --- a/PKHeX.WinForms/Resources/text/lang_fr.txt +++ b/PKHeX.WinForms/Resources/text/lang_fr.txt @@ -92,6 +92,7 @@ BoxExporter.label1=Namer: ErrorWindow.B_Abort=Abandonner ErrorWindow.B_Continue=Continuer ErrorWindow.B_CopyToClipboard=Copier dans le presse-papier +ErrorWindow.L_Message=An unknown error has occurred. ErrorWindow.L_ProvideInfo=Veuillez fournir les informations suivantes dans votre rapport d'erreur : LocalizedDescription.AllowBoxDataDrop=Allow drag and drop of boxdata binary files from the GUI via the Box tab. LocalizedDescription.AllowGen1Tradeback=GB: Permettre les movepools de revenants de la Gén. 2 @@ -1911,6 +1912,8 @@ SAV_ZygardeCell.B_GiveAll=Tout obtenir SAV_ZygardeCell.B_Save=Sauvegarder SAV_ZygardeCell.L_Cells=Conservé : SAV_ZygardeCell.L_Collected=Obtenu : +SettingsEditor.B_Reset=Reset All +SettingsEditor.L_Blank=Blank Save Version: SuperTrainingEditor.B_All=Tout donner SuperTrainingEditor.B_Cancel=Annuler SuperTrainingEditor.B_None=Tout retirer diff --git a/PKHeX.WinForms/Resources/text/lang_it.txt b/PKHeX.WinForms/Resources/text/lang_it.txt index e9ae92231..e868f55ce 100644 --- a/PKHeX.WinForms/Resources/text/lang_it.txt +++ b/PKHeX.WinForms/Resources/text/lang_it.txt @@ -92,6 +92,7 @@ BoxExporter.label1=Namer: ErrorWindow.B_Abort=Annulla ErrorWindow.B_Continue=Continua ErrorWindow.B_CopyToClipboard=Copiato negli appunti +ErrorWindow.L_Message=An unknown error has occurred. ErrorWindow.L_ProvideInfo=Per favore includi queste informazioni quando riporti questo errore: LocalizedDescription.AllowBoxDataDrop=Allow drag and drop of boxdata binary files from the GUI via the Box tab. LocalizedDescription.AllowGen1Tradeback=GB:Consenti insieme di mosse tradeback da 2° Generazione. @@ -1911,6 +1912,8 @@ SAV_ZygardeCell.B_GiveAll=Colleziona Tutto SAV_ZygardeCell.B_Save=Salva SAV_ZygardeCell.L_Cells=Stored: SAV_ZygardeCell.L_Collected=Collezionate: +SettingsEditor.B_Reset=Reset All +SettingsEditor.L_Blank=Blank Save Version: SuperTrainingEditor.B_All=Dai Tutto SuperTrainingEditor.B_Cancel=Annulla SuperTrainingEditor.B_None=Rimuovi Tutto diff --git a/PKHeX.WinForms/Resources/text/lang_ja.txt b/PKHeX.WinForms/Resources/text/lang_ja.txt index bd8f87a2f..361e3d842 100644 --- a/PKHeX.WinForms/Resources/text/lang_ja.txt +++ b/PKHeX.WinForms/Resources/text/lang_ja.txt @@ -92,6 +92,7 @@ BoxExporter.label1=Namer: ErrorWindow.B_Abort=キャンセル ErrorWindow.B_Continue=続ける ErrorWindow.B_CopyToClipboard=クリップボードにコピー +ErrorWindow.L_Message=An unknown error has occurred. ErrorWindow.L_ProvideInfo=このエラーを報告する時は、こちらの情報を提供してください: LocalizedDescription.AllowBoxDataDrop=Allow drag and drop of boxdata binary files from the GUI via the Box tab. LocalizedDescription.AllowGen1Tradeback=GB: Allow Generation 2 tradeback learnsets @@ -1911,6 +1912,8 @@ SAV_ZygardeCell.B_GiveAll=全て取得 SAV_ZygardeCell.B_Save=保存 SAV_ZygardeCell.L_Cells=キューブ内 SAV_ZygardeCell.L_Collected=回収 +SettingsEditor.B_Reset=Reset All +SettingsEditor.L_Blank=Blank Save Version: SuperTrainingEditor.B_All=全て取得 SuperTrainingEditor.B_Cancel=キャンセル SuperTrainingEditor.B_None=全て消去 diff --git a/PKHeX.WinForms/Resources/text/lang_ko.txt b/PKHeX.WinForms/Resources/text/lang_ko.txt index 06e6ccd73..160dbcf1c 100644 --- a/PKHeX.WinForms/Resources/text/lang_ko.txt +++ b/PKHeX.WinForms/Resources/text/lang_ko.txt @@ -92,6 +92,7 @@ BoxExporter.label1=Namer: ErrorWindow.B_Abort=중단 ErrorWindow.B_Continue=계속 ErrorWindow.B_CopyToClipboard=클립보드에 복사 +ErrorWindow.L_Message=An unknown error has occurred. ErrorWindow.L_ProvideInfo=오류를 보고할 때 이 정보를 제공해 주세요: LocalizedDescription.AllowBoxDataDrop=Allow drag and drop of boxdata binary files from the GUI via the Box tab. LocalizedDescription.AllowGen1Tradeback=GB: 2세대에서 옮겨온 1세대 기술 허용 @@ -1913,6 +1914,8 @@ SAV_ZygardeCell.B_GiveAll=모두 모으기 SAV_ZygardeCell.B_Save=저장 SAV_ZygardeCell.L_Cells=보관됨: SAV_ZygardeCell.L_Collected=회수함: +SettingsEditor.B_Reset=Reset All +SettingsEditor.L_Blank=Blank Save Version: SuperTrainingEditor.B_All=모두 주기 SuperTrainingEditor.B_Cancel=취소 SuperTrainingEditor.B_None=모두 제거 diff --git a/PKHeX.WinForms/Resources/text/lang_zh.txt b/PKHeX.WinForms/Resources/text/lang_zh.txt index afc75ccac..e1f902ba3 100644 --- a/PKHeX.WinForms/Resources/text/lang_zh.txt +++ b/PKHeX.WinForms/Resources/text/lang_zh.txt @@ -92,6 +92,7 @@ BoxExporter.label1=姓名: ErrorWindow.B_Abort=终止 ErrorWindow.B_Continue=继续 ErrorWindow.B_CopyToClipboard=复制到剪切板 +ErrorWindow.L_Message=An unknown error has occurred. ErrorWindow.L_ProvideInfo=提交错误报告时请提供以下信息: LocalizedDescription.AllowBoxDataDrop=Allow drag and drop of boxdata binary files from the GUI via the Box tab. LocalizedDescription.AllowGen1Tradeback=GB 允许二代传回的招式组合 @@ -1912,6 +1913,8 @@ SAV_ZygardeCell.B_GiveAll=全部收集 SAV_ZygardeCell.B_Save=保存 SAV_ZygardeCell.L_Cells=储存了: SAV_ZygardeCell.L_Collected=收集了: +SettingsEditor.B_Reset=Reset All +SettingsEditor.L_Blank=Blank Save Version: SuperTrainingEditor.B_All=获得全部 SuperTrainingEditor.B_Cancel=取消 SuperTrainingEditor.B_None=全部清除 diff --git a/PKHeX.WinForms/Resources/text/lang_zh2.txt b/PKHeX.WinForms/Resources/text/lang_zh2.txt index 9c35c42ce..8ac6920d4 100644 --- a/PKHeX.WinForms/Resources/text/lang_zh2.txt +++ b/PKHeX.WinForms/Resources/text/lang_zh2.txt @@ -92,6 +92,7 @@ BoxExporter.label1=Namer: ErrorWindow.B_Abort=終止 ErrorWindow.B_Continue=繼續 ErrorWindow.B_CopyToClipboard=複製到剪切板 +ErrorWindow.L_Message=An unknown error has occurred. ErrorWindow.L_ProvideInfo=提交錯誤報告時請提供以下資訊: LocalizedDescription.AllowBoxDataDrop=Allow drag and drop of boxdata binary files from the GUI via the Box tab. LocalizedDescription.AllowGen1Tradeback=GB 允許從第二世代傳回之招式組合 @@ -1911,6 +1912,8 @@ SAV_ZygardeCell.B_GiveAll=全部收集 SAV_ZygardeCell.B_Save=儲存 SAV_ZygardeCell.L_Cells=儲存了: SAV_ZygardeCell.L_Collected=收集了: +SettingsEditor.B_Reset=Reset All +SettingsEditor.L_Blank=Blank Save Version: SuperTrainingEditor.B_All=獲得全部 SuperTrainingEditor.B_Cancel=取消 SuperTrainingEditor.B_None=全部清除 diff --git a/PKHeX.WinForms/Subforms/SettingsEditor.cs b/PKHeX.WinForms/Subforms/SettingsEditor.cs index c5de94efe..b2c7b6341 100644 --- a/PKHeX.WinForms/Subforms/SettingsEditor.cs +++ b/PKHeX.WinForms/Subforms/SettingsEditor.cs @@ -17,6 +17,7 @@ public partial class SettingsEditor : Form public SettingsEditor(object obj) { InitializeComponent(); + WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage); LoadSettings(obj); if (obj is PKHeXSettings s) diff --git a/PKHeX.WinForms/Util/WinFormsTranslator.cs b/PKHeX.WinForms/Util/WinFormsTranslator.cs index 6e400aefc..6dff310db 100644 --- a/PKHeX.WinForms/Util/WinFormsTranslator.cs +++ b/PKHeX.WinForms/Util/WinFormsTranslator.cs @@ -225,7 +225,7 @@ public static void LoadAllForms(IEnumerable types, ReadOnlySpan ba { foreach (var t in types) { - if (t.BaseType == typeof(Form) && IsBannedStartsWith(t.Name, banlist)) + if (!typeof(Form).IsAssignableFrom(t) || IsBannedStartsWith(t.Name, banlist)) continue; var constructors = t.GetConstructors(); @@ -234,7 +234,8 @@ public static void LoadAllForms(IEnumerable types, ReadOnlySpan ba var argCount = constructors[0].GetParameters().Length; try { - _ = (Form?)Activator.CreateInstance(t, new object[argCount]); + var form = (Form?)Activator.CreateInstance(t, new object[argCount]); + form?.Dispose(); } // This is a debug utility method, will always be logging. Shouldn't ever fail. catch