[Pkg-privacy-commits] [onionshare] 13/66: Added estimated time remaining strings to English locale file

Ulrike Uhlig u-guest at moszumanska.debian.org
Wed Apr 13 22:17:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to branch master
in repository onionshare.

commit 41b3e6ab9d6c20d3de8e4ae09699492151d0631b
Author: Micah Lee <micah at micahflee.com>
Date:   Fri Feb 12 08:58:29 2016 -0800

    Added estimated time remaining strings to English locale file
---
 locale/en.json              | 5 ++++-
 onionshare_gui/downloads.py | 6 +++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/locale/en.json b/locale/en.json
index b6aa60a..e45a2fa 100644
--- a/locale/en.json
+++ b/locale/en.json
@@ -41,5 +41,8 @@
     "gui_please_wait": "Please wait...",
     "error_hs_dir_cannot_create": "Cannot create hidden service dir {0:s}",
     "error_hs_dir_not_writable": "Hidden service dir {0:s} is not writable",
-    "using_ephemeral": "Staring ephemeral Tor hidden service and awaiting publication"
+    "using_ephemeral": "Staring ephemeral Tor hidden service and awaiting publication",
+    "gui_download_progress_complete": "%p%, Time Elapsed: {0:s}",
+    "gui_download_progress_starting": "{0:s}, %p% (Computing ETA)",
+    "gui_download_progress_eta": "{0:s}, ETA: {1:s}, %p%"
 }
diff --git a/onionshare_gui/downloads.py b/onionshare_gui/downloads.py
index 8b563d1..054db3e 100644
--- a/onionshare_gui/downloads.py
+++ b/onionshare_gui/downloads.py
@@ -52,7 +52,7 @@ class Download(object):
 
         self.progress_bar.setValue(downloaded_bytes)
         if downloaded_bytes == self.progress_bar.total_bytes:
-            pb_fmt = "%p%, Time Elapsed: {0:s}".format(
+            pb_fmt = strings._('gui_download_progress_complete').format(
                 helpers.format_seconds(time.time() - self.started))
         else:
             elapsed = time.time() - self.started
@@ -60,10 +60,10 @@ class Download(object):
                 # Wait a couple of seconds for the download rate to stabilize.
                 # This prevents an "Windows copy dialog"-esque experience at
                 # the beginning of the download.
-                pb_fmt = "{0:s}, %p% (Computing ETA)".format(
+                pb_fmt = strings._('gui_download_progress_starting').format(
                     helpers.human_readable_filesize(downloaded_bytes))
             else:
-                pb_fmt = "{0:s}, ETA: {1:s}, %p%".format(
+                pb_fmt = strings._('gui_download_progress_eta').format(
                     helpers.human_readable_filesize(downloaded_bytes),
                     self.estimated_time_remaining)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git



More information about the Pkg-privacy-commits mailing list