Page 1 of 1

Add a localized_name to Surfaces

Posted: Thu Sep 07, 2023 6:26 am
by asher_sky
I would like to specify a LocalisedString to be displayed for a surface when it is referred to, maybe it can be defined as a parameter in game.create_surface(), or a read/write member of LuaSurface.

This would allow a mod to add locale for a surface name, and other mods could use that locale when referring to that surface in guis or other places a LocalisedString could be displayed.
It could also be used in chat location ping tags, so instead of displaying [gps=1,2,3,nauvis_copy] nauvis_copy could be displayed as "Nauvis".

Re: Add a localized_name to Surfaces

Posted: Thu Sep 07, 2023 6:57 am
by Pi-C
+1
It has always bothered me that the name of the vanilla surface is "nauvis" (all lower case) while name of surfaces from, say, Factorissimo start with a capital. Needless to say that while a name like "Factory floor X" makes sense for players who use the English locale for playing, it looks out of place if another locale is used.