Skip to content

Commit

Permalink
[fixes]
Browse files Browse the repository at this point in the history
+ Issue where different languages may use different translation keys for main menu buttons (ie: "Tutorial" and "LearnToPlay")
  • Loading branch information
ForsakenShell committed Oct 22, 2016
1 parent 47180bb commit b21f81d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions DLL_Project/Defs/MainMenuDef.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class MainMenuDef : Def
#region XML Data

public string labelKey;
public string labelKeyAlt;
public int order;
public Type menuClass;
public bool closeMainTab = false;
Expand All @@ -39,6 +40,14 @@ public virtual string Label
{
return label;
}
if( !labelKey.CanTranslate() )
{
if( !string.IsNullOrEmpty( labelKeyAlt ) )
{
return labelKeyAlt.Translate();
}
return label;
}
return labelKey.Translate();
}
}
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

<CommunityCoreLibrary.MainMenuDef>
<defName>LearnToPlay</defName>
<labelKey>LearnToPlay</labelKey>
<labelKey>Tutorial</labelKey>
<labelKeyAlt>LearnToPlay</labelKeyAlt>
<order>800</order>
<menuClass>CommunityCoreLibrary.MainMenu_LearnToPlay</menuClass>
<!--
Expand Down

0 comments on commit b21f81d

Please sign in to comment.