/**
*
*/
private void view(HttpServletRequest request, ModelAndView next, WikiPageInfo pageInfo) throws Exception {
String language = this.retrieveLanguage(request);
SortedProperties translations = new SortedProperties(Environment.loadProperties("ApplicationResources.properties"));
if (!StringUtils.isBlank(language)) {
String filename = filename(language);
// add all translated keys to the base translation list
translations.putAll(Environment.loadProperties(filename));
// if the user wants to see only untranslated values, return the intersection of the base
// translation list and the translated file list
if (BooleanUtils.toBoolean(request.getParameter("hideTranslated"))) {
Map tmp = Utilities.intersect(translations, Environment.loadProperties("ApplicationResources.properties"));
translations = new SortedProperties();
translations.putAll(tmp);
next.addObject("hideTranslated", true);
}
}
pageInfo.setContentJsp(JSP_ADMIN_TRANSLATION);
pageInfo.setAdmin(true);
pageInfo.setPageTitle(new WikiMessage("translation.title"));
next.addObject("translations", new TreeMap(translations));
next.addObject("codes", this.retrieveTranslationCodes());
next.addObject("language", language);
SortedProperties defaultTranslations = new SortedProperties(Environment.loadProperties("ApplicationResources.properties"));
next.addObject("defaultTranslations", new TreeMap(defaultTranslations));
}