Changeset 36406 in osm for applications/editors/josm/i18n
- Timestamp:
- 2025-03-12T12:52:05+01:00 (3 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/i18n/launchpad.pl
r36404 r36406 58 58 { 59 59 makeupload(); 60 } 61 elsif($ARGV[0] eq "uploadallsingle") 62 { 63 makeuploadsingle(); 60 64 } 61 65 elsif($ARGV[0] eq "approveall") … … 115 119 } 116 120 121 sub makeuploadsingle 122 { 123 my $count = 1; 124 my $outdate = `date -u +"%Y-%m-%dT%H_%M_%S"`; 125 my $mech = dologin(); 126 $outdate =~ s/[\r\n]+//; 127 mkdir "build/josm"; 128 system "rm build/josm/*"; 129 system "cp po/*.po po/josm.pot build/josm"; 130 chdir "build"; 131 print "Starting upload ($outdate).\n"; 132 if(!$count) 133 { 134 system "tar -cjf launchpad_upload_josm_$outdate.tar.bz2 josm"; 135 $mech->get("https://translations.launchpad.net/josm/trunk/+translations-upload"); 136 $mech->submit_form(with_fields => {"file" => "launchpad_upload_josm_$outdate.tar.bz2"}); 137 sleep(10); 138 } 139 else 140 { 141 my @files = sort glob("josm/*.po"); 142 my $num = 1; 143 while($#files >= 0) 144 { 145 my @f = splice(@files, 0, $count); 146 my $file = "launchpad_upload_josm_${outdate}_$num.tar.bz2"; 147 print "Create file $file (".join(" ",@f).").\n"; 148 system "tar -cjf $file ".join(" ",@f); 149 print "Upload file $file.\n"; 150 $mech->get("https://translations.launchpad.net/josm/trunk/+translations-upload"); 151 $mech->submit_form(with_fields => {"file" => $file}); 152 sleep(10); 153 ++$num; 154 } 155 } 156 system "rm -rv josm"; 157 chdir ".."; 158 approveall($mech); 159 } 160 117 161 sub makeupload 118 162 { … … 122 166 $outdate =~ s/[\r\n]+//; 123 167 mkdir "build/josm"; 168 system "rm build/josm/*"; 124 169 system "cp po/*.po po/josm.pot build/josm"; 125 170 chdir "build"; … … 140 185 my @f = splice(@files, 0, $count); 141 186 my $file = "launchpad_upload_josm_${outdate}_$num.tar.bz2"; 142 print "Create file $file.\n"; 187 print "Create file $file (".join(" ",@f).").\n"; 143 188 system "tar -cjf $file ".join(" ",@f); 144 189 print "Upload file $file.\n";
Note:
See TracChangeset
for help on using the changeset viewer.