public Message build() { String text; try { text = bundles.get(clientLocale, textKey.getBundle()).getString(textKey.getKey()); } catch (Exception e) { log.warn("Could not load bundle: " + textKey); text = textDefault; } if ((text == null) || "".equals(text)) { text = textKey.toString(); } template.text(text); return template.build(); }