[tor-commits] r24917: {website} think I found my bug in po2wml (website/trunk)
Author: runa Date: 2011-07-21 07:07:23 + (Thu, 21 Jul 2011) New Revision: 24917 Modified: website/trunk/po2wml.sh Log: think I found my bug in po2wml Modified: website/trunk/po2wml.sh === --- website/trunk/po2wml.sh 2011-07-21 04:11:03 UTC (rev 24916) +++ website/trunk/po2wml.sh 2011-07-21 07:07:23 UTC (rev 24917) @@ -410,7 +410,7 @@ else # If the current languge is of the form xx_XX, rename # to xx-xx instead (except for pl_PL) - if [[ $lang =~ _ $subdir != pl_PL ]] + if [[ $lang =~ _ $lang != pl_PL ]] then lang=`echo $lang | sed s/_/-/ | tr '[A-Z]' '[a-z]'` subdir ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] r24918: {translation} updated translation template for the website (translation/trunk/projects/website/po/templates/docs)
Author: runa Date: 2011-07-21 07:22:34 + (Thu, 21 Jul 2011) New Revision: 24918 Modified: translation/trunk/projects/website/po/templates/docs/1-high.bridges.pot Log: updated translation template for the website Modified: translation/trunk/projects/website/po/templates/docs/1-high.bridges.pot === --- translation/trunk/projects/website/po/templates/docs/1-high.bridges.pot 2011-07-21 07:07:23 UTC (rev 24917) +++ translation/trunk/projects/website/po/templates/docs/1-high.bridges.pot 2011-07-21 07:22:34 UTC (rev 24918) @@ -7,7 +7,7 @@ msgid msgstr Project-Id-Version: PACKAGE VERSION\n -POT-Creation-Date: 2011-03-01 16:36+\n +POT-Creation-Date: 2011-07-21 08:20+0200\n PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n Last-Translator: FULL NAME EMAIL@ADDRESS\n Language-Team: LANGUAGE l...@li.org\n @@ -35,8 +35,8 @@ msgstr #. type: Content of: divdiv -#: /home/runa/tor/website/docs/en/bridges.wml:15 /tmp/mX6VGOF12v.xml:79 -#: /tmp/mX6VGOF12v.xml:102 /tmp/mX6VGOF12v.xml:125 /tmp/mX6VGOF12v.xml:149 +#: /home/runa/tor/website/docs/en/bridges.wml:15 /tmp/YXED4Th9dW.xml:79 +#: /tmp/YXED4Th9dW.xml:102 /tmp/YXED4Th9dW.xml:125 /tmp/YXED4Th9dW.xml:149 msgid hr msgstr @@ -209,11 +209,11 @@ #, no-wrap msgid Here are your bridge relays:\n -\n - bridge 60.16.182.53:9001 c9111bd74a710c0d25dda6b35e181f1aa7911133\n - bridge 87.237.118.139:444 c18dde4804e8fcb48464341ca1375eb130453a39\n - bridge 60.63.97.221:443 ab5c849ed5896d53052e43966ee9aba2ff92fb82\n -\n +\n + bridge 60.16.182.53:9001\n + bridge 87.237.118.139:444\n + bridge 60.63.97.221:443\n +\n msgstr ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] r24920: {website} yet another minor fix for po2wml.sh (website/trunk)
Author: runa Date: 2011-07-21 07:39:29 + (Thu, 21 Jul 2011) New Revision: 24920 Modified: website/trunk/po2wml.sh Log: yet another minor fix for po2wml.sh Modified: website/trunk/po2wml.sh === --- website/trunk/po2wml.sh 2011-07-21 07:33:00 UTC (rev 24919) +++ website/trunk/po2wml.sh 2011-07-21 07:39:29 UTC (rev 24920) @@ -419,7 +419,7 @@ # If the current language is pl_PL use pl instead if [ $lang = pl_PL ] then - $lang=pl + lang=pl subdir fi ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] r24921: {website} problem in po2wml finally fixed (website/trunk)
Author: runa Date: 2011-07-21 08:15:36 + (Thu, 21 Jul 2011) New Revision: 24921 Modified: website/trunk/po2wml.sh Log: problem in po2wml finally fixed Modified: website/trunk/po2wml.sh === --- website/trunk/po2wml.sh 2011-07-21 07:39:29 UTC (rev 24920) +++ website/trunk/po2wml.sh 2011-07-21 08:15:36 UTC (rev 24921) @@ -373,14 +373,6 @@ # subdirectory. if [ $onedirup == $lang ] then - # If the current subdirectory is of the form xx_XX, - # rename to xx-xx instead (except for pl_PL) - if [[ $subdir =~ _ $subdir != pl_PL ]] - then - subdir=`echo $subdir | sed s/_/-/ | tr '[A-Z]' '[a-z]'` - nosubdir - fi - # If the current directory is pl_PL use pl instead if [ $subdir = pl_PL ] then @@ -402,20 +394,20 @@ nosubdir fi +# If the current subdirectory is of the form xx_XX, +# rename to xx-xx instead (except for pl_PL) +if [[ $subdir =~ _ $subdir != pl_PL ]] +then +subdir=`echo $subdir | sed s/_/-/ | tr '[A-Z]' '[a-z]'` +nosubdir +fi + # Convert everything else if [[ $subdir != en $subdir != pl_PL ! ($subdir =~ _) $subdir != nb $subdir != sv ]] then nosubdir fi else - # If the current languge is of the form xx_XX, rename - # to xx-xx instead (except for pl_PL) - if [[ $lang =~ _ $lang != pl_PL ]] - then - lang=`echo $lang | sed s/_/-/ | tr '[A-Z]' '[a-z]'` - subdir - fi - # If the current language is pl_PL use pl instead if [ $lang = pl_PL ] then @@ -436,7 +428,15 @@ lang=se subdir fi - + +# If the current languge is of the form xx_XX, rename +# to xx-xx instead (except for pl_PL) +if [[ $lang =~ _ $lang != pl_PL ]] +then +lang=`echo $lang | sed s/_/-/ | tr '[A-Z]' '[a-z]'` +subdir +fi + # Convert everything else if [[ $lang != en $lang != pl_PL ! ($lang =~ _) $lang != nb $lang != sv ]] then ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] [metrics-tasks/master] Avoid downloading server descriptor tarballs in #2394.
commit 7b75c704f5dad573ad6ba4f0a04cb8599b4cdb7a Author: Karsten Loesing karsten.loes...@gmx.net Date: Thu Jul 21 16:01:14 2011 +0200 Avoid downloading server descriptor tarballs in #2394. --- task-2394/ParseDescriptors.java | 133 ++- task-2394/README| 17 ++ 2 files changed, 80 insertions(+), 70 deletions(-) diff --git a/task-2394/ParseDescriptors.java b/task-2394/ParseDescriptors.java index 2197670..641518d 100644 --- a/task-2394/ParseDescriptors.java +++ b/task-2394/ParseDescriptors.java @@ -21,13 +21,13 @@ public class ParseDescriptors { consensuses.put(filename, file); } else if (filename.endsWith(-votes)) { votes.put(filename, file); - } else if (filename.length() == 40) { + } else if (filename.endsWith(-descriptors)) { descriptors.put(filename, file); } } System.out.println(We found + consensuses.size() -+ consensuses, + votes.size() + votes, and -+ descriptors.size() + server descriptors.); ++ consensus files, + votes.size() + vote files, and ++ descriptors.size() + server descriptor files.); /* Parse consensuses in an outer loop and the referenced votes and * descriptors in inner loops. Write the results to disk as soon as @@ -50,7 +50,6 @@ public class ParseDescriptors { bw.write(, + bandwidthAuthority + bandwidth); } bw.write(\n); -MapString, String parsedDescriptors = new HashMapString, String(); for (File consensusFile : consensuses.values()) { System.out.println(Parsing consensus + consensusFile.getName()); BufferedReader brC = new BufferedReader(new FileReader( @@ -58,12 +57,12 @@ public class ParseDescriptors { String lastRLine = null, lastSLine = null; String consensusTimestamp = consensusFile.getName().substring(0, -MM-DD-hh-mm-ss.length()); - String votesFilename = consensusTimestamp + -votes; MapString, MapString, String measuredBandwidthsByDirSource = new HashMapString, MapString, String(); /* Parse votes first, if we have them, and extract measured * bandwidths. */ + String votesFilename = consensusTimestamp + -votes; if (votes.containsKey(votesFilename)) { BufferedReader brV = new BufferedReader(new FileReader( votes.get(votesFilename))); @@ -89,6 +88,74 @@ public class ParseDescriptors { brV.close(); } + /* Parse referenced server descriptors to learn about exit policies + * and reported bandwidths. */ + String descriptorsFilename = consensusTimestamp + -descriptors; + MapString, String parsedDescriptors = + new HashMapString, String(); + if (descriptors.containsKey(descriptorsFilename)) { +BufferedReader brD = new BufferedReader(new FileReader( +descriptors.get(descriptorsFilename))); +SetString defaultRejects = new HashSetString(); +/* Starting with 0.2.1.6-alpha, ports 465 and 587 were allowed + * in the default exit policy again (and therefore removed + * from the default reject lines). */ +SetString optionalRejects = new HashSetString(); +String lineD, address = null, fingerprint = null, +descriptorBandwidth = null; +boolean defaultPolicy = false, comparePolicies = true; +while ((lineD = brD.readLine()) != null) { + if (lineD.startsWith(router )) { +address = lineD.split( )[2]; +defaultRejects.clear(); +defaultRejects.addAll(Arrays.asList((0.0.0.0/8:*, ++ 169.254.0.0/16:*,127.0.0.0/8:*,192.168.0.0/16:*, ++ 10.0.0.0/8:*,172.16.0.0/12:*,$IP:*,*:25,*:119, ++ *:135-139,*:445,*:563,*:1214,*:4661-4666,*:6346-6429, ++ *:6699,*:6881-6999).split(,))); +optionalRejects.clear(); +optionalRejects.addAll(Arrays.asList( +*:465,*:587.split(,))); +fingerprint = null; +descriptorBandwidth = null; +defaultPolicy = false; +comparePolicies = true; + } else if (lineD.startsWith(opt fingerprint ) || + lineD.startsWith(fingerprint )) { +fingerprint = lineD.substring(lineD.startsWith(opt ) ? +opt fingerprint.length() : fingerprint.length()). +replaceAll( , ).toLowerCase(); + } else if (lineD.startsWith(bandwidth )) { +descriptorBandwidth = lineD.split( )[3]; + } else if (lineD.startsWith(reject ) comparePolicies) { +String rejectPattern = lineD.substring(reject . +length()); +if (defaultRejects.contains(rejectPattern)) { + defaultRejects.remove(rejectPattern); +} else if (optionalRejects.contains(rejectPattern)) { + optionalRejects.remove(rejectPattern); +
[tor-commits] r24924: {website} include more languages when building the website (website/trunk)
Author: runa Date: 2011-07-21 15:12:53 + (Thu, 21 Jul 2011) New Revision: 24924 Modified: website/trunk/Makefile.common Log: include more languages when building the website Modified: website/trunk/Makefile.common === --- website/trunk/Makefile.common 2011-07-21 10:00:37 UTC (rev 24923) +++ website/trunk/Makefile.common 2011-07-21 15:12:53 UTC (rev 24924) @@ -18,7 +18,7 @@ -D STABLETAG=$(STABLETAG) #LANGS=ar bms de en es et fa it fi fr ja ko nl no pl pt ru se tr zh-cn -LANGS=en ar es fr ru pl da it fa de fi vn cy zh-cn pt pt-br id nl +LANGS=ar ar-se bms cy da de en es et fa fi fr hu id it ja ko nl no pl pt pt-br ru se tr vn zh-cn WMLFILES=$(wildcard $(patsubst %, %/*.wml, $(LANGS))) WMIFILES=$(wildcard $(patsubst %, %/*.wmi, $(LANGS)) $(WMLBASE)/include/*.wmi ) @@ -35,9 +35,15 @@ %.html.ar: ar/%.wml en/%.wml lang=`dirname $` wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $@ +%.html.ar-se: ar-se/%.wml en/%.wml + lang=`dirname $` wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $@ + %.html.bms: bms/%.wml en/%.wml lang=`dirname $` wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $@ +%.html.cy: cy/%.wml en/%.wml + lang=`dirname $` wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $@ + %.html.es: es/%.wml en/%.wml lang=`dirname $` wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $@ @@ -65,6 +71,9 @@ %.html.fr: fr/%.wml en/%.wml lang=`dirname $` wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $@ +%.html.hu: hu/%.wml en/%.wml + lang=`dirname $` wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $@ + %.html.ja: ja/%.wml en/%.wml lang=`dirname $` wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $@ @@ -98,6 +107,9 @@ %.html.vi: vi/%.wml en/%.wml lang=`dirname $` wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $@ +%.html.vn: vn/%.wml en/%.wml + lang=`dirname $` wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $@ + %.html.zh-cn: zh-cn/%.wml en/%.wml lang=`dirname $` wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $@ @@ -115,6 +127,13 @@ wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $$OUT --depend | tee $$tmpfile $@ \ sed -e s',\(^[^ ]*\):,.deps/\1.d:,' $$tmpfile $@ \ rm -f $$tmpfile +.deps/%.html.ar-se.d: ar-se/%.wml .deps/.stamp + tmpfile=`mktemp -t tmp.XXX` \ + lang=`dirname $` \ + OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` \ + wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $$OUT --depend | tee $$tmpfile $@ \ + sed -e s',\(^[^ ]*\):,.deps/\1.d:,' $$tmpfile $@ \ + rm -f $$tmpfile .deps/%.html.bms.d: bms/%.wml .deps/.stamp tmpfile=`mktemp -t tmp.XXX` \ lang=`dirname $` \ @@ -192,6 +211,13 @@ wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $$OUT --depend | tee $$tmpfile $@ \ sed -e s',\(^[^ ]*\):,.deps/\1.d:,' $$tmpfile $@ \ rm -f $$tmpfile +.deps/%.html.hu.d: hu/%.wml .deps/.stamp + tmpfile=`mktemp -t tmp.XXX` \ + lang=`dirname $` \ + OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` \ + wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $$OUT --depend | tee $$tmpfile $@ \ + sed -e s',\(^[^ ]*\):,.deps/\1.d:,' $$tmpfile $@ \ + rm -f $$tmpfile .deps/%.html.ja.d: ja/%.wml .deps/.stamp tmpfile=`mktemp -t tmp.XXX` \ lang=`dirname $` \ @@ -269,6 +295,13 @@ wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $$OUT --depend | tee $$tmpfile $@ \ sed -e s',\(^[^ ]*\):,.deps/\1.d:,' $$tmpfile $@ \ rm -f $$tmpfile +.deps/%.html.vn.d: vn/%.wml .deps/.stamp + tmpfile=`mktemp -t tmp.XXX` \ + lang=`dirname $` \ + OUT=`echo $@ | sed -e 's,\.deps/\(.*\)\.d$$,\1,'` \ + wml $(WMLOPT) -I $$lang -I $(WMLBASE)/$$lang -D LANG=$$lang $ -o $$OUT --depend | tee $$tmpfile $@ \ + sed -e s',\(^[^ ]*\):,.deps/\1.d:,' $$tmpfile $@ \ + rm -f $$tmpfile .deps/%.html.zh-cn.d: zh-cn/%.wml .deps/.stamp tmpfile=`mktemp -t tmp.XXX` \ lang=`dirname $` \ ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits
[tor-commits] r24925: {website} update perl-globals.wmi to include more languages (website/trunk/include)
Author: runa Date: 2011-07-21 15:20:43 + (Thu, 21 Jul 2011) New Revision: 24925 Modified: website/trunk/include/perl-globals.wmi Log: update perl-globals.wmi to include more languages Modified: website/trunk/include/perl-globals.wmi === --- website/trunk/include/perl-globals.wmi 2011-07-21 15:12:53 UTC (rev 24924) +++ website/trunk/include/perl-globals.wmi 2011-07-21 15:20:43 UTC (rev 24925) @@ -2,7 +2,7 @@ : # Change both. The array is ordered (for pages like translation status, order of flags, etc). - my @LANGUAGES = qw{ar bms de en es et fa fi fr it ja ko nl no pl pt ru se tr zh-cn}; + my @LANGUAGES = qw{ar ar-se bms cy da de en es et fa fi fr hu id it ja ko nl no pl pt pt-br ru se tr vn zh-cn}; my %LANGUAGES = ( 'ar' = #1593;#1585;#1576;#1610;#1577;nbsp;(Arabiya), 'bms' = Burmese, ___ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits