Added proper plural handling for PO files

svn path=/trunk/; revision=852
This commit is contained in:
Curtis Gedak 2008-06-10 19:16:26 +00:00
parent f0f045a42d
commit e2c70a8bf0
3 changed files with 28 additions and 13 deletions

View File

@ -1,3 +1,11 @@
2008-06-10 Curtis Gedak <gedakc@gmail.com>
* src/Dialog_Progress.cc: Added proper PO file plural handling.
- fixed a few spelling errors.
* src/Win_GParted.cc: Added proper PO file plural handling.
- Closes GParted bug #315291
2008-05-10 Curtis Gedak <gedakc@gmail.com> 2008-05-10 Curtis Gedak <gedakc@gmail.com>
* README: Removed absolute requirement for hal-lock. * README: Removed absolute requirement for hal-lock.

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2004 Bart /* Copyright (C) 2004, 2005, 2006, 2007, 2008 Bart Hakvoort
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -236,7 +236,7 @@ void Dialog_Progress::on_signal_show()
if ( cancel ) if ( cancel )
{ {
progressbar_current .set_text( _("Operation canceled") ) ; progressbar_current .set_text( _("Operation cancelled") ) ;
progressbar_current .set_fraction( 0.0 ) ; progressbar_current .set_fraction( 0.0 ) ;
} }
else else
@ -253,7 +253,9 @@ void Dialog_Progress::on_signal_show()
str_temp = _("All operations successfully completed") ; str_temp = _("All operations successfully completed") ;
if ( warnings > 0 ) if ( warnings > 0 )
str_temp += " (" + String::ucompose( _("%1 warnings"), warnings ) + ")" ; str_temp += " ("
+ String::ucompose( ngettext("%1 warning", "%1 warnings", warnings), warnings )
+ ")" ;
progressbar_all .set_text( str_temp ) ; progressbar_all .set_text( str_temp ) ;
progressbar_all .set_fraction( 1.0 ) ; progressbar_all .set_fraction( 1.0 ) ;
@ -313,7 +315,7 @@ void Dialog_Progress::on_cancel()
Gtk::BUTTONS_NONE, Gtk::BUTTONS_NONE,
true ) ; true ) ;
dialog .set_secondary_text( _("Canceling an operation may cause SEVERE filesystem damage.") ) ; dialog .set_secondary_text( _("Cancelling an operation may cause SEVERE file system damage.") ) ;
dialog .add_button( _("Continue Operation"), Gtk::RESPONSE_NONE ) ; dialog .add_button( _("Continue Operation"), Gtk::RESPONSE_NONE ) ;
dialog .add_button( _("Cancel Operation"), Gtk::RESPONSE_CANCEL ) ; dialog .add_button( _("Cancel Operation"), Gtk::RESPONSE_CANCEL ) ;

View File

@ -667,10 +667,13 @@ void Win_GParted::Refresh_Visual()
//set new statusbartext //set new statusbartext
statusbar .pop() ; statusbar .pop() ;
if ( operations .size() != 1 ) statusbar .push( String::ucompose( ngettext( "%1 operation pending"
statusbar .push( String::ucompose( _("%1 operations pending"), operations .size() ) ); , "%1 operations pending"
else , operations .size()
statusbar .push( _( "1 operation pending" ) ); )
, operations .size()
)
);
if ( ! operations .size() ) if ( ! operations .size() )
allow_undo_clear_apply( false ) ; allow_undo_clear_apply( false ) ;
@ -724,11 +727,13 @@ bool Win_GParted::Quit_Check_Operations()
Gtk::BUTTONS_NONE, Gtk::BUTTONS_NONE,
true ); true );
if ( operations .size() != 1 ) dialog .set_secondary_text( String::ucompose( ngettext( "%1 operation is currently pending."
dialog .set_secondary_text( String::ucompose( _("%1 operations are currently pending."), , "%1 operations are currently pending."
operations .size() ) ) ; , operations .size()
else )
dialog .set_secondary_text( _("1 operation is currently pending.") ) ; , operations .size()
)
) ;
dialog .add_button( Gtk::Stock::QUIT, Gtk::RESPONSE_CLOSE ); dialog .add_button( Gtk::Stock::QUIT, Gtk::RESPONSE_CLOSE );
dialog .add_button( Gtk::Stock::CANCEL,Gtk::RESPONSE_CANCEL ); dialog .add_button( Gtk::Stock::CANCEL,Gtk::RESPONSE_CANCEL );