GUAC-587: Add placeholder for merge logic.

This commit is contained in:
Michael Jumper
2015-05-18 17:31:32 -07:00
parent 50debbfc78
commit 47889e3f3f

View File

@@ -119,10 +119,22 @@ public class LanguageResourceService {
* "application/json". * "application/json".
*/ */
public void addLanguageResource(String key, Resource resource) { public void addLanguageResource(String key, Resource resource) {
// Merge language resources if already defined
Resource existing = resources.get(key);
if (existing != null) {
// TODO: Merge
logger.debug("Merged strings with existing language: \"{}\"", key);
}
// Otherwise, add new language resource
else {
resources.put(key, resource); resources.put(key, resource);
logger.debug("Added language: \"{}\"", key); logger.debug("Added language: \"{}\"", key);
} }
}
/** /**
* Adds or overlays all languages defined within the /translations * Adds or overlays all languages defined within the /translations
* directory of the given ServletContext. If no such language files exist, * directory of the given ServletContext. If no such language files exist,