Allow numbers at the end of localization strings
Posted: Sun Feb 02, 2020 12:33 am
As suggested by darkfrei:
It is quite common to differentiate between different tiers of an entity by attaching a number to its name. If you have prototype names like
the trailing "-1"/"-2" will be ignored, resulting in "missing localization key" messages. A way around is to define one key that is used for all tiers:
However, the assumption that different tiers are just variants of the same thing is not always correct. Here's an example for recipes where the different tiers produce different output:
Using one key for all of these tiers wouldn't be feasible. I worked around it by replacing the dashes ("-") in the names with underscores ("_"), however, that's against convention (vanilla prototypes use dashes).
Therefore, I'd like to request that trailing numbers in localization keys of prototype names are kept in place and not cut off. It would be great if you could implement this!
It is quite common to differentiate between different tiers of an entity by attaching a number to its name. If you have prototype names like
Code: Select all
bi-biomass-conversion-1=Bio fuel conversion 1
bi-biomass-conversion-2=Bio fuel conversion 2
Code: Select all
bi-biomass-conversion=Bio fuel conversion
Code: Select all
[recipe-name]
bi-biomass-conversion-1=Bio fuel conversion 1: Cellulose, light oil
bi-biomass-conversion-2=Bio fuel conversion 2: Petroleum gas
[recipe-description]
bi_biomass-conversion-1=Use algae biomass to produce light oil and cellulose
bi-biomass-conversion-2=Use algae biomass to produce petroleum gas
Therefore, I'd like to request that trailing numbers in localization keys of prototype names are kept in place and not cut off. It would be great if you could implement this!
