From 9ff7532168b97688806ea58d5ccef7a17c187d2a Mon Sep 17 00:00:00 2001 From: MaysWind Date: Mon, 30 May 2016 23:02:03 +0800 Subject: [PATCH] refactor code --- app/langs/zh-CN.json | 588 ++++++++++++++-------------- app/scripts/controllers/list.js | 2 +- app/scripts/core/lang-default.js | 614 +++++++++++++++--------------- app/scripts/core/utils.js | 10 +- app/scripts/filters/taskStatus.js | 16 +- 5 files changed, 617 insertions(+), 613 deletions(-) diff --git a/app/langs/zh-CN.json b/app/langs/zh-CN.json index af20ae7..7359902 100644 --- a/app/langs/zh-CN.json +++ b/app/langs/zh-CN.json @@ -99,297 +99,299 @@ "notice": "一般 (Notice)", "warn": "警告 (Warn)", "error": "错误 (Error)", - "options.dir.name": "下载路径", - "options.dir.description": "", - "options.log.name": "日志文件", - "options.log.description": "日志文件的路径. 如果设置为 \"-\", 日志则写入到 stdout. 如果设置为空字符串(\"\"), 日志将不会记录到磁盘上.", - "options.max-concurrent-downloads.name": "最大同时下载数", - "options.max-concurrent-downloads.description": "", - "options.check-integrity.name": "检查完整性", - "options.check-integrity.description": "通过对文件的每个分块或整个文件进行哈希验证来检查文件的完整性. 此选项仅对于BT、磁力链接及设置了 --checksum 选项的 HTTP(S)/FTP 链接.", - "options.continue.name": "断点续传", - "options.continue.description": "继续下载部分完成的文件. 启用此选项可以继续下载从浏览器或其他程序按顺序下载的文件. 此选项目前只支持 HTTP(S)/FTP 下载的文件.", - "options.all-proxy.name": "代理服务器", - "options.all-proxy.description": "设置所有协议的代理服务器地址. 如果覆盖之前设置的代理服务器, 使用 \"\" 即可. 您还可以针对特定的协议覆盖此参数, 即使用 --http-proxy, --https-proxy 和 --ftp-proxy 参数. 此设置将会影响所有下载. 代理服务器地址的格式为 [http://][USER:PASSWORD@]HOST[:PORT].", - "options.all-proxy-user.name": "代理服务器用户名", - "options.all-proxy-user.description": "", - "options.all-proxy-passwd.name": "代理服务器密码", - "options.all-proxy-passwd.description": "", - "options.connect-timeout.name": "连接超时时间", - "options.connect-timeout.description": "设置建立 HTTP/FTP/代理服务器 连接的超时时间(秒). 当连接建立后, 此选项不再生效, 请使用 --timeout 参数.", - "options.dry-run.name": "模拟运行", - "options.dry-run.description": "如果设置为是, aria2 将仅检查远程文件是否存在而不会下载文件内容. 此选项仅对 HTTP/FTP 下载生效. 如果设置为 true, BT 下载将会直接取消.", - "options.lowest-speed-limit.name": "最小速度限制", - "options.lowest-speed-limit.description": "当下载速度低于此选项设置的值(B/s) 时将会关闭连接. 0 表示不设置最小速度限制. 您还增加数值的单位 K 或 M (1K = 1024, 1M = 1024K). 此选项不会影响 BT 下载.", - "options.max-connection-per-server.name": "单服务器最大连接数", - "options.max-connection-per-server.description": "", - "options.max-file-not-found.name": "文件未找到重试次数", - "options.max-file-not-found.description": "如果 aria2 从远程 HTTP/FTP 服务器收到 \"文件未找到\" 的状态超过此选项设置的次数后下载将会失败. 设置为 0 将会禁用此选项. 此选项仅影响 HTTP/FTP 服务器. 重试时同时会记录重试次数, 所以也需要设置 --max-tries 这个参数.", - "options.max-tries.name": "最大尝试次数", - "options.max-tries.description": "设置最大尝试次数. 0 表示不限制.", - "options.min-split-size.name": "文件最小分割大小", - "options.netrc-path.name": ".netrc 文件路径", - "options.netrc-path.description": "", - "options.no-netrc.name": "禁用 netrc", - "options.no-netrc.description": "", - "options.no-proxy.name": "不使用代理服务器列表", - "options.no-proxy.description": "设置不使用代理服务器的主机名, 域名, 包含或不包含子网掩码的网络地址, 多个使用逗号分隔.", - "options.proxy-method.name": "代理服务器请求方法", - "options.remote-time.name": "获取服务器文件时间", - "options.remote-time.description": "从 HTTP/FTP 服务获取远程文件的时间戳, 如果可用将设置到本地文件", - "options.reuse-uri.name": "URI 复用", - "options.reuse-uri.description": "当所有给定的 URI 地址都已使用, 继续使用已经使用过的 URI 地址.", - "options.retry-wait.name": "重试等待时间", - "options.retry-wait.description": "设置重试间隔时间(秒). 当此选项的值大于 0 时, aria2 在 HTTP 服务器返回 503 响应时将会重试.", - "options.server-stat-of.name": "服务器状态保存文件", - "options.server-stat-timeout.name": "服务器状态超时", - "options.split.name": "文件分割数量", - "options.stream-piece-selector.name": "分片选择算法", - "options.timeout.name": "超时时间", - "options.timeout.description": "", - "options.uri-selector.name": "URI 选择算法", - "options.check-certificate.name": "检查证书", - "options.check-certificate.description": "", - "options.http-accept-gzip.name": "支持 GZip", - "options.http-auth-challenge.name": "HTTP 认证质询", - "options.http-no-cache.name": "禁用缓存", - "options.http-user.name": "HTTP 默认用户名", - "options.http-user.description": "", - "options.http-passwd.name": "HTTP 默认密码", - "options.http-passwd.description": "", - "options.http-proxy.name": "HTTP 代理服务器", - "options.http-proxy.description": "", - "options.http-proxy-user.name": "HTTP 代理服务器用户名", - "options.http-proxy-user.description": "", - "options.http-proxy-passwd.name": "HTTP 代理服务器密码", - "options.http-proxy-passwd.description": "", - "options.https-proxy.name": "HTTPS 代理服务器", - "options.https-proxy.description": "", - "options.https-proxy-user.name": "HTTPS 代理服务器用户名", - "options.https-proxy-user.description": "", - "options.https-proxy-passwd.name": "HTTPS 代理服务器密码", - "options.https-proxy-passwd.description": "", - "options.referer.name": "请求来源", - "options.enable-http-keep-alive.name": "启用持久连接", - "options.enable-http-keep-alive.description": "启用 HTTP/1.1 持久连接.", - "options.enable-http-pipelining.name": "启用 HTTP 管线化", - "options.enable-http-pipelining.description": "启用 HTTP/1.1 管线化.", - "options.header.name": "自定义请求头", - "options.header.description": "增加 HTTP 请求头内容.", - "options.save-cookies.name": "Cookies 保存路径", - "options.use-head.name": "启用 HEAD 方法", - "options.use-head.description": "第一次请求 HTTP 服务器时使用 HEAD 方法.", - "options.user-agent.name": "自定义 User Agent", - "options.user-agent.description": "", - "options.ftp-user.name": "FTP 默认用户名", - "options.ftp-user.description": "", - "options.ftp-passwd.name": "FTP 默认密码", - "options.ftp-passwd.description": "如果 URI 中包含用户名单不包含密码, aria2 首先会从 .netrc 文件中获取密码. 如果在 .netrc 文件中找到密码, 则使用该密码. 否则, 使用此选项设置的密码.", - "options.ftp-pasv.name": "被动模式", - "options.ftp-pasv.description": "在 FTP 中使用被动模式. 如果设置为否, 则使用主动模式. 此选项不适用于 SFTP 传输.", - "options.ftp-proxy.name": "FTP 代理服务器", - "options.ftp-proxy.description": "", - "options.ftp-proxy-user.name": "FTP 代理服务器用户名", - "options.ftp-proxy-user.description": "", - "options.ftp-proxy-passwd.name": "FTP 代理服务器密码", - "options.ftp-proxy-passwd.description": "", - "options.ftp-type.name": "传输类型", - "options.ftp-type.description": "", - "options.ftp-reuse-connection.name": "连接复用", - "options.ftp-reuse-connection.description": "", - "options.ssh-host-key-md.name": "SSH 公钥校验和", - "options.bt-detach-seed-only.name": "", - "options.bt-detach-seed-only.description": "", - "options.bt-enable-hook-after-hash-check.name": "", - "options.bt-enable-hook-after-hash-check.description": "", - "options.bt-enable-lpd.name": "", - "options.bt-enable-lpd.description": "", - "options.bt-exclude-tracker.name": "", - "options.bt-exclude-tracker.description": "", - "options.bt-external-ip.name": "", - "options.bt-external-ip.description": "", - "options.bt-force-encryption.name": "", - "options.bt-force-encryption.description": "", - "options.bt-hash-check-seed.name": "", - "options.bt-hash-check-seed.description": "", - "options.bt-max-open-files.name": "", - "options.bt-max-open-files.description": "", - "options.bt-max-peers.name": "", - "options.bt-max-peers.description": "", - "options.bt-metadata-only.name": "", - "options.bt-metadata-only.description": "", - "options.bt-min-crypto-level.name": "", - "options.bt-min-crypto-level.description": "", - "options.bt-prioritize-piece.name": "", - "options.bt-prioritize-piece.description": "", - "options.bt-remove-unselected-file.name": "", - "options.bt-remove-unselected-file.description": "", - "options.bt-require-crypto.name": "", - "options.bt-require-crypto.description": "", - "options.bt-request-peer-speed-limit.name": "", - "options.bt-request-peer-speed-limit.description": "", - "options.bt-save-metadata.name": "", - "options.bt-save-metadata.description": "", - "options.bt-seed-unverified.name": "", - "options.bt-seed-unverified.description": "", - "options.bt-stop-timeout.name": "", - "options.bt-stop-timeout.description": "", - "options.bt-tracker.name": "", - "options.bt-tracker.description": "", - "options.bt-tracker-connect-timeout.name": "", - "options.bt-tracker-connect-timeout.description": "", - "options.bt-tracker-interval.name": "", - "options.bt-tracker-interval.description": "", - "options.bt-tracker-timeout.name": "", - "options.bt-tracker-timeout.description": "", - "options.dht-file-path.name": "", - "options.dht-file-path.description": "", - "options.dht-file-path6.name": "", - "options.dht-file-path6.description": "", - "options.dht-listen-port.name": "", - "options.dht-listen-port.description": "", - "options.dht-message-timeout.name": "", - "options.dht-message-timeout.description": "", - "options.enable-dht.name": "", - "options.enable-dht.description": "", - "options.enable-dht6.name": "", - "options.enable-dht6.description": "", - "options.enable-peer-exchange.name": "", - "options.enable-peer-exchange.description": "", - "options.follow-torrent.name": "", - "options.follow-torrent.description": "", - "options.listen-port.name": "", - "options.listen-port.description": "", - "options.max-overall-upload-limit.name": "", - "options.max-overall-upload-limit.description": "", - "options.max-upload-limit.name": "", - "options.max-upload-limit.description": "", - "options.peer-id-prefix.name": "", - "options.peer-id-prefix.description": "", - "options.seed-ratio.name": "", - "options.seed-ratio.description": "", - "options.seed-time.name": "", - "options.seed-time.description": "", - "options.follow-metalink.name": "", - "options.follow-metalink.description": "", - "options.metalink-base-uri.name": "", - "options.metalink-base-uri.description": "", - "options.metalink-language.name": "", - "options.metalink-language.description": "", - "options.metalink-location.name": "", - "options.metalink-location.description": "", - "options.metalink-os.name": "", - "options.metalink-os.description": "", - "options.metalink-version.name": "", - "options.metalink-version.description": "", - "options.metalink-preferred-protocol.name": "", - "options.metalink-preferred-protocol.description": "", - "options.metalink-enable-unique-protocol.name": "", - "options.metalink-enable-unique-protocol.description": "", - "options.enable-rpc.name": "启用 JSON-RPC/XML-RPC 服务器", - "options.enable-rpc.description": "", - "options.pause-metadata.name": "元数据下载完后暂停", - "options.pause-metadata.description": "当元数据下载完成后暂停后续的下载. 在 aria2 中有三种类型的元数据下载: (1) 下载 .torrent 文件. (2) 通过磁链下载种子元数据. (3) 下载磁链文件. 这些元数据下载完后会根据元数据内容进行下载. 这个选项会暂停这些后续的下载. 此选项仅当 --enable-rpc 启用时生效.", - "options.rpc-allow-origin-all.name": "接受所有远程请求", - "options.rpc-allow-origin-all.description": "在 RPC 响应头增加 Access-Control-Allow-Origin 字段, 值为 * .", - "options.rpc-listen-all.name": "在所有网卡上监听", - "options.rpc-listen-all.description": "在所有网络适配器上监听 JSON-RPC/XML-RPC 的请求, 如果设置为否, 仅监听本地网络的请求.", - "options.rpc-listen-port.name": "监听端口", - "options.rpc-listen-port.description": "", - "options.rpc-max-request-size.name": "最大请求大小", - "options.rpc-max-request-size.description": "设置 JSON-RPC/XML-RPC 最大的请求大小. 如果 aria2 检测到请求超过设定的字节数, 会直接取消连接.", - "options.rpc-save-upload-metadata.name": "保存上传的元数据", - "options.rpc-save-upload-metadata.description": "在 dir 参数设置的目录中保存上传的种子文件或磁链的元数据. 文件名包括 SHA-1 哈希后的元数据和扩展名两部分. 对于种子文件, 扩展名为 '.torrent'. 对于磁链为 '.meta4'. 如果此选项设置为否, 通过 aria2.addTorrent() 或 aria2.addMetalink() 方法添加的下载将无法通过 --save-session 选项保存.", - "options.rpc-secure.name": "启用 SSL/TLS", - "options.rpc-secure.description": "RPC 将通过 SSL/TLS 加密传输. RPC 客户端需要使用 https 协议连接服务器. 对于 WebSocket 客户端, 使用 wss 协议. 使用 --rpc-certificate 和 --rpc-private-key 选项设置服务器的证书和私钥.", - "options.allow-overwrite.name": "", - "options.allow-overwrite.description": "", - "options.allow-piece-length-change.name": "", - "options.allow-piece-length-change.description": "", - "options.always-resume.name": "", - "options.always-resume.description": "", - "options.async-dns.name": "", - "options.async-dns.description": "", - "options.auto-file-renaming.name": "", - "options.auto-file-renaming.description": "", - "options.auto-save-interval.name": "", - "options.auto-save-interval.description": "", - "options.conditional-get.name": "", - "options.conditional-get.description": "", - "options.conf-path.name": "", - "options.conf-path.description": "", - "options.console-log-level.name": "", - "options.console-log-level.description": "", - "options.daemon.name": "", - "options.daemon.description": "", - "options.deferred-input.name": "", - "options.deferred-input.description": "", - "options.disable-ipv6.name": "", - "options.disable-ipv6.description": "", - "options.disk-cache.name": "", - "options.disk-cache.description": "", - "options.download-result.name": "", - "options.download-result.description": "", - "options.dscp.name": "", - "options.dscp.description": "", - "options.rlimit-nofile.name": "", - "options.rlimit-nofile.description": "", - "options.enable-color.name": "", - "options.enable-color.description": "", - "options.enable-mmap.name": "", - "options.enable-mmap.description": "", - "options.event-poll.name": "", - "options.event-poll.description": "", - "options.file-allocation.name": "", - "options.file-allocation.description": "", - "options.force-save.name": "", - "options.force-save.description": "", - "options.hash-check-only.name": "", - "options.hash-check-only.description": "", - "options.human-readable.name": "", - "options.human-readable.description": "", - "options.max-download-result.name": "", - "options.max-download-result.description": "", - "options.max-mmap-limit.name": "", - "options.max-mmap-limit.description": "", - "options.max-resume-failure-tries.name": "", - "options.max-resume-failure-tries.description": "", - "options.min-tls-version.name": "", - "options.min-tls-version.description": "", - "options.log-level.name": "", - "options.log-level.description": "", - "options.piece-length.name": "", - "options.piece-length.description": "", - "options.optimize-concurrent-downloads.name": "", - "options.optimize-concurrent-downloads.description": "", - "options.show-console-readout.name": "", - "options.show-console-readout.description": "", - "options.summary-interval.name": "", - "options.summary-interval.description": "", - "options.max-overall-download-limit.name": "", - "options.max-overall-download-limit.description": "", - "options.max-download-limit.name": "", - "options.max-download-limit.description": "", - "options.no-conf.name": "", - "options.no-conf.description": "", - "options.no-file-allocation-limit.name": "", - "options.no-file-allocation-limit.description": "", - "options.parameterized-uri.name": "", - "options.parameterized-uri.description": "", - "options.quiet.name": "", - "options.quiet.description": "", - "options.realtime-chunk-checksum.name": "", - "options.realtime-chunk-checksum.description": "", - "options.remove-control-file.name": "", - "options.remove-control-file.description": "", - "options.save-session.name": "", - "options.save-session.description": "", - "options.save-session-interval.name": "", - "options.save-session-interval.description": "", - "options.socket-recv-buffer-size.name": "", - "options.socket-recv-buffer-size.description": "", - "options.stop.name": "", - "options.stop.description": "", - "options.truncate-console-readout.name": "", - "options.truncate-console-readout.description": "" + "options": { + "dir.name": "下载路径", + "dir.description": "", + "log.name": "日志文件", + "log.description": "日志文件的路径. 如果设置为 \"-\", 日志则写入到 stdout. 如果设置为空字符串(\"\"), 日志将不会记录到磁盘上.", + "max-concurrent-downloads.name": "最大同时下载数", + "max-concurrent-downloads.description": "", + "check-integrity.name": "检查完整性", + "check-integrity.description": "通过对文件的每个分块或整个文件进行哈希验证来检查文件的完整性. 此选项仅对于BT、磁力链接及设置了 --checksum 选项的 HTTP(S)/FTP 链接.", + "continue.name": "断点续传", + "continue.description": "继续下载部分完成的文件. 启用此选项可以继续下载从浏览器或其他程序按顺序下载的文件. 此选项目前只支持 HTTP(S)/FTP 下载的文件.", + "all-proxy.name": "代理服务器", + "all-proxy.description": "设置所有协议的代理服务器地址. 如果覆盖之前设置的代理服务器, 使用 \"\" 即可. 您还可以针对特定的协议覆盖此参数, 即使用 --http-proxy, --https-proxy 和 --ftp-proxy 参数. 此设置将会影响所有下载. 代理服务器地址的格式为 [http://][USER:PASSWORD@]HOST[:PORT].", + "all-proxy-user.name": "代理服务器用户名", + "all-proxy-user.description": "", + "all-proxy-passwd.name": "代理服务器密码", + "all-proxy-passwd.description": "", + "connect-timeout.name": "连接超时时间", + "connect-timeout.description": "设置建立 HTTP/FTP/代理服务器 连接的超时时间(秒). 当连接建立后, 此选项不再生效, 请使用 --timeout 参数.", + "dry-run.name": "模拟运行", + "dry-run.description": "如果设置为是, aria2 将仅检查远程文件是否存在而不会下载文件内容. 此选项仅对 HTTP/FTP 下载生效. 如果设置为 true, BT 下载将会直接取消.", + "lowest-speed-limit.name": "最小速度限制", + "lowest-speed-limit.description": "当下载速度低于此选项设置的值(B/s) 时将会关闭连接. 0 表示不设置最小速度限制. 您还增加数值的单位 K 或 M (1K = 1024, 1M = 1024K). 此选项不会影响 BT 下载.", + "max-connection-per-server.name": "单服务器最大连接数", + "max-connection-per-server.description": "", + "max-file-not-found.name": "文件未找到重试次数", + "max-file-not-found.description": "如果 aria2 从远程 HTTP/FTP 服务器收到 \"文件未找到\" 的状态超过此选项设置的次数后下载将会失败. 设置为 0 将会禁用此选项. 此选项仅影响 HTTP/FTP 服务器. 重试时同时会记录重试次数, 所以也需要设置 --max-tries 这个参数.", + "max-tries.name": "最大尝试次数", + "max-tries.description": "设置最大尝试次数. 0 表示不限制.", + "min-split-size.name": "文件最小分割大小", + "netrc-path.name": ".netrc 文件路径", + "netrc-path.description": "", + "no-netrc.name": "禁用 netrc", + "no-netrc.description": "", + "no-proxy.name": "不使用代理服务器列表", + "no-proxy.description": "设置不使用代理服务器的主机名, 域名, 包含或不包含子网掩码的网络地址, 多个使用逗号分隔.", + "proxy-method.name": "代理服务器请求方法", + "remote-time.name": "获取服务器文件时间", + "remote-time.description": "从 HTTP/FTP 服务获取远程文件的时间戳, 如果可用将设置到本地文件", + "reuse-uri.name": "URI 复用", + "reuse-uri.description": "当所有给定的 URI 地址都已使用, 继续使用已经使用过的 URI 地址.", + "retry-wait.name": "重试等待时间", + "retry-wait.description": "设置重试间隔时间(秒). 当此选项的值大于 0 时, aria2 在 HTTP 服务器返回 503 响应时将会重试.", + "server-stat-of.name": "服务器状态保存文件", + "server-stat-timeout.name": "服务器状态超时", + "split.name": "文件分割数量", + "stream-piece-selector.name": "分片选择算法", + "timeout.name": "超时时间", + "timeout.description": "", + "uri-selector.name": "URI 选择算法", + "check-certificate.name": "检查证书", + "check-certificate.description": "", + "http-accept-gzip.name": "支持 GZip", + "http-auth-challenge.name": "HTTP 认证质询", + "http-no-cache.name": "禁用缓存", + "http-user.name": "HTTP 默认用户名", + "http-user.description": "", + "http-passwd.name": "HTTP 默认密码", + "http-passwd.description": "", + "http-proxy.name": "HTTP 代理服务器", + "http-proxy.description": "", + "http-proxy-user.name": "HTTP 代理服务器用户名", + "http-proxy-user.description": "", + "http-proxy-passwd.name": "HTTP 代理服务器密码", + "http-proxy-passwd.description": "", + "https-proxy.name": "HTTPS 代理服务器", + "https-proxy.description": "", + "https-proxy-user.name": "HTTPS 代理服务器用户名", + "https-proxy-user.description": "", + "https-proxy-passwd.name": "HTTPS 代理服务器密码", + "https-proxy-passwd.description": "", + "referer.name": "请求来源", + "enable-http-keep-alive.name": "启用持久连接", + "enable-http-keep-alive.description": "启用 HTTP/1.1 持久连接.", + "enable-http-pipelining.name": "启用 HTTP 管线化", + "enable-http-pipelining.description": "启用 HTTP/1.1 管线化.", + "header.name": "自定义请求头", + "header.description": "增加 HTTP 请求头内容.", + "save-cookies.name": "Cookies 保存路径", + "use-head.name": "启用 HEAD 方法", + "use-head.description": "第一次请求 HTTP 服务器时使用 HEAD 方法.", + "user-agent.name": "自定义 User Agent", + "user-agent.description": "", + "ftp-user.name": "FTP 默认用户名", + "ftp-user.description": "", + "ftp-passwd.name": "FTP 默认密码", + "ftp-passwd.description": "如果 URI 中包含用户名单不包含密码, aria2 首先会从 .netrc 文件中获取密码. 如果在 .netrc 文件中找到密码, 则使用该密码. 否则, 使用此选项设置的密码.", + "ftp-pasv.name": "被动模式", + "ftp-pasv.description": "在 FTP 中使用被动模式. 如果设置为否, 则使用主动模式. 此选项不适用于 SFTP 传输.", + "ftp-proxy.name": "FTP 代理服务器", + "ftp-proxy.description": "", + "ftp-proxy-user.name": "FTP 代理服务器用户名", + "ftp-proxy-user.description": "", + "ftp-proxy-passwd.name": "FTP 代理服务器密码", + "ftp-proxy-passwd.description": "", + "ftp-type.name": "传输类型", + "ftp-type.description": "", + "ftp-reuse-connection.name": "连接复用", + "ftp-reuse-connection.description": "", + "ssh-host-key-md.name": "SSH 公钥校验和", + "bt-detach-seed-only.name": "", + "bt-detach-seed-only.description": "", + "bt-enable-hook-after-hash-check.name": "", + "bt-enable-hook-after-hash-check.description": "", + "bt-enable-lpd.name": "", + "bt-enable-lpd.description": "", + "bt-exclude-tracker.name": "", + "bt-exclude-tracker.description": "", + "bt-external-ip.name": "", + "bt-external-ip.description": "", + "bt-force-encryption.name": "", + "bt-force-encryption.description": "", + "bt-hash-check-seed.name": "", + "bt-hash-check-seed.description": "", + "bt-max-open-files.name": "", + "bt-max-open-files.description": "", + "bt-max-peers.name": "", + "bt-max-peers.description": "", + "bt-metadata-only.name": "", + "bt-metadata-only.description": "", + "bt-min-crypto-level.name": "", + "bt-min-crypto-level.description": "", + "bt-prioritize-piece.name": "", + "bt-prioritize-piece.description": "", + "bt-remove-unselected-file.name": "", + "bt-remove-unselected-file.description": "", + "bt-require-crypto.name": "", + "bt-require-crypto.description": "", + "bt-request-peer-speed-limit.name": "", + "bt-request-peer-speed-limit.description": "", + "bt-save-metadata.name": "", + "bt-save-metadata.description": "", + "bt-seed-unverified.name": "", + "bt-seed-unverified.description": "", + "bt-stop-timeout.name": "", + "bt-stop-timeout.description": "", + "bt-tracker.name": "", + "bt-tracker.description": "", + "bt-tracker-connect-timeout.name": "", + "bt-tracker-connect-timeout.description": "", + "bt-tracker-interval.name": "", + "bt-tracker-interval.description": "", + "bt-tracker-timeout.name": "", + "bt-tracker-timeout.description": "", + "dht-file-path.name": "", + "dht-file-path.description": "", + "dht-file-path6.name": "", + "dht-file-path6.description": "", + "dht-listen-port.name": "", + "dht-listen-port.description": "", + "dht-message-timeout.name": "", + "dht-message-timeout.description": "", + "enable-dht.name": "", + "enable-dht.description": "", + "enable-dht6.name": "", + "enable-dht6.description": "", + "enable-peer-exchange.name": "", + "enable-peer-exchange.description": "", + "follow-torrent.name": "", + "follow-torrent.description": "", + "listen-port.name": "", + "listen-port.description": "", + "max-overall-upload-limit.name": "", + "max-overall-upload-limit.description": "", + "max-upload-limit.name": "", + "max-upload-limit.description": "", + "peer-id-prefix.name": "", + "peer-id-prefix.description": "", + "seed-ratio.name": "", + "seed-ratio.description": "", + "seed-time.name": "", + "seed-time.description": "", + "follow-metalink.name": "", + "follow-metalink.description": "", + "metalink-base-uri.name": "", + "metalink-base-uri.description": "", + "metalink-language.name": "", + "metalink-language.description": "", + "metalink-location.name": "", + "metalink-location.description": "", + "metalink-os.name": "", + "metalink-os.description": "", + "metalink-version.name": "", + "metalink-version.description": "", + "metalink-preferred-protocol.name": "", + "metalink-preferred-protocol.description": "", + "metalink-enable-unique-protocol.name": "", + "metalink-enable-unique-protocol.description": "", + "enable-rpc.name": "启用 JSON-RPC/XML-RPC 服务器", + "enable-rpc.description": "", + "pause-metadata.name": "元数据下载完后暂停", + "pause-metadata.description": "当元数据下载完成后暂停后续的下载. 在 aria2 中有三种类型的元数据下载: (1) 下载 .torrent 文件. (2) 通过磁链下载种子元数据. (3) 下载磁链文件. 这些元数据下载完后会根据元数据内容进行下载. 这个选项会暂停这些后续的下载. 此选项仅当 --enable-rpc 启用时生效.", + "rpc-allow-origin-all.name": "接受所有远程请求", + "rpc-allow-origin-all.description": "在 RPC 响应头增加 Access-Control-Allow-Origin 字段, 值为 * .", + "rpc-listen-all.name": "在所有网卡上监听", + "rpc-listen-all.description": "在所有网络适配器上监听 JSON-RPC/XML-RPC 的请求, 如果设置为否, 仅监听本地网络的请求.", + "rpc-listen-port.name": "监听端口", + "rpc-listen-port.description": "", + "rpc-max-request-size.name": "最大请求大小", + "rpc-max-request-size.description": "设置 JSON-RPC/XML-RPC 最大的请求大小. 如果 aria2 检测到请求超过设定的字节数, 会直接取消连接.", + "rpc-save-upload-metadata.name": "保存上传的元数据", + "rpc-save-upload-metadata.description": "在 dir 参数设置的目录中保存上传的种子文件或磁链的元数据. 文件名包括 SHA-1 哈希后的元数据和扩展名两部分. 对于种子文件, 扩展名为 '.torrent'. 对于磁链为 '.meta4'. 如果此选项设置为否, 通过 aria2.addTorrent() 或 aria2.addMetalink() 方法添加的下载将无法通过 --save-session 选项保存.", + "rpc-secure.name": "启用 SSL/TLS", + "rpc-secure.description": "RPC 将通过 SSL/TLS 加密传输. RPC 客户端需要使用 https 协议连接服务器. 对于 WebSocket 客户端, 使用 wss 协议. 使用 --rpc-certificate 和 --rpc-private-key 选项设置服务器的证书和私钥.", + "allow-overwrite.name": "", + "allow-overwrite.description": "", + "allow-piece-length-change.name": "", + "allow-piece-length-change.description": "", + "always-resume.name": "", + "always-resume.description": "", + "async-dns.name": "", + "async-dns.description": "", + "auto-file-renaming.name": "", + "auto-file-renaming.description": "", + "auto-save-interval.name": "", + "auto-save-interval.description": "", + "conditional-get.name": "", + "conditional-get.description": "", + "conf-path.name": "", + "conf-path.description": "", + "console-log-level.name": "", + "console-log-level.description": "", + "daemon.name": "", + "daemon.description": "", + "deferred-input.name": "", + "deferred-input.description": "", + "disable-ipv6.name": "", + "disable-ipv6.description": "", + "disk-cache.name": "", + "disk-cache.description": "", + "download-result.name": "", + "download-result.description": "", + "dscp.name": "", + "dscp.description": "", + "rlimit-nofile.name": "", + "rlimit-nofile.description": "", + "enable-color.name": "", + "enable-color.description": "", + "enable-mmap.name": "", + "enable-mmap.description": "", + "event-poll.name": "", + "event-poll.description": "", + "file-allocation.name": "", + "file-allocation.description": "", + "force-save.name": "", + "force-save.description": "", + "hash-check-only.name": "", + "hash-check-only.description": "", + "human-readable.name": "", + "human-readable.description": "", + "max-download-result.name": "", + "max-download-result.description": "", + "max-mmap-limit.name": "", + "max-mmap-limit.description": "", + "max-resume-failure-tries.name": "", + "max-resume-failure-tries.description": "", + "min-tls-version.name": "", + "min-tls-version.description": "", + "log-level.name": "", + "log-level.description": "", + "piece-length.name": "", + "piece-length.description": "", + "optimize-concurrent-downloads.name": "", + "optimize-concurrent-downloads.description": "", + "show-console-readout.name": "", + "show-console-readout.description": "", + "summary-interval.name": "", + "summary-interval.description": "", + "max-overall-download-limit.name": "", + "max-overall-download-limit.description": "", + "max-download-limit.name": "", + "max-download-limit.description": "", + "no-conf.name": "", + "no-conf.description": "", + "no-file-allocation-limit.name": "", + "no-file-allocation-limit.description": "", + "parameterized-uri.name": "", + "parameterized-uri.description": "", + "quiet.name": "", + "quiet.description": "", + "realtime-chunk-checksum.name": "", + "realtime-chunk-checksum.description": "", + "remove-control-file.name": "", + "remove-control-file.description": "", + "save-session.name": "", + "save-session.description": "", + "save-session-interval.name": "", + "save-session-interval.description": "", + "socket-recv-buffer-size.name": "", + "socket-recv-buffer-size.description": "", + "stop.name": "", + "stop.description": "", + "truncate-console-readout.name": "", + "truncate-console-readout.description": "" + } } diff --git a/app/scripts/controllers/list.js b/app/scripts/controllers/list.js index 9639fb4..c6fcb52 100644 --- a/app/scripts/controllers/list.js +++ b/app/scripts/controllers/list.js @@ -1,7 +1,7 @@ (function () { 'use strict'; - angular.module('ariaNg').controller('DownloadListController', ['$rootScope', '$scope', '$window', '$location', '$interval', 'translateFilter', 'aria2RpcService', 'ariaNgSettingService', 'utils', function ($rootScope, $scope, $window, $location, $interval, translateFilter, aria2RpcService, ariaNgSettingService, utils) { + angular.module('ariaNg').controller('DownloadListController', ['$rootScope', '$scope', '$window', '$location', '$interval', 'aria2RpcService', 'ariaNgSettingService', 'utils', function ($rootScope, $scope, $window, $location, $interval, aria2RpcService, ariaNgSettingService, utils) { var location = $location.path().substring(1); var downloadTaskRefreshPromise = null; var needRequestWholeInfo = true; diff --git a/app/scripts/core/lang-default.js b/app/scripts/core/lang-default.js index 33d8d6b..75eeb70 100644 --- a/app/scripts/core/lang-default.js +++ b/app/scripts/core/lang-default.js @@ -103,312 +103,314 @@ 'notice': 'Notice', 'warn': 'Warn', 'error': 'Error', - 'options.dir.name': 'Download Path', - 'options.dir.description': '', - 'options.log.name': 'Log File', - 'options.log.description': 'The file name of the log file. If - is specified, log is written to stdout. If empty string("") is specified, or this option is omitted, no log is written to disk at all.', - 'options.max-concurrent-downloads.name': 'Max Concurrent Downloads', - 'options.max-concurrent-downloads.description': '', - 'options.check-integrity.name': 'Check Integrity', - 'options.check-integrity.description': 'Check file integrity by validating piece hashes or a hash of entire file. This option has effect only in BitTorrent, Metalink downloads with checksums or HTTP(S)/FTP downloads with --checksum option.', - 'options.continue.name': 'Resume Download', - 'options.continue.description': 'Continue downloading a partially downloaded file. Use this option to resume a download started by a web browser or another program which downloads files sequentially from the beginning. Currently this option is only applicable to HTTP(S)/FTP downloads.', - 'options.all-proxy.name': 'Proxy Server', - 'options.all-proxy.description': 'Use a proxy server for all protocols. To override a previously defined proxy, use "". You also can override this setting and specify a proxy server for a particular protocol using --http-proxy, --https-proxy and --ftp-proxy options. This affects all downloads. The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT].', - 'options.all-proxy-user.name': 'Proxy User Name', - 'options.all-proxy-user.description': '', - 'options.all-proxy-passwd.name': 'Proxy Password', - 'options.all-proxy-passwd.description': '', - 'options.connect-timeout.name': 'Connect Timeout', - 'options.connect-timeout.description': 'Set the connect timeout in seconds to establish connection to HTTP/FTP/proxy server. After the connection is established, this option makes no effect and --timeout option is used instead.', - 'options.dry-run.name': 'Dry Run', - 'options.dry-run.description': 'If true is given, aria2 just checks whether the remote file is available and doesn\'t download data. This option has effect on HTTP/FTP download. BitTorrent downloads are canceled if true is specified.', - 'options.lowest-speed-limit.name': 'Lowest Speed Limit', - 'options.lowest-speed-limit.description': 'Close connection if download speed is lower than or equal to this value(bytes per sec). 0 means aria2 does not have a lowest speed limit. You can append K or M (1K = 1024, 1M = 1024K). This option does not affect BitTorrent downloads.', - 'options.max-connection-per-server.name': 'Max Connection Per Server', - 'options.max-connection-per-server.description': '', - 'options.max-file-not-found.name': 'Max File Not Found Try Times', - 'options.max-file-not-found.description': '', - 'options.max-tries.name': 'Max Try Times', - 'options.max-tries.description': 'Set number of tries. 0 means unlimited.', - 'options.min-split-size.name': 'Min Split Size', - 'options.min-split-size.description': 'aria2 does not split less than 2*SIZE byte range. For example, let\'s consider downloading 20MiB file. If SIZE is 10M, aria2 can split file into 2 range [0-10MiB) and [10MiB-20MiB) and download it using 2 sources(if --split >= 2, of course). If SIZE is 15M, since 2*15M > 20MiB, aria2 does not split file and download it using 1 source. You can append K or M (1K = 1024, 1M = 1024K). Possible Values: 1M-1024M.', - 'options.netrc-path.name': '.netrc Path', - 'options.netrc-path.description': '', - 'options.no-netrc.name': 'Disable netrc', - 'options.no-netrc.description': '', - 'options.no-proxy.name': 'No Proxy List', - 'options.no-proxy.description': 'Specify a comma separated list of host names, domains and network addresses with or without a subnet mask where no proxy should be used.', - 'options.proxy-method.name': 'Proxy Method', - 'options.proxy-method.description': 'Set the method to use in proxy request. METHOD is either get or tunnel. HTTPS downloads always use tunnel regardless of this option.', - 'options.remote-time.name': 'Remote File Timestamp', - 'options.remote-time.description': 'Retrieve timestamp of the remote file from the remote HTTP/FTP server and if it is available, apply it to the local file.', - 'options.reuse-uri.name': 'Reuse Uri', - 'options.reuse-uri.description': 'Reuse already used URIs if no unused URIs are left.', - 'options.retry-wait.name': 'Retry Wait', - 'options.retry-wait.description': 'Set the seconds to wait between retries. When SEC > 0, aria2 will retry downloads when the HTTP server returns a 503 response. ', - 'options.server-stat-of.name': 'Server Stat Output', - 'options.server-stat-of.description': 'Specify the file name to which performance profile of the servers is saved. You can load saved data using --server-stat-if option.', - 'options.server-stat-timeout.name': 'Server Stat Timeout', - 'options.server-stat-timeout.description': 'Specifies timeout in seconds to invalidate performance profile of the servers since the last contact to them.', - 'options.split.name': 'Split Count', - 'options.split.description': 'Download a file using N connections. If more than N URIs are given, first N URIs are used and remaining URIs are used for backup. If less than N URIs are given, those URIs are used more than once so that N connections total are made simultaneously. The number of connections to the same host is restricted by the --max-connection-per-server option. See also the --min-split-size option.', - 'options.stream-piece-selector.name': 'Piece Selection Algorithm', - 'options.stream-piece-selector.description': 'Specify piece selection algorithm used in HTTP/FTP download. Piece means fixed length segment which is downloaded in parallel in segmented download. If default is given, aria2 selects piece so that it reduces the number of establishing connection. This is reasonable default behavior because establishing connection is an expensive operation. If inorder is given, aria2 selects piece which has minimum index. Index=0 means first of the file. This will be useful to view movie while downloading it. --enable-http-pipelining option may be useful to reduce re-connection overhead. Please note that aria2 honors --min-split-size option, so it will be necessary to specify a reasonable value to --min-split-size option. If random is given, aria2 selects piece randomly. Like inorder, --min-split-size option is honored. If geom is given, at the beginning aria2 selects piece which has minimum index like inorder, but it exponentially increasingly keeps space from previously selected piece. This will reduce the number of establishing connection and at the same time it will download the beginning part of the file first. This will be useful to view movie while downloading it.', - 'options.timeout.name': 'Timeout', - 'options.timeout.description': '', - 'options.uri-selector.name': 'URI Selection Algorithm', - 'options.uri-selector.description': 'Specify URI selection algorithm. The possible values are inorder, feedback and adaptive. If inorder is given, URI is tried in the order appeared in the URI list. If feedback is given, aria2 uses download speed observed in the previous downloads and choose fastest server in the URI list. This also effectively skips dead mirrors. The observed download speed is a part of performance profile of servers mentioned in --server-stat-of and --server-stat-if options. If adaptive is given, selects one of the best mirrors for the first and reserved connections. For supplementary ones, it returns mirrors which has not been tested yet, and if each of them has already been tested, returns mirrors which has to be tested again. Otherwise, it doesn\'t select anymore mirrors. Like feedback, it uses a performance profile of servers.', - 'options.check-certificate.name': 'Check Certificate', - 'options.check-certificate.description': '', - 'options.http-accept-gzip.name': 'Accept GZip', - 'options.http-accept-gzip.description': 'Send Accept: deflate, gzip request header and inflate response if remote server responds with Content-Encoding: gzip or Content-Encoding: deflate.', - 'options.http-auth-challenge.name': 'HTTP Auth Challenge', - 'options.http-auth-challenge.description': 'Send HTTP authorization header only when it is requested by the server. If false is set, then authorization header is always sent to the server. There is an exception: if user name and password are embedded in URI, authorization header is always sent to the server regardless of this option.', - 'options.http-no-cache.name': 'No Cache', - 'options.http-no-cache.description': 'Send Cache-Control: no-cache and Pragma: no-cache header to avoid cached content. If false is given, these headers are not sent and you can add Cache-Control header with a directive you like using --header option.', - 'options.http-user.name': 'HTTP Default User Name', - 'options.http-user.description': '', - 'options.http-passwd.name': 'HTTP Default Password', - 'options.http-passwd.description': '', - 'options.http-proxy.name': 'HTTP Proxy Server', - 'options.http-proxy.description': '', - 'options.http-proxy-user.name': 'HTTP Proxy User Name', - 'options.http-proxy-user.description': '', - 'options.http-proxy-passwd.name': 'HTTP Proxy Password', - 'options.http-proxy-passwd.description': '', - 'options.https-proxy.name': 'HTTPS Proxy Server', - 'options.https-proxy.description': '', - 'options.https-proxy-user.name': 'HTTPS Proxy User Name', - 'options.https-proxy-user.description': '', - 'options.https-proxy-passwd.name': 'HTTPS Proxy Password', - 'options.https-proxy-passwd.description': '', - 'options.referer.name': 'Referer', - 'options.referer.description': 'Set an http referrer (Referer). This affects all http/https downloads. If * is given, the download URI is also used as the referrer. This may be useful when used together with the --parameterized-uri option.', - 'options.enable-http-keep-alive.name': 'Enable Persistent Connection', - 'options.enable-http-keep-alive.description': 'Enable HTTP/1.1 persistent connection.', - 'options.enable-http-pipelining.name': 'Enable HTTP Pipelining', - 'options.enable-http-pipelining.description': 'Enable HTTP/1.1 pipelining.', - 'options.header.name': 'Custom Header', - 'options.header.description': 'Append HEADER to HTTP request header.', - 'options.save-cookies.name': 'Cookies Path', - 'options.save-cookies.description': 'Save Cookies to FILE in Mozilla/Firefox(1.x/2.x)/ Netscape format. If FILE already exists, it is overwritten. Session Cookies are also saved and their expiry values are treated as 0.', - 'options.use-head.name': 'Use HEAD Method', - 'options.use-head.description': 'Use HEAD method for the first request to the HTTP server.', - 'options.user-agent.name': 'Custom User Agent', - 'options.user-agent.description': '', - 'options.ftp-user.name': 'FTP Default User Name', - 'options.ftp-user.description': '', - 'options.ftp-passwd.name': 'FTP Default Password', - 'options.ftp-passwd.description': 'If user name is embedded but password is missing in URI, aria2 tries to resolve password using .netrc. If password is found in .netrc, then use it as password. If not, use the password specified in this option.', - 'options.ftp-pasv.name': 'Passive Mode', - 'options.ftp-pasv.description': 'Use the passive mode in FTP. If false is given, the active mode will be used. This option is ignored for SFTP transfer.', - 'options.ftp-proxy.name': 'FTP Proxy Server', - 'options.ftp-proxy.description': '', - 'options.ftp-proxy-user.name': 'FTP Proxy User Name', - 'options.ftp-proxy-user.description': '', - 'options.ftp-proxy-passwd.name': 'FTP Proxy Password', - 'options.ftp-proxy-passwd.description': '', - 'options.ftp-type.name': 'Transfer Type', - 'options.ftp-type.description': '', - 'options.ftp-reuse-connection.name': 'Reuse Connection', - 'options.ftp-reuse-connection.description': '', - 'options.ssh-host-key-md.name': 'SSH Public Key Checksum', - 'options.ssh-host-key-md.description': 'Set checksum for SSH host public key. TYPE is hash type. The supported hash type is sha-1 or md5. DIGEST is hex digest. For example: sha-1=b030503d4de4539dc7885e6f0f5e256704edf4c3. This option can be used to validate server\'s public key when SFTP is used. If this option is not set, which is default, no validation takes place.', - 'options.bt-detach-seed-only.name': '', - 'options.bt-detach-seed-only.description': '', - 'options.bt-enable-hook-after-hash-check.name': '', - 'options.bt-enable-hook-after-hash-check.description': '', - 'options.bt-enable-lpd.name': '', - 'options.bt-enable-lpd.description': '', - 'options.bt-exclude-tracker.name': '', - 'options.bt-exclude-tracker.description': '', - 'options.bt-external-ip.name': '', - 'options.bt-external-ip.description': '', - 'options.bt-force-encryption.name': '', - 'options.bt-force-encryption.description': '', - 'options.bt-hash-check-seed.name': '', - 'options.bt-hash-check-seed.description': '', - 'options.bt-max-open-files.name': '', - 'options.bt-max-open-files.description': '', - 'options.bt-max-peers.name': '', - 'options.bt-max-peers.description': '', - 'options.bt-metadata-only.name': '', - 'options.bt-metadata-only.description': '', - 'options.bt-min-crypto-level.name': '', - 'options.bt-min-crypto-level.description': '', - 'options.bt-prioritize-piece.name': '', - 'options.bt-prioritize-piece.description': '', - 'options.bt-remove-unselected-file.name': '', - 'options.bt-remove-unselected-file.description': '', - 'options.bt-require-crypto.name': '', - 'options.bt-require-crypto.description': '', - 'options.bt-request-peer-speed-limit.name': '', - 'options.bt-request-peer-speed-limit.description': '', - 'options.bt-save-metadata.name': '', - 'options.bt-save-metadata.description': '', - 'options.bt-seed-unverified.name': '', - 'options.bt-seed-unverified.description': '', - 'options.bt-stop-timeout.name': '', - 'options.bt-stop-timeout.description': '', - 'options.bt-tracker.name': '', - 'options.bt-tracker.description': '', - 'options.bt-tracker-connect-timeout.name': '', - 'options.bt-tracker-connect-timeout.description': '', - 'options.bt-tracker-interval.name': '', - 'options.bt-tracker-interval.description': '', - 'options.bt-tracker-timeout.name': '', - 'options.bt-tracker-timeout.description': '', - 'options.dht-file-path.name': '', - 'options.dht-file-path.description': '', - 'options.dht-file-path6.name': '', - 'options.dht-file-path6.description': '', - 'options.dht-listen-port.name': '', - 'options.dht-listen-port.description': '', - 'options.dht-message-timeout.name': '', - 'options.dht-message-timeout.description': '', - 'options.enable-dht.name': '', - 'options.enable-dht.description': '', - 'options.enable-dht6.name': '', - 'options.enable-dht6.description': '', - 'options.enable-peer-exchange.name': '', - 'options.enable-peer-exchange.description': '', - 'options.follow-torrent.name': '', - 'options.follow-torrent.description': '', - 'options.listen-port.name': '', - 'options.listen-port.description': '', - 'options.max-overall-upload-limit.name': '', - 'options.max-overall-upload-limit.description': '', - 'options.max-upload-limit.name': '', - 'options.max-upload-limit.description': '', - 'options.peer-id-prefix.name': '', - 'options.peer-id-prefix.description': '', - 'options.seed-ratio.name': '', - 'options.seed-ratio.description': '', - 'options.seed-time.name': '', - 'options.seed-time.description': '', - 'options.follow-metalink.name': '', - 'options.follow-metalink.description': '', - 'options.metalink-base-uri.name': '', - 'options.metalink-base-uri.description': '', - 'options.metalink-language.name': '', - 'options.metalink-language.description': '', - 'options.metalink-location.name': '', - 'options.metalink-location.description': '', - 'options.metalink-os.name': '', - 'options.metalink-os.description': '', - 'options.metalink-version.name': '', - 'options.metalink-version.description': '', - 'options.metalink-preferred-protocol.name': '', - 'options.metalink-preferred-protocol.description': '', - 'options.metalink-enable-unique-protocol.name': '', - 'options.metalink-enable-unique-protocol.description': '', - 'options.enable-rpc.name': 'Enable JSON-RPC/XML-RPC Server', - 'options.enable-rpc.description': '', - 'options.pause-metadata.name': 'Pause After Metadata Downloaded', - 'options.pause-metadata.description': 'Pause downloads created as a result of metadata download. There are 3 types of metadata downloads in aria2: (1) downloading .torrent file. (2) downloading torrent metadata using magnet link. (3) downloading metalink file. These metadata downloads will generate downloads using their metadata. This option pauses these subsequent downloads. This option is effective only when --enable-rpc=true is given.', - 'options.rpc-allow-origin-all.name': 'Allow All Origin Request', - 'options.rpc-allow-origin-all.description': 'Add Access-Control-Allow-Origin header field with value * to the RPC response.', - 'options.rpc-listen-all.name': 'Listen on All Network Interfaces', - 'options.rpc-listen-all.description': 'Listen incoming JSON-RPC/XML-RPC requests on all network interfaces. If false is given, listen only on local loopback interface.', - 'options.rpc-listen-port.name': 'Listen Port', - 'options.rpc-listen-port.description': '', - 'options.rpc-max-request-size.name': 'Max Request Size', - 'options.rpc-max-request-size.description': 'Set max size of JSON-RPC/XML-RPC request. If aria2 detects the request is more than SIZE bytes, it drops connection.', - 'options.rpc-save-upload-metadata.name': 'Save Upload Metadata', - 'options.rpc-save-upload-metadata.description': 'Save the uploaded torrent or metalink meta data in the directory specified by --dir option. The file name consists of SHA-1 hash hex string of meta data plus extension. For torrent, the extension is \'.torrent\'. For metalink, it is \'.meta4\'. If false is given to this option, the downloads added by aria2.addTorrent() or aria2.addMetalink() will not be saved by --save-session option.', - 'options.rpc-secure.name': 'Enable SSL/TLS', - 'options.rpc-secure.description': 'RPC transport will be encrypted by SSL/TLS. The RPC clients must use https scheme to access the server. For WebSocket client, use wss scheme. Use --rpc-certificate and --rpc-private-key options to specify the server certificate and private key.', - 'options.allow-overwrite.name': '', - 'options.allow-overwrite.description': '', - 'options.allow-piece-length-change.name': '', - 'options.allow-piece-length-change.description': '', - 'options.always-resume.name': '', - 'options.always-resume.description': '', - 'options.async-dns.name': '', - 'options.async-dns.description': '', - 'options.auto-file-renaming.name': '', - 'options.auto-file-renaming.description': '', - 'options.auto-save-interval.name': '', - 'options.auto-save-interval.description': '', - 'options.conditional-get.name': '', - 'options.conditional-get.description': '', - 'options.conf-path.name': '', - 'options.conf-path.description': '', - 'options.console-log-level.name': '', - 'options.console-log-level.description': '', - 'options.daemon.name': '', - 'options.daemon.description': '', - 'options.deferred-input.name': '', - 'options.deferred-input.description': '', - 'options.disable-ipv6.name': '', - 'options.disable-ipv6.description': '', - 'options.disk-cache.name': '', - 'options.disk-cache.description': '', - 'options.download-result.name': '', - 'options.download-result.description': '', - 'options.dscp.name': '', - 'options.dscp.description': '', - 'options.rlimit-nofile.name': '', - 'options.rlimit-nofile.description': '', - 'options.enable-color.name': '', - 'options.enable-color.description': '', - 'options.enable-mmap.name': '', - 'options.enable-mmap.description': '', - 'options.event-poll.name': '', - 'options.event-poll.description': '', - 'options.file-allocation.name': '', - 'options.file-allocation.description': '', - 'options.force-save.name': '', - 'options.force-save.description': '', - 'options.hash-check-only.name': '', - 'options.hash-check-only.description': '', - 'options.human-readable.name': '', - 'options.human-readable.description': '', - 'options.max-download-result.name': '', - 'options.max-download-result.description': '', - 'options.max-mmap-limit.name': '', - 'options.max-mmap-limit.description': '', - 'options.max-resume-failure-tries.name': '', - 'options.max-resume-failure-tries.description': '', - 'options.min-tls-version.name': '', - 'options.min-tls-version.description': '', - 'options.log-level.name': '', - 'options.log-level.description': '', - 'options.piece-length.name': '', - 'options.piece-length.description': '', - 'options.optimize-concurrent-downloads.name': '', - 'options.optimize-concurrent-downloads.description': '', - 'options.show-console-readout.name': '', - 'options.show-console-readout.description': '', - 'options.summary-interval.name': '', - 'options.summary-interval.description': '', - 'options.max-overall-download-limit.name': '', - 'options.max-overall-download-limit.description': '', - 'options.max-download-limit.name': '', - 'options.max-download-limit.description': '', - 'options.no-conf.name': '', - 'options.no-conf.description': '', - 'options.no-file-allocation-limit.name': '', - 'options.no-file-allocation-limit.description': '', - 'options.parameterized-uri.name': '', - 'options.parameterized-uri.description': '', - 'options.quiet.name': '', - 'options.quiet.description': '', - 'options.realtime-chunk-checksum.name': '', - 'options.realtime-chunk-checksum.description': '', - 'options.remove-control-file.name': '', - 'options.remove-control-file.description': '', - 'options.save-session.name': '', - 'options.save-session.description': '', - 'options.save-session-interval.name': '', - 'options.save-session-interval.description': '', - 'options.socket-recv-buffer-size.name': '', - 'options.socket-recv-buffer-size.description': '', - 'options.stop.name': '', - 'options.stop.description': '', - 'options.truncate-console-readout.name': '', - 'options.truncate-console-readout.description': '' + 'options': { + 'dir.name': 'Download Path', + 'dir.description': '', + 'log.name': 'Log File', + 'log.description': 'The file name of the log file. If - is specified, log is written to stdout. If empty string("") is specified, or this option is omitted, no log is written to disk at all.', + 'max-concurrent-downloads.name': 'Max Concurrent Downloads', + 'max-concurrent-downloads.description': '', + 'check-integrity.name': 'Check Integrity', + 'check-integrity.description': 'Check file integrity by validating piece hashes or a hash of entire file. This option has effect only in BitTorrent, Metalink downloads with checksums or HTTP(S)/FTP downloads with --checksum option.', + 'continue.name': 'Resume Download', + 'continue.description': 'Continue downloading a partially downloaded file. Use this option to resume a download started by a web browser or another program which downloads files sequentially from the beginning. Currently this option is only applicable to HTTP(S)/FTP downloads.', + 'all-proxy.name': 'Proxy Server', + 'all-proxy.description': 'Use a proxy server for all protocols. To override a previously defined proxy, use "". You also can override this setting and specify a proxy server for a particular protocol using --http-proxy, --https-proxy and --ftp-proxy This affects all downloads. The format of PROXY is [http://][USER:PASSWORD@]HOST[:PORT].', + 'all-proxy-user.name': 'Proxy User Name', + 'all-proxy-user.description': '', + 'all-proxy-passwd.name': 'Proxy Password', + 'all-proxy-passwd.description': '', + 'connect-timeout.name': 'Connect Timeout', + 'connect-timeout.description': 'Set the connect timeout in seconds to establish connection to HTTP/FTP/proxy server. After the connection is established, this option makes no effect and --timeout option is used instead.', + 'dry-run.name': 'Dry Run', + 'dry-run.description': 'If true is given, aria2 just checks whether the remote file is available and doesn\'t download data. This option has effect on HTTP/FTP download. BitTorrent downloads are canceled if true is specified.', + 'lowest-speed-limit.name': 'Lowest Speed Limit', + 'lowest-speed-limit.description': 'Close connection if download speed is lower than or equal to this value(bytes per sec). 0 means aria2 does not have a lowest speed limit. You can append K or M (1K = 1024, 1M = 1024K). This option does not affect BitTorrent downloads.', + 'max-connection-per-server.name': 'Max Connection Per Server', + 'max-connection-per-server.description': '', + 'max-file-not-found.name': 'Max File Not Found Try Times', + 'max-file-not-found.description': '', + 'max-tries.name': 'Max Try Times', + 'max-tries.description': 'Set number of tries. 0 means unlimited.', + 'min-split-size.name': 'Min Split Size', + 'min-split-size.description': 'aria2 does not split less than 2*SIZE byte range. For example, let\'s consider downloading 20MiB file. If SIZE is 10M, aria2 can split file into 2 range [0-10MiB) and [10MiB-20MiB) and download it using 2 sources(if --split >= 2, of course). If SIZE is 15M, since 2*15M > 20MiB, aria2 does not split file and download it using 1 source. You can append K or M (1K = 1024, 1M = 1024K). Possible Values: 1M-1024M.', + 'netrc-path.name': '.netrc Path', + 'netrc-path.description': '', + 'no-netrc.name': 'Disable netrc', + 'no-netrc.description': '', + 'no-proxy.name': 'No Proxy List', + 'no-proxy.description': 'Specify a comma separated list of host names, domains and network addresses with or without a subnet mask where no proxy should be used.', + 'proxy-method.name': 'Proxy Method', + 'proxy-method.description': 'Set the method to use in proxy request. METHOD is either get or tunnel. HTTPS downloads always use tunnel regardless of this option.', + 'remote-time.name': 'Remote File Timestamp', + 'remote-time.description': 'Retrieve timestamp of the remote file from the remote HTTP/FTP server and if it is available, apply it to the local file.', + 'reuse-uri.name': 'Reuse Uri', + 'reuse-uri.description': 'Reuse already used URIs if no unused URIs are left.', + 'retry-wait.name': 'Retry Wait', + 'retry-wait.description': 'Set the seconds to wait between retries. When SEC > 0, aria2 will retry downloads when the HTTP server returns a 503 response. ', + 'server-stat-of.name': 'Server Stat Output', + 'server-stat-of.description': 'Specify the file name to which performance profile of the servers is saved. You can load saved data using --server-stat-if option.', + 'server-stat-timeout.name': 'Server Stat Timeout', + 'server-stat-timeout.description': 'Specifies timeout in seconds to invalidate performance profile of the servers since the last contact to them.', + 'split.name': 'Split Count', + 'split.description': 'Download a file using N connections. If more than N URIs are given, first N URIs are used and remaining URIs are used for backup. If less than N URIs are given, those URIs are used more than once so that N connections total are made simultaneously. The number of connections to the same host is restricted by the --max-connection-per-server option. See also the --min-split-size option.', + 'stream-piece-selector.name': 'Piece Selection Algorithm', + 'stream-piece-selector.description': 'Specify piece selection algorithm used in HTTP/FTP download. Piece means fixed length segment which is downloaded in parallel in segmented download. If default is given, aria2 selects piece so that it reduces the number of establishing connection. This is reasonable default behavior because establishing connection is an expensive operation. If inorder is given, aria2 selects piece which has minimum index. Index=0 means first of the file. This will be useful to view movie while downloading it. --enable-http-pipelining option may be useful to reduce re-connection overhead. Please note that aria2 honors --min-split-size option, so it will be necessary to specify a reasonable value to --min-split-size option. If random is given, aria2 selects piece randomly. Like inorder, --min-split-size option is honored. If geom is given, at the beginning aria2 selects piece which has minimum index like inorder, but it exponentially increasingly keeps space from previously selected piece. This will reduce the number of establishing connection and at the same time it will download the beginning part of the file first. This will be useful to view movie while downloading it.', + 'timeout.name': 'Timeout', + 'timeout.description': '', + 'uri-selector.name': 'URI Selection Algorithm', + 'uri-selector.description': 'Specify URI selection algorithm. The possible values are inorder, feedback and adaptive. If inorder is given, URI is tried in the order appeared in the URI list. If feedback is given, aria2 uses download speed observed in the previous downloads and choose fastest server in the URI list. This also effectively skips dead mirrors. The observed download speed is a part of performance profile of servers mentioned in --server-stat-of and --server-stat-if If adaptive is given, selects one of the best mirrors for the first and reserved connections. For supplementary ones, it returns mirrors which has not been tested yet, and if each of them has already been tested, returns mirrors which has to be tested again. Otherwise, it doesn\'t select anymore mirrors. Like feedback, it uses a performance profile of servers.', + 'check-certificate.name': 'Check Certificate', + 'check-certificate.description': '', + 'http-accept-gzip.name': 'Accept GZip', + 'http-accept-gzip.description': 'Send Accept: deflate, gzip request header and inflate response if remote server responds with Content-Encoding: gzip or Content-Encoding: deflate.', + 'http-auth-challenge.name': 'HTTP Auth Challenge', + 'http-auth-challenge.description': 'Send HTTP authorization header only when it is requested by the server. If false is set, then authorization header is always sent to the server. There is an exception: if user name and password are embedded in URI, authorization header is always sent to the server regardless of this option.', + 'http-no-cache.name': 'No Cache', + 'http-no-cache.description': 'Send Cache-Control: no-cache and Pragma: no-cache header to avoid cached content. If false is given, these headers are not sent and you can add Cache-Control header with a directive you like using --header option.', + 'http-user.name': 'HTTP Default User Name', + 'http-user.description': '', + 'http-passwd.name': 'HTTP Default Password', + 'http-passwd.description': '', + 'http-proxy.name': 'HTTP Proxy Server', + 'http-proxy.description': '', + 'http-proxy-user.name': 'HTTP Proxy User Name', + 'http-proxy-user.description': '', + 'http-proxy-passwd.name': 'HTTP Proxy Password', + 'http-proxy-passwd.description': '', + 'https-proxy.name': 'HTTPS Proxy Server', + 'https-proxy.description': '', + 'https-proxy-user.name': 'HTTPS Proxy User Name', + 'https-proxy-user.description': '', + 'https-proxy-passwd.name': 'HTTPS Proxy Password', + 'https-proxy-passwd.description': '', + 'referer.name': 'Referer', + 'referer.description': 'Set an http referrer (Referer). This affects all http/https downloads. If * is given, the download URI is also used as the referrer. This may be useful when used together with the --parameterized-uri option.', + 'enable-http-keep-alive.name': 'Enable Persistent Connection', + 'enable-http-keep-alive.description': 'Enable HTTP/1.1 persistent connection.', + 'enable-http-pipelining.name': 'Enable HTTP Pipelining', + 'enable-http-pipelining.description': 'Enable HTTP/1.1 pipelining.', + 'header.name': 'Custom Header', + 'header.description': 'Append HEADER to HTTP request header.', + 'save-cookies.name': 'Cookies Path', + 'save-cookies.description': 'Save Cookies to FILE in Mozilla/Firefox(1.x/2.x)/ Netscape format. If FILE already exists, it is overwritten. Session Cookies are also saved and their expiry values are treated as 0.', + 'use-head.name': 'Use HEAD Method', + 'use-head.description': 'Use HEAD method for the first request to the HTTP server.', + 'user-agent.name': 'Custom User Agent', + 'user-agent.description': '', + 'ftp-user.name': 'FTP Default User Name', + 'ftp-user.description': '', + 'ftp-passwd.name': 'FTP Default Password', + 'ftp-passwd.description': 'If user name is embedded but password is missing in URI, aria2 tries to resolve password using .netrc. If password is found in .netrc, then use it as password. If not, use the password specified in this option.', + 'ftp-pasv.name': 'Passive Mode', + 'ftp-pasv.description': 'Use the passive mode in FTP. If false is given, the active mode will be used. This option is ignored for SFTP transfer.', + 'ftp-proxy.name': 'FTP Proxy Server', + 'ftp-proxy.description': '', + 'ftp-proxy-user.name': 'FTP Proxy User Name', + 'ftp-proxy-user.description': '', + 'ftp-proxy-passwd.name': 'FTP Proxy Password', + 'ftp-proxy-passwd.description': '', + 'ftp-type.name': 'Transfer Type', + 'ftp-type.description': '', + 'ftp-reuse-connection.name': 'Reuse Connection', + 'ftp-reuse-connection.description': '', + 'ssh-host-key-md.name': 'SSH Public Key Checksum', + 'ssh-host-key-md.description': 'Set checksum for SSH host public key. TYPE is hash type. The supported hash type is sha-1 or md5. DIGEST is hex digest. For example: sha-1=b030503d4de4539dc7885e6f0f5e256704edf4c3. This option can be used to validate server\'s public key when SFTP is used. If this option is not set, which is default, no validation takes place.', + 'bt-detach-seed-only.name': '', + 'bt-detach-seed-only.description': '', + 'bt-enable-hook-after-hash-check.name': '', + 'bt-enable-hook-after-hash-check.description': '', + 'bt-enable-lpd.name': '', + 'bt-enable-lpd.description': '', + 'bt-exclude-tracker.name': '', + 'bt-exclude-tracker.description': '', + 'bt-external-ip.name': '', + 'bt-external-ip.description': '', + 'bt-force-encryption.name': '', + 'bt-force-encryption.description': '', + 'bt-hash-check-seed.name': '', + 'bt-hash-check-seed.description': '', + 'bt-max-open-files.name': '', + 'bt-max-open-files.description': '', + 'bt-max-peers.name': '', + 'bt-max-peers.description': '', + 'bt-metadata-only.name': '', + 'bt-metadata-only.description': '', + 'bt-min-crypto-level.name': '', + 'bt-min-crypto-level.description': '', + 'bt-prioritize-piece.name': '', + 'bt-prioritize-piece.description': '', + 'bt-remove-unselected-file.name': '', + 'bt-remove-unselected-file.description': '', + 'bt-require-crypto.name': '', + 'bt-require-crypto.description': '', + 'bt-request-peer-speed-limit.name': '', + 'bt-request-peer-speed-limit.description': '', + 'bt-save-metadata.name': '', + 'bt-save-metadata.description': '', + 'bt-seed-unverified.name': '', + 'bt-seed-unverified.description': '', + 'bt-stop-timeout.name': '', + 'bt-stop-timeout.description': '', + 'bt-tracker.name': '', + 'bt-tracker.description': '', + 'bt-tracker-connect-timeout.name': '', + 'bt-tracker-connect-timeout.description': '', + 'bt-tracker-interval.name': '', + 'bt-tracker-interval.description': '', + 'bt-tracker-timeout.name': '', + 'bt-tracker-timeout.description': '', + 'dht-file-path.name': '', + 'dht-file-path.description': '', + 'dht-file-path6.name': '', + 'dht-file-path6.description': '', + 'dht-listen-port.name': '', + 'dht-listen-port.description': '', + 'dht-message-timeout.name': '', + 'dht-message-timeout.description': '', + 'enable-dht.name': '', + 'enable-dht.description': '', + 'enable-dht6.name': '', + 'enable-dht6.description': '', + 'enable-peer-exchange.name': '', + 'enable-peer-exchange.description': '', + 'follow-torrent.name': '', + 'follow-torrent.description': '', + 'listen-port.name': '', + 'listen-port.description': '', + 'max-overall-upload-limit.name': '', + 'max-overall-upload-limit.description': '', + 'max-upload-limit.name': '', + 'max-upload-limit.description': '', + 'peer-id-prefix.name': '', + 'peer-id-prefix.description': '', + 'seed-ratio.name': '', + 'seed-ratio.description': '', + 'seed-time.name': '', + 'seed-time.description': '', + 'follow-metalink.name': '', + 'follow-metalink.description': '', + 'metalink-base-uri.name': '', + 'metalink-base-uri.description': '', + 'metalink-language.name': '', + 'metalink-language.description': '', + 'metalink-location.name': '', + 'metalink-location.description': '', + 'metalink-os.name': '', + 'metalink-os.description': '', + 'metalink-version.name': '', + 'metalink-version.description': '', + 'metalink-preferred-protocol.name': '', + 'metalink-preferred-protocol.description': '', + 'metalink-enable-unique-protocol.name': '', + 'metalink-enable-unique-protocol.description': '', + 'enable-rpc.name': 'Enable JSON-RPC/XML-RPC Server', + 'enable-rpc.description': '', + 'pause-metadata.name': 'Pause After Metadata Downloaded', + 'pause-metadata.description': 'Pause downloads created as a result of metadata download. There are 3 types of metadata downloads in aria2: (1) downloading .torrent file. (2) downloading torrent metadata using magnet link. (3) downloading metalink file. These metadata downloads will generate downloads using their metadata. This option pauses these subsequent downloads. This option is effective only when --enable-rpc=true is given.', + 'rpc-allow-origin-all.name': 'Allow All Origin Request', + 'rpc-allow-origin-all.description': 'Add Access-Control-Allow-Origin header field with value * to the RPC response.', + 'rpc-listen-all.name': 'Listen on All Network Interfaces', + 'rpc-listen-all.description': 'Listen incoming JSON-RPC/XML-RPC requests on all network interfaces. If false is given, listen only on local loopback interface.', + 'rpc-listen-port.name': 'Listen Port', + 'rpc-listen-port.description': '', + 'rpc-max-request-size.name': 'Max Request Size', + 'rpc-max-request-size.description': 'Set max size of JSON-RPC/XML-RPC request. If aria2 detects the request is more than SIZE bytes, it drops connection.', + 'rpc-save-upload-metadata.name': 'Save Upload Metadata', + 'rpc-save-upload-metadata.description': 'Save the uploaded torrent or metalink meta data in the directory specified by --dir option. The file name consists of SHA-1 hash hex string of meta data plus extension. For torrent, the extension is \'.torrent\'. For metalink, it is \'.meta4\'. If false is given to this option, the downloads added by aria2.addTorrent() or aria2.addMetalink() will not be saved by --save-session option.', + 'rpc-secure.name': 'Enable SSL/TLS', + 'rpc-secure.description': 'RPC transport will be encrypted by SSL/TLS. The RPC clients must use https scheme to access the server. For WebSocket client, use wss scheme. Use --rpc-certificate and --rpc-private-key options to specify the server certificate and private key.', + 'allow-overwrite.name': '', + 'allow-overwrite.description': '', + 'allow-piece-length-change.name': '', + 'allow-piece-length-change.description': '', + 'always-resume.name': '', + 'always-resume.description': '', + 'async-dns.name': '', + 'async-dns.description': '', + 'auto-file-renaming.name': '', + 'auto-file-renaming.description': '', + 'auto-save-interval.name': '', + 'auto-save-interval.description': '', + 'conditional-get.name': '', + 'conditional-get.description': '', + 'conf-path.name': '', + 'conf-path.description': '', + 'console-log-level.name': '', + 'console-log-level.description': '', + 'daemon.name': '', + 'daemon.description': '', + 'deferred-input.name': '', + 'deferred-input.description': '', + 'disable-ipv6.name': '', + 'disable-ipv6.description': '', + 'disk-cache.name': '', + 'disk-cache.description': '', + 'download-result.name': '', + 'download-result.description': '', + 'dscp.name': '', + 'dscp.description': '', + 'rlimit-nofile.name': '', + 'rlimit-nofile.description': '', + 'enable-color.name': '', + 'enable-color.description': '', + 'enable-mmap.name': '', + 'enable-mmap.description': '', + 'event-poll.name': '', + 'event-poll.description': '', + 'file-allocation.name': '', + 'file-allocation.description': '', + 'force-save.name': '', + 'force-save.description': '', + 'hash-check-only.name': '', + 'hash-check-only.description': '', + 'human-readable.name': '', + 'human-readable.description': '', + 'max-download-result.name': '', + 'max-download-result.description': '', + 'max-mmap-limit.name': '', + 'max-mmap-limit.description': '', + 'max-resume-failure-tries.name': '', + 'max-resume-failure-tries.description': '', + 'min-tls-version.name': '', + 'min-tls-version.description': '', + 'log-level.name': '', + 'log-level.description': '', + 'piece-length.name': '', + 'piece-length.description': '', + 'optimize-concurrent-downloads.name': '', + 'optimize-concurrent-downloads.description': '', + 'show-console-readout.name': '', + 'show-console-readout.description': '', + 'summary-interval.name': '', + 'summary-interval.description': '', + 'max-overall-download-limit.name': '', + 'max-overall-download-limit.description': '', + 'max-download-limit.name': '', + 'max-download-limit.description': '', + 'no-conf.name': '', + 'no-conf.description': '', + 'no-file-allocation-limit.name': '', + 'no-file-allocation-limit.description': '', + 'parameterized-uri.name': '', + 'parameterized-uri.description': '', + 'quiet.name': '', + 'quiet.description': '', + 'realtime-chunk-checksum.name': '', + 'realtime-chunk-checksum.description': '', + 'remove-control-file.name': '', + 'remove-control-file.description': '', + 'save-session.name': '', + 'save-session.description': '', + 'save-session-interval.name': '', + 'save-session-interval.description': '', + 'socket-recv-buffer-size.name': '', + 'socket-recv-buffer-size.description': '', + 'stop.name': '', + 'stop.description': '', + 'truncate-console-readout.name': '', + 'truncate-console-readout.description': '' + } }); }]) })(); diff --git a/app/scripts/core/utils.js b/app/scripts/core/utils.js index a5cc08b..67b49f4 100644 --- a/app/scripts/core/utils.js +++ b/app/scripts/core/utils.js @@ -1,7 +1,7 @@ (function () { 'use strict'; - angular.module('ariaNg').factory('utils', ['$location', '$timeout', '$base64', 'SweetAlert', 'translateFilter', 'ariaNgConstants', 'aria2AllOptions', function ($location, $timeout, $base64, SweetAlert, translateFilter, ariaNgConstants, aria2AllOptions) { + angular.module('ariaNg').factory('utils', ['$location', '$timeout', '$base64', 'SweetAlert', '$translate', 'ariaNgConstants', 'aria2AllOptions', function ($location, $timeout, $base64, SweetAlert, $translate, ariaNgConstants, aria2AllOptions) { var calculateDownloadRemainTime = function (remainBytes, downloadSpeed) { if (downloadSpeed == 0) { return 0; @@ -20,10 +20,10 @@ alert: function (text) { $timeout(function () { SweetAlert.swal({ - title: translateFilter('Error'), - text: translateFilter(text), + title: $translate.instant('Error'), + text: $translate.instant(text), type: 'error', - confirmButtonText: translateFilter('OK') + confirmButtonText: $translate.instant('OK') }); }, 100); }, @@ -136,7 +136,7 @@ } if (!taskName) { - taskName = translateFilter('Unknown'); + taskName = $translate.instant('Unknown'); } return taskName; diff --git a/app/scripts/filters/taskStatus.js b/app/scripts/filters/taskStatus.js index 2222817..2f21f95 100644 --- a/app/scripts/filters/taskStatus.js +++ b/app/scripts/filters/taskStatus.js @@ -1,7 +1,7 @@ (function () { 'use strict'; - angular.module("ariaNg").filter('taskStatus', ['translateFilter', function (translateFilter) { + angular.module("ariaNg").filter('taskStatus', ['$translate', function ($translate) { return function (task) { if (!task) { return ''; @@ -9,20 +9,20 @@ if (task.status == 'active') { if (task.seeder === true || task.seeder === 'true') { - return translateFilter('Seeding'); + return $translate.instant('Seeding'); } else { - return translateFilter('Downloading'); + return $translate.instant('Downloading'); } } else if (task.status == 'waiting') { - return translateFilter('Waiting'); + return $translate.instant('Waiting'); } else if (task.status == 'paused') { - return translateFilter('Paused'); + return $translate.instant('Paused'); } else if (task.status == 'complete') { - return translateFilter('Completed'); + return $translate.instant('Completed'); } else if (task.status == 'error') { - return translateFilter('Error Occurred') + (task.errorCode ? ' (' + task.errorCode + ')' : ''); + return $translate.instant('Error Occurred') + (task.errorCode ? ' (' + task.errorCode + ')' : ''); } else if (task.status == 'removed') { - return translateFilter('Removed'); + return $translate.instant('Removed'); } else { return ''; }