Changeset 26928 in osm for applications/editors
- Timestamp:
- 2011-10-22T21:16:32+02:00 (13 years ago)
- Location:
- applications/editors/josm
- Files:
-
- 37 added
- 30 deleted
- 104 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/i18n/build.xml
r26849 r26928 60 60 </foreach> 61 61 </target> 62 <target name="buildcore" depends="po/josm.pot,init"> 63 <gettext-merge keysFile="josm.pot" poDirectory="po"/> 64 <antcall target="coretrans"/> 65 </target> 62 66 <target name="coretrans"> 63 67 <mkdir dir="${po.build.dir}/core"/> … … 93 97 </then> 94 98 </if> 99 <delete dir="${po.build.dir}/plugin_${dir}"/> 95 100 </target> 96 101 <target name="clean"> … … 99 104 <delete> 100 105 <fileset dir="po" includes="*.*~" defaultexcludes="false"/> 106 </delete> 107 <delete> 108 <fileset dir="po" includes="*.po" defaultexcludes="false"/> 101 109 </delete> 102 110 </target> … … 107 115 </exec> 108 116 </target> 117 <target name="pot" depends="po/josm.pot" /> 118 <target name="update"> 119 <exec executable="perl"> 120 <arg line="launchpad.pl bzronly"/> 121 </exec> 122 <antcall target="build"/> 123 </target> 124 <target name="updatecore"> 125 <exec executable="perl"> 126 <arg line="launchpad.pl bzronly"/> 127 </exec> 128 <antcall target="buildcore"/> 129 </target> 109 130 </project> -
applications/editors/josm/i18n/launchpad.pl
r26849 r26928 3 3 use strict; 4 4 5 my %lang = map {$_ => 1} ( 6 "ar", "bg", "cs", "da", "de", "el", "en_AU", "en_GB", 7 "es", "et", "eu", "fi", "fr", "gl", "he", "id", "is", 8 "it", "ja", "nb", "nl", "pl", "pt_BR", "ru", "sk", 9 "sv", "tr", "uk", "zh_CN", "zh_TW" 10 ); 11 5 12 my $count = 0;#11; 6 13 my $cleanall = 0;#1; 14 my $upload = 0;#1; 7 15 8 16 if($#ARGV != 0) 9 17 { 10 warn "URL not given." 18 warn "URL not given (try Launchpad download URL or \"bzr\")." 19 } 20 elsif($ARGV[0] eq "bzr" || $ARGV[0] eq "bzronly") 21 { 22 mkdir "build"; 23 die "Could not change into new data dir." if !chdir "build"; 24 system "bzr export -v josm_trans lp:~openstreetmap/josm/josm_trans"; 25 chdir ".."; 26 copypo("build/josm_trans/josm"); 27 system "rm -rv build/josm_trans"; 28 exit(0) if $ARGV[0] eq "bzronly"; 11 29 } 12 30 else 13 31 { 14 32 mkdir "build"; 15 mkdir "build/ new";16 die "Could not change into new data dir." if !chdir "build/ new";33 mkdir "build/josm_trans"; 34 die "Could not change into new data dir." if !chdir "build/josm_trans"; 17 35 system "wget $ARGV[0]"; 18 36 system "tar -xf laun*"; 19 37 chdir "../.."; 20 foreach my $name (split("\n", `find build/new -name "*.po"`)) 38 copypo("build/josm_trans"); 39 system "rm -rv build/josm_trans"; 40 } 41 42 system "ant"; 43 if($upload) 44 { 45 my $outdate = `date -u +"%Y-%m-%dT%H_%M_%S"`; 46 chomp $outdate; 47 mkdir "build/josm"; 48 system "cp po/*.po po/josm.pot build/josm"; 49 chdir "build"; 50 if(!$count) 51 { 52 system "tar -cjf ../launchpad_upload_josm_$outdate.tar.bz2 josm"; 53 } 54 else 55 { 56 my @files = sort glob("josm/*.po"); 57 my $num = 1; 58 while($#files >= 0) 21 59 { 22 my $a=$name; 23 $a =~ s/.*-//; 24 if(-f "po/$a") 60 my @f = splice(@files, 0, $count); 61 system "tar -cjf ../launchpad_upload_josm_${outdate}_$num.tar.bz2 josm/josm.pot ".join(" ",@f); 62 ++$num; 63 } 64 } 65 system "rm -rv josm"; 66 chdir ".."; 67 } 68 69 sub copypo 70 { 71 my ($path) = @_; 72 foreach my $name (split("\n", `find $path -name "*.po"`)) 73 { 74 $name =~ /([a-zA-Z_]+)\.po/; 75 if($lang{$1}) 25 76 { 26 system " mv -v $name po/$a";77 system "cp -v $name po/$1.po"; 27 78 } 28 79 elsif($cleanall) … … 33 84 close FILE; 34 85 $x =~ s/\n\n.*$/\n/s; 35 open FILE,">","po/$ a" or die;86 open FILE,">","po/$1.po" or die; 36 87 print FILE $x; 37 88 close FILE; … … 39 90 } 40 91 } 41 system "ant";42 my $outdate = `date -u +"%Y-%m-%dT%H_%M_%S"`;43 chomp $outdate;44 mkdir "build/josm";45 system "cp po/*.po po/josm.pot build/josm";46 chdir "build";47 if(!$count)48 {49 system "tar -cjf launchpad_upload_josm_$outdate.tar.bz2 josm";50 }51 else52 {53 my @files = sort glob("josm/*.po");54 my $num = 1;55 while($#files >= 0)56 {57 my @f = splice(@files, 0, $count);58 system "tar -cjf launchpad_upload_josm_${outdate}_$num.tar.bz2 josm/josm.pot ".join(" ",@f);59 ++$num;60 }61 }62 system "rm -rv josm new";63 chdir ".."; -
applications/editors/josm/i18n/po
- Property svn:ignore
-
old new 1 1 josm.pot 2 *.po 3 *~
-
- Property svn:ignore
Note:
See TracChangeset
for help on using the changeset viewer.