From b7e01ee3c27b9cb73a8c7112762c966242372366 Mon Sep 17 00:00:00 2001 From: Miepee Date: Fri, 24 Feb 2023 16:10:07 +0100 Subject: [PATCH] Add initial localization support --- Atomic/Atomic.csproj | 41 ++++ Atomic/Language/Text.Designer.cs | 324 ++++++++++++++++++++++++++++++ Atomic/Language/Text.de.resx | 159 +++++++++++++++ Atomic/Language/Text.es.resx | 159 +++++++++++++++ Atomic/Language/Text.fr.resx | 159 +++++++++++++++ Atomic/Language/Text.it.resx | 159 +++++++++++++++ Atomic/Language/Text.ja.resx | 159 +++++++++++++++ Atomic/Language/Text.pt.resx | 159 +++++++++++++++ Atomic/Language/Text.resx | 159 +++++++++++++++ Atomic/Language/Text.ru.resx | 159 +++++++++++++++ Atomic/Language/Text.zh-Hans.resx | 159 +++++++++++++++ Atomic/ModPacker.Designer.cs | 52 ++--- Atomic/ModPacker.cs | 54 +++-- AtomicLib/Core.cs | 2 + 14 files changed, 1860 insertions(+), 44 deletions(-) create mode 100644 Atomic/Language/Text.Designer.cs create mode 100644 Atomic/Language/Text.de.resx create mode 100644 Atomic/Language/Text.es.resx create mode 100644 Atomic/Language/Text.fr.resx create mode 100644 Atomic/Language/Text.it.resx create mode 100644 Atomic/Language/Text.ja.resx create mode 100644 Atomic/Language/Text.pt.resx create mode 100644 Atomic/Language/Text.resx create mode 100644 Atomic/Language/Text.ru.resx create mode 100644 Atomic/Language/Text.zh-Hans.resx diff --git a/Atomic/Atomic.csproj b/Atomic/Atomic.csproj index a7637a4..5d22965 100644 --- a/Atomic/Atomic.csproj +++ b/Atomic/Atomic.csproj @@ -10,6 +10,42 @@ ResXFileCodeGenerator Resources.Designer.cs + + ResXFileCodeGenerator + Text.Designer.cs + + + ResXFileCodeGenerator + Text.Designer.cs + + + ResXFileCodeGenerator + Text.Designer.cs + + + ResXFileCodeGenerator + Text.Designer.cs + + + ResXFileCodeGenerator + Text.Designer.cs + + + ResXFileCodeGenerator + Text.Designer.cs + + + ResXFileCodeGenerator + Text.Designer.cs + + + ResXFileCodeGenerator + Text.Designer.cs + + + ResXFileCodeGenerator + Text.Designer.cs + @@ -18,6 +54,11 @@ True Resources.resx + + True + True + Text.resx + diff --git a/Atomic/Language/Text.Designer.cs b/Atomic/Language/Text.Designer.cs new file mode 100644 index 0000000..0f1dcbc --- /dev/null +++ b/Atomic/Language/Text.Designer.cs @@ -0,0 +1,324 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Atomic.Language { + using System; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [System.Diagnostics.DebuggerNonUserCodeAttribute()] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Text_fr { + + private static System.Resources.ResourceManager resourceMan; + + private static System.Globalization.CultureInfo resourceCulture; + + [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Text_fr() { + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + internal static System.Resources.ResourceManager ResourceManager { + get { + if (object.Equals(null, resourceMan)) { + System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Atomic.Language.Text_fr", typeof(Text_fr).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + internal static System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + internal static string ModName { + get { + return ResourceManager.GetString("ModName", resourceCulture); + } + } + + internal static string Author { + get { + return ResourceManager.GetString("Author", resourceCulture); + } + } + + internal static string Version { + get { + return ResourceManager.GetString("Version", resourceCulture); + } + } + + internal static string ModNotes { + get { + return ResourceManager.GetString("ModNotes", resourceCulture); + } + } + + internal static string UsesCustomSaves { + get { + return ResourceManager.GetString("UsesCustomSaves", resourceCulture); + } + } + + internal static string SelectFolder { + get { + return ResourceManager.GetString("SelectFolder", resourceCulture); + } + } + + internal static string UsesCustomMusic { + get { + return ResourceManager.GetString("UsesCustomMusic", resourceCulture); + } + } + + internal static string UsesYYC { + get { + return ResourceManager.GetString("UsesYYC", resourceCulture); + } + } + + internal static string SupportsWindows { + get { + return ResourceManager.GetString("SupportsWindows", resourceCulture); + } + } + + internal static string LoadWindowsZip { + get { + return ResourceManager.GetString("LoadWindowsZip", resourceCulture); + } + } + + internal static string WindowsLoaded { + get { + return ResourceManager.GetString("WindowsLoaded", resourceCulture); + } + } + + internal static string BundleAndroid { + get { + return ResourceManager.GetString("BundleAndroid", resourceCulture); + } + } + + internal static string LoadAndroidAPK { + get { + return ResourceManager.GetString("LoadAndroidAPK", resourceCulture); + } + } + + internal static string AndroidLoaded { + get { + return ResourceManager.GetString("AndroidLoaded", resourceCulture); + } + } + + internal static string SupportsLinux { + get { + return ResourceManager.GetString("SupportsLinux", resourceCulture); + } + } + + internal static string LinuxLoaded { + get { + return ResourceManager.GetString("LinuxLoaded", resourceCulture); + } + } + + internal static string SupportsMac { + get { + return ResourceManager.GetString("SupportsMac", resourceCulture); + } + } + + internal static string LoadMacZip { + get { + return ResourceManager.GetString("LoadMacZip", resourceCulture); + } + } + + internal static string MacLoaded { + get { + return ResourceManager.GetString("MacLoaded", resourceCulture); + } + } + + internal static string LoadAM2R11 { + get { + return ResourceManager.GetString("LoadAM2R11", resourceCulture); + } + } + + internal static string AM2R11Loaded { + get { + return ResourceManager.GetString("AM2R11Loaded", resourceCulture); + } + } + + internal static string CreateModPackage { + get { + return ResourceManager.GetString("CreateModPackage", resourceCulture); + } + } + + internal static string ModPackageCreated { + get { + return ResourceManager.GetString("ModPackageCreated", resourceCulture); + } + } + + internal static string LoadLinuxZip { + get { + return ResourceManager.GetString("LoadLinuxZip", resourceCulture); + } + } + + internal static string ZipArchivesFileFilter { + get { + return ResourceManager.GetString("ZipArchivesFileFilter", resourceCulture); + } + } + + internal static string APKFileFilter { + get { + return ResourceManager.GetString("APKFileFilter", resourceCulture); + } + } + + internal static string InvalidSaveDirectory { + get { + return ResourceManager.GetString("InvalidSaveDirectory", resourceCulture); + } + } + + internal static string YYCMacUnsupported { + get { + return ResourceManager.GetString("YYCMacUnsupported", resourceCulture); + } + } + + internal static string Warning { + get { + return ResourceManager.GetString("Warning", resourceCulture); + } + } + + internal static string SelectAM2R11FileDialog { + get { + return ResourceManager.GetString("SelectAM2R11FileDialog", resourceCulture); + } + } + + internal static string FieldsMissing { + get { + return ResourceManager.GetString("FieldsMissing", resourceCulture); + } + } + + internal static string Error { + get { + return ResourceManager.GetString("Error", resourceCulture); + } + } + + internal static string NameInvalidCharacters { + get { + return ResourceManager.GetString("NameInvalidCharacters", resourceCulture); + } + } + + internal static string AM2R11Invalid { + get { + return ResourceManager.GetString("AM2R11Invalid", resourceCulture); + } + } + + internal static string PackagingMods { + get { + return ResourceManager.GetString("PackagingMods", resourceCulture); + } + } + + internal static string ModPackagingAborted { + get { + return ResourceManager.GetString("ModPackagingAborted", resourceCulture); + } + } + + internal static string ModdedGameNotFound { + get { + return ResourceManager.GetString("ModdedGameNotFound", resourceCulture); + } + } + + internal static string Mac { + get { + return ResourceManager.GetString("Mac", resourceCulture); + } + } + + internal static string Linux { + get { + return ResourceManager.GetString("Linux", resourceCulture); + } + } + + internal static string Windows { + get { + return ResourceManager.GetString("Windows", resourceCulture); + } + } + + internal static string ProfileXMLFound { + get { + return ResourceManager.GetString("ProfileXMLFound", resourceCulture); + } + } + + internal static string SaveOSModProfile { + get { + return ResourceManager.GetString("SaveOSModProfile", resourceCulture); + } + } + + internal static string Android { + get { + return ResourceManager.GetString("Android", resourceCulture); + } + } + + internal static string SelectModdedFile { + get { + return ResourceManager.GetString("SelectModdedFile", resourceCulture); + } + } + + internal static string APK { + get { + return ResourceManager.GetString("APK", resourceCulture); + } + } + + internal static string Zip { + get { + return ResourceManager.GetString("Zip", resourceCulture); + } + } + } +} diff --git a/Atomic/Language/Text.de.resx b/Atomic/Language/Text.de.resx new file mode 100644 index 0000000..b6dcc78 --- /dev/null +++ b/Atomic/Language/Text.de.resx @@ -0,0 +1,159 @@ + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Mod name: + + + Autor(en): + + + Version: + + + Mod notes: + + + Uses custom save directory + + + Select folder + + + Uses custom music + + + Uses YoYo Compiler + + + Supports Windows + + + Load modded Windows .zip + + + Modded Mac game loaded! + + + Additionally bundle Android + + + Load modded Android APK + + + Modded APK loaded! + + + Supports Linux .zip + + + Modded Linux game loaded! + + + Supports Mac + + + Load modded Mac .zip + + + Modded Mac game loaded! + + + Load 1.1 + + + 1.1 loaded! + + + Create mod package(s) + + + Mod package created! + + + Load modded Linux .zip + + + Zip-Archive (*.zip) + + + Android application packages (*.apk) + + + Invalid save directory! Please consult the GameMaker: Studio 1.4 documentation for valid save directories! + + + YoYoCompiler isn't supported with Mac! + + + Warning + + + AM2R_1.1.zip auswählen + + + Mod name, author or version field missing! Mod packaging aborted. + + + Fehler + + + Name contains invalid characters! These characters are not allowed: + + + AM2R 1.1 zip is invalid! Error code: + + + Packaging mod(s)... This could take a while! + + + Mod packaging aborted! + + + Modded $1 game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue? + + + Mac + + + Linux + + + Windows + + + profile.xml found. This file is used by the AM2RLauncher to determine profile stats and its inclusion may make the profile uninstallable. Are you sure you want to continue? + + + Save $1 mod profile + + + Android + + + Please select your modded $1 AM2R .$2 + + + apk + + + zip + + \ No newline at end of file diff --git a/Atomic/Language/Text.es.resx b/Atomic/Language/Text.es.resx new file mode 100644 index 0000000..b8a4e8b --- /dev/null +++ b/Atomic/Language/Text.es.resx @@ -0,0 +1,159 @@ + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Mod name: + + + Autor(es): + + + Version: + + + Mod notes: + + + Uses custom save directory + + + Select folder + + + Uses custom music + + + Uses YoYo Compiler + + + Supports Windows + + + Load modded Windows .zip + + + Modded Mac game loaded! + + + Additionally bundle Android + + + Load modded Android APK + + + Modded APK loaded! + + + Supports Linux .zip + + + Modded Linux game loaded! + + + Supports Mac + + + Load modded Mac .zip + + + Modded Mac game loaded! + + + Load 1.1 + + + 1.1 loaded! + + + Create mod package(s) + + + Mod package created! + + + Load modded Linux .zip + + + Archivos zip (*.zip) + + + Android application packages (*.apk) + + + Invalid save directory! Please consult the GameMaker: Studio 1.4 documentation for valid save directories! + + + YoYoCompiler isn't supported with Mac! + + + Warning + + + Selecciona AM2R_1.1.zip + + + Mod name, author or version field missing! Mod packaging aborted. + + + Error + + + Name contains invalid characters! These characters are not allowed: + + + AM2R 1.1 zip is invalid! Error code: + + + Packaging mod(s)... This could take a while! + + + Mod packaging aborted! + + + Modded $1 game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue? + + + Mac + + + Linux + + + Windows + + + profile.xml found. This file is used by the AM2RLauncher to determine profile stats and its inclusion may make the profile uninstallable. Are you sure you want to continue? + + + Save $1 mod profile + + + Android + + + Please select your modded $1 AM2R .$2 + + + apk + + + zip + + \ No newline at end of file diff --git a/Atomic/Language/Text.fr.resx b/Atomic/Language/Text.fr.resx new file mode 100644 index 0000000..c6a8da7 --- /dev/null +++ b/Atomic/Language/Text.fr.resx @@ -0,0 +1,159 @@ + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Mod name: + + + Auteur(s) : + + + Version: + + + Mod notes: + + + Uses custom save directory + + + Select folder + + + Uses custom music + + + Uses YoYo Compiler + + + Supports Windows + + + Load modded Windows .zip + + + Modded Mac game loaded! + + + Additionally bundle Android + + + Load modded Android APK + + + Modded APK loaded! + + + Supports Linux .zip + + + Modded Linux game loaded! + + + Supports Mac + + + Load modded Mac .zip + + + Modded Mac game loaded! + + + Load 1.1 + + + 1.1 loaded! + + + Create mod package(s) + + + Mod package created! + + + Load modded Linux .zip + + + Archives Zip (*.zip) + + + Android application packages (*.apk) + + + Invalid save directory! Please consult the GameMaker: Studio 1.4 documentation for valid save directories! + + + YoYoCompiler isn't supported with Mac! + + + Warning + + + Choisissez AM2R_1.1.zip + + + Mod name, author or version field missing! Mod packaging aborted. + + + Erreur + + + Name contains invalid characters! These characters are not allowed: + + + AM2R 1.1 zip is invalid! Error code: + + + Packaging mod(s)... This could take a while! + + + Mod packaging aborted! + + + Modded $1 game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue? + + + Mac + + + Linux + + + Windows + + + profile.xml found. This file is used by the AM2RLauncher to determine profile stats and its inclusion may make the profile uninstallable. Are you sure you want to continue? + + + Save $1 mod profile + + + Android + + + Please select your modded $1 AM2R .$2 + + + apk + + + zip + + \ No newline at end of file diff --git a/Atomic/Language/Text.it.resx b/Atomic/Language/Text.it.resx new file mode 100644 index 0000000..40faf16 --- /dev/null +++ b/Atomic/Language/Text.it.resx @@ -0,0 +1,159 @@ + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Mod name: + + + Autore/i: + + + Version: + + + Mod notes: + + + Uses custom save directory + + + Select folder + + + Uses custom music + + + Uses YoYo Compiler + + + Supports Windows + + + Load modded Windows .zip + + + Modded Mac game loaded! + + + Additionally bundle Android + + + Load modded Android APK + + + Modded APK loaded! + + + Supports Linux .zip + + + Modded Linux game loaded! + + + Supports Mac + + + Load modded Mac .zip + + + Modded Mac game loaded! + + + Load 1.1 + + + 1.1 loaded! + + + Create mod package(s) + + + Mod package created! + + + Load modded Linux .zip + + + Archivi Zip (.zip) + + + Android application packages (*.apk) + + + Invalid save directory! Please consult the GameMaker: Studio 1.4 documentation for valid save directories! + + + YoYoCompiler isn't supported with Mac! + + + Warning + + + Seleziona AM2R_1.1.zip + + + Mod name, author or version field missing! Mod packaging aborted. + + + Errore + + + Name contains invalid characters! These characters are not allowed: + + + AM2R 1.1 zip is invalid! Error code: + + + Packaging mod(s)... This could take a while! + + + Mod packaging aborted! + + + Modded $1 game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue? + + + Mac + + + Linux + + + Windows + + + profile.xml found. This file is used by the AM2RLauncher to determine profile stats and its inclusion may make the profile uninstallable. Are you sure you want to continue? + + + Save $1 mod profile + + + Android + + + Please select your modded $1 AM2R .$2 + + + apk + + + zip + + \ No newline at end of file diff --git a/Atomic/Language/Text.ja.resx b/Atomic/Language/Text.ja.resx new file mode 100644 index 0000000..6e8314d --- /dev/null +++ b/Atomic/Language/Text.ja.resx @@ -0,0 +1,159 @@ + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Mod name: + + + 制作者: + + + Version: + + + Mod notes: + + + Uses custom save directory + + + Select folder + + + Uses custom music + + + Uses YoYo Compiler + + + Supports Windows + + + Load modded Windows .zip + + + Modded Mac game loaded! + + + Additionally bundle Android + + + Load modded Android APK + + + Modded APK loaded! + + + Supports Linux .zip + + + Modded Linux game loaded! + + + Supports Mac + + + Load modded Mac .zip + + + Modded Mac game loaded! + + + Load 1.1 + + + 1.1 loaded! + + + Create mod package(s) + + + Mod package created! + + + Load modded Linux .zip + + + ZIPファイル (*.zip) + + + Android application packages (*.apk) + + + Invalid save directory! Please consult the GameMaker: Studio 1.4 documentation for valid save directories! + + + YoYoCompiler isn't supported with Mac! + + + Warning + + + 「AM2R_11.zip」ファイルを指定して下さい + + + Mod name, author or version field missing! Mod packaging aborted. + + + エラー! + + + Name contains invalid characters! These characters are not allowed: + + + AM2R 1.1 zip is invalid! Error code: + + + Packaging mod(s)... This could take a while! + + + Mod packaging aborted! + + + Modded $1 game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue? + + + Mac + + + Linux + + + Windows + + + profile.xml found. This file is used by the AM2RLauncher to determine profile stats and its inclusion may make the profile uninstallable. Are you sure you want to continue? + + + Save $1 mod profile + + + Android + + + Please select your modded $1 AM2R .$2 + + + apk + + + zip + + \ No newline at end of file diff --git a/Atomic/Language/Text.pt.resx b/Atomic/Language/Text.pt.resx new file mode 100644 index 0000000..37f8db0 --- /dev/null +++ b/Atomic/Language/Text.pt.resx @@ -0,0 +1,159 @@ + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Mod name: + + + Autor(es): + + + Version: + + + Mod notes: + + + Uses custom save directory + + + Select folder + + + Uses custom music + + + Uses YoYo Compiler + + + Supports Windows + + + Load modded Windows .zip + + + Modded Mac game loaded! + + + Additionally bundle Android + + + Load modded Android APK + + + Modded APK loaded! + + + Supports Linux .zip + + + Modded Linux game loaded! + + + Supports Mac + + + Load modded Mac .zip + + + Modded Mac game loaded! + + + Load 1.1 + + + 1.1 loaded! + + + Create mod package(s) + + + Mod package created! + + + Load modded Linux .zip + + + Arquivos Zip (*.zip) + + + Android application packages (*.apk) + + + Invalid save directory! Please consult the GameMaker: Studio 1.4 documentation for valid save directories! + + + YoYoCompiler isn't supported with Mac! + + + Warning + + + Selecione o AM2R_1.1.zip + + + Mod name, author or version field missing! Mod packaging aborted. + + + Erro + + + Name contains invalid characters! These characters are not allowed: + + + AM2R 1.1 zip is invalid! Error code: + + + Packaging mod(s)... This could take a while! + + + Mod packaging aborted! + + + Modded $1 game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue? + + + Mac + + + Linux + + + Windows + + + profile.xml found. This file is used by the AM2RLauncher to determine profile stats and its inclusion may make the profile uninstallable. Are you sure you want to continue? + + + Save $1 mod profile + + + Android + + + Please select your modded $1 AM2R .$2 + + + apk + + + zip + + \ No newline at end of file diff --git a/Atomic/Language/Text.resx b/Atomic/Language/Text.resx new file mode 100644 index 0000000..da21667 --- /dev/null +++ b/Atomic/Language/Text.resx @@ -0,0 +1,159 @@ + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Mod name: + + + Author(s): + + + Version: + + + Mod notes: + + + Uses custom save directory + + + Select folder + + + Uses custom music + + + Uses YoYo Compiler + + + Supports Windows + + + Load modded Windows .zip + + + Modded Mac game loaded! + + + Additionally bundle Android + + + Load modded Android APK + + + Modded APK loaded! + + + Supports Linux .zip + + + Modded Linux game loaded! + + + Supports Mac + + + Load modded Mac .zip + + + Modded Mac game loaded! + + + Load 1.1 + + + 1.1 loaded! + + + Create mod package(s) + + + Mod package created! + + + Load modded Linux .zip + + + Zip Archives (*.zip) + + + Android application packages (*.apk) + + + Invalid save directory! Please consult the GameMaker: Studio 1.4 documentation for valid save directories! + + + YoYoCompiler isn't supported with Mac! + + + Warning + + + Select AM2R_1.1.zip + + + Mod name, author or version field missing! Mod packaging aborted. + + + Error + + + Name contains invalid characters! These characters are not allowed: + + + AM2R 1.1 zip is invalid! Error code: + + + Packaging mod(s)... This could take a while! + + + Mod packaging aborted! + + + Modded $1 game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue? + + + Mac + + + Linux + + + Windows + + + profile.xml found. This file is used by the AM2RLauncher to determine profile stats and its inclusion may make the profile uninstallable. Are you sure you want to continue? + + + Save $1 mod profile + + + Android + + + Please select your modded $1 AM2R .$2 + + + apk + + + zip + + \ No newline at end of file diff --git a/Atomic/Language/Text.ru.resx b/Atomic/Language/Text.ru.resx new file mode 100644 index 0000000..10632b0 --- /dev/null +++ b/Atomic/Language/Text.ru.resx @@ -0,0 +1,159 @@ + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Mod name: + + + Автор(ы): + + + Version: + + + Mod notes: + + + Uses custom save directory + + + Select folder + + + Uses custom music + + + Uses YoYo Compiler + + + Supports Windows + + + Load modded Windows .zip + + + Modded Mac game loaded! + + + Additionally bundle Android + + + Load modded Android APK + + + Modded APK loaded! + + + Supports Linux .zip + + + Modded Linux game loaded! + + + Supports Mac + + + Load modded Mac .zip + + + Modded Mac game loaded! + + + Load 1.1 + + + 1.1 loaded! + + + Create mod package(s) + + + Mod package created! + + + Load modded Linux .zip + + + Архивы ZIP (*.zip) + + + Android application packages (*.apk) + + + Invalid save directory! Please consult the GameMaker: Studio 1.4 documentation for valid save directories! + + + YoYoCompiler isn't supported with Mac! + + + Warning + + + Укажите AM2R_1.1.zip + + + Mod name, author or version field missing! Mod packaging aborted. + + + Ошибка + + + Name contains invalid characters! These characters are not allowed: + + + AM2R 1.1 zip is invalid! Error code: + + + Packaging mod(s)... This could take a while! + + + Mod packaging aborted! + + + Modded $1 game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue? + + + Mac + + + Linux + + + Windows + + + profile.xml found. This file is used by the AM2RLauncher to determine profile stats and its inclusion may make the profile uninstallable. Are you sure you want to continue? + + + Save $1 mod profile + + + Android + + + Please select your modded $1 AM2R .$2 + + + apk + + + zip + + \ No newline at end of file diff --git a/Atomic/Language/Text.zh-Hans.resx b/Atomic/Language/Text.zh-Hans.resx new file mode 100644 index 0000000..c5e06b6 --- /dev/null +++ b/Atomic/Language/Text.zh-Hans.resx @@ -0,0 +1,159 @@ + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Mod name: + + + 作者: + + + Version: + + + Mod notes: + + + Uses custom save directory + + + Select folder + + + Uses custom music + + + Uses YoYo Compiler + + + Supports Windows + + + Load modded Windows .zip + + + Modded Mac game loaded! + + + Additionally bundle Android + + + Load modded Android APK + + + Modded APK loaded! + + + Supports Linux .zip + + + Modded Linux game loaded! + + + Supports Mac + + + Load modded Mac .zip + + + Modded Mac game loaded! + + + Load 1.1 + + + 1.1 loaded! + + + Create mod package(s) + + + Mod package created! + + + Load modded Linux .zip + + + Zip 压缩文件 (*.zip) + + + Android application packages (*.apk) + + + Invalid save directory! Please consult the GameMaker: Studio 1.4 documentation for valid save directories! + + + YoYoCompiler isn't supported with Mac! + + + Warning + + + 选择「AM2R_11.zip」 + + + Mod name, author or version field missing! Mod packaging aborted. + + + 错误 + + + Name contains invalid characters! These characters are not allowed: + + + AM2R 1.1 zip is invalid! Error code: + + + Packaging mod(s)... This could take a while! + + + Mod packaging aborted! + + + Modded $1 game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue? + + + Mac + + + Linux + + + Windows + + + profile.xml found. This file is used by the AM2RLauncher to determine profile stats and its inclusion may make the profile uninstallable. Are you sure you want to continue? + + + Save $1 mod profile + + + Android + + + Please select your modded $1 AM2R .$2 + + + apk + + + zip + + \ No newline at end of file diff --git a/Atomic/ModPacker.Designer.cs b/Atomic/ModPacker.Designer.cs index 5b3ff49..66037f1 100644 --- a/Atomic/ModPacker.Designer.cs +++ b/Atomic/ModPacker.Designer.cs @@ -3,8 +3,10 @@ using Eto.Forms; using Eto.Drawing; using AtomicLib.XML; using System.IO; +using System.Net.Mime; using System.Reflection; using AtomicLib; +using Atomic.Language; namespace Atomic; @@ -140,42 +142,42 @@ public partial class ModPacker : Form } #region Design Elements - private Label nameLabel = new Label() { Text = "Mod name:" }; + private Label nameLabel = new Label() { Text = Text.ModName }; private TextBox nameTextBox = new TextBox(); - private Label authorLabel = new Label() { Text = "Author:" }; + private Label authorLabel = new Label() { Text = Text.Author }; private TextBox authorTextBox = new TextBox(); - private Label versionLabel = new Label() { Text = "Version:" }; + private Label versionLabel = new Label() { Text = Text.Version }; private TextBox versionTextBox = new TextBox(); - private Label modNotesLabel = new Label() { Text = "Mod notes:" }; + private Label modNotesLabel = new Label() { Text = Text.ModNotes }; private TextArea modNotesTextBox = new TextArea() { }; - private CheckBox customSaveCheckBox = new CheckBox() { Text = "Uses custom save directory" }; - private Button customSaveButton = new Button() { Text = "Select folder", Enabled = false }; + private CheckBox customSaveCheckBox = new CheckBox() { Text = Text.UsesCustomSaves }; + private Button customSaveButton = new Button() { Text = Text.SelectFolder, Enabled = false }; // TODO: remove read only and make it correctly respond to user input private TextBox customSaveTextBox = new TextBox() { ReadOnly = true }; - private CheckBox musicCheckBox = new CheckBox() { Text = "Uses custom music" }; + private CheckBox musicCheckBox = new CheckBox() { Text = Text.UsesCustomMusic }; - private CheckBox yycCheckBox = new CheckBox() { Text = "Uses the YoYo Compiler" }; + private CheckBox yycCheckBox = new CheckBox() { Text = Text.UsesYYC }; - private CheckBox windowsCheckBox = new CheckBox() { Text = "Supports Windows" }; - private Button windowsButton = new Button() { Text = "Load modded Windows .zip", Enabled = false }; - private Label windowsLabel = new Label() { Text = "Modded Windows game loaded!", Visible = false }; + private CheckBox windowsCheckBox = new CheckBox() { Text = Text.SupportsWindows }; + private Button windowsButton = new Button() { Text = Text.LoadWindowsZip, Enabled = false }; + private Label windowsLabel = new Label() { Text = Text.WindowsLoaded, Visible = false }; - private CheckBox apkCheckBox = new CheckBox() { Text = "Additionally bundle Android" }; - private Button apkButton = new Button() { Text = "Load modded Android APK", Enabled = false }; - private Label apkLabel = new Label() { Text = "Modded APK loaded!", Visible = false }; + private CheckBox apkCheckBox = new CheckBox() { Text = Text.BundleAndroid }; + private Button apkButton = new Button() { Text = Text.LoadAndroidAPK, Enabled = false }; + private Label apkLabel = new Label() { Text = Text.AndroidLoaded, Visible = false }; - private CheckBox linuxCheckBox = new CheckBox() { Text = "Supports Linux" }; - private Button linuxButton = new Button() { Text = "Load modded Linux .zip", Enabled = false }; - private Label linuxLabel = new Label() { Text = "Modded Linux game loaded!", Visible = false }; + private CheckBox linuxCheckBox = new CheckBox() { Text = Text.SupportsLinux}; + private Button linuxButton = new Button() { Text = Text.LoadLinuxZip, Enabled = false }; + private Label linuxLabel = new Label() { Text = Text.LinuxLoaded, Visible = false }; - private CheckBox macCheckBox = new CheckBox() { Text = "Supports Mac" }; - private Button macButton = new Button() { Text = "Load modded Mac .zip", Enabled = false }; - private Label macLabel = new Label() { Text = "Modded Mac game loaded!", Visible = false }; - - private Button originalZipButton = new Button() { Text = "Load 1.1" }; - private Label originalZipLabel = new Label() { Text = "1.1 loaded!", Visible = false}; - private Button createButton = new Button() { Text = "Create mod package(s)", Enabled = false }; - private Label createLabel = new Label() { Text = "Mod package created!", Visible = false}; + private CheckBox macCheckBox = new CheckBox() { Text = Text.SupportsMac }; + private Button macButton = new Button() { Text = Text.LoadMacZip, Enabled = false }; + private Label macLabel = new Label() { Text = Text.MacLoaded, Visible = false }; + + private Button originalZipButton = new Button() { Text = Text.LoadAM2R11 }; + private Label originalZipLabel = new Label() { Text = Text.AM2R11Loaded, Visible = false}; + private Button createButton = new Button() { Text = Text.CreateModPackage, Enabled = false }; + private Label createLabel = new Label() { Text = Text.ModPackageCreated, Visible = false}; #endregion } \ No newline at end of file diff --git a/Atomic/ModPacker.cs b/Atomic/ModPacker.cs index 7160f3c..ed02b61 100644 --- a/Atomic/ModPacker.cs +++ b/Atomic/ModPacker.cs @@ -3,8 +3,10 @@ using System.Collections.Generic; using System.IO; using System.IO.Compression; using System.Linq; +using System.Net.Mime; using System.Reflection; using System.Text.RegularExpressions; +using Atomic.Language; using AtomicLib; using Eto.Forms; @@ -23,8 +25,8 @@ public partial class ModPacker : Form private Dictionary modPathLookupTable = new Dictionary(); private Dictionary isModLoadedLookupTable = new Dictionary(); - private readonly FileFilter zipFileFilter = new FileFilter("zip archives (*.zip)", ".zip"); - private readonly FileFilter apkFileFilter = new FileFilter("Android application packages (*.apk)", ".apk"); + private readonly FileFilter zipFileFilter = new FileFilter(Text.ZipArchivesFileFilter, ".zip"); + private readonly FileFilter apkFileFilter = new FileFilter(Text.APKFileFilter, ".apk"); #region Eto events private void CustomSaveCheckBoxChecked_Changed(object sender, EventArgs e) @@ -66,7 +68,7 @@ public partial class ModPacker : Form match = macSaveRegex.Match(dialog.Directory); if (match.Success == false) - MessageBox.Show("Invalid Save Directory! Please consult the GameMaker: Studio 1.4 documentation for valid save directories!"); + MessageBox.Show(Text.InvalidSaveDirectory); else { wasSuccessful = true; @@ -113,7 +115,7 @@ public partial class ModPacker : Form OSCheckboxChanged(ProfileOperatingSystems.Mac); else if (macCheckBox.Checked.Value) { - MessageBox.Show("YoYoCompiler isn't supported with Mac!", "Warning", MessageBoxButtons.OK, MessageBoxType.Warning); + MessageBox.Show(Text.YYCMacUnsupported, Text.Warning, MessageBoxButtons.OK, MessageBoxType.Warning); macCheckBox.Checked = false; } } @@ -121,7 +123,7 @@ public partial class ModPacker : Form private void OriginalZipButton_Click(object sender, EventArgs e) { // Open window to select AM2R 1.1 - modInfo.AM2R11Path = SelectFile("Please select AM2R_11.zip", zipFileFilter); + modInfo.AM2R11Path = SelectFile(Text.SelectAM2R11FileDialog, zipFileFilter); originalZipLabel.Visible = modInfo.IsAM2R11Loaded; UpdateCreateButton(); } @@ -130,7 +132,7 @@ public partial class ModPacker : Form { if (nameTextBox.Text == "" || authorTextBox.Text == "" || versionTextBox.Text == "") { - MessageBox.Show("Mod name, author or version field missing! Mod packaging aborted.", "Error", MessageBoxButtons.OK, MessageBoxType.Error); + MessageBox.Show(Text.FieldsMissing, Text.Error, MessageBoxButtons.OK, MessageBoxType.Error); return; } @@ -140,7 +142,7 @@ public partial class ModPacker : Form if (Path.GetInvalidFileNameChars().Any(nameTextBox.Text.Contains)) { - MessageBox.Show("Name contains invalid characters! These characters are not allowed:\n" + String.Join("\n", Path.GetInvalidFileNameChars())); + MessageBox.Show( Text.NameInvalidCharacters + "\n" + String.Join("\n", Path.GetInvalidFileNameChars())); return; } @@ -148,25 +150,25 @@ public partial class ModPacker : Form var result11 = Core.CheckIfZipIsAM2R11(modInfo.AM2R11Path); if (result11 != IsZipAM2R11ReturnCodes.Successful) { - MessageBox.Show("AM2R 1.1 zip is invalid! Error code: " + result11); + MessageBox.Show(Text.AM2R11Invalid + " " + result11); AbortPatch(); return; } createLabel.Visible = true; - createLabel.Text = "Packaging mod(s)... This could take a while!"; + createLabel.Text = Text.PackagingMods; bool PromptAndSaveOSMod(ProfileOperatingSystems os) { string output; - - using (var saveFile = new SaveFileDialog { Title = $"Save {os.ToString()} mod profile", Filters = { zipFileFilter } }) + + using (var saveFile = new SaveFileDialog { Title = Text.SaveOSModProfile.Replace("$1", GetLocalizedStringOfOS(os)), Filters = { zipFileFilter } }) { if (saveFile.ShowDialog(this) == DialogResult.Ok) output = saveFile.FileName; else { - createLabel.Text = "Mod packaging aborted!"; + createLabel.Text = Text.ModPackagingAborted; return false; } } @@ -180,7 +182,7 @@ public partial class ModPacker : Form } catch (Exception exception) { - MessageBox.Show(exception.ToString(), "Error", MessageBoxButtons.OK, MessageBoxType.Error); + MessageBox.Show(exception.ToString(), Text.Error, MessageBoxButtons.OK, MessageBoxType.Error); AbortPatch(); return false; } @@ -191,7 +193,7 @@ public partial class ModPacker : Form { if (zipfile.Entries.All(f => f.Name != "profile.xml")) return true; - var result = MessageBox.Show("profile.xml found. This file is used by the AM2RLauncher to determine profile stats and its inclusion may make the profile uninstallable. Are you sure you want to continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxType.Warning); + var result = MessageBox.Show(Text.ProfileXMLFound, Text.Warning, MessageBoxButtons.YesNo, MessageBoxType.Warning); if (result == DialogResult.Yes) return true; AbortPatch(); @@ -203,7 +205,8 @@ public partial class ModPacker : Form var windowsZip = ZipFile.Open(modInfo.WindowsModPath, ZipArchiveMode.Read); if (windowsZip.Entries.All(f => f.FullName != "AM2R.exe")) { - var result = MessageBox.Show("Modded game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxType.Warning); + // TODO: make method for these $1 replacements + var result = MessageBox.Show(Text.ModdedGameNotFound.Replace("$1", Text.Windows), Text.Warning, MessageBoxButtons.YesNo, MessageBoxType.Warning); if (result != DialogResult.Yes) { AbortPatch(); @@ -223,7 +226,7 @@ public partial class ModPacker : Form var linuxZip = ZipFile.Open(modInfo.LinuxModPath, ZipArchiveMode.Read); if (linuxZip.Entries.All(f => f.FullName != "AM2R") && linuxZip.Entries.All(f => f.FullName != "runner")) { - var result = MessageBox.Show("Modded Linux game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxType.Warning); + var result = MessageBox.Show(Text.ModdedGameNotFound.Replace("$1", Text.Linux), Text.Warning, MessageBoxButtons.YesNo, MessageBoxType.Warning); if (result != DialogResult.Yes) { AbortPatch(); @@ -242,7 +245,7 @@ public partial class ModPacker : Form var macZip = ZipFile.Open(modInfo.MacModPath, ZipArchiveMode.Read); if (macZip.Entries.All(f => f.FullName != "AM2R.app/Contents/MacOS/Mac_Runner")) { - var result = MessageBox.Show("Modded Mac game not found, make sure it's not placed in any subfolders.\nCreated profile will likely not be installable, are you sure you want to continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxType.Warning); + var result = MessageBox.Show(Text.ModdedGameNotFound.Replace("$1", Text.Mac), Text.Warning, MessageBoxButtons.YesNo, MessageBoxType.Warning); if (result != DialogResult.Yes) AbortPatch(); } @@ -255,6 +258,19 @@ public partial class ModPacker : Form } createLabel.Text = "Mod package(s) created!"; } + + private static string GetLocalizedStringOfOS(ProfileOperatingSystems os) + { + return os switch + { + ProfileOperatingSystems.Windows => Text.Windows, + ProfileOperatingSystems.Linux => Text.Linux, + ProfileOperatingSystems.Mac => Text.Mac, + ProfileOperatingSystems.Android => Text.Android, + _ => "Unknown" + }; + } + #endregion private void LoadProfileParameters(ProfileOperatingSystems operatingSystem) @@ -286,7 +302,7 @@ public partial class ModPacker : Form private void AbortPatch() { // Set labels - createLabel.Text = "Mod packaging aborted!"; + createLabel.Text = Text.ModPackagingAborted; // Remove temp directory if (Directory.Exists(Path.GetTempPath() + "/Atomic")) @@ -339,7 +355,7 @@ public partial class ModPacker : Form private void OSButtonClicked(ProfileOperatingSystems os) { - string pickerMessage = $"Please select your custom {os.ToString()} AM2R .{(os == ProfileOperatingSystems.Android ? "apk" : "zip")}"; + string pickerMessage = Text.SelectModdedFile.Replace("$1", GetLocalizedStringOfOS(os)).Replace("$2", os == ProfileOperatingSystems.Android ? Text.APK : Text.Zip); Label osLabel = labelLookupTable[os]; FieldInfo osModPath = modPathLookupTable[os]; PropertyInfo isOsModLoaded = isModLoadedLookupTable[os]; diff --git a/AtomicLib/Core.cs b/AtomicLib/Core.cs index 4b8fca1..bba2420 100644 --- a/AtomicLib/Core.cs +++ b/AtomicLib/Core.cs @@ -26,6 +26,8 @@ public enum IsZipAM2R11ReturnCodes GameIsInASubfolder } +// TODO: documentation + public static class Core { public const string Version = "2.1.0";