diff --git a/About/About.xml b/About/About.xml index 1680851f..d52330e6 100644 --- a/About/About.xml +++ b/About/About.xml @@ -72,7 +72,7 @@ maarxx: Various fixes and improvements rimpy-custom: Fix for Russian translation <size=24>Version</size> -This is version 4.30.606, for RimWorld 1.1.2624. +This is version 4.30.607, for RimWorld 1.1.2624. diff --git a/Assemblies/Fluffy_ColonyManager.dll b/Assemblies/Fluffy_ColonyManager.dll index cf27e989..41335cdb 100644 Binary files a/Assemblies/Fluffy_ColonyManager.dll and b/Assemblies/Fluffy_ColonyManager.dll differ diff --git a/Readme.md b/Readme.md index 809e500f..eaa151fa 100644 --- a/Readme.md +++ b/Readme.md @@ -79,4 +79,4 @@ Show your appreciation by buying me a coffee (or contribute towards a nice singl [![I Have a Black Dog](https://i.ibb.co/ss59Rwy/New-Project-2.png)](https://www.youtube.com/watch?v=XiCrniLQGYc) # Version -This is version 4.30.606, for RimWorld 1.1.2624. \ No newline at end of file +This is version 4.30.607, for RimWorld 1.1.2624. \ No newline at end of file diff --git a/Source/Helpers/I18n.cs b/Source/Helpers/I18n.cs new file mode 100644 index 00000000..79b5ca76 --- /dev/null +++ b/Source/Helpers/I18n.cs @@ -0,0 +1,24 @@ +// I18n.cs +// Copyright Karel Kroeze, 2020-2020 + +using Verse; + +namespace FluffyManager +{ + public class I18n + { + public static string Translate( string key, params object[] args ) + { + return Key( key ).Translate( args ).ResolveTags(); + } + + public static string Key( string key ) => $"Fluffy.ColonyManager.{key}"; + public static string HistoryStock = Translate( "HistoryStock" ); + public static string HistoryDesignated = Translate( "HistoryDesignated" ); + public static string HistoryCorpses = Translate( "HistoryCorpses" ); + public static string HistoryChunks = Translate( "HistoryChunks" ); + public static string HistoryProduction = Translate( "HistoryProduction" ); + public static string HistoryConsumption = Translate( "HistoryConsumption" ); + public static string HistoryBatteries = Translate( "HistoryBatteries" ); + } +} \ No newline at end of file diff --git a/Source/Manager.csproj b/Source/Manager.csproj index 1e1e913d..4c261153 100644 --- a/Source/Manager.csproj +++ b/Source/Manager.csproj @@ -75,6 +75,7 @@ + diff --git a/Source/ManagerJobs/ManagerJob_Foraging.cs b/Source/ManagerJobs/ManagerJob_Foraging.cs index d591e777..3e55200d 100644 --- a/Source/ManagerJobs/ManagerJob_Foraging.cs +++ b/Source/ManagerJobs/ManagerJob_Foraging.cs @@ -31,7 +31,7 @@ public ManagerJob_Foraging( Manager manager ) : base( manager ) Trigger = new Trigger_Threshold( this ); // create History tracker - History = new History( new[] {"stock", "designated"}, new[] {Color.white, Color.grey} ); + History = new History( new[] {I18n.HistoryStock, I18n.HistoryDesignated }, new[] {Color.white, Color.grey} ); // init stuff if we're not loading // todo: please, please refactor this into something less clumsy! diff --git a/Source/ManagerJobs/ManagerJob_Forestry.cs b/Source/ManagerJobs/ManagerJob_Forestry.cs index 8caedf00..8871a747 100644 --- a/Source/ManagerJobs/ManagerJob_Forestry.cs +++ b/Source/ManagerJobs/ManagerJob_Forestry.cs @@ -54,7 +54,7 @@ public ManagerJob_Forestry( Manager manager ) : base( manager ) // initialize clearAreas list with current areas UpdateClearAreas(); - History = new History( new[] {"stock", "designated"}, new[] {Color.white, Color.grey} ); + History = new History( new[] {I18n.HistoryStock, I18n.HistoryDesignated}, new[] {Color.white, Color.grey} ); // init stuff if we're not loading diff --git a/Source/ManagerJobs/ManagerJob_Hunting.cs b/Source/ManagerJobs/ManagerJob_Hunting.cs index 8dd96aea..86d1b67e 100644 --- a/Source/ManagerJobs/ManagerJob_Hunting.cs +++ b/Source/ManagerJobs/ManagerJob_Hunting.cs @@ -41,7 +41,7 @@ public ManagerJob_Hunting( Manager manager ) : base( manager ) Trigger.ThresholdFilter.SetAllow( Utilities_Hunting.InsectMeat, false ); // start the history tracker; - History = new History( new[] {"stock", "corpses", "designated"}, + History = new History( new[] {I18n.HistoryStock, I18n.HistoryCorpses, I18n.HistoryDesignated }, new[] {Color.white, new Color( .7f, .7f, .7f ), new Color( .4f, .4f, .4f )} ); // init stuff if we're not loading diff --git a/Source/ManagerJobs/ManagerJob_Mining.cs b/Source/ManagerJobs/ManagerJob_Mining.cs index fffbb0e4..02c24c9c 100644 --- a/Source/ManagerJobs/ManagerJob_Mining.cs +++ b/Source/ManagerJobs/ManagerJob_Mining.cs @@ -37,7 +37,7 @@ public ManagerJob_Mining( Manager manager ) : base( manager ) Trigger = new Trigger_Threshold( this ); // start the history tracker; - History = new History( new[] {"stock", "chunks", "designated"}, + History = new History( new[] { I18n.HistoryStock, I18n.HistoryChunks, I18n.HistoryDesignated }, new[] {Color.white, new Color( .7f, .7f, .7f ), new Color( .4f, .4f, .4f )} ); // init stuff if we're not loading diff --git a/Source/ManagerTabs/ManagerTab_Power.cs b/Source/ManagerTabs/ManagerTab_Power.cs index e215b4e7..dd503a6b 100644 --- a/Source/ManagerTabs/ManagerTab_Power.cs +++ b/Source/ManagerTabs/ManagerTab_Power.cs @@ -57,7 +57,12 @@ public ManagerTab_Power( Manager manager ) : base( manager ) DrawMaxMarkers = true }; - overallHistory = new History( new[] {"Production", "Consumption", "Batteries"} ) + overallHistory = new History( new[] + { + I18n.HistoryProduction, + I18n.HistoryConsumption, + I18n.HistoryBatteries + } ) { DrawOptions = false, DrawInlineLegend = false, diff --git a/Source/Properties/AssemblyInfo.cs b/Source/Properties/AssemblyInfo.cs index 94a06680..3621d9e9 100644 --- a/Source/Properties/AssemblyInfo.cs +++ b/Source/Properties/AssemblyInfo.cs @@ -39,4 +39,4 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("4.0.0")] -[assembly: AssemblyFileVersion("4.30.606")] \ No newline at end of file +[assembly: AssemblyFileVersion("4.30.607")] \ No newline at end of file