[Feature Request] Translation Setting Extendability for Nested Class in Config Model
c0nstexpr opened this issue · 0 comments
Currently, providing translations for multiple nested objects need to be done one by one. But there are cases the nested object can provide uniform translation. For example:
public class MyConfig {
public MyNested uiScale1 = new MyNested();
public MyNested uiScale2 = new MyNested();
public static class MyNested {
public int Length;
public int Width;
}
// uiScale3, uiScale4, ...
}
The class MyNested
provide similar functionality for each config options in this case. Apply same translation would be intuitive.
Here are the possible solutions:
- add setter for translationKey in Option
- add class serves like
OptionComponentFactory
to resolve translation key - add attribute in config model to resolve translation key
- add translation key candidate "text.config.{config name}.{nested class name}.{prop name}", behaves like enum "text.config.{config name}.{enum name}.{value name}"