Closed Kelnor277 closed 7 years ago
Wrong place and way to implement this fix.
Implemented "labelKeyAlt" in def to handle possible translation key differences.
That seems like a better idea. I've pull that code to my fork. If you want any help getting the repo up to Alpha 15 let me know.
The alpha15 branch is done, it just needs the final once-over to make sure detours are correct and all the xml is up to date with core (for xml overrides of things like the ThinkTreeDefs).
Cool
The text showed a garbled "LearnToPlay" for the tutorial button. It looks like A15 uses "Tutorial" as the English translate key, not "LearnToPlay". However, it still uses "LearnToPlay" for other languages.
French XML from my Core/Languages/French/Keyed/Menus_Main.xml
English XML from my Core/Languages/English/Keyed/Menus_Main.xml
Looks like base game fixes it with this: (Decompiled Code) string label = "Tutorial".CanTranslate() ? "Tutorial".Translate() : "LearnToPlay".Translate(); optList.Add(new ListableOption(label, (Action) (() => MainMenuDrawer.InitLearnToPlay()), (string) null)); optList.Add(new ListableOption("NewColony".Translate(), (Action) (() => Find.WindowStack.Add((Window) new Page_SelectScenario())), (string) null));
So, I added code to find the menu item, test if "Tutorial" is translatable, and change it to "Tutorial" before it gets passed to the CCL menu drawer.