1 package org.cacert.gigi.output.template;
3 import java.io.PrintWriter;
4 import java.util.Collection;
7 import org.cacert.gigi.localisation.Language;
8 import org.cacert.gigi.util.HTMLEncoder;
11 * Wraps a String that needs to be translated before it is printed to the user.
13 public final class TranslateCommand implements Translatable {
15 private final String raw;
18 * Creates a new TranslateCommand that wraps the given String.
21 * the String to be translated.
23 public TranslateCommand(String raw) {
28 public void output(PrintWriter out, Language l, Map<String, Object> vars) {
29 out.print(HTMLEncoder.encodeHTML(l.getTranslation(raw)));
33 * Gets the raw, untranslated String.
35 * @return the raw, untranslated String.
37 public String getRaw() {
42 public void addTranslations(Collection<String> s) {