Search in sources :

Example 1 with MessageCatalogResource

use of org.apache.tapestry5.internal.util.MessageCatalogResource in project tapestry-5 by apache.

the class JavaScriptModule method setupApplicationCatalogModules.

@Contribute(ModuleManager.class)
public static void setupApplicationCatalogModules(MappedConfiguration<String, Object> configuration, LocalizationSetter localizationSetter, ComponentMessagesSource messagesSource, ResourceChangeTracker resourceChangeTracker, @Symbol(SymbolConstants.COMPACT_JSON) boolean compactJSON) {
    for (Locale locale : localizationSetter.getSupportedLocales()) {
        MessageCatalogResource resource = new MessageCatalogResource(locale, messagesSource, resourceChangeTracker, compactJSON);
        configuration.add("t5/core/messages/" + locale.toString(), new JavaScriptModuleConfiguration(resource));
    }
}
Also used : Locale(java.util.Locale) MessageCatalogResource(org.apache.tapestry5.internal.util.MessageCatalogResource) JavaScriptModuleConfiguration(org.apache.tapestry5.services.javascript.JavaScriptModuleConfiguration) Contribute(org.apache.tapestry5.ioc.annotations.Contribute)

Aggregations

Locale (java.util.Locale)1 MessageCatalogResource (org.apache.tapestry5.internal.util.MessageCatalogResource)1 Contribute (org.apache.tapestry5.ioc.annotations.Contribute)1 JavaScriptModuleConfiguration (org.apache.tapestry5.services.javascript.JavaScriptModuleConfiguration)1