EssentialGG / Vigilance

Configuration Utility using Elementa
GNU Lesser General Public License v3.0
54 stars 12 forks source link

Implement i18nDescription Property #64

Closed Brittank88 closed 1 year ago

Brittank88 commented 1 year ago

I am using vigilance-1.18.1-fabric 253+pull-55.

With all other translatable properties, there is an i18n equivalent... except the description property.

Without an i18n counterpart, I am unable to just directly read the @Property annotation for both the translation key and the corresponding translation, for my datagen.

Generally speaking, it doesn't follow the pattern of the other properties such as i18nName, i18nCategory and i18nSubcategory.

LlamaLad7 commented 1 year ago

The i18nName, i18nCategory and i18nSubcategory properties exist only for backwards compatibility with existing config files. Their original counterparts are used directly in the generated toml, so must be kept the same when changing the frontend (e.g. migrating a project to use localization) which is exactly what the i18n properties are for. All the original name, description, etc do get localized, you can put a translation key in there. Think of i18nName as displayName, etc. You only need to use it when the display string should differ from what's used in the config file. The description is not used in the config file, and hence doesn't need one.