r27171 - in trunk/freenet/src/freenet: clients/http l10n
[email protected] Tue, 21 Apr 2009 22:35:30 +0000
| Newsgroups | gmane.network.freenet.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: toad
Date: 2009-04-21 22:35:30 +0000 (Tue, 21 Apr 2009)
New Revision: 27171
Modified:
trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
Log:
Use l10n
Modified: trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/FProxyToadlet.java 2009-04-21 21:45:28 UTC (rev 27170)
+++ trunk/freenet/src/freenet/clients/http/FProxyToadlet.java 2009-04-21 22:35:30 UTC (rev 27171)
@@ -518,23 +518,25 @@
HTMLNode infobox = contentNode.addChild("div", "class", "infobox infobox-information");
infobox.addChild("div", "class", "infobox-header", l10n("fetchingPageBox"));
HTMLNode infoboxContent = infobox.addChild("div", "class", "infobox-content");
- infoboxContent.addChild("#", "Filename: ");
+ infoboxContent.addChild("#", l10n("filenameLabel")+ " ");
infoboxContent.addChild("a", "href", "/"+key.toString(false, false), key.getPreferredFilename());
- if(fr.mimeType != null) infoboxContent.addChild("br", "Content type: "+fr.mimeType);
+ if(fr.mimeType != null) infoboxContent.addChild("br", l10n("contentTypeLabel")+" "+fr.mimeType);
if(fr.size > 0) infoboxContent.addChild("br", "Size: "+SizeUtil.formatSize(fr.size));
if(core.isAdvancedModeEnabled()) {
- infoboxContent.addChild("br", "Blocks: " +fr.fetchedBlocks+" / "+fr.requiredBlocks+" (total "+fr.totalBlocks+" failed "+fr.failedBlocks+" fatally failed "+fr.fatallyFailedBlocks+")");
+ infoboxContent.addChild("br", l10n("blocksDetail",
+ new String[] { "fetched", "required", "total", "failed", "fatallyfailed" },
+ new String[] { Integer.toString(fr.fetchedBlocks), Integer.toString(fr.requiredBlocks), Integer.toString(fr.totalBlocks), Integer.toString(fr.failedBlocks), Integer.toString(fr.fatallyFailedBlocks) }));
}
- infoboxContent.addChild("br", "Time elapsed: "+TimeUtil.formatTime(System.currentTimeMillis() - fr.timeStarted));
+ infoboxContent.addChild("br", l10n("timeElapsedLabel")+" "+TimeUtil.formatTime(System.currentTimeMillis() - fr.timeStarted));
long eta = fr.eta;
if(eta > 0)
infoboxContent.addChild("br", "ETA: "+TimeUtil.formatTime(eta));
if(fr.goneToNetwork)
- infoboxContent.addChild("p", "Your node is downloading this page or file from Freenet. This could take seconds or minutes depending on how big and how popular the page or file is.");
+ infoboxContent.addChild("p", l10n("progressDownloading"));
else
- infoboxContent.addChild("p", "Your Freenet node is checking your local cache for this page or file. If it is not found in the cache, it will try to download it from Freenet.");
+ infoboxContent.addChild("p", l10n("progressCheckingStore"));
if(!fr.finalizedBlocks)
- infoboxContent.addChild("p", "The progress bar is likely to jump around a lot as we have not downloaded enough blocks to know how big the file is.");
+ infoboxContent.addChild("p", l10n("progressNotFinalized"));
HTMLNode table = infoboxContent.addChild("table", "border", "0");
HTMLNode progressCell = table.addChild("tr").addChild("td", "class", "request-progress");
@@ -572,7 +574,7 @@
infoboxContent = infobox.addChild("div", "class", "infobox-content");
HTMLNode ul = infoboxContent.addChild("ul");
- ul.addChild("li").addChild("p", "You can wait for the page. This page will be refreshed every 2 seconds until the file is fetched or Freenet gives up. Alternatively:");
+ ul.addChild("li").addChild("p", l10n("progressOptionZero"));
HTMLNode optionForm = ctx.addFormChild(ul.addChild("li").addChild("p"), "/queue/", "tooBigQueueForm");
optionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "key", key.toString() });
optionForm.addChild("input", new String[] { "type", "name", "value" }, new String[] { "hidden", "return-type", "disk" });
@@ -771,6 +773,10 @@
private String l10n(String key, String pattern, String value) {
return L10n.getString("FProxyToadlet."+key, new String[] { pattern }, new String[] { value });
}
+
+ private String l10n(String key, String[] pattern, String[] value) {
+ return L10n.getString("FProxyToadlet."+key, pattern, value);
+ }
private String getLink(FreenetURI uri, String requestedMimeType, long maxSize, String force,
boolean forceDownload) {
Modified: trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
===================================================================
--- trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties 2009-04-21 21:45:28 UTC (rev 27170)
+++ trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties 2009-04-21 22:35:30 UTC (rev 27171)
@@ -329,9 +329,11 @@
FProxyToadlet.alerts=detailed status messages and messages from your Friends
FProxyToadlet.backToFProxy=${link}Click here${/link} to go to the FProxy home page.
FProxyToadlet.backToReferrer=${link}Click here${/link} to go back to the referring page.
+FProxyToadlet.blocksDetail=Blocks: ${fetched} / ${required} (total ${total} failed ${failed} fatally failed ${fatallyfailed})
FProxyToadlet.cantBindPort=Can't bind fproxy on that port!
FProxyToadlet.config=configure your node
FProxyToadlet.configTitle=Configuration
+FProxyToadlet.contentTypeLabel=Content type:
FProxyToadlet.dangerousContentTitle=Potentially Dangerous Content
FProxyToadlet.dangerousRSS=Freenet has detected that the file you are trying to fetch might be RSS. RSS cannot be properly filtered by Freenet, and may contain web-bugs (inline images etc which may expose your IP address to a malicious site author and therefore break your anonymity). Firefox 2.0 and Internet Explorer 7.0 will open the file as RSS even though its content type is "${type}".
FProxyToadlet.dangerousRSSSubtitle=RSS feed may be dangerous
@@ -377,6 +379,10 @@
FProxyToadlet.pathNotFoundTitle=Path Not Found
FProxyToadlet.plugins=configure and manage plugins
FProxyToadlet.pluginsTitle=Plugins
+FProxyToadlet.progressCheckingStore=Your Freenet node is checking your local cache for this page or file. If it is not found in the cache, it will try to download it from Freenet.
+FProxyToadlet.progressDownloading=Your node is downloading this page or file from Freenet. This could take seconds or minutes depending on how big and how popular the page or file is.
+FProxyToadlet.progressNotFinalized=The progress bar is likely to jump around a lot as we have not downloaded enough blocks to know how big the file is.
+FProxyToadlet.progressOptionZero=You can wait for the page. This page will be refreshed every 2 seconds until the file is fetched or Freenet gives up. Alternatively:
FProxyToadlet.queue=manage queued requests
FProxyToadlet.queueTitle=Downloads and uploads
FProxyToadlet.retryNow=Retry now
@@ -384,6 +390,7 @@
FProxyToadlet.sizeUnknown=Size: unknown
FProxyToadlet.stats=view statistics
FProxyToadlet.statsTitle=Statistics
+FProxyToadlet.timeElapsedLabel=Time elapsed:
FProxyToadlet.unableToRetrieve=Freenet was unable to retrieve this file.
FProxyToadlet.unknownMIMEType=MIME type: unknown
FProxyToadlet.welcome=browse freenet