-
-
Notifications
You must be signed in to change notification settings - Fork 24
Description
When using multiple modules in a ColdBox application that have module specific i18n resourceBundle declarations in ModuleConfig.cfc as follows:
i18n = {
resourceBundles = {
"myBundle" = "#moduleMapping#/includes/i18n/myBundle"
}
};
i18n validations will only work with default bundle for the entire application and not for a module that has its own declared bundle.
When considering the IValidationResult function addError( required IValidationError error )
function in ValidationResult.cfc component, there is no way to pass the 'bundle' parameter to var message = resourceService.getResource
function so that i18n validation can be targeted to a specific bundle. Ideally, one should be able to validate an object and pass a 'bundle' alias so that the i18n type validation can be validated against the correct bundle. eg,
var validationResults = validateModel(target=rc.objEntity, locale=i18n.getFWLocale(), bundle="myBundle");
I'm happy to take a stab at correcting this and creating a pull request.