[1.1.2633 rev1099] String not directly translatable

Started by Ragnar-F, May 14, 2020, 07:58:43 AM

Previous topic - Next topic

Ragnar-F

It would be nice if "Terrain building in progress." is directly translatable. Currently, it is only indirectly translatable via ImpliedDefs.xml, unnecessarily wasting system resources as it needs to be translated for each floor type. Edit: Does not need to be translated. The string will be displayed in ImpliedDefs.xml, but in the end the game will display the normal description of each floor when under construction.

You can find this string in ThingDefGenerator_Buildings.cs. I would suggest either handling it the same way as with meat descriptions which can be found in Data\Core\Languages\English\Keyed\Misc.xml under MeatDesc, or just remove the string since it doesn't really provide any value.

Ragnar-F

Another one in KeyBindingDefGenerator.cs:

keyBindingDef.label = "Toggle " + mainButtonDef.label + " tab";

This string can be seen multiple times in the keyboard settings.

There are two other strings in this file that might deserve a translation, but I have no idea where they appear in the game.

keyBindingCategoryDef.label = designationCategoryDef.label + " tab";
keyBindingCategoryDef.description = "Key bindings for the \"" + designationCategoryDef.LabelCap + "\" section of the Architect menu";

ison

Aren't these fields translatable by def injections just like other defs?

Ragnar-F

No, they are not directly translatable, only indirectly via ImpliedDefs.xml as seen here. The disadvantage of ImpliedDefs.xml is that you have to add new items manually as seen here - the cleanup tool does not do this. This unnecessarily requires extra attention from the translator.

It would be best to provide something like "<ToggleTab>Toggle {0} tab</ToggleTab>", if possible. So part of the code should look like this:

keyBindingDef.label = "ToggleTab".Translate(mainButtonDef.label);

As for the other strings, I'm not sure if they need to be made translatable at all. I can't figure out where exactly they appear in the game.