- - {{getEta(download) | time}}
+ - {{getEta(download) | time}}
- {{download.fmtTotalLength}}
- {{download.fmtCompletedLength}}
- {{download.fmtDownloadSpeed}}
@@ -790,7 +790,7 @@ http://ex1.com/f2.mp4 http://ex2.com/f2.mp4 --out=file2.mp4
{{ '- Select the torrent from the local filesystem to start the download.' | translate }}
{{ '- You can select multiple torrents to start multiple downloads.' | translate }}
- {{ '- To add a BitTorrent-Magnet URL, use the add URI option and add it there.' | translate }}
+ {{ '- To add a BitTorrent-Magnet URL, use the Add By URI option and add it there.' | translate }}
@@ -1137,7 +1137,7 @@ http://ex1.com/f2.mp4 http://ex2.com/f2.mp4 --out=file2.mp4
{{ 'To download the latest version of the project, add issues or to contribute back, head on to' | translate }}:
http://github.com/ziahamza/webui-aria2
- {{ 'Or you can open the latest version in browser through' | translate }}:
+ {{ 'Or you can open the latest version in the browser through' | translate }}:
http://ziahamza.github.io/webui-aria2
diff --git a/js/services/rpc/rpc.js b/js/services/rpc/rpc.js
index 6d7792c..851b0a9 100644
--- a/js/services/rpc/rpc.js
+++ b/js/services/rpc/rpc.js
@@ -5,8 +5,8 @@ angular
])
.factory('$rpc', [
'$syscall', '$globalTimeout', '$alerts', '$utils',
- '$rootScope', '$location', '$authconf',
-function(syscall, globalTimeout, alerts, utils, rootScope, uri, authconf) {
+ '$rootScope', '$location', '$authconf', '$filter',
+function(syscall, globalTimeout, alerts, utils, rootScope, uri, authconf, filter) {
var subscriptions = []
, configurations = [authconf]
@@ -102,11 +102,13 @@ function(syscall, globalTimeout, alerts, utils, rootScope, uri, authconf) {
// If some proposed configurations are still in the pipeline then retry
if (configurations.length) {
- alerts.log("The last connection attempt was unsuccessful. Trying another configuration");
+ alerts.log(filter('translate')("The last connection attempt was unsuccessful. Trying another configuration"));
timeout = setTimeout(update, 0);
}
else {
- alerts.addAlert('Oh Snap! Could not connect to the aria2 RPC server. Will retry in 10 secs. You might want to check the connection settings by going to Settings > Connection Settings', 'error');
+ alerts.addAlert('' + filter('translate')('Oh Snap!') + ' ' +
+ filter('translate')('Could not connect to the aria2 RPC server. Will retry in 10 secs. You might want to check the connection settings by going to Settings > Connection Settings')
+ , 'error')
timeout = setTimeout(update, globalTimeout);
}
};
@@ -129,9 +131,9 @@ function(syscall, globalTimeout, alerts, utils, rootScope, uri, authconf) {
// configuration worked, save it in cookie for next time and
// delete the pipelined configurations!!
if (currentToken)
- alerts.addAlert('Successfully connected to Aria2 through its remote RPC …', 'success');
+ alerts.addAlert(filter('translate')('Successfully connected to Aria2 through its remote RPC …'), 'success');
else
- alerts.addAlert('Successfully connected to Aria2 through remote RPC, however the connection is still insecure. For complete security try adding an authorization secret token while starting Aria2 (through the flag --rpc-secret)');
+ alerts.addAlert(filter('translate')('Successfully connected to Aria2 through remote RPC, however the connection is still insecure. For complete security try adding an authorization secret token while starting Aria2 (through the flag --rpc-secret)'));
configurations = [];
}
@@ -180,7 +182,7 @@ function(syscall, globalTimeout, alerts, utils, rootScope, uri, authconf) {
// each one will be tried one after the other till success,
// for all options for one conf read rpc/syscall.js
configure: function(conf) {
- alerts.addAlert('Trying to connect to aria2 using the new connection configuration', 'info');
+ alerts.addAlert(filter('translate')('Trying to connect to aria2 using the new connection configuration'), 'info');
if (conf instanceof Array)
configurations = conf;
diff --git a/js/translate/en_US.js b/js/translate/en_US.js
index 5f3b026..2731047 100644
--- a/js/translate/en_US.js
+++ b/js/translate/en_US.js
@@ -133,5 +133,12 @@ translations.en_US = {
'Download GID':'Download GID',
'Number of Pieces':'Number of Pieces',
'Piece Length': 'Piece Length',
- 'Shutdown Server': 'Shutdown Server'
+ 'Shutdown Server': 'Shutdown Server',
+
+ 'The last connection attempt was unsuccessful. Trying another configuration': 'The last connection attempt was unsuccessful. Trying another configuration',
+ 'Oh Snap!': 'Oh Snap!',
+ 'Could not connect to the aria2 RPC server. Will retry in 10 secs. You might want to check the connection settings by going to Settings > Connection Settings': 'Could not connect to the aria2 RPC server. Will retry in 10 secs. You might want to check the connection settings by going to Settings > Connection Settings',
+ 'Successfully connected to Aria2 through its remote RPC …': 'Successfully connected to Aria2 through its remote RPC …',
+ 'Successfully connected to Aria2 through remote RPC, however the connection is still insecure. For complete security try adding an authorization secret token while starting Aria2 (through the flag --rpc-secret)': 'Successfully connected to Aria2 through remote RPC, however the connection is still insecure. For complete security try adding an authorization secret token while starting Aria2 (through the flag --rpc-secret)',
+ 'Trying to connect to aria2 using the new connection configuration': 'Trying to connect to aria2 using the new connection configuration',
};
diff --git a/js/translate/template.js b/js/translate/template.js
index 8ca5f3e..496ec78 100644
--- a/js/translate/template.js
+++ b/js/translate/template.js
@@ -147,5 +147,15 @@ translations.en_US = { // replace en_US to ll_CC, examples: zh_CN, de_AT.
'Uploaded':'',
'Download GID':'',
'Number of Pieces':'',
- 'Piece Length':''
+ 'Piece Length':'',
+
+ //alerts
+
+ 'The last connection attempt was unsuccessful. Trying another configuration': '',
+ 'Oh Snap!': 'Oh Snap!',
+ 'Could not connect to the aria2 RPC server. Will retry in 10 secs. You might want to check the connection settings by going to Settings > Connection Settings': '',
+ 'Successfully connected to Aria2 through its remote RPC …': '',
+ 'Successfully connected to Aria2 through remote RPC, however the connection is still insecure. For complete security try adding an authorization secret token while starting Aria2 (through the flag --rpc-secret)': '',
+ 'Trying to connect to aria2 using the new connection configuration': '',
+
};
diff --git a/js/translate/zh_CN.js b/js/translate/zh_CN.js
index 79dfab1..d685550 100644
--- a/js/translate/zh_CN.js
+++ b/js/translate/zh_CN.js
@@ -118,7 +118,7 @@ translations.zh_CN = {
// about modal
'To download the latest version of the project, add issues or to contribute back, head on to':
'下载最新版本,反馈问题,请到',
- 'Or you can open the latest version in browser through': '在线使用请开打',
+ 'Or you can open the latest version in the browser through': '在线使用请开打',
'Close': '关闭',
// lables
'Download status':'下载状态',
@@ -134,4 +134,3 @@ translations.zh_CN = {
'Number of Pieces':'块数量',
'Piece Length':'每块大小'
};
-