* The Sone web interface
*/
public GetTranslationPage(WebInterface webInterface) {
- super("ajax/getTranslation.ajax", webInterface);
+ super("getTranslation.ajax", webInterface);
}
//
@Override
protected JsonObject createJsonObject(Request request) {
String key = request.getHttpRequest().getParam("key");
- String translation = webInterface.l10n().getString(key);
- return new JsonObject().put("value", translation);
+ String translation = webInterface.getL10n().getString(key);
+ return createSuccessJsonObject().put("value", translation);
}
/**