projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set client information in Sone builder.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
web
/
ajax
/
GetTranslationPage.java
diff --git
a/src/main/java/net/pterodactylus/sone/web/ajax/GetTranslationPage.java
b/src/main/java/net/pterodactylus/sone/web/ajax/GetTranslationPage.java
index
68f1777
..
d8f43cd
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/ajax/GetTranslationPage.java
+++ b/
src/main/java/net/pterodactylus/sone/web/ajax/GetTranslationPage.java
@@
-1,5
+1,5
@@
/*
/*
- * Sone - GetTranslationPage.java - Copyright © 2010 David Roden
+ * Sone - GetTranslationPage.java - Copyright © 2010
–2013
David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-18,7
+18,7
@@
package net.pterodactylus.sone.web.ajax;
import net.pterodactylus.sone.web.WebInterface;
package net.pterodactylus.sone.web.ajax;
import net.pterodactylus.sone.web.WebInterface;
-import net.pterodactylus.
util.json.JsonObjec
t;
+import net.pterodactylus.
sone.web.page.FreenetReques
t;
/**
* Returns the translation for a given key as JSON object.
/**
* Returns the translation for a given key as JSON object.
@@
-34,29
+34,28
@@
public class GetTranslationPage extends JsonPage {
* The Sone web interface
*/
public GetTranslationPage(WebInterface webInterface) {
* The Sone web interface
*/
public GetTranslationPage(WebInterface webInterface) {
- super("
ajax/
getTranslation.ajax", webInterface);
+ super("getTranslation.ajax", webInterface);
}
//
// JSONPAGE METHODS
//
}
//
// JSONPAGE METHODS
//
- /**
- * {@inheritDoc}
- */
@Override
@Override
- protected Json
Object createJsonObject(
Request request) {
+ protected Json
ReturnObject createJsonObject(Freenet
Request request) {
String key = request.getHttpRequest().getParam("key");
String key = request.getHttpRequest().getParam("key");
- String translation = webInterface.
l
10n().getString(key);
- return
new
JsonObject().put("value", translation);
+ String translation = webInterface.
getL
10n().getString(key);
+ return
createSuccess
JsonObject().put("value", translation);
}
}
- /**
- * {@inheritDoc}
- */
@Override
protected boolean needsFormPassword() {
return false;
}
@Override
protected boolean needsFormPassword() {
return false;
}
+ @Override
+ protected boolean requiresLogin() {
+ return false;
+ }
+
}
}