projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add some margin below backlinks.
[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
..
e0909ca
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/ajax/GetTranslationPage.java
+++ b/
src/main/java/net/pterodactylus/sone/web/ajax/GetTranslationPage.java
@@
-18,6
+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.sone.web.page.FreenetRequest;
import net.pterodactylus.util.json.JsonObject;
/**
import net.pterodactylus.util.json.JsonObject;
/**
@@
-34,7
+35,7
@@
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);
}
//
}
//
@@
-45,10
+46,10
@@
public class GetTranslationPage extends JsonPage {
* {@inheritDoc}
*/
@Override
* {@inheritDoc}
*/
@Override
- protected JsonObject createJsonObject(Request request) {
+ protected JsonObject 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);
}
/**
}
/**
@@
-59,4
+60,12
@@
public class GetTranslationPage extends JsonPage {
return false;
}
return false;
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean requiresLogin() {
+ return false;
+ }
+
}
}