From c51061f0fb39e9d6fdfcb0b20c9ff8fc77518b6b Mon Sep 17 00:00:00 2001 From: JustArchi Date: Fri, 6 Jan 2017 12:11:11 +0100 Subject: [PATCH] Start working on translations --- ArchiSteamFarm/ArchiSteamFarm.csproj | 12 ++ ArchiSteamFarm/Bot.cs | 3 +- .../Localization/Strings.Designer.cs | 72 ++++++++++ ArchiSteamFarm/Localization/Strings.pl.resx | 123 ++++++++++++++++++ ArchiSteamFarm/Localization/Strings.resx | 123 ++++++++++++++++++ GUI/GUI.csproj | 9 ++ 6 files changed, 341 insertions(+), 1 deletion(-) create mode 100644 ArchiSteamFarm/Localization/Strings.Designer.cs create mode 100644 ArchiSteamFarm/Localization/Strings.pl.resx create mode 100644 ArchiSteamFarm/Localization/Strings.resx diff --git a/ArchiSteamFarm/ArchiSteamFarm.csproj b/ArchiSteamFarm/ArchiSteamFarm.csproj index acd8c1186..ebd054cf5 100644 --- a/ArchiSteamFarm/ArchiSteamFarm.csproj +++ b/ArchiSteamFarm/ArchiSteamFarm.csproj @@ -130,6 +130,11 @@ + + True + True + Strings.resx + @@ -177,6 +182,13 @@ + + + + ResXFileCodeGenerator + Strings.Designer.cs + + diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index 8540ba313..85cd1a163 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -34,6 +34,7 @@ using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using ArchiSteamFarm.JSON; +using ArchiSteamFarm.Localization; using Newtonsoft.Json; using SteamKit2; using SteamKit2.Discovery; @@ -2570,7 +2571,7 @@ namespace ArchiSteamFarm { if (!KeepRunning) { KeepRunning = true; Task.Run(() => HandleCallbacks()).Forget(); - ArchiLogger.LogGenericInfo("Starting..."); + ArchiLogger.LogGenericInfo(Strings.Starting + "..."); } await Connect().ConfigureAwait(false); diff --git a/ArchiSteamFarm/Localization/Strings.Designer.cs b/ArchiSteamFarm/Localization/Strings.Designer.cs new file mode 100644 index 000000000..8591a8e0d --- /dev/null +++ b/ArchiSteamFarm/Localization/Strings.Designer.cs @@ -0,0 +1,72 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ArchiSteamFarm.Localization { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Strings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Strings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ArchiSteamFarm.Localization.Strings", typeof(Strings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Starting. + /// + internal static string Starting { + get { + return ResourceManager.GetString("Starting", resourceCulture); + } + } + } +} diff --git a/ArchiSteamFarm/Localization/Strings.pl.resx b/ArchiSteamFarm/Localization/Strings.pl.resx new file mode 100644 index 000000000..4050f235b --- /dev/null +++ b/ArchiSteamFarm/Localization/Strings.pl.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Startowanie + + \ No newline at end of file diff --git a/ArchiSteamFarm/Localization/Strings.resx b/ArchiSteamFarm/Localization/Strings.resx new file mode 100644 index 000000000..91ca6111e --- /dev/null +++ b/ArchiSteamFarm/Localization/Strings.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Starting + + \ No newline at end of file diff --git a/GUI/GUI.csproj b/GUI/GUI.csproj index e90bd818d..df94f7b93 100644 --- a/GUI/GUI.csproj +++ b/GUI/GUI.csproj @@ -139,6 +139,9 @@ JSON\Steam.cs + + Localization\Strings.Designer.cs + MobileAuthenticator.cs @@ -179,6 +182,12 @@ + + Localization\Strings.pl.resx + + + Localization\Strings.resx + BotStatusForm.cs