[tor-commits] [stem/master] Duplicate key in test data

2019-04-21 Thread atagar
commit 658dd5281604eb9c63a91e529501947ecc65ef6b
Author: Damian Johnson 
Date:   Sun Apr 21 16:50:46 2019 -0700

Duplicate key in test data

Oops, pushed a little too soon. The test passed, but accidently defined one 
of
the keys twice.
---
 test/unit/descriptor/bandwidth_file.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/test/unit/descriptor/bandwidth_file.py 
b/test/unit/descriptor/bandwidth_file.py
index ddf171a2..8cb0b942 100644
--- a/test/unit/descriptor/bandwidth_file.py
+++ b/test/unit/descriptor/bandwidth_file.py
@@ -54,7 +54,6 @@ EXPECTED_MEASUREMENT_2 = {
 
 EXPECTED_MEASUREMENT_3 = {
   'desc_bw_obs_last': '70423',
-  'success': '13',
   'desc_bw_obs_mean': '81784',
   'bw_median': '2603',
   'nick': 'whitsun',

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [stem/master] Bandwidth file 1.4 headers

2019-04-21 Thread atagar
commit 0fb5efe1be34949f7fa13eaba8e48fedd4342f2b
Author: Damian Johnson 
Date:   Sun Apr 21 16:47:16 2019 -0700

Bandwidth file 1.4 headers

Parsing the headers added in bandwidth file version 1.4.0.

  https://trac.torproject.org/projects/tor/ticket/30160
---
 run_tests.py  |   9 +--
 stem/descriptor/bandwidth_file.py |  93 ++-
 test/unit/descriptor/bandwidth_file.py| 105 ++
 test/unit/descriptor/data/bandwidth_file_v1.4 |  84 +
 4 files changed, 284 insertions(+), 7 deletions(-)

diff --git a/run_tests.py b/run_tests.py
index d5a16651..89c0b3de 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -109,12 +109,11 @@ def log_traceback(sig, frame):
   for p in multiprocessing.active_children():
 try:
   os.kill(p.pid, sig)
-except OSError as e:
-  # If the process exited before we could kill it
-  if e.errno == errno.ESRCH: # No such process
-pass
+except OSError as exc:
+  if exc.errno == errno.ESRCH:
+pass  # already exited, no such process
   else:
-raise e
+raise exc
 
   if sig == signal.SIGABRT:
 # we need to use os._exit() to abort every thread in the interpreter,
diff --git a/stem/descriptor/bandwidth_file.py 
b/stem/descriptor/bandwidth_file.py
index 75fe2639..a26b2d57 100644
--- a/stem/descriptor/bandwidth_file.py
+++ b/stem/descriptor/bandwidth_file.py
@@ -38,6 +38,53 @@ HEADER_DIV = b'='
 HEADER_DIV_ALT = b''
 
 
+class RecentStats(object):
+  """
+  Statistical information collected over the last 'data_period' (by default
+  five days).
+
+  :var int consensus_count: number of consensuses published during this period
+
+  :var int prioritized_relays: number of relays prioritized to be measured
+  :var int prioritized_relay_lists: number of times a set of relays were
+prioritized to be measured
+
+  :var int measurement_attempts: number of relay measurements we attempted
+  :var int measurement_failures: number of measurement attempts that failed
+
+  :var RelayFailures relay_failures: number of relays we failed to measure
+  """
+
+  def __init__(self):
+self.consensus_count = None
+self.prioritized_relays = None
+self.prioritized_relay_lists = None
+self.measurement_attempts = None
+self.measurement_failures = None
+self.relay_failures = RelayFailures()
+
+
+class RelayFailures(object):
+  """
+  Summary of the number of relays we were unable to measure.
+
+  :var int no_measurement: number of relays that did not have any successful
+measurements
+  :var int insuffient_period: number of relays whos measurements were collected
+over a period that was too small (1 day by default)
+  :var int insufficient_measurements: number of relays we did not collect
+enough measurements for (2 by default)
+  :var int stale: number of relays whos latest measurement is too old (5 days
+by default)
+  """
+
+  def __init__(self):
+self.no_measurement = None
+self.insuffient_period = None
+self.insufficient_measurements = None
+self.stale = None
+
+
 # Converts header attributes to a given type. Malformed fields should be
 # ignored according to the spec.
 
@@ -56,9 +103,15 @@ def _date(val):
 return None  # not an iso formatted date
 
 
+def _csv(val):
+  return map(lambda v: v.strip(), val.split(',')) if val is not None else None
+
+
 # mapping of attributes => (header, type)
 
 HEADER_ATTR = {
+  # version 1.1.0 introduced headers
+
   'version': ('version', _str),
 
   'software': ('software', _str),
@@ -69,11 +122,32 @@ HEADER_ATTR = {
   'created_at': ('file_created', _date),
   'generated_at': ('generator_started', _date),
 
+  # version 1.2.0 additions
+
   'consensus_size': ('number_consensus_relays', _int),
   'eligible_count': ('number_eligible_relays', _int),
   'eligible_percent': ('percent_eligible_relays', _int),
   'min_count': ('minimum_number_eligible_relays', _int),
   'min_percent': ('minimum_percent_eligible_relays', _int),
+
+  # version 1.3.0 additions
+
+  'scanner_country': ('scanner_country', _str),
+  'destinations_countries': ('destinations_countries', _csv),
+
+  # version 1.4.0 additions
+
+  'time_to_report_half_network': ('time_to_report_half_network', _int),
+
+  'recent_stats.consensus_count': ('recent_consensus_count', _int),
+  'recent_stats.prioritized_relay_lists': ('recent_priority_list_count', _int),
+  'recent_stats.prioritized_relays': ('recent_priority_relay_count', _int),
+  'recent_stats.measurement_attempts': ('recent_measurement_attempt_count', 
_int),
+  'recent_stats.measurement_failures': ('recent_measurement_failure_count', 
_int),
+  'recent_stats.relay_failures.no_measurement': 
('recent_measurements_excluded_error_count', _int),
+  'recent_stats.relay_failures.insuffient_period': 
('recent_measurements_excluded_near_count', _int),
+  'recent_stats.relay_failures.insufficient_measurements': 

[tor-commits] [translation/torcheck] Update translations for torcheck

2019-04-21 Thread translation
commit 442eba533c5801a1b058f468e19f3eeddf1c385b
Author: Translation commit bot 
Date:   Sun Apr 21 21:49:45 2019 +

Update translations for torcheck
---
 uz/torcheck.po | 35 ++-
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/uz/torcheck.po b/uz/torcheck.po
index b80f92d56..8d87e5864 100644
--- a/uz/torcheck.po
+++ b/uz/torcheck.po
@@ -2,12 +2,13 @@
 # Copyright (C) 2008-2013 The Tor Project, Inc
 # 
 # Translators:
+# Akmal , 2019
 msgid ""
 msgstr ""
 "Project-Id-Version: Tor Project\n"
 "POT-Creation-Date: 2012-02-16 20:28+PDT\n"
-"PO-Revision-Date: 2019-04-09 01:51+\n"
-"Last-Translator: carolyn \n"
+"PO-Revision-Date: 2019-04-21 21:49+\n"
+"Last-Translator: Akmal \n"
 "Language-Team: Uzbek (http://www.transifex.com/otf/torproject/language/uz/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -17,24 +18,24 @@ msgstr ""
 "Plural-Forms: nplurals=1; plural=0;\n"
 
 msgid "Congratulations. This browser is configured to use Tor."
-msgstr ""
+msgstr "Tabriklaymiz. Endi bu brauzerda Tordan foydalanish mumkin"
 
 msgid ""
 "Please refer to the https://www.torproject.org/\;>Tor website "
 "for further information about using Tor safely.  You are now free to browse "
 "the Internet anonymously."
-msgstr ""
+msgstr "Tor brauzeridan xavfsiz foydalanish haqida batafsil maʼlumot olish 
uchun https://www.torproject.org/\;>Tor saytiga kiring.  Siz endi 
internetda bepul kezishingiz mumkin."
 
 msgid "There is a security update available for Tor Browser."
-msgstr ""
+msgstr "Tor brauzeri uchun xavfsizlik yangilanishi mavjud."
 
 msgid ""
 "https://www.torproject.org/download/\;>Click here to go to the "
 "download page"
-msgstr ""
+msgstr "https://www.torproject.org/download/\;>Yuklab olish 
sahifasini ochish uchun bu yerga bosing"
 
 msgid "Sorry. You are not using Tor."
-msgstr ""
+msgstr "Uzr. Siz Tor brauzeridan foydalanmayapsiz."
 
 msgid ""
 "If you are attempting to use a Tor client, please refer to the ___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/exoneratorproperties] Update translations for exoneratorproperties

2019-04-21 Thread translation
commit 005833a9f79c838c004b251562e6fdd7d32a6af6
Author: Translation commit bot 
Date:   Sun Apr 21 21:45:44 2019 +

Update translations for exoneratorproperties
---
 uz/exonerator.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/uz/exonerator.properties b/uz/exonerator.properties
index ad803d4d2..ca0765d53 100644
--- a/uz/exonerator.properties
+++ b/uz/exonerator.properties
@@ -50,5 +50,5 @@ footer.abouttor.body.link3=contact The Tor Project, Inc.
 footer.aboutexonerator.heading=About ExoneraTor
 footer.aboutexonerator.body=The ExoneraTor service maintains a database of IP 
addresses that have been part of the Tor network. It answers the question 
whether there was a Tor relay running on a given IP address on a given 
date. ExoneraTor may store more than one IP address per relay if relays 
use a different IP address for exiting to the Internet than for registering in 
the Tor network, and it stores whether a relay permitted transit of Tor traffic 
to the open Internet at that time.
 footer.language.name=Ingliz
-footer.language.text=This page is also available in the following languages:
+footer.language.text=Bu sahifa quyidagi tillarda ham mavjud:
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/support-portal] Update translations for support-portal

2019-04-21 Thread translation
commit 54f6c1479044b63d0da2e5a4c2652e9a78e23ab3
Author: Translation commit bot 
Date:   Sun Apr 21 18:20:29 2019 +

Update translations for support-portal
---
 contents+it.po | 5 +
 1 file changed, 5 insertions(+)

diff --git a/contents+it.po b/contents+it.po
index 6390c7280..8241e65c2 100644
--- a/contents+it.po
+++ b/contents+it.po
@@ -4948,6 +4948,8 @@ msgid ""
 "\"little-t tor\" is one way of referring to tor the network daemon, as "
 "opposed to Tor Browser or Tor Project."
 msgstr ""
+"\"little-t tor\" è un modo di riferirsi a tor il demone della rete, al "
+"contrario di Tor Broswer o Tor Project."
 
 #: https//support.torproject.org/misc/glossary/
 #: (content/misc/glossary/contents+en.lrquestion.description)
@@ -5708,6 +5710,9 @@ msgid ""
 "software associated with this network is called Core Tor, and sometimes "
 "[\"little-t tor\"](#little-t-tor)."
 msgstr ""
+"L'insieme dei relay volontari è chiamato rete Tor. A volte il software "
+"associato a questa rete è chiamato Core Tor, altre volte [\"little-t "
+"tor\"](#little-t-tor)."
 
 #: https//support.torproject.org/misc/glossary/
 #: (content/misc/glossary/contents+en.lrquestion.description)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tbmanual-contentspot] Update translations for tbmanual-contentspot

2019-04-21 Thread translation
commit eb2dc4160bbb8f0e5925e470096abdbddad944cc
Author: Translation commit bot 
Date:   Sun Apr 21 16:47:44 2019 +

Update translations for tbmanual-contentspot
---
 contents+fr.po | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/contents+fr.po b/contents+fr.po
index 8a2ad8f88..e18e84ee1 100644
--- a/contents+fr.po
+++ b/contents+fr.po
@@ -2,8 +2,8 @@
 # erinm, 2019
 # AO , 2019
 # Curtis Baltimore , 2019
-# Thomas Prévost , 2019
 # Emma Peel, 2019
+# Thomas Prévost , 2019
 # 
 msgid ""
 msgstr ""
@@ -11,7 +11,7 @@ msgstr ""
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2019-04-09 09:20+CET\n"
 "PO-Revision-Date: 2018-11-14 12:31+\n"
-"Last-Translator: Emma Peel, 2019\n"
+"Last-Translator: Thomas Prévost , 2019\n"
 "Language-Team: French (https://www.transifex.com/otf/teams/1519/fr/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -2228,7 +2228,7 @@ msgstr ""
 #: https//tb-manual.torproject.org/en-US/becoming-tor-translator/
 #: (content/becoming-tor-translator/contents+en-US.lrtopic.body)
 msgid ""
-msgstr ""
+msgstr ""
 
 #: https//tb-manual.torproject.org/en-US/becoming-tor-translator/
 #: (content/becoming-tor-translator/contents+en-US.lrtopic.body)
@@ -2314,6 +2314,10 @@ msgid ""
 "page](https://www.transifex.com/otf/torproject/) when you are ready to "
 "begin."
 msgstr ""
+"Après que votre candidature ait été approuvée, vous pourrez commencer à "
+"traduire. Dès que vous serez prêt à traduire, vous trouverez une liste des 
"
+"translations dont nous avons besoin sur [la page Transifex de "
+"Tor](https://www.transifex.com/otf/torproject/)."
 
 #: https//tb-manual.torproject.org/en-US/becoming-tor-translator/
 #: (content/becoming-tor-translator/contents+en-US.lrtopic.body)
@@ -2321,6 +2325,9 @@ msgid ""
 "The [Localization Lab Wiki](https://wiki.localizationlab.org/index.php/Tor) "
 "also has information about the translations with bigger priority."
 msgstr ""
+"Le [Wiki Localization Lab](https://wiki.localizationlab.org/index.php/Tor) "
+"vous donnera également des renseignements à propos des traductions "
+"prioritaires."
 
 #: https//tb-manual.torproject.org/en-US/becoming-tor-translator/
 #: (content/becoming-tor-translator/contents+en-US.lrtopic.body)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tbmanual-contentspot_completed] Update translations for tbmanual-contentspot_completed

2019-04-21 Thread translation
commit 7f4fe9245e1c672a1fbee56e1f5b3665a189b725
Author: Translation commit bot 
Date:   Sun Apr 21 16:47:51 2019 +

Update translations for tbmanual-contentspot_completed
---
 contents+fr.po | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/contents+fr.po b/contents+fr.po
index 8a2ad8f88..e18e84ee1 100644
--- a/contents+fr.po
+++ b/contents+fr.po
@@ -2,8 +2,8 @@
 # erinm, 2019
 # AO , 2019
 # Curtis Baltimore , 2019
-# Thomas Prévost , 2019
 # Emma Peel, 2019
+# Thomas Prévost , 2019
 # 
 msgid ""
 msgstr ""
@@ -11,7 +11,7 @@ msgstr ""
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2019-04-09 09:20+CET\n"
 "PO-Revision-Date: 2018-11-14 12:31+\n"
-"Last-Translator: Emma Peel, 2019\n"
+"Last-Translator: Thomas Prévost , 2019\n"
 "Language-Team: French (https://www.transifex.com/otf/teams/1519/fr/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -2228,7 +2228,7 @@ msgstr ""
 #: https//tb-manual.torproject.org/en-US/becoming-tor-translator/
 #: (content/becoming-tor-translator/contents+en-US.lrtopic.body)
 msgid ""
-msgstr ""
+msgstr ""
 
 #: https//tb-manual.torproject.org/en-US/becoming-tor-translator/
 #: (content/becoming-tor-translator/contents+en-US.lrtopic.body)
@@ -2314,6 +2314,10 @@ msgid ""
 "page](https://www.transifex.com/otf/torproject/) when you are ready to "
 "begin."
 msgstr ""
+"Après que votre candidature ait été approuvée, vous pourrez commencer à "
+"traduire. Dès que vous serez prêt à traduire, vous trouverez une liste des 
"
+"translations dont nous avons besoin sur [la page Transifex de "
+"Tor](https://www.transifex.com/otf/torproject/)."
 
 #: https//tb-manual.torproject.org/en-US/becoming-tor-translator/
 #: (content/becoming-tor-translator/contents+en-US.lrtopic.body)
@@ -2321,6 +2325,9 @@ msgid ""
 "The [Localization Lab Wiki](https://wiki.localizationlab.org/index.php/Tor) "
 "also has information about the translations with bigger priority."
 msgstr ""
+"Le [Wiki Localization Lab](https://wiki.localizationlab.org/index.php/Tor) "
+"vous donnera également des renseignements à propos des traductions "
+"prioritaires."
 
 #: https//tb-manual.torproject.org/en-US/becoming-tor-translator/
 #: (content/becoming-tor-translator/contents+en-US.lrtopic.body)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/donatepages-messagespot] Update translations for donatepages-messagespot

2019-04-21 Thread translation
commit 30116b32f33257285125ca4e4cffb75d41b8e5eb
Author: Translation commit bot 
Date:   Sun Apr 21 16:45:35 2019 +

Update translations for donatepages-messagespot
---
 locale/fr/LC_MESSAGES/messages.po | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/locale/fr/LC_MESSAGES/messages.po 
b/locale/fr/LC_MESSAGES/messages.po
index c6a8d34db..66fe5f616 100644
--- a/locale/fr/LC_MESSAGES/messages.po
+++ b/locale/fr/LC_MESSAGES/messages.po
@@ -362,7 +362,7 @@ msgstr "Nom de famille"
 
 #: 
tmp/cache_locale/ce/cec5a6fe643ad38144e0af02cadfaaf024540f1f46db44998f6c033630795bef.php:41
 msgid "Estimated Donation Date:"
-msgstr ""
+msgstr "Date de don estimée :"
 
 #: 
tmp/cache_locale/ce/cec5a6fe643ad38144e0af02cadfaaf024540f1f46db44998f6c033630795bef.php:46
 msgid "Email"
@@ -370,7 +370,7 @@ msgstr "Courriel"
 
 #: 
tmp/cache_locale/ce/cec5a6fe643ad38144e0af02cadfaaf024540f1f46db44998f6c033630795bef.php:51
 msgid "Choose a Currency"
-msgstr ""
+msgstr "Choisissez une devise"
 
 #: 
tmp/cache_locale/ce/cec5a6fe643ad38144e0af02cadfaaf024540f1f46db44998f6c033630795bef.php:73
 msgid "Currency Amount"
@@ -378,7 +378,7 @@ msgstr ""
 
 #: 
tmp/cache_locale/ce/cec5a6fe643ad38144e0af02cadfaaf024540f1f46db44998f6c033630795bef.php:80
 msgid "Report Donation"
-msgstr ""
+msgstr "Rapporter le don"
 
 #: 
tmp/cache_locale/ce/cec5a6fe643ad38144e0af02cadfaaf024540f1f46db44998f6c033630795bef.php:87
 msgid "Wallet Addresses"
@@ -889,6 +889,9 @@ msgid ""
 "If you have any questions, or would like to donate a cryptocurrency not "
 "listed below, please email us at giv...@torproject.org."
 msgstr ""
+"Si vous avez des questions ou si vous désirez faire un don avec une "
+"cryptomonnaie non listé ci-dessous, veuillez nous envoyer un courriel à "
+"giv...@torproject.org."
 
 #: 
tmp/cache_locale/6f/6f67db0a5268c67c9254c73517aaaea60c8c65a268f9242703a3299173f14b74.php:22
 msgid "See if your employer offers employee gift matching"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [metrics-web/master] Make userstats-combined.csv order platform independent.

2019-04-21 Thread karsten
commit 03d6a1a0305548d7c5b548feb905cb5c9525d266
Author: Karsten Loesing 
Date:   Fri Mar 8 15:19:22 2019 +0100

Make userstats-combined.csv order platform independent.

Turns out that we didn't specify the sorting order of
userstats-combined.csv. However, different platforms produced
consistently different outputs. Let's just define sort order to make
the output deterministic, even across platforms.
---
 src/main/sql/clients/init-userstats.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/sql/clients/init-userstats.sql 
b/src/main/sql/clients/init-userstats.sql
index cf2b620..467f8aa 100644
--- a/src/main/sql/clients/init-userstats.sql
+++ b/src/main/sql/clients/init-userstats.sql
@@ -761,5 +761,5 @@ CREATE OR REPLACE VIEW combined AS SELECT
   AND a.date < current_date - 1
 
   -- Order results.
-  ORDER BY date DESC;
+  ORDER BY date, node, country, LOWER(transport);
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [metrics-web/master] Make bandwidth.csv independent of import order.

2019-04-21 Thread karsten
commit 1fd062c11e45ca5c4cb166f6db8a27eabaf60e48
Author: Karsten Loesing 
Date:   Fri Mar 8 15:08:08 2019 +0100

Make bandwidth.csv independent of import order.

With this patch we're not overwriting bandwidth history parts with
whichever history comes last, but we're computing the maximum value
for each 15-minute interval of all imported bandwidth histories. This
makes bandwidth.csv independent of descriptor import order.
---
 src/main/sql/bwhist/tordir.sql | 41 ++---
 1 file changed, 22 insertions(+), 19 deletions(-)

diff --git a/src/main/sql/bwhist/tordir.sql b/src/main/sql/bwhist/tordir.sql
index dfe7b5d..047f18e 100644
--- a/src/main/sql/bwhist/tordir.sql
+++ b/src/main/sql/bwhist/tordir.sql
@@ -122,6 +122,24 @@ CREATE TABLE updates (
 date DATE
 );
 
+-- Return an array as the result of merging two arrays: if an array index is
+-- only contained in one array, that array element is included in the result;
+-- if an array index is contained in both arrays, the greater of the two
+-- elements is included.
+CREATE OR REPLACE FUNCTION array_merge(first BIGINT[], second BIGINT[])
+RETURNS BIGINT[] AS $$
+DECLARE
+  merged BIGINT[];
+BEGIN
+  FOR i IN LEAST(array_lower(first, 1), array_lower(second, 1))..
+  GREATEST(array_upper(first, 1), array_upper(second, 1)) LOOP
+merged[i] := GREATEST(first[i], second[i]);
+  END LOOP;
+RETURN merged;
+END;
+$$ LANGUAGE plpgsql
+STABLE RETURNS NULL ON NULL INPUT;
+
 CREATE OR REPLACE FUNCTION array_sum (BIGINT[]) RETURNS BIGINT AS $$
   SELECT SUM($1[i])::bigint
   FROM generate_series(array_lower($1, 1), array_upper($1, 1)) index(i);
@@ -143,25 +161,10 @@ CREATE OR REPLACE FUNCTION insert_bwhist(
   ELSE
 BEGIN
 UPDATE bwhist
-SET read[array_lower(insert_read, 1):
-  array_upper(insert_read, 1)] = insert_read,
-written[array_lower(insert_written, 1):
-  array_upper(insert_written, 1)] = insert_written,
-dirread[array_lower(insert_dirread, 1):
-  array_upper(insert_dirread, 1)] = insert_dirread,
-dirwritten[array_lower(insert_dirwritten, 1):
-  array_upper(insert_dirwritten, 1)] = insert_dirwritten
-WHERE fingerprint = insert_fingerprint AND date = insert_date;
--- Updating twice is an ugly workaround for PostgreSQL bug 5840
-UPDATE bwhist
-SET read[array_lower(insert_read, 1):
-  array_upper(insert_read, 1)] = insert_read,
-written[array_lower(insert_written, 1):
-  array_upper(insert_written, 1)] = insert_written,
-dirread[array_lower(insert_dirread, 1):
-  array_upper(insert_dirread, 1)] = insert_dirread,
-dirwritten[array_lower(insert_dirwritten, 1):
-  array_upper(insert_dirwritten, 1)] = insert_dirwritten
+SET read = array_merge(read, insert_read),
+written = array_merge(written, insert_written),
+dirread = array_merge(dirread, insert_dirread),
+dirwritten = array_merge(dirwritten, insert_dirwritten)
 WHERE fingerprint = insert_fingerprint AND date = insert_date;
 END;
   END IF;



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tpo-web] Update translations for tpo-web

2019-04-21 Thread translation
commit f8abf58e1bbbd08a38bf9de5086a5162bb3f10f4
Author: Translation commit bot 
Date:   Sun Apr 21 10:20:00 2019 +

Update translations for tpo-web
---
 contents+pt-PT.po | 27 +++
 1 file changed, 23 insertions(+), 4 deletions(-)

diff --git a/contents+pt-PT.po b/contents+pt-PT.po
index 5a6390413..fe1238e31 100644
--- a/contents+pt-PT.po
+++ b/contents+pt-PT.po
@@ -42,7 +42,7 @@ msgstr ""
 
 #: https//www.torproject.org/ (content/contents+en.lrpage.body)
 msgid "We are the Tor Project, a 501(c)3 US nonprofit."
-msgstr "Nós somos o Projetor Tor, uma 501(c)3 US empresa não lucrativa."
+msgstr "Nós somos o Tor Project, uma 501(c)3 US empresa não lucrativa."
 
 #: https//www.torproject.org/ (content/contents+en.lrpage.body)
 msgid ""
@@ -63,7 +63,7 @@ msgstr "Contactar"
 #: https//www.torproject.org/thank-you/
 #: (content/thank-you/contents+en.lrpage.section)
 msgid "The Tor Project"
-msgstr "O Projetor Tor"
+msgstr "O Tor Project"
 
 #: https//www.torproject.org/contact/
 #: (content/contact/contents+en.lrpage.body)
@@ -170,7 +170,7 @@ msgid ""
 "It is free and open source software maintained by the Tor Project and a "
 "community of volunteers worldwide."
 msgstr ""
-"É software gratuito e aberto mantido pelo Projeto Tor e uma comunidade de "
+"É software gratuito e aberto mantido pelo Tor Project e uma comunidade de "
 "voluntários por todo o mundo."
 
 #: https//www.torproject.org/thank-you/
@@ -427,6 +427,9 @@ msgid ""
 "mainstream concern thanks to the [Snowden revelations in "
 "2013](https://www.theguardian.com/us-news/the-nsa-files)."
 msgstr ""
+"A necessidade de ferramentas que protegessem contra vigilância das massas "
+"tornou-se uma procupação geral devido às [revelações de Snowden em "
+"2013](https://www.theguardian.com/us-news/the-nsa-files)."
 
 #: https//www.torproject.org/about/history/
 #: (content/about/history/contents+en.lrpage.body)
@@ -435,6 +438,9 @@ msgid ""
 "the documents also upheld assurances that, at that time, [Tor could not be "
 "cracked](https://www.wired.com/story/the-grand-tor/)."
 msgstr ""
+"Não só foi o Tor instrumental para as denúncias de Snowden, mas o 
conteúdo "
+"dos documentos confirmou que, naquele momento, [o Tor não podia ser "
+"cracked](https://www.wired.com/story/the-grand-tor/)."
 
 #: https//www.torproject.org/about/history/
 #: (content/about/history/contents+en.lrpage.body)
@@ -443,6 +449,9 @@ msgid ""
 "increased, but so has the prevalence of these hindrances to internet "
 "freedom."
 msgstr ""
+"A consciência das pessoas em relação a rastreamento, vigilância e censura 
"
+"pode ter aumentado, mas com isto, também aumentou a prevalência destes "
+"impedimentos à liberdade da internet."
 
 #: https//www.torproject.org/about/history/
 #: (content/about/history/contents+en.lrpage.body)
@@ -451,6 +460,9 @@ msgid ""
 " run by volunteers and millions of users worldwide. And it is this diversity"
 " that keeps Tor users safe."
 msgstr ""
+"Hoje, a rede tem [milhares de relays](https://metrics.torproject.org) de "
+"voluntários e milhões de utilizadores por todo o mundo. E é esta 
diversidade"
+" que mantém os users do Tor seguros."
 
 #: https//www.torproject.org/about/history/
 #: (content/about/history/contents+en.lrpage.body)
@@ -459,6 +471,9 @@ msgid ""
 "to an uncensored internet, and Tor has become the world's strongest tool for"
 " privacy and freedom online."
 msgstr ""
+"Nós no Tor Project lutamos todos os dias para toda a gente ter acesso "
+"privado a uma internet sem censura e o Tor tornou-se a ferramenta mais forte"
+" para privacidade e segurança online."
 
 #: https//www.torproject.org/about/history/
 #: (content/about/history/contents+en.lrpage.body)
@@ -468,6 +483,10 @@ msgid ""
 "is [deeply committed](https://blog.torproject.org/tor-social-contract) to "
 "transparency and the safety of its users."
 msgstr ""
+"Mas o Tor é mais do que só software. É um trabalho de amor produzido por 
uma"
+" comunidade internacional de pessoas dedicadas aos direitos humanos. O Tor "
+"Project está [fortemente comprometido](https://blog.torproject.org/tor-;
+"social-contract) à transparência e segurança dos seus utilizadores."
 
 #: https//www.torproject.org/about/people/
 #: (content/about/people/contents+en.lrpeople.title)
@@ -901,7 +920,7 @@ msgstr ""
 
 #: templates/meta.html:11
 msgid "The Tor Project | Privacy & Freedom Online"
-msgstr ""
+msgstr "The Tor Project | Privacidade e Liberdade Online"
 
 #: templates/meta.html:17
 msgid "Tor Project"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tpo-web] Update translations for tpo-web

2019-04-21 Thread translation
commit b16a30ee2edbf1d4e51d1a4fb1088a1880db9828
Author: Translation commit bot 
Date:   Sun Apr 21 09:50:09 2019 +

Update translations for tpo-web
---
 contents+pt-PT.po | 103 --
 1 file changed, 92 insertions(+), 11 deletions(-)

diff --git a/contents+pt-PT.po b/contents+pt-PT.po
index d219c8158..5a6390413 100644
--- a/contents+pt-PT.po
+++ b/contents+pt-PT.po
@@ -23,30 +23,35 @@ msgstr ""
 
 #: https//www.torproject.org/ (content/contents+en.lrpage.title)
 msgid "Anonymity Online"
-msgstr ""
+msgstr "Anonimidade Online"
 
 #: https//www.torproject.org/ (content/contents+en.lrpage.section)
 msgid "home"
-msgstr ""
+msgstr "home"
 
 #: https//www.torproject.org/ (content/contents+en.lrpage.body)
 msgid "##ABOUT US##"
-msgstr ""
+msgstr "##SOBRE NÓS##"
 
 #: https//www.torproject.org/ (content/contents+en.lrpage.body)
 msgid ""
 "We believe everyone should be able to explore the internet with privacy."
 msgstr ""
+"Nós acreditamos que toda a gente deve ter a possibilidade de explorar a "
+"internet com privacidade."
 
 #: https//www.torproject.org/ (content/contents+en.lrpage.body)
 msgid "We are the Tor Project, a 501(c)3 US nonprofit."
-msgstr ""
+msgstr "Nós somos o Projetor Tor, uma 501(c)3 US empresa não lucrativa."
 
 #: https//www.torproject.org/ (content/contents+en.lrpage.body)
 msgid ""
 "We advance human rights and defend your privacy online through free software"
 " and open networks. [Meet our team](about/people)."
 msgstr ""
+"Nós avançamos os direitos humanos e defendemos a tua privacidade online "
+"através de software e redes abertas e gratuitas. [Conheça a nossa "
+"equipa](about/people)."
 
 #: https//www.torproject.org/contact/
 #: (content/contact/contents+en.lrpage.title)
@@ -58,7 +63,7 @@ msgstr "Contactar"
 #: https//www.torproject.org/thank-you/
 #: (content/thank-you/contents+en.lrpage.section)
 msgid "The Tor Project"
-msgstr ""
+msgstr "O Projetor Tor"
 
 #: https//www.torproject.org/contact/
 #: (content/contact/contents+en.lrpage.body)
@@ -66,6 +71,8 @@ msgid ""
 "Get Support "
 msgstr ""
+"Pedir apoio"
 
 #: https//www.torproject.org/contact/
 #: (content/contact/contents+en.lrpage.body)
@@ -74,6 +81,10 @@ msgid ""
 "answers to frequently asked questions about connecting to Tor, circumventing"
 " censorship, using onion services, and more."
 msgstr ""
+"Precisa de ajuda? Visite o nosso [Portal de "
+"Apoio](https://support.torproject.org) para respostas a questões "
+"frequentemente perguntas relacionadas com a conexão ao Tor, evitar censura, "
+"usar onion services e mais."
 
 #: https//www.torproject.org/download/
 #: (content/download/contents+en.lrpage.title)
@@ -112,7 +123,7 @@ msgstr "Imprensa"
 
 #: https//www.torproject.org/menu/ (content/menu/contents+en.lrpage.body)
 msgid "Blog"
-msgstr "Blogue"
+msgstr "Blog"
 
 #: https//www.torproject.org/menu/ (content/menu/contents+en.lrpage.body)
 msgid "Newsletter"
@@ -146,12 +157,12 @@ msgstr "Sucesso"
 #: https//www.torproject.org/thank-you/
 #: (content/thank-you/contents+en.lrpage.body)
 msgid "You're equipped to browse freely."
-msgstr ""
+msgstr "Estás equipado para navegar livremente."
 
 #: https//www.torproject.org/thank-you/
 #: (content/thank-you/contents+en.lrpage.body)
 msgid "Tor is the strongest tool for privacy and freedom online."
-msgstr ""
+msgstr "O Tor é a ferramenta mais forte para privacidade e liberdade online."
 
 #: https//www.torproject.org/thank-you/
 #: (content/thank-you/contents+en.lrpage.body)
@@ -159,6 +170,8 @@ msgid ""
 "It is free and open source software maintained by the Tor Project and a "
 "community of volunteers worldwide."
 msgstr ""
+"É software gratuito e aberto mantido pelo Projeto Tor e uma comunidade de "
+"voluntários por todo o mundo."
 
 #: https//www.torproject.org/thank-you/
 #: (content/thank-you/contents+en.lrpage.body)
@@ -166,6 +179,8 @@ msgid ""
 "We need your help to keep Tor secure and safe for millions across the globe."
 " [Donate Now](https://donate.torproject.org/)"
 msgstr ""
+"Nós precisamos da tua ajuda para manter o Tor seguro para milhões de 
pessoas"
+" por todo o mundo. [Contribui agora](https://donate.torproject.org/)"
 
 #: https//www.torproject.org/about/ (content/about/contents+en.lrpage.title)
 #: https//www.torproject.org/about/history/
@@ -176,7 +191,7 @@ msgstr "Histórico"
 #: https//www.torproject.org/download/alpha/
 #: (content/download/alpha/contents+en.lrpage.title)
 msgid "Download Tor Browser Alpha"
-msgstr ""
+msgstr "Descarregar o Tor Browser Alpha"
 
 #: https//www.torproject.org/download/alpha/
 #: (content/download/alpha/contents+en.lrpage.body)
@@ -184,6 +199,8 @@ msgid ""
 "Before we release a stable version of our software, we release an alpha "
 "version to test features and find bugs."
 msgstr ""
+"Antes de lançarmos uma versão estável do nosso programa, lançamos uma 
versão"
+" alpha para testar funcionalidades e encontrar bugs."