From c159ef671d1e868b20b388b4674bce55935e96f9 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Thu, 18 Sep 2014 00:26:22 +0000 Subject: [PATCH] removed unused strings --- onionshare/strings.json | 30 ------------------------------ onionshare_gui/file_selection.py | 1 + test/onionshare_strings_test.py | 4 ++-- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/onionshare/strings.json b/onionshare/strings.json index f675df57..a168ef51 100644 --- a/onionshare/strings.json +++ b/onionshare/strings.json @@ -1,5 +1,4 @@ { "en": { - "calculating_sha1": "Calculating SHA1 checksum.", "connecting_ctrlport": "Connecting to Tor control port to set up hidden service on port {0}.", "cant_connect_ctrlport": "Can't connect to Tor control port on port {0}. OnionShare requires Tor Browser to be running in the background to work. If you don't have it you can get it from https://www.torproject.org/.", "cant_connect_socksport": "Can't connect to Tor SOCKS5 server on port {0}. OnionShare requires Tor Browser to be running in the background to work. If you don't have it you can get it from https://www.torproject.org/.", @@ -14,10 +13,8 @@ "download_size": "Download size", "filename": "Filename", "size": "Size", - "sha1_checksum": "SHA1 checksum", "download_page_loaded": "Download page loaded", "other_page_loaded": "URL loaded", - "tails_requires_root": "You must run OnionShare as root in Tails", "close_on_finish": "Stop server automatically", "choose_file": "Choose a file to share", "closing_automatically": "Closing automatically because download finished", @@ -42,21 +39,17 @@ "gui_copied_url": "Copied URL to clipboard", "gui_starting_server": "Please wait, starting server..." }, "no": { - "calculating_sha1": "Kalkulerer SHA1 sjekksum.", "connecting_ctrlport": "Kobler til Tors kontroll-port for å sette opp en gjemt tjeneste på port {0}.", "cant_connect_ctrlport": "Klarte ikke å koble til Tors kontroll-porter {0}. Sjekk at Tor kjører.", "give_this_url": "Gi personen du vil sende filen til denne URL-en:", "ctrlc_to_stop": "Trykk Ctrl+C for å stoppe serveren.", "not_a_file": "{0} er ikke en fil.", - "sha1_checksum": "SHA1 sjekksum", "gui_copied_url": "Kopierte URL-en til utklippstavlen", "download_page_loaded": "Nedlastingsside lastet", "other_page_loaded": "En annen side har blitt lastet", - "tails_requires_root": "OnionShare kan må kjøres som administrator i Tails", "close_on_finish": "Lukk automatisk", "choose_file": "Velg en fil å dele" }, "es": { - "calculating_sha1": "Calculando suma de verificación SHA1.", "connecting_ctrlport": "Conectando a puerto control de Tor para configurar servicio oculto en puerto {0}.", "cant_connect_ctrlport": "No se pudo conectar a puerto control de Tor en puertos {0}. ¿Está funcionando Tor?", "cant_connect_socksport": "No se pudo conectar al servidor SOCKS5 de Tor en el puerto {0}. ¿Está funcionando Tor?", @@ -71,10 +64,8 @@ "download_size": "Tamaño de la descarga", "filename": "Archivo", "size": "Tamaño", - "sha1_checksum": "Suma de verificación SHA1", "download_page_loaded": "La página de descarga está lista.", "other_page_loaded": "La URL está lista.", - "tails_requires_root": "Debe ejecutar OnionShare como root en Tails", "close_on_finish": "Apagar el servidor automáticamente.", "choose_file": "Elija un archivo para compartir", "closing_automatically": "Apagando automáticamente porque la descarga finalizó", @@ -98,7 +89,6 @@ "gui_copied_url": "Se copió la URL en el portapapeles", "gui_starting_server": "Por favor espere, levantando el servidor..." }, "fr": { - "calculating_sha1": "Calculer une somme de contrôle SHA-1.", "connecting_ctrlport": "Connexion au réseau Tor pour mettre en place un Hidden Service sur le port {0}.", "cant_connect_ctrlport": "Impossible de se connecter au port de contrôle Tor sur le port {0}. Est-ce que Tor tourne ?", "preparing_files": "Préparation des fichiers à partager.", @@ -112,10 +102,8 @@ "download_size": "Taille de téléchargement", "filename": "Nom du fichier", "size": "Taille", - "sha1_checksum": "Somme de contrôle SHA1", "download_page_loaded": "Page de téléchargement chargée", "other_page_loaded": "URL chargée", - "tails_requires_root": "Pour utiliser OnionShare sur Tails, il faut utiliser un mot de passe administrateur.", "close_on_finish": "Arrêter le serveur automatiquement", "choose_file": "Sélectionnez un fichier à partager", "closing_automatically": "Fermeture automatique car le téléchargement est fini", @@ -139,21 +127,17 @@ "gui_copied_url": "URL copié dans le presse-papier", "gui_starting_server": "Veuillez patienter, le serveur démarre..." }, "it": { - "calculating_sha1": "Calcolo della firma SHA1.", "connecting_ctrlport": "Connessione alla porta di controllo di Tor per inizializzare il servizio nascosto sulla porta {0}.", "cant_connect_ctrlport": "Impossibile connettere alla porta di controllo di Tor tramite le porte {0}. Tor è stato avviato?", "give_this_url": "Comunica questo URL alla persona a cui vuoi inviare il file:", "ctrlc_to_stop": "Premi Ctrl-C per fermare il server", "not_a_file": "{0} non è un file.", - "sha1_checksum": "Firma SHA1", "gui_copied_url": "URL copiato negli appunti", "download_page_loaded": "Pagina di download caricata", "other_page_loaded": "Un altra pagina é stata caricata", - "tails_requires_root": "Con Tails devi avviare OnionShare come utente root", "close_on_finish": "Chiudi automaticamente", "choose_file": "Scegli un file da condividere" }, "nl": { - "calculating_sha1": "SHA1 controlecijfer berekenen.", "connecting_ctrlport": "Verbinden met de Tor controle port om een verborgen service op te zetten op poort {0}.", "cant_connect_ctrlport": "Kan niet verbinden met de Tor controle poort op poorten {0}. Draait Tor?", "preparing_files": "Bestanden om te delen aan het voorbereiden.", @@ -167,10 +151,8 @@ "download_size": "Downloadgrootte", "filename": "Bestandsnaam", "size": "Grootte", - "sha1_checksum": "SHA1 controlecijfer", "download_page_loaded": "Downloadpagina geladen", "other_page_loaded": "URL geladen", - "tails_requires_root": "Je moet OnionShare als root draaien in Tails", "close_on_finish": "Stop server automatisch", "choose_file": "Kies een bestand om te delen", "closing_automatically": "Sluit nu automatisch omdat download gereed is", @@ -194,36 +176,29 @@ "gui_copied_url": "URL gekopieerd naar klembord", "gui_starting_server": "Moment geduld, server wordt gestart..." }, "pt": { - "calculating_sha1": "Calculando checksum SHA1.", "connecting_ctrlport": "Conectando-se à porta de controle Tor para configurar serviço escondido na porta {0}.", "cant_connect_ctrlport": "Não pode conectar à porta de controle Tor na porta {0}. O Tor está rodando?", "give_this_url": "Passe este URL para a pessoa que deve receber o arquivo:", "ctrlc_to_stop": "Pressione Ctrl-C para parar o servidor", "not_a_file": "{0} não é um arquivo.", - "sha1_checksum": "Checksum SHA1", "gui_copied_url": "URL foi copiado para área de transferência", "download_page_loaded": "Página de download carregada", "other_page_loaded": "Outra página tem sido carregada", - "tails_requires_root": "Tem que rodar o OnionShare como root no Tails", "close_on_finish": "Fechar automaticamente", "choose_file": "Escolhe um arquivo para compartilhar" }, "ru": { - "calculating_sha1": "Вычисляется SHA1 хешсумма.", "connecting_ctrlport": "Соединяемся с контрольным портом Tor для создания скрытого сервиса на порту {0}.", "cant_connect_ctrlport": "Невозможно соединиться с контрольным портом Tor на порту {0}. Tor запущен?", "give_this_url": "Отправьте эту ссылку тому человеку, которому вы хотите передать файл:", "ctrlc_to_stop": "Нажмите Ctrl-C чтобы остановить сервер", "not_a_file": "{0} не является файлом.", - "sha1_checksum": "SHA1 хешсумма", "gui_copied_url": "Ссылка скопирована в буфер обмена", "download_page_loaded": "Страница закачки загружена", "other_page_loaded": "Другая страница была загружена", - "tails_requires_root": "Вы должны запустить OnionShare с правами root в Tails", "close_on_finish": "Закрыть автоматически", "choose_file": "Выберите файл", "gui_copy_url": "Скопировать ссылку" }, "de": { - "calculating_sha1": "Kalkuliere SHA1 Checksumme.", "connecting_ctrlport": "Verbinde zum Tor-Kontrollport um den versteckten Dienst auf Port {0} laufen zu lassen.", "cant_connect_ctrlport": "Konnte keine Verbindung zum Tor-Kontrollport auf Port {0} aufbauen. Läuft Tor?", "preparing_files": "Dateien werden vorbereitet.", @@ -237,10 +212,8 @@ "download_size": "Dateigrösse", "filename": "Dateiname", "size": "Dateigröße", - "sha1_checksum": "SHA1 Checksumme", "download_page_loaded": "Seite geladen", "other_page_loaded": "URL geladen", - "tails_requires_root": "Um OnionShare in Tails zu benutzen, benötigen Sie root", "close_on_finish": "Den Server automatisch anhalten", "choose_file": "Wählen Sie eine Datei", "closing_automatically": "Halte automatisch an, da der Download beendet wurde", @@ -264,17 +237,14 @@ "gui_copied_url": "URL wurde in die Zwischenablage kopiert", "gui_starting_server": "Bitte warten, der Server startet..." },"tr": { - "calculating_sha1": "SHA1 özeti hesaplanıyor.", "connecting_ctrlport": "{0} portundaki gizli servis kurulumu için Tor kontrol portuna bağlanıyor.", "cant_connect_ctrlport": "Tor kontrol {0} portuna bağlanamıyor. Tor çalışıyor mu?", "give_this_url": "Dosyayı gönderdiğin kişiye bu URL'i verin:", "ctrlc_to_stop": "Sunucuyu durdurmak için, Ctrl-C basın", "not_a_file": "{0} dosya değil.", - "sha1_checksum": "SHA1 özeti", "gui_copied_url": "Panoya kopyalanan URL", "download_page_loaded": "İndirme sayfası yüklendi", "other_page_loaded": "Diğer sayfa yüklendi", - "tails_requires_root": "Tails'da OnionShare root olarak çalışır", "close_on_finish": "Kendiliğinden kapan", "choose_file": "Paylaşım için bir dosya seç", "gui_copy_url": "URL Kopyala" diff --git a/onionshare_gui/file_selection.py b/onionshare_gui/file_selection.py index d5c21dca..4a8aa2dc 100644 --- a/onionshare_gui/file_selection.py +++ b/onionshare_gui/file_selection.py @@ -162,6 +162,7 @@ class FileSelection(QtGui.QVBoxLayout): # add the widgets self.addWidget(self.file_list) self.addLayout(button_layout) + self.addWidget(self.filesize_warning) self.update() diff --git a/test/onionshare_strings_test.py b/test/onionshare_strings_test.py index 16a65023..f4ad5a87 100644 --- a/test/onionshare_strings_test.py +++ b/test/onionshare_strings_test.py @@ -29,11 +29,11 @@ def test_load_strings_defaults_to_english(): "load_strings() loads English by default" locale.getdefaultlocale = lambda: ('en_US', 'UTF-8') strings.load_strings() - assert strings._('calculating_sha1') == "Calculating SHA1 checksum." + assert strings._('wait_for_hs') == "Waiting for HS to be ready:" def test_load_strings_loads_other_languages(): "load_strings() loads other languages in different locales" locale.getdefaultlocale = lambda: ('fr_FR', 'UTF-8') strings.load_strings("fr") - assert strings._('calculating_sha1') == "Calculer une somme de contrôle SHA-1." + assert strings._('wait_for_hs') == "En attente du HS:"