| Last change
 on this file since 12485 was             11529, checked in by mfloryan, 17 years ago | 
        
          | 
Refactoring of JOSM translation infrastructure - translations are now moved away from plugins into separate directory and handled natively in JOSM core. Ant produces josm-translation.jar which if added to core/lib supplies all translations to JOSM core. ("ant install" does that)
 | 
        
          | File size:
            531 bytes | 
      
      
| Rev | Line |  | 
|---|
| [11529] | 1 | #! /usr/bin/perl -w | 
|---|
|  | 2 |  | 
|---|
|  | 3 | # Written by Dirk Stöcker <openstreetmap@dstoecker.de> | 
|---|
|  | 4 | # Public domain, no rights reserved. | 
|---|
|  | 5 |  | 
|---|
|  | 6 | use strict; | 
|---|
|  | 7 |  | 
|---|
|  | 8 | my $item; | 
|---|
|  | 9 | my $comment = 0; | 
|---|
|  | 10 |  | 
|---|
|  | 11 | # This is a simple conversion and in no way a complete XML parser | 
|---|
|  | 12 | # but it works with a default Perl installation | 
|---|
|  | 13 |  | 
|---|
|  | 14 | while(my $line = <>) | 
|---|
|  | 15 | { | 
|---|
|  | 16 | chomp($line); | 
|---|
|  | 17 | if($line =~ /^#(.*)$/) | 
|---|
|  | 18 | { | 
|---|
|  | 19 | print "//$1\n"; | 
|---|
|  | 20 | } | 
|---|
|  | 21 | elsif($line =~ /^$/) | 
|---|
|  | 22 | { | 
|---|
|  | 23 | print "\n"; | 
|---|
|  | 24 | } | 
|---|
|  | 25 | elsif($line =~ /(.*) *# *(.*) *$/) | 
|---|
|  | 26 | { | 
|---|
|  | 27 | print "tr(\"$2\") // $1\n"; | 
|---|
|  | 28 | } | 
|---|
|  | 29 | else | 
|---|
|  | 30 | { | 
|---|
|  | 31 | print "/* $line */\n"; | 
|---|
|  | 32 | } | 
|---|
|  | 33 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.