Changeset 2296
- Timestamp:
- 12/30/08 18:29:52 (3 years ago)
- Location:
- trunk/Padre/lib/Padre
- Files:
-
- 2 edited
-
Locale.pm (modified) (2 diffs)
-
Wx/Menu/View.pm (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Locale.pm
r2294 r2296 191 191 my %NUMBER = reverse %SHORTNAME; 192 192 193 # LANGUAGES hash needs to be here in order194 # the get the run-time language change for these words too.195 my %LANGUAGES = ( 193 # The list of languages that should be shown in the language menu 194 # and the strings that should be used to label them. 195 sub menu_view_languages { 196 196 ar => Wx::gettext('Arabic'), 197 197 de => Wx::gettext('German'), … … 206 206 pt => Wx::gettext('Portuguese'), # Actually brazilian, which is a bug 207 207 es => Wx::gettext('Spanish'), 208 );209 210 # TODO: The need for direct access to the table indicates a failure211 # on the part of Padre::Locale to provide sufficiently useful212 # functions. Second-generation locale support has data that is213 # too complex to be reasonably useful to external consumers, so214 # we need to fix that by providing more direct functions.215 sub languages {216 return %LANGUAGES;217 208 } 218 209 -
trunk/Padre/lib/Padre/Wx/Menu/View.pm
r2231 r2296 21 21 22 22 sub new { 23 my $class = shift; 24 my $main = shift; 23 my $class = shift; 24 my $main = shift; 25 my $config = Padre->ide->config; 25 26 26 27 # Create the empty menu as normal … … 190 191 191 192 193 192 194 # Font Size 193 195 Wx::Event::EVT_MENU( $main, … … 245 247 $self->AppendSeparator; 246 248 247 my $config = Padre->ide->config; 249 250 251 248 252 249 253 # Styles (temporary location?) … … 253 257 $self->{style} 254 258 ); 255 my %styles = (default => 'Default', night => 'Night');259 my %styles = ( default => 'Default', night => 'Night' ); 256 260 foreach my $name ( sort { $styles{$a} cmp $styles{$b} } keys %styles) { 257 261 my $label = $styles{$name}; … … 269 273 270 274 275 276 277 271 278 # Language Support 272 279 $self->{language} = Wx::Menu->new; … … 284 291 $self->{language}->AppendSeparator; 285 292 286 my %languages = Padre::Locale:: languages();293 my %languages = Padre::Locale::menu_view_languages(); 287 294 foreach my $name ( sort { $languages{$a} cmp $languages{$b} } keys %languages) { 288 295 my $label = $languages{$name}; 289 296 if ( $label eq 'English' ) { 297 # NOTE: A dose of fun in a mostly boring application. 298 # With more Padre developers, more countries, and more 299 # people in total British English instead of American 300 # English CLEARLY it is a FAR better default for us to 301 # use. 302 # Because it's something of an in joke to English 303 # speakers, non-English localisations do NOT show this. 290 304 $label = "English (New Britstralian)"; 291 305 } 292 306 293 307 my $radio = $self->{language}->AppendRadioItem( -1, $label ); 294 if ( $config->{host}->{locale} and $config->{host}->{locale} eq $name ) {295 $radio->Check(1);296 }297 308 Wx::Event::EVT_MENU( $main, 298 309 $radio, … … 301 312 }, 302 313 ); 314 if ( $config->{host}->{locale} and $config->{host}->{locale} eq $name ) { 315 $radio->Check(1); 316 } 303 317 } 304 318 … … 312 326 Wx::Event::EVT_MENU( $main, 313 327 $self->Append( -1, 314 Wx::gettext("&Full screen\tF11")328 Wx::gettext("&Full Screen\tF11") 315 329 ), 316 330 sub {
Note: See TracChangeset
for help on using the changeset viewer.
