Changeset 36409 in osm
- Timestamp:
- 2025-03-20T16:44:40+01:00 (2 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/i18n/replacetrans.pl
r36400 r36409 4 4 use strict; 5 5 use open qw/:std :encoding(utf8)/; 6 use Encode; 6 7 7 8 # call with pairs of strings, first the wrong string, second the replacement … … 11 12 while(@ARGV) 12 13 { 13 my $from = shift @ARGV; 14 my $to = shift @ARGV; 14 my $from = Encode::decode("utf-8", shift @ARGV); 15 my $to = Encode::decode("utf-8", shift @ARGV); 15 16 $rep{$from} = $to; 16 17 print "'$from' -> '$to'\n"; 17 18 } 18 19 19 for my $po (reverse sort glob("po/ *.po"))20 for my $po (reverse sort glob("po/fr.po")) 20 21 { 21 22 local $/; 22 23 $/ = "\n\n"; 23 open my $in,'<',$po or die; 24 open my $in,'<:encoding(utf-8)',$po or die; 24 25 my $outpo = $po; 25 26 $outpo =~ s/.*\///; 26 27 open my $out,'>',$outpo or die; 27 28 my $changed = 0; 28 29 29 30 for my $line (<$in>) 30 31 {
Note:
See TracChangeset
for help on using the changeset viewer.