public void load ( RulesDefinition . NewRepository repo ) { for ( RulesDefinition . NewRule rule : repo . rules ( ) ) { String name = i18n . getName ( repo . key ( ) , rule . key ( ) ) ; if ( StringUtils . isNotBlank ( name ) ) { rule . setName ( name ) ; } String desc = i18n . getDescription ( repo . key ( ) , rule . key ( ) ) ; if ( StringUtils . isNotBlank ( desc ) ) { rule . setHtmlDescription ( desc ) ; } for ( RulesDefinition . NewParam param : rule . params ( ) ) { String paramDesc = i18n . getParamDescription ( repo . key ( ) , rule . key ( ) , param . key ( ) ) ; if ( StringUtils . isNotBlank ( paramDesc ) ) { param . setDescription ( paramDesc ) ; } } } }
Loads descriptions of rules and related rule parameters . Existing descriptions are overridden if English labels exist in bundles .