Enhancement
Major
Detail
Major
Detail
Currently, resources are declared in I18NConstants files and maintained accordingly in the I18N properties of the module. For this, the fully qualified name of the property must be copied into the resource file and the replacement text must be entered in it and translated into all languages.
Improvement
The English translation of the key is maintained directly in the JavaDoc comment of the property. This is then copied to the system resources of the module by the JavaDoc task and then translated to all supported languages via DeepL:
#!java package my.package; public class I18NConstants extends I18NConstantsBase { /** * Error message, if required attribute has no value * * @en Value of {0} is missing * @tooltip To finish the process, all value must be filled out */ public static ResKey ERROR_MISSING_VALUE__ATTR; ... }
In the JavaDoc tag @en the replacement text for the key is specified in English. An optional documentation of the key is still possible.
Cf. https://dev. top-logic.com/documentation/servlet/LayoutServlet?page=I18N&uuid=a060e9bc-e5be-4eed-9bce-dab7db44cbc1
Test
- Create I18NConstants file with key.
- Callmvn install on module (DeepL API key must be set up).
- Check whether the key, the replacement value and the translations have been entered in the system resources(src/main/java/META-INF/...).