Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0cd150d3

Von Sven Schöling vor mehr als 9 Jahren hinzugefügt

  • ID 0cd150d3a21c6d23b9fe0d9451562d15abdecf94
  • Vorgänger 63f95eee
  • Nachfolger 87c518f3

migrate script für menu

Unterschiede anzeigen:

scripts/migrate_icons.pl
10 10
'AP--Reports--Purchase Orders.png'                          => 'purchase_order_report.png',
11 11
'AP--Reports--RFQs.png'                                     => 'rfq_report.png',
12 12
'AR--Add Credit Note.png'                                   => 'credit_note_add.png',
13
'AR--Add Delivery Order.png'                                => undef, # symlink to MDI-Txt_editor
13
'AR--Add Delivery Order.png'                                => 'delivery_oder_add.png', # symlink to MDI-Txt_editor
14 14
'AR--Add Dunning.png'                                       => 'dunning_add.png',
15 15
'AR--Add Quotation.png'                                     => 'quotation_add.png',
16 16
'AR--Add Sales Invoice.png'                                 => 'sales_invoice_add.png',
17 17
'AR--Add Sales Order.png'                                   => 'sales_order_add.png',
18 18
'AR.png'                                                    => 'ar.png',
19
'AR--Reports--Delivery Orders.png'                          => undef, # symlink to MDI-Text_editor
19
'AR--Reports--Delivery Orders.png'                          => 'delivery_order_report.png', # symlink to MDI-Text_editor
20 20
'AR--Reports--Dunnings.png'                                 => 'dunnings_report.png',
21 21
'AR--Reports--Invoices, Credit Notes & AR Transactions.png' => 'invoices_report.png',
22 22
'AR--Reports.png'                                           => 'ar_report.png',
......
85 85
'Master Data--Reports--Vendors.png'                         => 'vendor_report.png',
86 86
'Master Data--Update Prices.png'                            => 'prices_update.png',
87 87
'Neues Fenster.png'                                         => 'window_new.png',
88
# 'phone.png'                                                 => 'phone.png',
88
'phone.png'                                                 => 'phone.png',
89 89
'Program--Logout.png'                                       => 'logout.png',
90 90
'Program.png'                                               => 'program.png',
91 91
'Program--Preferences.png'                                  => 'preferences.png',
......
99 99
'Warehouse.png'                                             => 'warehouse.png',
100 100
'Warehouse--Produce Assembly.png'                           => 'assembly_produce.png',
101 101
'MDI-Text-Editor-16x16.png'                                 => 'mdi_text_editor.png',
102
'Productivity'                                              => 'productivity.png',
102 103
);
103 104

  
104 105
my %symlinks = (
......
152 153
  }
153 154
}
154 155

  
155
checks();
156
make_icons();
156
sub translate_menu {
157
  my ($menu_file) = @_;
158

  
159
  my $new_file = $menu_file;
160
  $new_file =~ s/\./_new\./;
161

  
162
  open my $in,  "<", $menu_file or die "error opening $menu_file: $!";
163
  open my $out, ">", $new_file  or die "error opening $new_file:  $!";
164

  
165
  while (<$in>) {
166
    print $out $_;
167
    if (/^\[(.*)\]$/) {
168
      my $name = $1;
169
      # look if we got this in %icons
170
      if ($icons{ $name . '.png' }) {
171
        my $new_name = $icons{ $name . '.png' };
172
        $new_name =~ s/\.png$//;
173
        print $out "ICON=$icons{ $name . '.png' }\n";
174
      } else {
175
        warn "don't know what '$name' is in $menu_file";
176
      }
177
    }
178
  }
179
  system("mv $new_file $menu_file");
180
}
181

  
182
# checks();
183
# make_icons();
184

  
185
translate_menu('menus/erp.ini');
186
translate_menu('menus/admin.ini');
187
translate_menu('menus/crm.ini');

Auch abrufbar als: Unified diff