Ticket #92: gettext.diff
| File gettext.diff, 39.4 KB (added by hjansen, 5 years ago) |
|---|
-
lib/Padre/Wx/Dialog/Bookmarks.pm
8 8 9 9 use Padre::Wx; 10 10 use Padre::Wx::Dialog; 11 use Wx::Locale qw(:default); 11 12 12 13 our $VERSION = '0.15'; 13 14 … … 16 17 17 18 my @layout; 18 19 if ($text) { 19 push @layout, [['Wx::TextCtrl', 'entry', $text]];20 push @layout, [['Wx::TextCtrl', gettext('entry'), $text]]; 20 21 } 21 22 push @layout, 22 23 [ 23 ['Wx::StaticText', undef, "Existing bookmarks:"],24 ['Wx::StaticText', undef, gettext("Existing bookmarks:")], 24 25 ], 25 26 [ 26 27 ['Wx::Treebook', 'tb', $shortcuts], … … 41 42 sub dialog { 42 43 my ($class, $main, $text) = @_; 43 44 44 my $title = $text ? "Set Bookmark" : "GoTo Bookmark";45 my $title = $text ? gettext("Set Bookmark") : gettext("GoTo Bookmark"); 45 46 my $config = Padre->ide->config; 46 47 my @shortcuts = sort keys %{ $config->{bookmarks} }; 47 48 … … 107 108 my $path = $main->selected_filename; 108 109 my $file = File::Basename::basename($path || ''); 109 110 110 my $dialog = $class->dialog($main, "$file line $line");111 my $dialog = $class->dialog($main, gettext("%s line %s", $file, $line)); 111 112 return if not show_modal($dialog); 112 113 113 114 my $data = _get_data($dialog); -
lib/Padre/Wx/Dialog/Find.pm
8 8 9 9 use Padre::Wx; 10 10 use Padre::Wx::Dialog; 11 use Wx::Locale qw(:default); 11 12 12 13 our $VERSION = '0.15'; 13 14 … … 18 19 19 20 my @layout = ( 20 21 [ 21 [ 'Wx::StaticText', undef, 'Find:'],22 [ 'Wx::StaticText', undef, gettext('Find:')], 22 23 [ 'Wx::ComboBox', '_find_choice_', $search_term, $config->{search_terms}], 23 24 [ 'Wx::Button', '_find_', Wx::wxID_FIND ], 24 25 ], 25 26 [ 26 [ 'Wx::StaticText', undef, 'Replace With:'],27 [ 'Wx::StaticText', undef, gettext('Replace With:')], 27 28 [ 'Wx::ComboBox', '_replace_choice_', '', $config->{replace_terms}], 28 29 [ 'Wx::Button', '_replace_', '&Replace'], 29 30 ], 30 31 [ 31 32 [], 32 33 [], 33 [ 'Wx::Button', '_replace_all_', 'Replace &All'],34 [ 'Wx::Button', '_replace_all_', gettext('Replace &All')], 34 35 ], 35 36 [ 36 ['Wx::CheckBox', 'case_insensitive', 'Case &Insensitive', ($config->{search}->{case_insensitive} ? 1 : 0) ],37 ['Wx::CheckBox', 'case_insensitive', gettext('Case &Insensitive'), ($config->{search}->{case_insensitive} ? 1 : 0) ], 37 38 ], 38 39 [ 39 ['Wx::CheckBox', 'use_regex', '&Use Regex', ($config->{search}->{use_regex} ? 1 : 0) ],40 ['Wx::CheckBox', 'use_regex', gettext('&Use Regex'), ($config->{search}->{use_regex} ? 1 : 0) ], 40 41 ], 41 42 [ 42 ['Wx::CheckBox', 'backwards', 'Search &Backwards', ($config->{search}->{backwards} ? 1 : 0) ],43 ['Wx::CheckBox', 'backwards', gettext('Search &Backwards'), ($config->{search}->{backwards} ? 1 : 0) ], 43 44 ], 44 45 [ 45 ['Wx::CheckBox', 'close_on_hit', 'Close Window on &hit', ($config->{search}->{close_on_hit} ? 1 : 0) ],46 ['Wx::CheckBox', 'close_on_hit', gettext('Close Window on &hit'), ($config->{search}->{close_on_hit} ? 1 : 0) ], 46 47 ], 47 48 [ 48 49 [], … … 75 76 my $layout = get_layout($search_term, $config); 76 77 my $dialog = Padre::Wx::Dialog->new( 77 78 parent => $win, 78 title => "Search",79 title => gettext("Search"), 79 80 layout => $layout, 80 81 width => [150, 200], 81 82 ); … … 254 255 eval { $regex = qr/$search_term/m }; 255 256 if ($@) { 256 257 my $main_window = Padre->ide->wx->main_window; 257 Wx::MessageBox( "Cannot build regex for '$search_term'", "Search error", Wx::wxOK, $main_window);258 Wx::MessageBox(gettext("Cannot build regex for '%s'", $search_term), gettext("Search error"), Wx::wxOK, $main_window); 258 259 return; 259 260 } 260 261 return $regex; -
lib/Padre/Wx/Dialog/Preferences.pm
6 6 7 7 use Padre::Wx (); 8 8 use Padre::Wx::Dialog (); 9 use Wx::Locale qw(:default); 9 10 10 11 our $VERSION = '0.15'; 11 12 … … 15 16 return [ 16 17 [ 17 18 [], 18 ['Wx::CheckBox', 'editor_use_tabs', 'Use Tabs', ($config->{editor_use_tabs} ? 1 : 0) ],19 ['Wx::CheckBox', 'editor_use_tabs', gettext('Use Tabs'), ($config->{editor_use_tabs} ? 1 : 0) ], 19 20 ], 20 21 [ 21 [ 'Wx::StaticText', undef, 'TAB display size (in spaces)'],22 [ 'Wx::StaticText', undef, gettext('TAB display size (in spaces)')], 22 23 [ 'Wx::TextCtrl', 'editor_tabwidth', $config->{editor_tabwidth}], 23 24 ], 24 25 [ 25 [ 'Wx::StaticText', undef, 'Max number of modules'],26 [ 'Wx::StaticText', undef, gettext('Max number of modules')], 26 27 [ 'Wx::TextCtrl', 'pod_maxlist', $config->{pod_maxlist}], 27 28 ], 28 29 [ 29 [ 'Wx::StaticText', undef, 'Min number of modules'],30 [ 'Wx::StaticText', undef, gettext('Min number of modules')], 30 31 [ 'Wx::TextCtrl', 'pod_minlist', $config->{pod_minlist}], 31 32 ], 32 33 [ 33 [ 'Wx::StaticText', undef, 'Open files:'],34 [ 'Wx::StaticText', undef, gettext('Open files:')], 34 35 [ 'Wx::Choice', 'choice', $values], 35 36 ], 36 37 [ … … 51 52 my $layout = get_layout($config, \@values); 52 53 my $dialog = Padre::Wx::Dialog->new( 53 54 parent => $win, 54 title => "Preferences",55 title => gettext("Preferences"), 55 56 layout => $layout, 56 57 width => [250, 200], 57 58 ); -
lib/Padre/Wx/Dialog/ModuleStart.pm
10 10 11 11 use Padre::Wx (); 12 12 use Padre::Wx::Dialog (); 13 use Wx::Locale qw(:default); 13 14 14 15 our $VERSION = '0.15'; 15 16 … … 25 26 26 27 my @layout = ( 27 28 [ 28 [ 'Wx::StaticText', undef, 'Module Name:'],29 [ 'Wx::StaticText', undef, gettext('Module Name:')], 29 30 [ 'Wx::TextCtrl', '_module_name_', ''], 30 31 ], 31 32 [ 32 [ 'Wx::StaticText', undef, 'Author:'],33 [ 'Wx::StaticText', undef, gettext('Author:')], 33 34 [ 'Wx::TextCtrl', '_author_name_', ($config->{module_start}{author_name} || '') ], 34 35 ], 35 36 [ 36 [ 'Wx::StaticText', undef, 'Email:'],37 [ 'Wx::StaticText', undef, gettext('Email:')], 37 38 [ 'Wx::TextCtrl', '_email_', ($config->{module_start}{email} || '') ], 38 39 ], 39 40 [ 40 [ 'Wx::StaticText', undef, 'Builder:'],41 [ 'Wx::StaticText', undef, gettext('Builder:')], 41 42 [ 'Wx::ComboBox', '_builder_choice_', '', \@builders], 42 43 ], 43 44 [ 44 [ 'Wx::StaticText', undef, 'License:'],45 [ 'Wx::StaticText', undef, gettext('License:')], 45 46 [ 'Wx::ComboBox', '_license_choice_', '', \@licenses], 46 47 ], 47 48 [ 48 [ 'Wx::StaticText', undef, 'Parent Directory:'],49 [ 'Wx::DirPickerCtrl', '_directory_', '', 'Pick parent directory'],49 [ 'Wx::StaticText', undef, gettext('Parent Directory:')], 50 [ 'Wx::DirPickerCtrl', '_directory_', '', gettext('Pick parent directory')], 50 51 ], 51 52 [ 52 53 [ 'Wx::Button', '_ok_', Wx::wxID_OK ], … … 70 71 my $layout = get_layout($config); 71 72 my $dialog = Padre::Wx::Dialog->new( 72 73 parent => $win, 73 title => "Module Start",74 title => gettext("Module Start"), 74 75 layout => $layout, 75 76 width => [100, 200], 76 77 ); … … 79 80 Wx::Event::EVT_BUTTON( $dialog, $dialog->{_widgets_}{_ok_}, \&ok_clicked ); 80 81 Wx::Event::EVT_BUTTON( $dialog, $dialog->{_widgets_}{_cancel_}, \&cancel_clicked ); 81 82 82 $dialog->{_widgets_}{_license_choice_}->SetValue( 'perl');83 $dialog->{_widgets_}{_license_choice_}->SetValue(gettext('perl')); 83 84 84 85 $dialog->{_widgets_}{_module_name_}->SetFocus; 85 86 $dialog->Show(1); … … 113 114 my @fields = qw(_module_name_ _author_name_ _email_ _builder_choice_ _license_choice_); 114 115 foreach my $f (@fields) { 115 116 if (not $data->{$f}) { 116 Wx::MessageBox( "Field $f was missing. Module not created.", "missing field", Wx::wxOK, $main_window);117 Wx::MessageBox(gettext("Field %s was missing. Module not created.", $f), gettext("missing field"), Wx::wxOK, $main_window); 117 118 return; 118 119 } 119 120 } … … 130 131 Module::Starter::App->run; 131 132 @ARGV = (); 132 133 chdir $pwd; 133 Wx::MessageBox( "$data->{_module_name_} apparantly created.", "Done", Wx::wxOK, $main_window);134 Wx::MessageBox(gettext("%s apparantly created.", $data->{_module_name_}), gettext("Done"), Wx::wxOK, $main_window); 134 135 135 136 return; 136 137 } -
lib/Padre/Wx/Menu.pm
8 8 use Padre::Wx (); 9 9 use Padre::Util (); 10 10 use Padre::Documents (); 11 use Wx::Locale qw(:default); 11 12 12 13 our $VERSION = '0.15'; 13 14 … … 34 35 35 36 # Creating new things 36 37 Wx::Event::EVT_MENU( $win, 37 $menu->{file}->Append( -1, "New Tab\tCtrl-T"),38 $menu->{file}->Append( -1, gettext("New Tab\tCtrl-T") ), 38 39 sub { 39 40 $_[0]->setup_editor; 40 41 return; 41 42 }, 42 43 ); 43 44 $menu->{file_new} = Wx::Menu->new; 44 $menu->{file}->Append( -1, "New...", $menu->{file_new} );45 $menu->{file}->Append( -1, gettext("New..."), $menu->{file_new} ); 45 46 Wx::Event::EVT_MENU( $win, 46 $menu->{file_new}->Append( -1, 'Perl Distribution (Module::Starter)'),47 $menu->{file_new}->Append( -1, gettext('Perl Distribution (Module::Starter)') ), 47 48 \&Padre::Wx::Dialog::ModuleStart::on_start, 48 49 ); 49 50 … … 53 54 sub { $_[0]->on_open }, 54 55 ); 55 56 Wx::Event::EVT_MENU( $win, 56 $menu->{file}->Append( -1, "Open Selection\tCtrl-Shift-O"),57 $menu->{file}->Append( -1, gettext("Open Selection\tCtrl-Shift-O") ), 57 58 sub { $_[0]->on_open_selection }, 58 59 ); 59 60 Wx::Event::EVT_MENU( $win, … … 61 62 sub { $_[0]->on_close }, 62 63 ); 63 64 Wx::Event::EVT_MENU( $win, 64 $menu->{file}->Append( -1, 'Close All'),65 $menu->{file}->Append( -1, gettext('Close All') ), 65 66 sub { $_[0]->on_close_all }, 66 67 ); 67 68 Wx::Event::EVT_MENU( $win, 68 $menu->{file}->Append( -1, 'Close All but Current Document'),69 $menu->{file}->Append( -1, gettext('Close All but Current Document') ), 69 70 sub { $_[0]->on_close_all_but_current }, 70 71 ); 71 72 Wx::Event::EVT_MENU( $win, 72 $menu->{file}->Append( -1, 'Reload file'),73 $menu->{file}->Append( -1, gettext('Reload file') ), 73 74 sub { $_[0]->on_reload_file }, 74 75 ); 75 76 $menu->{file}->AppendSeparator; … … 84 85 sub { $_[0]->on_save_as }, 85 86 ); 86 87 Wx::Event::EVT_MENU( $win, 87 $menu->{file}->Append( -1, 'Save All'),88 $menu->{file}->Append( -1, gettext('Save All') ), 88 89 sub { $_[0]->on_save_all }, 89 90 ); 90 91 $menu->{file}->AppendSeparator; 91 92 92 93 # Conversions and Transforms 93 94 $menu->{file_convert} = Wx::Menu->new; 94 $menu->{file}->Append( -1, "Convert...", $menu->{file_convert} );95 $menu->{file}->Append( -1, gettext("Convert..."), $menu->{file_convert} ); 95 96 Wx::Event::EVT_MENU( $win, 96 $menu->{file_convert}->Append(-1, "EOL to Windows"),97 $menu->{file_convert}->Append(-1, gettext("EOL to Windows")), 97 98 sub { $_[0]->convert_to("WIN") }, 98 99 ); 99 100 Wx::Event::EVT_MENU( $win, 100 $menu->{file_convert}->Append(-1, "EOL to Unix"),101 $menu->{file_convert}->Append(-1, gettext("EOL to Unix")), 101 102 sub { $_[0]->convert_to("UNIX") }, 102 103 ); 103 104 Wx::Event::EVT_MENU( $win, 104 $menu->{file_convert}->Append(-1, "EOL to Mac"),105 $menu->{file_convert}->Append(-1, gettext("EOL to Mac")), 105 106 sub { $_[0]->convert_to("MAC") }, 106 107 ); 107 108 $menu->{file}->AppendSeparator; 108 109 109 110 # Recent things 110 111 $menu->{file_recentfiles} = Wx::Menu->new; 111 $menu->{file}->Append( -1, "Recent Files", $menu->{file_recentfiles} );112 $menu->{file}->Append( -1, gettext("Recent Files"), $menu->{file_recentfiles} ); 112 113 foreach my $f ( Padre::DB->get_recent_files ) { 113 114 next unless -f $f; 114 115 Wx::Event::EVT_MENU( $win, … … 126 127 } 127 128 if ( $experimental ) { 128 129 $menu->{file_recent_projects} = Wx::Menu->new; 129 $menu->{file}->Append( -1, "Recent Projects", $menu->{file_recent_projects} );130 $menu->{file}->Append( -1, gettext("Recent Projects"), $menu->{file_recent_projects} ); 130 131 } 131 132 $menu->{file}->AppendSeparator; 132 133 … … 172 173 \&Padre::Wx::Dialog::Find::on_find, 173 174 ); 174 175 Wx::Event::EVT_MENU( $win, 175 $menu->{edit}->Append( -1, "&Find Next\tF3"),176 $menu->{edit}->Append( -1, gettext("&Find Next\tF3") ), 176 177 \&Padre::Wx::Dialog::Find::on_find_next, 177 178 ); 178 179 Wx::Event::EVT_MENU( $win, 179 $menu->{edit}->Append( -1, "Find Previous\tShift-F3"),180 $menu->{edit}->Append( -1, gettext("Find Previous\tShift-F3") ), 180 181 \&Padre::Wx::Dialog::Find::on_find_previous, 181 182 ); 182 183 Wx::Event::EVT_MENU( $win, 183 $menu->{edit}->Append( -1, "Ac&k"),184 $menu->{edit}->Append( -1, gettext("Ac&k") ), 184 185 \&Padre::Wx::Ack::on_ack, 185 186 ); 186 187 Wx::Event::EVT_MENU( $win, 187 $menu->{edit}->Append( -1, "&Goto\tCtrl-G"),188 $menu->{edit}->Append( -1, gettext("&Goto\tCtrl-G") ), 188 189 \&Padre::Wx::MainWindow::on_goto, 189 190 ); 190 191 Wx::Event::EVT_MENU( $win, 191 $menu->{edit}->Append( -1, "&AutoComp\tCtrl-P"),192 $menu->{edit}->Append( -1, gettext("&AutoComp\tCtrl-P") ), 192 193 \&Padre::Wx::MainWindow::on_autocompletition, 193 194 ); 194 195 Wx::Event::EVT_MENU( $win, 195 $menu->{edit}->Append( -1, "Subs\tAlt-S"),196 $menu->{edit}->Append( -1, gettext("Subs\tAlt-S") ), 196 197 sub { $_[0]->{rightbar}->SetFocus }, 197 198 ); 198 199 Wx::Event::EVT_MENU( $win, 199 $menu->{edit}->Append( -1, "&Brace matching\tCtrl-1"),200 $menu->{edit}->Append( -1, gettext("&Brace matching\tCtrl-1") ), 200 201 \&Padre::Wx::MainWindow::on_brace_matching, 201 202 ); 202 203 $menu->{edit}->AppendSeparator; 203 204 204 205 # Commenting 205 206 Wx::Event::EVT_MENU( $win, 206 $menu->{edit}->Append( -1, "&Comment Selected Lines\tCtrl-M"),207 $menu->{edit}->Append( -1, gettext("&Comment Selected Lines\tCtrl-M") ), 207 208 \&Padre::Wx::MainWindow::on_comment_out_block, 208 209 ); 209 210 Wx::Event::EVT_MENU( $win, 210 $menu->{edit}->Append( -1, "&Uncomment Selected Lines\tCtrl-Shift-M"),211 $menu->{edit}->Append( -1, gettext("&Uncomment Selected Lines\tCtrl-Shift-M") ), 211 212 \&Padre::Wx::MainWindow::on_uncomment_block, 212 213 ); 213 214 $menu->{edit}->AppendSeparator; 214 215 215 216 216 217 Wx::Event::EVT_MENU( $win, 217 $menu->{edit}->Append( -1, "Diff"),218 $menu->{edit}->Append( -1, gettext("Diff") ), 218 219 \&Padre::Wx::MainWindow::on_diff, 219 220 ); 220 221 $menu->{edit}->AppendSeparator; 221 222 222 223 # User Preferences 223 224 Wx::Event::EVT_MENU( $win, 224 $menu->{edit}->Append( -1, "&Preferences"),225 $menu->{edit}->Append( -1, gettext("&Preferences") ), 225 226 \&Padre::Wx::MainWindow::on_preferences, 226 227 ); 227 228 … … 231 232 232 233 # Create the View menu 233 234 $menu->{view} = Wx::Menu->new; 234 $menu->{view_lines} = $menu->{view}->AppendCheckItem( -1, "Show Line numbers");235 $menu->{view_lines} = $menu->{view}->AppendCheckItem( -1, gettext("Show Line numbers") ); 235 236 Wx::Event::EVT_MENU( $win, 236 237 $menu->{view_lines}, 237 238 \&Padre::Wx::MainWindow::on_toggle_line_numbers, 238 239 ); 239 $menu->{view_eol} = $menu->{view}->AppendCheckItem( -1, "Show Newlines");240 $menu->{view_eol} = $menu->{view}->AppendCheckItem( -1, gettext("Show Newlines") ); 240 241 Wx::Event::EVT_MENU( $win, 241 242 $menu->{view_eol}, 242 243 \&Padre::Wx::MainWindow::on_toggle_eol, 243 244 ); 244 $menu->{view_output} = $menu->{view}->AppendCheckItem( -1, "Show Output");245 $menu->{view_output} = $menu->{view}->AppendCheckItem( -1, gettext("Show Output") ); 245 246 Wx::Event::EVT_MENU( $win, 246 247 $menu->{view_output}, 247 248 sub { … … 252 253 ); 253 254 unless ( Padre::Util::WIN32 ) { 254 255 # On Windows disabling the status bar is broken, so don't allow it 255 $menu->{view_statusbar} = $menu->{view}->AppendCheckItem( -1, "Show StatusBar");256 $menu->{view_statusbar} = $menu->{view}->AppendCheckItem( -1, gettext("Show StatusBar") ); 256 257 Wx::Event::EVT_MENU( $win, 257 258 $menu->{view_statusbar}, 258 259 \&Padre::Wx::MainWindow::on_toggle_status_bar, 259 260 ); 260 261 } 261 $menu->{view_indentation_guide} = $menu->{view}->AppendCheckItem( -1, "Show Indentation Guide");262 $menu->{view_indentation_guide} = $menu->{view}->AppendCheckItem( -1, gettext("Show Indentation Guide") ); 262 263 Wx::Event::EVT_MENU( $win, 263 264 $menu->{view_indentation_guide}, 264 265 \&Padre::Wx::MainWindow::on_toggle_indentation_guide, 265 266 ); 266 $menu->{view_show_calltips} = $menu->{view}->AppendCheckItem( -1, "Show Call Tips");267 $menu->{view_show_calltips} = $menu->{view}->AppendCheckItem( -1, gettext("Show Call Tips") ); 267 268 Wx::Event::EVT_MENU( $win, 268 269 $menu->{view_show_calltips}, 269 270 sub { $config->{editor_calltips} = $menu->{view_show_calltips}->IsChecked }, … … 271 272 $menu->{view}->AppendSeparator; 272 273 273 274 Wx::Event::EVT_MENU( $win, 274 $menu->{view}->Append( -1, "Increase Font Size\tCtrl-+"),275 $menu->{view}->Append( -1, gettext("Increase Font Size\tCtrl-+") ), 275 276 sub { $_[0]->zoom(+1) }, 276 277 ); 277 278 Wx::Event::EVT_MENU( $win, 278 $menu->{view}->Append( -1, "Decrease Font Size\tCtrl--"),279 $menu->{view}->Append( -1, gettext("Decrease Font Size\tCtrl--") ), 279 280 sub { $_[0]->zoom(-1) }, 280 281 ); 281 282 Wx::Event::EVT_MENU( $win, 282 $menu->{view}->Append( -1, "Reset Font Size\tCtrl-/"),283 $menu->{view}->Append( -1, gettext("Reset Font Size\tCtrl-/") ), 283 284 sub { $_[0]->zoom( -1 * $_[0]->selected_editor->GetZoom ) }, 284 285 ); 285 286 286 287 $menu->{view}->AppendSeparator; 287 288 Wx::Event::EVT_MENU( $win, 288 $menu->{view}->Append( -1, "Set Bookmark\tCtrl-B"),289 $menu->{view}->Append( -1, gettext("Set Bookmark\tCtrl-B") ), 289 290 sub { Padre::Wx::Dialog::Bookmarks->set_bookmark($_[0]) }, 290 291 ); 291 292 Wx::Event::EVT_MENU( $win, 292 $menu->{view}->Append( -1, "Goto Bookmark\tCtrl-Shift-B"),293 $menu->{view}->Append( -1, gettext("Goto Bookmark\tCtrl-Shift-B") ), 293 294 sub { Padre::Wx::Dialog::Bookmarks->goto_bookmark($_[0]) }, 294 295 ); 295 296 … … 299 300 $menu->{perl} = Wx::Menu->new; 300 301 301 302 # Perl-Specific Searches 302 $menu->{perl_find_unmatched} = $menu->{perl}->Append( -1, "Find Unmatched Brace");303 $menu->{perl_find_unmatched} = $menu->{perl}->Append( -1, gettext("Find Unmatched Brace") ); 303 304 Wx::Event::EVT_MENU( $win, 304 305 $menu->{perl_find_unmatched}, 305 306 sub { … … 320 321 } @$where; 321 322 $doc->ppi_select( $where->[0] ); 322 323 } else { 323 Wx::MessageBox( "All braces appear to be matched", "Check Complete", Wx::wxOK, $win );324 Wx::MessageBox( gettext("All braces appear to be matched"), gettext("Check Complete"), Wx::wxOK, $win ); 324 325 } 325 326 }, 326 327 ); … … 330 331 $menu->{run} = Wx::Menu->new; 331 332 332 333 # Script Execution 333 $menu->{run_run_script} = $menu->{run}->Append( -1, "Run Script\tF5");334 $menu->{run_run_script} = $menu->{run}->Append( -1, gettext("Run Script\tF5") ); 334 335 Wx::Event::EVT_MENU( $win, 335 336 $menu->{run_run_script}, 336 337 sub { $_[0]->run_script }, 337 338 ); 338 $menu->{run_run_command} = $menu->{run}->Append( -1, "Run Command\tCtrl-F5");339 $menu->{run_run_command} = $menu->{run}->Append( -1, gettext("Run Command\tCtrl-F5") ); 339 340 Wx::Event::EVT_MENU( $win, 340 341 $menu->{run_run_command}, 341 342 sub { $_[0]->on_run_command }, 342 343 ); 343 $menu->{run_stop} = $menu->{run}->Append( -1, "&Stop");344 $menu->{run_stop} = $menu->{run}->Append( -1, gettext("&Stop") ); 344 345 Wx::Event::EVT_MENU( $win, 345 346 $menu->{run_stop}, 346 347 sub { … … 377 378 $menu->{window} = Wx::Menu->new; 378 379 if ( $experimental ) { 379 380 Wx::Event::EVT_MENU( $win, 380 $menu->{window}->Append( -1, "&Split window"),381 $menu->{window}->Append( -1, gettext("&Split window") ), 381 382 \&Padre::Wx::MainWindow::on_split_window, 382 383 ); 383 384 $menu->{window}->AppendSeparator; 384 385 } 385 386 Wx::Event::EVT_MENU( $win, 386 $menu->{window}->Append(-1, "Next File\tCtrl-TAB"),387 $menu->{window}->Append(-1, gettext("Next File\tCtrl-TAB")), 387 388 \&Padre::Wx::MainWindow::on_next_pane, 388 389 ); 389 390 Wx::Event::EVT_MENU( $win, 390 $menu->{window}->Append(-1, "Previous File\tCtrl-Shift-TAB"),391 $menu->{window}->Append(-1, gettext("Previous File\tCtrl-Shift-TAB")), 391 392 \&Padre::Wx::MainWindow::on_prev_pane, 392 393 ); 393 394 $menu->{window}->AppendSeparator; … … 405 406 sub { $help->help($win) }, 406 407 ); 407 408 Wx::Event::EVT_MENU( $win, 408 $menu->{help}->Append( -1, "Context Help\tCtrl-Shift-H"),409 $menu->{help}->Append( -1, gettext("Context Help\tCtrl-Shift-H") ), 409 410 sub { 410 411 my $main = shift; 411 412 my $selection = $main->selected_text; … … 432 433 if ( $experimental ) { 433 434 $menu->{experimental} = Wx::Menu->new; 434 435 Wx::Event::EVT_MENU( $win, 435 $menu->{experimental}->Append( -1, 'Reflow Menu/Toolbar'),436 $menu->{experimental}->Append( -1, gettext('Reflow Menu/Toolbar') ), 436 437 sub { 437 438 $DB::single = 1; 438 439 my $document = Padre::Documents->current; … … 444 445 ); 445 446 Wx::Event::EVT_MENU( 446 447 $win, 447 $menu->{experimental}->Append( -1, 'Run in &Padre'),448 $menu->{experimental}->Append( -1, gettext('Run in &Padre') ), 448 449 sub { 449 450 my $self = shift; 450 451 my $code = Padre::Documents->current->text_get; 451 452 eval $code; 452 453 if ($@) { 453 Wx::MessageBox( "Error: $@", "Self error", Wx::wxOK, $self);454 Wx::MessageBox(gettext("Error: ") . "$@", gettext("Self error"), Wx::wxOK, $self); 454 455 return; 455 456 } 456 457 return; … … 460 461 461 462 # Create and return the main menu bar 462 463 $menu->{wx} = Wx::MenuBar->new; 463 $menu->{wx}->Append( $menu->{file}, "&File");464 $menu->{wx}->Append( $menu->{project}, "&Project");465 $menu->{wx}->Append( $menu->{edit}, "&Edit");466 $menu->{wx}->Append( $menu->{view}, "&View");467 #$menu->{wx}->Append( $menu->{perl}, "Perl");468 $menu->{wx}->Append( $menu->{run}, "Run");469 $menu->{wx}->Append( $menu->{bookmark}, "&Bookmarks");470 $menu->{wx}->Append( $menu->{plugin}, "Pl&ugins") if $menu->{plugin};471 $menu->{wx}->Append( $menu->{window}, "&Window");472 $menu->{wx}->Append( $menu->{help}, "&Help");464 $menu->{wx}->Append( $menu->{file}, gettext("&File") ); 465 $menu->{wx}->Append( $menu->{project}, gettext("&Project") ); 466 $menu->{wx}->Append( $menu->{edit}, gettext("&Edit") ); 467 $menu->{wx}->Append( $menu->{view}, gettext("&View") ); 468 #$menu->{wx}->Append( $menu->{perl}, gettext("Perl") ); 469 $menu->{wx}->Append( $menu->{run}, gettext("Run") ); 470 $menu->{wx}->Append( $menu->{bookmark}, gettext("&Bookmarks") ); 471 $menu->{wx}->Append( $menu->{plugin}, gettext("Pl&ugins") ) if $menu->{plugin}; 472 $menu->{wx}->Append( $menu->{window}, gettext("&Window") ); 473 $menu->{wx}->Append( $menu->{help}, gettext("&Help") ); 473 474 if ( $experimental ) { 474 $menu->{wx}->Append( $menu->{experimental}, "E&xperimental");475 $menu->{wx}->Append( $menu->{experimental}, gettext("E&xperimental") ); 475 476 } 476 477 477 478 # Setup menu state from configuration … … 564 565 565 566 # Create the new menu bar 566 567 $self->{wx} = Wx::MenuBar->new; 567 $self->{wx}->Append( $self->{file}, "&File");568 $self->{wx}->Append( $self->{project}, "&Project");569 $self->{wx}->Append( $self->{edit}, "&Edit");570 $self->{wx}->Append( $self->{view}, "&View");568 $self->{wx}->Append( $self->{file}, gettext("&File") ); 569 $self->{wx}->Append( $self->{project}, gettext("&Project") ); 570 $self->{wx}->Append( $self->{edit}, gettext("&Edit") ); 571 $self->{wx}->Append( $self->{view}, gettext("&View") ); 571 572 if ( _INSTANCE($document, 'Padre::Document::Perl') ) { 572 $self->{wx}->Append( $self->{perl}, "Perl");573 $self->{wx}->Append( $self->{perl}, gettext("Perl") ); 573 574 } 574 $self->{wx}->Append( $self->{bookmark}, "&Bookmarks");575 $self->{wx}->Append( $self->{plugin}, "Pl&ugins") if $self->{plugin};576 $self->{wx}->Append( $self->{window}, "&Window");577 $self->{wx}->Append( $self->{help}, "&Help");575 $self->{wx}->Append( $self->{bookmark}, gettext("&Bookmarks") ); 576 $self->{wx}->Append( $self->{plugin}, gettext("Pl&ugins") ) if $self->{plugin}; 577 $self->{wx}->Append( $self->{window}, gettext("&Window") ); 578 $self->{wx}->Append( $self->{help}, gettext("&Help") ); 578 579 if ( Padre->ide->config->{experimental} ) { 579 $self->{wx}->Append( $self->{experimental}, "E&xperimental");580 $self->{wx}->Append( $self->{experimental}, gettext("E&xperimental") ); 580 581 } 581 582 $self->win->SetMenuBar( $self->{wx} ); 582 583 -
lib/Padre/Wx/Project.pm
9 9 # Project related widgets of Padre 10 10 11 11 use Padre::Wx (); 12 use Wx::Locale qw(:default); 12 13 13 14 our $VERSION = '0.15'; 14 15 … … 20 21 # create directory call, Module::Starter 21 22 # set current project 22 23 # run 23 Wx::MessageBox( "Not implemented yet", "Not Yes", Wx::wxOK, $self);24 Wx::MessageBox(gettext("Not implemented yet"), gettext("Not Yes"), Wx::wxOK, $self); 24 25 25 26 return; 26 27 } … … 37 38 38 39 my $config = Padre->ide->config; 39 40 40 my $dialog = Wx::Dialog->new( $self, -1, "Select Project", [-1, -1], [-1, -1]);41 my $dialog = Wx::Dialog->new( $self, -1, gettext("Select Project"), [-1, -1], [-1, -1]); 41 42 42 43 my $box = Wx::BoxSizer->new( Wx::wxVERTICAL ); 43 44 my $row1 = Wx::BoxSizer->new( Wx::wxHORIZONTAL ); … … 50 51 $box->Add($row3); 51 52 $box->Add($row4); 52 53 53 $row1->Add( Wx::StaticText->new( $dialog, -1, 'Select Project Name or type in new one'), 1, Wx::wxALL, 3 );54 $row1->Add( Wx::StaticText->new( $dialog, -1, gettext('Select Project Name or type in new one')), 1, Wx::wxALL, 3 ); 54 55 55 56 my @projects = keys %{ $config->{projects} }; 56 57 my $choice = Wx::ComboBox->new( $dialog, -1, '', [-1, -1], [-1, -1], \@projects); 57 58 $row2->Add( $choice, 1, Wx::wxALL, 3); 58 59 59 my $dir_selector = Wx::Button->new( $dialog, -1, 'Select Directory');60 my $dir_selector = Wx::Button->new( $dialog, -1, gettext('Select Directory')); 60 61 $row2->Add($dir_selector, 1, Wx::wxALL, 3); 61 62 62 63 my $path = Wx::StaticText->new( $dialog, -1, ''); … … 120 121 sub on_pick_project_dir { 121 122 my ($path, $self, $event) = @_; 122 123 123 my $dialog = Wx::DirDialog->new( $self, "Select Project Directory", $default_dir);124 my $dialog = Wx::DirDialog->new( $self, gettext("Select Project Directory"), $default_dir); 124 125 if ($dialog->ShowModal == Wx::wxID_CANCEL) { 125 126 #print "Cancel\n"; 126 127 return; … … 136 137 137 138 sub on_test_project { 138 139 my ($self) = @_; 139 Wx::MessageBox( "Not implemented yet", "Not Yes", Wx::wxOK, $self);140 Wx::MessageBox(gettext("Not implemented yet"), gettext("Not Yes"), Wx::wxOK, $self); 140 141 } 141 142 142 143 1; -
lib/Padre/Wx/Menu/Help.pm
6 6 7 7 use Padre::Wx (); 8 8 use Padre::Util; 9 use Wx::Locale qw(:default); 9 10 10 11 our $VERSION = '0.15'; 11 12 #our @ISA = 'Wx::Menu'; … … 38 39 "Config at " . Padre->ide->config_dir . "\n" 39 40 ); 40 41 $about->SetVersion($Padre::VERSION); 41 $about->SetCopyright( "Copyright 2008 Gabor Szabo");42 $about->SetCopyright(gettext("Copyright 2008 Gabor Szabo")); 42 43 # Only Unix/GTK native about box supports websites 43 44 if ( Padre::Util::UNIX ) { 44 45 $about->SetWebSite("http://padre.perlide.org/"); -
lib/Padre/Wx/MainWindow.pm
18 18 use Padre::Wx::Output (); 19 19 use Padre::Documents (); 20 20 21 use Wx::Locale qw(:default); 22 21 23 use base qw{Wx::Frame}; 22 24 23 25 our $VERSION = '0.15'; … … 49 51 my $dir = $0; 50 52 $dir =~ s/padre$//; 51 53 if ( -d "$dir.svn" ) { 52 $title .= '(running from SVN checkout)';54 $title .= gettext('(running from SVN checkout)'); 53 55 } 54 56 } 55 57 my $self = $class->SUPER::new( … … 67 69 $wx_frame_style, 68 70 ); 69 71 72 # config param has to be ID, not name (e.g.: 87 for 'de'); TODO change this 73 $self->refresh_locale( $config->{'host'}->{'locale'} ); 74 70 75 $self->{manager} = Wx::AuiManager->new; 71 76 $self->manager->SetManagedWindow( $self ); 72 77 … … 100 105 ->Dockable->Floatable->PinButton->CaptionVisible->Movable 101 106 ->MinimizeButton->PaneBorder->Gripper->MaximizeButton 102 107 ->FloatingPosition(100, 100)->FloatingSize(500, 300) 103 ->Caption( "Files")->Position( 1 )108 ->Caption( gettext("Files") )->Position( 1 ) 104 109 ); 105 110 106 111 … … 135 140 ->Dockable->Floatable->PinButton->CaptionVisible->Movable 136 141 ->MinimizeButton->PaneBorder->Gripper->MaximizeButton 137 142 ->FloatingPosition(100, 100)->FloatingSize(100, 400) 138 ->Caption( "Subs")->Position( 3 )->Right143 ->Caption( gettext("Subs") )->Position( 3 )->Right 139 144 ); 140 145 141 146 142 $self->{rightbar}->InsertColumn(0, 'Methods');147 $self->{rightbar}->InsertColumn(0, gettext('Methods')); 143 148 $self->{rightbar}->SetColumnWidth(0, Wx::wxLIST_AUTOSIZE); 144 149 Wx::Event::EVT_LIST_ITEM_ACTIVATED( 145 150 $self, … … 157 162 ->Dockable->Floatable->PinButton->CaptionVisible->Movable 158 163 ->MinimizeButton->PaneBorder->Gripper->MaximizeButton 159 164 ->FloatingPosition(100, 100) 160 ->Caption( "Output")->Position( 2 )->Bottom165 ->Caption( gettext("Output") )->Position( 2 )->Bottom 161 166 ); 162 167 163 168 # Special Key Handling … … 293 298 return if $self->no_refresh; 294 299 295 300 my $doc = $self->selected_document; 301 $self->refresh_locale; 296 302 $self->refresh_menu; 297 303 $self->refresh_toolbar; 298 304 $self->refresh_status; … … 306 312 return; 307 313 } 308 314 315 sub refresh_locale { 316 my $self = shift; 317 my $lang = shift || Wx::Locale::GetSystemLanguage; 318 319 $self->{'locale'} = undef; 320 321 $self->{'locale'} = Wx::Locale->new($lang); 322 $self->{'locale'}->AddCatalogLookupPathPrefix( Padre::Wx::sharedir('locale') ); 323 my $langname = $self->{'locale'}->GetCanonicalName(); 324 325 my $shortname = $langname ? substr( $langname, 0, 2 ) : 'en'; # only providing default sublangs 326 my $filename = Padre::Wx::sharefile( 'locale', $shortname ) . '.mo'; 327 328 $self->{'locale'}->AddCatalog($shortname) if -f $filename; 329 330 return; 331 } 332 309 333 sub refresh_menu { 310 334 my $self = shift; 311 335 return if $self->no_refresh; … … 448 472 require Padre::Wx::History::TextDialog; 449 473 my $dialog = Padre::Wx::History::TextDialog->new( 450 474 $main_window, 451 "Command line",452 "Run setup",475 gettext("Command line"), 476 gettext("Run setup"), 453 477 "run_command", 454 478 ); 455 479 if ( $dialog->ShowModal == Wx::wxID_CANCEL ) { … … 513 537 } 514 538 515 539 # Start the command 516 $self->{command} = Wx::Perl::ProcessStream->OpenProcess( $cmd, 'MyName1', $self );540 $self->{command} = Wx::Perl::ProcessStream->OpenProcess( $cmd, gettext('MyName1'), $self ); 517 541 unless ( $self->{command} ) { 518 542 # Failed to start the command. Clean up. 519 543 $self->{menu}->{run_run_script}->Enable(1); … … 529 553 my $self = shift; 530 554 my $document = Padre::Documents->current; 531 555 532 return $self->error( "No open document") if not $document;556 return $self->error(gettext("No open document")) if not $document; 533 557 534 558 # Apply the user's save-on-run policy 535 559 # TODO: Make this code suck less … … 543 567 } 544 568 545 569 if ( not $document->can('get_command') ) { 546 return $self->error( "No execution mode was defined for this document");570 return $self->error(gettext("No execution mode was defined for this document")); 547 571 } 548 572 549 573 my $cmd = eval { $document->get_command }; … … 562 586 my $self = shift; 563 587 my $document = $self->selected_document; 564 588 unless ( $document->isa('Perl::Document::Perl') ) { 565 return $self->error( "Not a Perl document");589 return $self->error(gettext("Not a Perl document")); 566 590 } 567 591 568 592 # Check the file name 569 593 my $filename = $document->filename; 570 594 unless ( $filename =~ /\.pl$/i ) { 571 return $self->error( "Only .pl files can be executed");595 return $self->error(gettext("Only .pl files can be executed")); 572 596 } 573 597 574 598 # Apply the user's save-on-run policy … … 604 628 sub message { 605 629 my $self = shift; 606 630 my $message = shift; 607 my $title = shift || 'Message';631 my $title = shift || gettext('Message'); 608 632 Wx::MessageBox( $message, $title, Wx::wxOK | Wx::wxCENTRE, $self ); 609 633 return; 610 634 } 611 635 612 636 sub error { 613 637 my $self = shift; 614 $self->message( shift, 'Error');638 $self->message( shift, gettext('Error') ); 615 639 } 616 640 617 641 … … 697 721 my $doc = $self->selected_document or return; 698 722 my ( $length, @words ) = $doc->autocomplete; 699 723 if ( $length =~ /\D/ ) { 700 Wx::MessageBox($length, "Autocompletions error", Wx::wxOK);724 Wx::MessageBox($length, gettext("Autocompletions error"), Wx::wxOK); 701 725 } 702 726 if ( @words ) { 703 727 $doc->editor->AutoCompShow($length, join " ", @words); … … 708 732 sub on_goto { 709 733 my $self = shift; 710 734 711 my $dialog = Wx::TextEntryDialog->new( $self, "Line number:", "", '' );735 my $dialog = Wx::TextEntryDialog->new( $self, gettext("Line number:"), "", '' ); 712 736 if ($dialog->ShowModal == Wx::wxID_CANCEL) { 713 737 return; 714 738 } … … 864 888 my ($self, $event) = @_; 865 889 my $selection = $self->selected_text(); 866 890 if (not $selection) { 867 Wx::MessageBox( "Need to have something selected", "Open Selection", Wx::wxOK, $self);891 Wx::MessageBox(gettext("Need to have something selected"), gettext("Open Selection"), Wx::wxOK, $self); 868 892 return; 869 893 } 870 894 my $file; … … 901 925 } 902 926 903 927 if (not $file) { 904 Wx::MessageBox( "Could not find file '$selection'", "Open Selection", Wx::wxOK, $self);928 Wx::MessageBox(gettext("Could not find file '%s'", $selection), gettext("Open Selection"), Wx::wxOK, $self); 905 929 return; 906 930 } 907 931 … … 921 945 } 922 946 my $dialog = Wx::FileDialog->new( 923 947 $self, 924 "Open file",948 gettext("Open file"), 925 949 $default_dir, 926 950 "", 927 951 "*.*", … … 974 998 while (1) { 975 999 my $dialog = Wx::FileDialog->new( 976 1000 $self, 977 "Save file as...",1001 gettext("Save file as..."), 978 1002 $default_dir, 979 1003 "", 980 1004 "*.*", … … 988 1012 my $path = File::Spec->catfile($default_dir, $filename); 989 1013 if ( -e $path ) { 990 1014 my $res = Wx::MessageBox( 991 "File already exists. Overwrite it?",992 "Exist",1015 gettext("File already exists. Overwrite it?"), 1016 gettext("Exist"), 993 1017 Wx::wxYES_NO, 994 1018 $self, 995 1019 ); … … 1050 1074 1051 1075 if ($doc->has_changed_on_disk) { 1052 1076 my $ret = Wx::MessageBox( 1053 "File changed on disk since last saved. Do you want to overwrite it?",1054 $doc->filename || "File not in sync",1077 gettext("File changed on disk since last saved. Do you want to overwrite it?"), 1078 $doc->filename || gettext("File not in sync"), 1055 1079 Wx::wxYES_NO|Wx::wxCENTRE, 1056 1080 $self, 1057 1081 ); … … 1060 1084 1061 1085 my $error = $doc->save_file; 1062 1086 if ($error) { 1063 Wx::MessageBox($error, "Error", Wx::wxOK, $self);1087 Wx::MessageBox($error, gettext("Error"), Wx::wxOK, $self); 1064 1088 return; 1065 1089 } 1066 1090 … … 1101 1125 1102 1126 if ( $doc->is_modified and not $doc->is_unused ) { 1103 1127 my $ret = Wx::MessageBox( 1104 "File changed. Do you want to save it?",1105 $doc->filename || "Unsaved File",1128 gettext("File changed. Do you want to save it?"), 1129 $doc->filename || gettext("Unsaved File"), 1106 1130 Wx::wxYES_NO|Wx::wxCANCEL|Wx::wxCENTRE, 1107 1131 $self, 1108 1132 ); … … 1202 1226 use Text::Diff (); 1203 1227 my $current = $doc->text_get; 1204 1228 my $file = $doc->filename; 1205 return $self->error( "Cannot diff if file was never saved") if not $file;1229 return $self->error(gettext("Cannot diff if file was never saved")) if not $file; 1206 1230 1207 1231 my $diff = Text::Diff::diff($file, \$current); 1208 1232 1209 1233 if (not $diff) { 1210 $diff = "There are no differences\n";1234 $diff = gettext("There are no differences\n"); 1211 1235 } 1212 1236 $self->show_output; 1213 1237 $self->{output}->clear; … … 1353 1377 my $code = $doc->text_get; 1354 1378 eval $code; 1355 1379 if ( $@ ) { 1356 Wx::MessageBox( "Error: $@", "Self error", Wx::wxOK, $self);1380 Wx::MessageBox(gettext("Error: %s", $@), gettext("Self error"), Wx::wxOK, $self); 1357 1381 return; 1358 1382 } 1359 1383 return; -
lib/Padre/Wx/Ack.pm
7 7 use App::Ack; 8 8 9 9 use Padre::Wx; 10 use Wx::Locale qw(:default); 10 11 11 12 my $iter; 12 13 my %opts; … … 64 65 my $style = Wx::wxDEFAULT_FRAME_STYLE; 65 66 66 67 my $dialog = Wx::Dialog->new( $win, $id, $title, $pos, $size, $style, $name ); 67 my $label_1 = Wx::StaticText->new($dialog, -1, "Term: ", Wx::wxDefaultPosition, Wx::wxDefaultSize, );68 my $label_1 = Wx::StaticText->new($dialog, -1, gettext("Term: "), Wx::wxDefaultPosition, Wx::wxDefaultSize, ); 68 69 my $term = Wx::ComboBox->new($dialog, -1, "", Wx::wxDefaultPosition, Wx::wxDefaultSize, [], Wx::wxCB_DROPDOWN); 69 70 my $button_search = Wx::Button->new($dialog, Wx::wxID_FIND, ''); 70 my $label_2 = Wx::StaticText->new($dialog, -1, "Dir: ", Wx::wxDefaultPosition, Wx::wxDefaultSize, );71 my $label_2 = Wx::StaticText->new($dialog, -1, gettext("Dir: "), Wx::wxDefaultPosition, Wx::wxDefaultSize, ); 71 72 my $dir = Wx::ComboBox->new($dialog, -1, "", Wx::wxDefaultPosition, Wx::wxDefaultSize, [], Wx::wxCB_DROPDOWN); 72 73 my $button_cancel = Wx::Button->new($dialog, Wx::wxID_CANCEL, ''); 73 74 my $nothing_1 = Wx::StaticText->new($dialog, -1, "", Wx::wxDefaultPosition, Wx::wxDefaultSize, ); 74 75 my $nothing_2 = Wx::StaticText->new($dialog, -1, "", Wx::wxDefaultPosition, Wx::wxDefaultSize, ); 75 my $button_dir = Wx::Button->new($dialog, -1, "Pick &directory");76 my $button_dir = Wx::Button->new($dialog, -1, gettext("Pick &directory")); 76 77 77 78 Wx::Event::EVT_BUTTON( $dialog, $button_search, sub { $dialog->EndModal(Wx::wxID_FIND) } ); 78 79 Wx::Event::EVT_BUTTON( $dialog, $button_dir, sub { on_pick_dir($dir, @_) } ); … … 121 122 sub on_pick_dir { 122 123 my ($dir, $self, $event) = @_; 123 124 124 my $dir_dialog = Wx::DirDialog->new( $self, "Select directory", '');125 my $dir_dialog = Wx::DirDialog->new( $self, gettext("Select directory"), ''); 125 126 if ($dir_dialog->ShowModal == Wx::wxID_CANCEL) { 126 127 return; 127 128 } -
lib/Padre/Wx/Output.pm
9 9 use warnings; 10 10 use Params::Util (); 11 11 use Padre::Wx (); 12 use Wx::Locale qw(:default); 12 13 13 14 use base 'Wx::TextCtrl'; 14 15 … … 28 29 29 30 # Do custom startup stuff here 30 31 $self->clear; 31 $self->AppendText( 'No output');32 $self->AppendText(gettext('No output')); 32 33 33 34 return $self; 34 35 } -
lib/Padre/Wx/ToolBar.pm
5 5 use warnings; 6 6 7 7 use Padre::Wx (); 8 use Wx::Locale qw(:default); 8 9 use File::Spec::Functions qw(catfile); 9 10 10 11 our $VERSION = '0.15'; … … 23 24 ); 24 25 25 26 # Automatically populate 26 $self->AddTool( 1000, '', Padre::Wx::tango(catfile('actions', 'document-new.png')), 'New File');27 $self->AddTool( Wx::wxID_OPEN, '', Padre::Wx::tango(catfile('actions', 'document-open.png')), 'Open File');28 $self->AddTool( Wx::wxID_SAVE, '', Padre::Wx::tango(catfile('actions', 'document-save.png')), 'Save File');29 $self->AddTool( Wx::wxID_CLOSE, '', Padre::Wx::tango(catfile('emblems', 'emblem-unreadable.png')) , 'Close File');27 $self->AddTool( 1000, '', Padre::Wx::tango(catfile('actions', 'document-new.png')), gettext('New File') ); 28 $self->AddTool( Wx::wxID_OPEN, '', Padre::Wx::tango(catfile('actions', 'document-open.png')), gettext('Open File') ); 29 $self->AddTool( Wx::wxID_SAVE, '', Padre::Wx::tango(catfile('actions', 'document-save.png')), gettext('Save File') ); 30 $self->AddTool( Wx::wxID_CLOSE, '', Padre::Wx::tango(catfile('emblems', 'emblem-unreadable.png')), gettext('Close File') ); 30 31 $self->AddSeparator; 31 32 # TODO, how can we make sure these numbers are unique? 32 33 #$self->AddTool( 1000, '', Padre::Wx::tango(catfile('actions', 'bookmark-new.png')), 'Bookmark' ); -
MANIFEST
75 75 eg/wx/03_button.pl 76 76 eg/wx/04_button_with_event.pl 77 77 78 share/locale/de.po 79 share/locale/de.mo 80 78 81 share/templates/template.pl 79 82 share/templates/template.pm 80 83 share/templates/template.t
