[gparted] Replace String::ucompose() with Glibmm equivalent (#46)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Replace String::ucompose() with Glibmm equivalent (#46)
- Date: Wed, 27 Mar 2019 17:40:39 +0000 (UTC)
commit e55b3c8544edf3bc680fe851eb11a79d1c9fc4f0
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Mon Mar 25 20:41:08 2019 +0000
Replace String::ucompose() with Glibmm equivalent (#46)
Glibmm has implemented a ustring::compose() set of methods [1] since
Glibmm 2.16, circa 2008. So replace String::ucompose(). Note that
GParted already requires glibmm >= 2.32 as set in configure.ac.
This commit just replaces all the method calls. Edit created by:
sed -i 's|String::ucompose *|Glib::ustring::compose|' src/*.cc
[1] Glibmm Reference Manual, Glib::ustring Class, compose() method
https://developer.gnome.org/glibmm/2.32/classGlib_1_1ustring.html#a64ff7ac3d9e9899c2910f1d831f8d500
Closes #46 - Drop compose subdir
src/CopyBlocks.cc | 8 +-
src/DMRaid.cc | 8 +-
src/DialogManageFlags.cc | 4 +-
src/DialogPasswordEntry.cc | 4 +-
src/Dialog_Base_Partition.cc | 4 +-
src/Dialog_Disklabel.cc | 4 +-
src/Dialog_FileSystem_Label.cc | 2 +-
src/Dialog_Partition_Copy.cc | 2 +-
src/Dialog_Partition_Info.cc | 4 +-
src/Dialog_Partition_Name.cc | 2 +-
src/Dialog_Partition_New.cc | 2 +-
src/Dialog_Partition_Resize_Move.cc | 6 +-
src/Dialog_Progress.cc | 10 +--
src/Dialog_Rescue_Data.cc | 6 +-
src/FileSystem.cc | 8 +-
src/GParted_Core.cc | 142 ++++++++++++++++++------------------
src/OperationChangeUUID.cc | 4 +-
src/OperationCheck.cc | 2 +-
src/OperationCopy.cc | 4 +-
src/OperationCreate.cc | 2 +-
src/OperationDelete.cc | 2 +-
src/OperationFormat.cc | 2 +-
src/OperationLabelFileSystem.cc | 4 +-
src/OperationNamePartition.cc | 4 +-
src/OperationResizeMove.cc | 8 +-
src/ProgressBar.cc | 4 +-
src/Utils.cc | 10 +--
src/Win_GParted.cc | 70 +++++++++---------
src/btrfs.cc | 2 +-
src/linux_swap.cc | 4 +-
src/udf.cc | 4 +-
31 files changed, 171 insertions(+), 171 deletions(-)
---
diff --git a/src/CopyBlocks.cc b/src/CopyBlocks.cc
index 2a0aa397..c7852b65 100644
--- a/src/CopyBlocks.cc
+++ b/src/CopyBlocks.cc
@@ -68,7 +68,7 @@ bool CopyBlocks::set_progress_info()
operationdetail.run_progressbar( (double)(total_done+done), (double)total_length,
PROGRESSBAR_TEXT_COPY_BYTES );
OperationDetail &operationdetail = this->operationdetail.get_last_child().get_last_child();
operationdetail.set_description(
- String::ucompose( /*TO TRANSLATORS: looks like 1.00 MiB of 16.00 MiB copied */
+ Glib::ustring::compose( /*TO TRANSLATORS: looks like 1.00 MiB of 16.00 MiB copied */
_("%1 of %2 copied"),
Utils::format_size( done, 1 ), Utils::format_size( length, 1 ) ),
FONT_ITALIC );
@@ -173,7 +173,7 @@ bool CopyBlocks::copy()
{
//final description
operationdetail.get_last_child().get_last_child().set_description(
- String::ucompose( /*TO TRANSLATORS: looks like 1.00 MiB of 16.00 MiB copied
*/
+ Glib::ustring::compose( /*TO TRANSLATORS: looks like 1.00 MiB of 16.00 MiB
copied */
_("%1 of %2 copied"),
Utils::format_size( llabs( done ), 1 ),
Utils::format_size( length, 1 ) ),
@@ -226,12 +226,12 @@ void CopyBlocks::copy_block()
if ( ped_device_write( lp_device_dst, buf, offset_dst, num_blocks_dst ) )
success = true;
else {
- error_message = String::ucompose( _("Error while writing block at sector
%1"), offset_dst );
+ error_message = Glib::ustring::compose( _("Error while writing block at
sector %1"), offset_dst );
success = false;
}
}
else
- error_message = String::ucompose( _("Error while reading block at sector %1"),
offset_src ) ;
+ error_message = Glib::ustring::compose( _("Error while reading block at sector %1"),
offset_src ) ;
}
if ( blocksize > 0 )
{
diff --git a/src/DMRaid.cc b/src/DMRaid.cc
index 246db27f..c003ab17 100644
--- a/src/DMRaid.cc
+++ b/src/DMRaid.cc
@@ -329,7 +329,7 @@ bool DMRaid::create_dev_map_entries( const Partition & partition, OperationDetai
bool exit_status = true ;
/*TO TRANSLATORS: looks like create missing /dev/mapper entries */
- Glib::ustring tmp = String::ucompose ( _("create missing %1 entries"), DEV_MAPPER_PATH );
+ Glib::ustring tmp = Glib::ustring::compose( _("create missing %1 entries"), DEV_MAPPER_PATH );
operationdetail .add_child( OperationDetail( tmp ) );
//Newer dmraid defaults to always inserting the letter 'p' between the device name
@@ -413,7 +413,7 @@ bool DMRaid::delete_affected_dev_map_entries( const Partition & partition, Opera
bool exit_status = true ;
/*TO TRANSLATORS: looks like delete affected /dev/mapper entries */
- Glib::ustring tmp = String::ucompose ( _("delete affected %1 entries"), DEV_MAPPER_PATH );
+ Glib::ustring tmp = Glib::ustring::compose( _("delete affected %1 entries"), DEV_MAPPER_PATH );
operationdetail .add_child( OperationDetail( tmp ) );
get_affected_dev_map_entries( partition, affected_entries ) ;
@@ -435,7 +435,7 @@ bool DMRaid::delete_dev_map_entry( const Partition & partition, OperationDetail
bool exit_status = true ;
/*TO TRANSLATORS: looks like delete /dev/mapper entry */
- Glib::ustring tmp = String::ucompose ( _("delete %1 entry"), DEV_MAPPER_PATH );
+ Glib::ustring tmp = Glib::ustring::compose( _("delete %1 entry"), DEV_MAPPER_PATH );
operationdetail .add_child( OperationDetail( tmp ) );
std::vector<Glib::ustring> partition_entries ;
@@ -484,7 +484,7 @@ bool DMRaid::update_dev_map_entry( const Partition & partition, OperationDetail
bool exit_status = true ;
/*TO TRANSLATORS: looks like update /dev/mapper entry */
- Glib::ustring tmp = String::ucompose ( _("update %1 entry"), DEV_MAPPER_PATH );
+ Glib::ustring tmp = Glib::ustring::compose( _("update %1 entry"), DEV_MAPPER_PATH );
operationdetail .add_child( OperationDetail( tmp ) );
if( ! delete_dev_map_entry( partition , operationdetail .get_last_child() ) )
diff --git a/src/DialogManageFlags.cc b/src/DialogManageFlags.cc
index 1057d7e9..ec51be1c 100644
--- a/src/DialogManageFlags.cc
+++ b/src/DialogManageFlags.cc
@@ -29,11 +29,11 @@ DialogManageFlags::DialogManageFlags( const Partition & partition, std::map<Glib
{
any_change = false ;
- set_title( String::ucompose( _("Manage flags on %1"), partition .get_path() ) );
+ set_title( Glib::ustring::compose( _("Manage flags on %1"), partition .get_path() ) );
set_resizable( false ) ;
Glib::ustring str_temp = "<span weight=\"bold\" size=\"larger\">" ;
- str_temp += String::ucompose( _("Manage flags on %1"), partition .get_path() ) ;
+ str_temp += Glib::ustring::compose( _("Manage flags on %1"), partition .get_path() ) ;
str_temp += "</span>\n" ;
get_vbox() ->pack_start( * Utils::mk_label( str_temp ), Gtk::PACK_SHRINK );
diff --git a/src/DialogPasswordEntry.cc b/src/DialogPasswordEntry.cc
index cbf4d4fa..c4bb9027 100644
--- a/src/DialogPasswordEntry.cc
+++ b/src/DialogPasswordEntry.cc
@@ -33,7 +33,7 @@ DialogPasswordEntry::DialogPasswordEntry( const Partition & partition )
this->set_size_request( 400, -1 );
/* TO TRANSLATORS: dialog title, looks like LUKS Passphrase /dev/sda1 */
- this->set_title( String::ucompose( _("LUKS Passphrase %1"), partition.get_path() ) );
+ this->set_title( Glib::ustring::compose( _("LUKS Passphrase %1"), partition.get_path() ) );
// Separate VBox to hold lines in the dialog.
Gtk::VBox *vbox( manage( new Gtk::VBox() ) );
@@ -43,7 +43,7 @@ DialogPasswordEntry::DialogPasswordEntry( const Partition & partition )
// Line 1: "Enter LUKS passphrase to open /dev/sda1"
vbox->pack_start( *Utils::mk_label(
- String::ucompose( _("Enter LUKS passphrase to open %1"), partition.get_path() ) ),
+ Glib::ustring::compose( _("Enter LUKS passphrase to open %1"), partition.get_path() )
),
Gtk::PACK_SHRINK );
// Line 2: "Passphrase: [ ]"
diff --git a/src/Dialog_Base_Partition.cc b/src/Dialog_Base_Partition.cc
index 4bf17d92..dcd0aa98 100644
--- a/src/Dialog_Base_Partition.cc
+++ b/src/Dialog_Base_Partition.cc
@@ -270,8 +270,8 @@ void Dialog_Base_Partition::Set_Confirm_Button( CONFIRMBUTTON button_type )
void Dialog_Base_Partition::Set_MinMax_Text( Sector min, Sector max )
{
- Glib::ustring str_temp(String::ucompose( _("Minimum size: %1 MiB"), min ) + "\t\t");
- str_temp += String::ucompose( _("Maximum size: %1 MiB"), max ) ;
+ Glib::ustring str_temp(Glib::ustring::compose( _("Minimum size: %1 MiB"), min ) + "\t\t");
+ str_temp += Glib::ustring::compose( _("Maximum size: %1 MiB"), max ) ;
label_minmax .set_text( str_temp ) ;
}
diff --git a/src/Dialog_Disklabel.cc b/src/Dialog_Disklabel.cc
index 655d5bd6..49140f75 100644
--- a/src/Dialog_Disklabel.cc
+++ b/src/Dialog_Disklabel.cc
@@ -27,7 +27,7 @@ Dialog_Disklabel::Dialog_Disklabel( const Device & device )
const Glib::ustring device_path = device .get_path() ;
/*TO TRANSLATORS: dialogtitle, looks like Create partition table on /dev/hda */
- this ->set_title( String::ucompose( _("Create partition table on %1"), device_path ) );
+ this ->set_title( Glib::ustring::compose( _("Create partition table on %1"), device_path ) );
this ->set_resizable( false );
{
@@ -50,7 +50,7 @@ Dialog_Disklabel::Dialog_Disklabel( const Device & device )
Glib::ustring str_temp("<span weight=\"bold\" size=\"larger\">");
/*TO TRANSLATORS: looks like WARNING: This will ERASE ALL DATA on the ENTIRE DISK
/dev/hda */
- str_temp += String::ucompose(_("WARNING: This will ERASE ALL DATA on the ENTIRE DISK
%1"), device_path);
+ str_temp += Glib::ustring::compose(_("WARNING: This will ERASE ALL DATA on the
ENTIRE DISK %1"), device_path);
str_temp += "</span>\n";
vbox->pack_start(*Utils::mk_label(str_temp), Gtk::PACK_SHRINK);
diff --git a/src/Dialog_FileSystem_Label.cc b/src/Dialog_FileSystem_Label.cc
index e665eb40..1f8e808c 100644
--- a/src/Dialog_FileSystem_Label.cc
+++ b/src/Dialog_FileSystem_Label.cc
@@ -31,7 +31,7 @@ Dialog_FileSystem_Label::Dialog_FileSystem_Label( const Partition & partition )
this->set_size_request( 400, -1 );
/* TO TRANSLATORS: dialog title, looks like Set file system label on /dev/hda3 */
- this->set_title( String::ucompose( _("Set file system label on %1"), partition.get_path() ) );
+ this->set_title( Glib::ustring::compose( _("Set file system label on %1"), partition.get_path() ) );
// HBox to hold the label and entry box line
Gtk::HBox *hbox( manage( new Gtk::HBox() ) );
diff --git a/src/Dialog_Partition_Copy.cc b/src/Dialog_Partition_Copy.cc
index c285799b..3315c4cf 100644
--- a/src/Dialog_Partition_Copy.cc
+++ b/src/Dialog_Partition_Copy.cc
@@ -45,7 +45,7 @@ Dialog_Partition_Copy::~Dialog_Partition_Copy()
void Dialog_Partition_Copy::set_data( const Partition & selected_partition, const Partition &
copied_partition )
{
- this ->set_title( String::ucompose( _("Paste %1"), copied_partition .get_path() ) ) ;
+ this ->set_title( Glib::ustring::compose( _("Paste %1"), copied_partition .get_path() ) ) ;
//set partition color
Gdk::Color partition_color( Utils::get_color( copied_partition.filesystem ) );
diff --git a/src/Dialog_Partition_Info.cc b/src/Dialog_Partition_Info.cc
index 215fedad..5d0263d9 100644
--- a/src/Dialog_Partition_Info.cc
+++ b/src/Dialog_Partition_Info.cc
@@ -43,7 +43,7 @@ Dialog_Partition_Info::Dialog_Partition_Info( const Partition & partition ) : pa
this ->set_size_request( -1, 370 ) ; //Minimum 370 to avoid scrolling on Fedora 20
/*TO TRANSLATORS: dialogtitle, looks like Information about /dev/hda3 */
- this ->set_title( String::ucompose( _("Information about %1"), partition .get_path() ) );
+ this ->set_title( Glib::ustring::compose( _("Information about %1"), partition .get_path() ) );
init_drawingarea() ;
@@ -355,7 +355,7 @@ void Dialog_Partition_Info::Display_Info()
}
else if ( filesystem_ptn.get_mountpoints().size() )
{
- str_temp = String::ucompose(
+ str_temp = Glib::ustring::compose(
/* TO TRANSLATORS: looks like Mounted on /mnt/mymountpoint
*/
_("Mounted on %1"),
Glib::build_path( ", ", filesystem_ptn.get_mountpoints() ) );
diff --git a/src/Dialog_Partition_Name.cc b/src/Dialog_Partition_Name.cc
index 0815794c..e081583c 100644
--- a/src/Dialog_Partition_Name.cc
+++ b/src/Dialog_Partition_Name.cc
@@ -31,7 +31,7 @@ Dialog_Partition_Name::Dialog_Partition_Name( const Partition & partition, int m
this->set_size_request( 400, -1 );
/* TO TRANSLATORS: dialog title, looks like Set partition name on /dev/hda3 */
- this->set_title( String::ucompose( _("Set partition name on %1"), partition.get_path() ) );
+ this->set_title( Glib::ustring::compose( _("Set partition name on %1"), partition.get_path() ) );
// HBox to hole the label and entry box line
Gtk::HBox *hbox( manage( new Gtk::HBox() ) );
diff --git a/src/Dialog_Partition_New.cc b/src/Dialog_Partition_New.cc
index 83314b25..ddedb966 100644
--- a/src/Dialog_Partition_New.cc
+++ b/src/Dialog_Partition_New.cc
@@ -234,7 +234,7 @@ const Partition & Dialog_Partition_New::Get_New_Partition()
bool inside_extended = new_partition->inside_extended;
new_partition->Reset();
new_partition->Set( device_path,
- String::ucompose( _("New Partition #%1"), new_count ),
+ Glib::ustring::compose( _("New Partition #%1"), new_count ),
new_count, part_type,
FILESYSTEMS[combo_filesystem.get_active_row_number()].filesystem,
new_start, new_end,
diff --git a/src/Dialog_Partition_Resize_Move.cc b/src/Dialog_Partition_Resize_Move.cc
index 15a3875b..0502eab8 100644
--- a/src/Dialog_Partition_Resize_Move.cc
+++ b/src/Dialog_Partition_Resize_Move.cc
@@ -95,12 +95,12 @@ void Dialog_Partition_Resize_Move::Resize_Move_Normal( const PartitionVector & p
// See if we can allow the start of the file system to move
if ( fs.move && ! new_partition->busy && new_partition->type != TYPE_UNPARTITIONED )
{
- set_title( String::ucompose( _("Resize/Move %1"), new_partition->get_path() ) );
+ set_title( Glib::ustring::compose( _("Resize/Move %1"), new_partition->get_path() ) );
frame_resizer_base ->set_fixed_start( false ) ;
}
else
{
- set_title( String::ucompose( _("Resize %1"), new_partition->get_path() ) );
+ set_title( Glib::ustring::compose( _("Resize %1"), new_partition->get_path() ) );
this ->fixed_start = true;
frame_resizer_base ->set_fixed_start( true ) ;
spinbutton_before .set_sensitive( false ) ;
@@ -232,7 +232,7 @@ void Dialog_Partition_Resize_Move::Resize_Move_Extended( const PartitionVector &
{
g_assert( new_partition != NULL ); // Bug: Not initialised by constructor calling set_data()
- set_title(String::ucompose(_("Resize/Move %1"), new_partition->get_path()));
+ set_title(Glib::ustring::compose(_("Resize/Move %1"), new_partition->get_path()));
//calculate total size in MiB's of previous, current and next partition
//first find index of partition
diff --git a/src/Dialog_Progress.cc b/src/Dialog_Progress.cc
index a9d46bd7..36aa3b7c 100644
--- a/src/Dialog_Progress.cc
+++ b/src/Dialog_Progress.cc
@@ -216,7 +216,7 @@ void Dialog_Progress::on_signal_show()
label_current .set_markup( "<b>" + operations[ t ] ->description + "</b>" ) ;
- progressbar_all .set_text( String::ucompose( _("%1 of %2 operations completed"), t,
operations .size() ) ) ;
+ progressbar_all .set_text( Glib::ustring::compose( _("%1 of %2 operations completed"), t,
operations .size() ) ) ;
progressbar_all .set_fraction( fraction * t > 1.0 ? 1.0 : fraction * t ) ;
treerow = treestore_operations ->children()[ t ] ;
@@ -264,7 +264,7 @@ void Dialog_Progress::on_signal_show()
if ( warnings > 0 )
str_temp += " ("
- + String::ucompose( ngettext("%1 warning", "%1 warnings", warnings),
warnings )
+ + Glib::ustring::compose( ngettext("%1 warning", "%1 warnings", warnings),
warnings )
+ ")" ;
progressbar_all .set_text( str_temp ) ;
@@ -287,7 +287,7 @@ void Dialog_Progress::on_signal_show()
str_temp += "\n\n<i><b>" + Glib::ustring( _("IMPORTANT") ) + "</b>\n" ;
str_temp += _("If you want support, you need to provide the saved details!") ;
str_temp += "\n";
- str_temp += String::ucompose(
+ str_temp += Glib::ustring::compose(
/* TO TRANSLATORS: looks like
* See https://gparted.org/save-details.htm for more information.
*/
@@ -312,7 +312,7 @@ bool Dialog_Progress::cancel_timeout()
if (--cancel_countdown) {
/*TO TRANSLATORS: looks like Force Cancel (5)
* where the number represents a count down in seconds until the button is enabled */
- cancelbutton->set_label( String::ucompose( _("Force Cancel (%1)"), cancel_countdown ) );
+ cancelbutton->set_label( Glib::ustring::compose( _("Force Cancel (%1)"), cancel_countdown ) );
} else {
cancelbutton->set_label( _("Force Cancel") );
canceltimer.disconnect();
@@ -343,7 +343,7 @@ void Dialog_Progress::on_cancel()
cancel_countdown = 5;
/*TO TRANSLATORS: looks like Force Cancel (5)
* where the number represents a count down in seconds until the button is enabled */
- cancelbutton->set_label( String::ucompose( _("Force Cancel (%1)"), cancel_countdown )
);
+ cancelbutton->set_label( Glib::ustring::compose( _("Force Cancel (%1)"),
cancel_countdown ) );
canceltimer = Glib::signal_timeout().connect(
sigc::mem_fun(*this, &Dialog_Progress::cancel_timeout), 1000 );
}
diff --git a/src/Dialog_Rescue_Data.cc b/src/Dialog_Rescue_Data.cc
index 6f3b15ec..5c740f1f 100644
--- a/src/Dialog_Rescue_Data.cc
+++ b/src/Dialog_Rescue_Data.cc
@@ -53,7 +53,7 @@ void Dialog_Rescue_Data::draw_dialog()
Glib::ustring *message;
/*TO TRANSLATORS: looks like File systems found on /dev/sdb */
- this ->set_title( String::ucompose( _("File systems found on %1"), this->device_path ) );
+ this ->set_title( Glib::ustring::compose( _("File systems found on %1"), this->device_path ) );
message=new Glib::ustring("<big><b>");
if(!this->inconsistencies)
@@ -129,7 +129,7 @@ void Dialog_Rescue_Data::create_list_of_fs()
}
/*TO TRANSLATORS: looks like 1: ntfs (10240 MiB)*/
- Gtk::Label *fsLbl= manage(new Gtk::Label( String::ucompose(_("#%1: %2 (%3 MiB)"), i+1,
fs_name, (this->partitions[i].get_byte_length()/1024/1024))));
+ Gtk::Label *fsLbl= manage(new Gtk::Label( Glib::ustring::compose(_("#%1: %2 (%3 MiB)"), i+1,
fs_name, (this->partitions[i].get_byte_length()/1024/1024))));
if(this->is_inconsistent(this->partitions[i]))
{
fsLbl->set_label(fsLbl->get_label().append(" (!)"));
@@ -343,7 +343,7 @@ void Dialog_Rescue_Data::read_partitions_from_buffer()
part_num=Utils::convert_to_int(num);
//Get the part_path
- part_path=String::ucompose ( "%1%2", this->device_path, num );
+ part_path=Glib::ustring::compose( "%1%2", this->device_path, num );
while(getline(*this->buffer, line))
{
diff --git a/src/FileSystem.cc b/src/FileSystem.cc
index fb9024e8..b9f3331c 100644
--- a/src/FileSystem.cc
+++ b/src/FileSystem.cc
@@ -216,7 +216,7 @@ Glib::ustring FileSystem::mk_temp_dir( const Glib::ustring & infix, OperationDet
{
int e = errno ;
operationdetail .get_last_child() .add_child( OperationDetail(
- String::ucompose( "mkdtemp(%1): %2", dir_buf, Glib::strerror( e ) ),
STATUS_NONE ) ) ;
+ Glib::ustring::compose( "mkdtemp(%1): %2", dir_buf, Glib::strerror( e ) ),
STATUS_NONE ) ) ;
operationdetail.get_last_child().set_success_and_capture_errors( false );
dir_name = "" ;
}
@@ -227,7 +227,7 @@ Glib::ustring FileSystem::mk_temp_dir( const Glib::ustring & infix, OperationDet
Glib::ustring( "mkdir -v " ) + dir_name, FONT_BOLD_ITALIC ) ;
operationdetail .get_last_child() .add_child( OperationDetail(
/*TO TRANSLATORS: looks like Created directory /tmp/gparted-CEzvSp */
- String::ucompose( _("Created directory %1"), dir_name ), STATUS_NONE ) ) ;
+ Glib::ustring::compose( _("Created directory %1"), dir_name ), STATUS_NONE )
) ;
operationdetail.get_last_child().set_success_and_capture_errors( true );
}
@@ -246,14 +246,14 @@ void FileSystem::rm_temp_dir( const Glib::ustring dir_name, OperationDetail & op
// failed. Set to Warning (N/A) instead.
int e = errno ;
operationdetail .get_last_child() .add_child( OperationDetail(
- String::ucompose( "rmdir(%1): ", dir_name ) + Glib::strerror( e ),
STATUS_NONE ) ) ;
+ Glib::ustring::compose( "rmdir(%1): ", dir_name ) + Glib::strerror( e ),
STATUS_NONE ) ) ;
operationdetail.get_last_child().set_status( STATUS_WARNING );
}
else
{
operationdetail .get_last_child() .add_child( OperationDetail(
/*TO TRANSLATORS: looks like Removed directory /tmp/gparted-CEzvSp */
- String::ucompose( _("Removed directory %1"), dir_name ), STATUS_NONE ) ) ;
+ Glib::ustring::compose( _("Removed directory %1"), dir_name ), STATUS_NONE )
) ;
operationdetail.get_last_child().set_success_and_capture_errors( true );
}
}
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index de7c5713..92f78623 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -196,7 +196,7 @@ void GParted_Core::set_devices_thread( std::vector<Device> * pdevices )
for (unsigned int k=0; k < temp_devices .size(); k++)
{
/*TO TRANSLATORS: looks like Scanning /dev/sda */
- set_thread_status_message( String::ucompose ( _("Scanning %1"), temp_devices[
k ] ) ) ;
+ set_thread_status_message( Glib::ustring::compose( _("Scanning %1"),
temp_devices[ k ] ) ) ;
ped_device_get( temp_devices[ k ] .c_str() ) ;
}
@@ -205,7 +205,7 @@ void GParted_Core::set_devices_thread( std::vector<Device> * pdevices )
std::vector<Glib::ustring> dmraid_devices ;
dmraid .get_devices( dmraid_devices ) ;
for ( unsigned int k=0; k < dmraid_devices .size(); k++ ) {
- set_thread_status_message( String::ucompose ( _("Scanning %1"),
dmraid_devices[k] ) ) ;
+ set_thread_status_message( Glib::ustring::compose( _("Scanning %1"),
dmraid_devices[k] ) ) ;
#ifndef USE_LIBPARTED_DMRAID
dmraid .create_dev_map_entries( dmraid_devices[k] ) ;
settle_device( SETTLE_DEVICE_PROBE_MAX_WAIT_SECONDS );
@@ -224,7 +224,7 @@ void GParted_Core::set_devices_thread( std::vector<Device> * pdevices )
while ( lp_device )
{
/* TO TRANSLATORS: looks like Confirming /dev/sda */
- set_thread_status_message( String::ucompose( _("Confirming %1"), lp_device->path ) );
+ set_thread_status_message( Glib::ustring::compose( _("Confirming %1"),
lp_device->path ) );
//only add this device if we can read the first sector (which means it's a real
device)
if ( useable_device( lp_device ) )
@@ -249,7 +249,7 @@ void GParted_Core::set_devices_thread( std::vector<Device> * pdevices )
for ( unsigned int t = 0 ; t < device_paths .size() ; t++ )
{
- set_thread_status_message( String::ucompose( _("Confirming %1"), device_paths[t] ) );
+ set_thread_status_message( Glib::ustring::compose( _("Confirming %1"),
device_paths[t] ) );
#ifndef USE_LIBPARTED_DMRAID
// Ensure that dmraid device entries are created
@@ -278,7 +278,7 @@ void GParted_Core::set_devices_thread( std::vector<Device> * pdevices )
for ( unsigned int t = 0 ; t < device_paths .size() ; t++ )
{
/*TO TRANSLATORS: looks like Searching /dev/sda partitions */
- set_thread_status_message( String::ucompose ( _("Searching %1 partitions"), device_paths[ t ]
) ) ;
+ set_thread_status_message( Glib::ustring::compose( _("Searching %1 partitions"),
device_paths[ t ] ) ) ;
Device temp_device;
set_device_from_disk( temp_device, device_paths[t] );
devices.push_back( temp_device );
@@ -534,7 +534,7 @@ bool GParted_Core::snap_to_alignment( const Device & device, Partition & partiti
//do some basic checks on the partition
if ( partition .get_sector_length() <= 0 )
{
- error = String::ucompose(
+ error = Glib::ustring::compose(
/* TO TRANSLATORS: looks like A partition cannot have a length of -1
sectors */
_("A partition cannot have a length of %1 sectors"),
partition .get_sector_length() ) ;
@@ -548,7 +548,7 @@ bool GParted_Core::snap_to_alignment( const Device & device, Partition & partiti
// the above reasoning. Confirm condition is impossible and consider removing this code.
if ( partition .get_sector_length() < partition .sectors_used )
{
- error = String::ucompose(
+ error = Glib::ustring::compose(
/* TO TRANSLATORS: looks like A partition with used sectors (2048) greater
than its length (1536) is not valid */
_("A partition with used sectors (%1) greater than its length (%2) is not
valid"),
partition .sectors_used,
@@ -1520,7 +1520,7 @@ FSType GParted_Core::detect_filesystem( PedDevice * lp_device, PedPartition * lp
temp += _( "There is no file system available (unformatted)" ) ;
temp += "\n- ";
/* TO TRANSLATORS: looks like The device entry /dev/sda5 is missing */
- temp += String::ucompose( _("The device entry %1 is missing"), path );
+ temp += Glib::ustring::compose( _("The device entry %1 is missing"), path );
messages .push_back( temp ) ;
@@ -1796,7 +1796,7 @@ void GParted_Core::set_used_sectors( Partition & partition, PedDisk* lp_disk )
temp += _("The cause might be a missing software package.");
temp += "\n";
/*TO TRANSLATORS: looks like The following list of software packages is
required for NTFS file system support: ntfsprogs. */
- temp += String::ucompose( _("The following list of software packages is
required for %1 file system support: %2."),
+ temp += Glib::ustring::compose( _("The following list of software packages is
required for %1 file system support: %2."),
Utils::get_filesystem_string( partition.filesystem
),
Utils::get_filesystem_software(
partition.filesystem )
);
@@ -1806,7 +1806,7 @@ void GParted_Core::set_used_sectors( Partition & partition, PedDisk* lp_disk )
else if ( ( unallocated = partition.get_sectors_unallocated() ) > 0 )
{
/* TO TRANSLATORS: looks like 1.28GiB of unallocated space within the partition. */
- Glib::ustring temp = String::ucompose( _("%1 of unallocated space within the
partition."),
+ Glib::ustring temp = Glib::ustring::compose( _("%1 of unallocated space within the
partition."),
Utils::format_size( unallocated,
partition.sector_size ) );
FS fs = get_fs( partition.filesystem );
if ( fs.check != FS::NONE && fs.grow != FS::NONE )
@@ -2008,11 +2008,11 @@ bool GParted_Core::create_partition( Partition & new_partition, OperationDetail
* This is showing the name and the fact
* that it is a partition within a device.
*/
- String::ucompose( _("path: %1 (%2)"),
+ Glib::ustring::compose( _("path: %1 (%2)"),
new_partition.get_path(), _("partition") )
+ "\n" +
- String::ucompose( _("start: %1"), new_partition .sector_start
) + "\n" +
- String::ucompose( _("end: %1"), new_partition .sector_end ) +
"\n" +
- String::ucompose( _("size: %1 (%2)"),
+ Glib::ustring::compose( _("start: %1"), new_partition
.sector_start ) + "\n" +
+ Glib::ustring::compose( _("end: %1"), new_partition
.sector_end ) + "\n" +
+ Glib::ustring::compose( _("size: %1 (%2)"),
new_partition .get_sector_length(),
Utils::format_size( new_partition
.get_sector_length(), new_partition .sector_size ) ),
STATUS_NONE,
@@ -2049,7 +2049,7 @@ bool GParted_Core::create_filesystem( const Partition & partition, OperationDeta
return false;
}
- operationdetail .add_child( OperationDetail( String::ucompose(
+ operationdetail .add_child( OperationDetail( Glib::ustring::compose(
/*TO TRANSLATORS: looks like create new ext3 file
system */
_("create new %1 file system"),
Utils::get_filesystem_string( partition .filesystem )
) ) ) ;
@@ -2156,7 +2156,7 @@ bool GParted_Core::remove_filesystem( const Partition & partition, OperationDeta
//Run file system specific remove method to delete the file system. Most
// file systems should NOT implement a remove() method as it will prevent
// recovery from accidental partition deletion.
- operationdetail .add_child( OperationDetail( String::ucompose(
+ operationdetail .add_child( OperationDetail( Glib::ustring::compose(
_("delete %1 file system"),
Utils::get_filesystem_string( partition
.filesystem ) ) ) ) ;
success = ( p_filesystem = get_filesystem_object( partition .filesystem ) ) &&
@@ -2182,10 +2182,10 @@ bool GParted_Core::label_filesystem( const Partition & partition, OperationDetai
if( partition.get_filesystem_label().empty() ) {
operationdetail.add_child( OperationDetail(
- String::ucompose( _("Clear file system label on %1"), partition.get_path() ) ) );
+ Glib::ustring::compose( _("Clear file system label on %1"), partition.get_path() ) )
);
} else {
operationdetail.add_child( OperationDetail(
- String::ucompose( _("Set file system label to \"%1\" on %2"),
+ Glib::ustring::compose( _("Set file system label to \"%1\" on %2"),
partition.get_filesystem_label(), partition.get_path() ) ) );
}
@@ -2210,10 +2210,10 @@ bool GParted_Core::name_partition( const Partition & partition, OperationDetail
{
if ( partition.name.empty() )
operationdetail.add_child( OperationDetail(
- String::ucompose( _("Clear partition name on %1"), partition.get_path() ) ) );
+ Glib::ustring::compose( _("Clear partition name on %1"), partition.get_path()
) ) );
else
operationdetail.add_child( OperationDetail(
- String::ucompose( _("Set partition name to \"%1\" on %2"),
+ Glib::ustring::compose( _("Set partition name to \"%1\" on %2"),
partition.name, partition.get_path() ) ) );
bool success = false;
@@ -2244,12 +2244,12 @@ bool GParted_Core::change_filesystem_uuid( const Partition & partition, Operatio
}
if ( partition .uuid == UUID_RANDOM_NTFS_HALF ) {
- operationdetail .add_child( OperationDetail( String::ucompose(
+ operationdetail .add_child( OperationDetail( Glib::ustring::compose(
_("Set half of the UUID on %1
to a new, random value"),
partition .get_path()
) ) ) ;
} else {
- operationdetail .add_child( OperationDetail( String::ucompose(
+ operationdetail .add_child( OperationDetail( Glib::ustring::compose(
_("Set UUID on %1 to a new,
random value"),
partition .get_path()
) ) ) ;
@@ -2747,7 +2747,7 @@ bool GParted_Core::resize_move_partition( const Partition & partition_old,
}
if ( ! description .empty() && action != NONE && action != MOVE_LEFT && action != MOVE_RIGHT )
- description = String::ucompose( description,
+ description = Glib::ustring::compose( description,
Utils::format_size( partition_old .get_sector_length(),
partition_old .sector_size ),
Utils::format_size( partition_new .get_sector_length(),
partition_new .sector_size ) ) ;
@@ -2767,9 +2767,9 @@ bool GParted_Core::resize_move_partition( const Partition & partition_old,
operationdetail .get_last_child() .add_child(
OperationDetail(
- String::ucompose( _("old start: %1"), partition_old .sector_start ) + "\n" +
- String::ucompose( _("old end: %1"), partition_old .sector_end ) + "\n" +
- String::ucompose( _("old size: %1 (%2)"),
+ Glib::ustring::compose( _("old start: %1"), partition_old .sector_start ) + "\n" +
+ Glib::ustring::compose( _("old end: %1"), partition_old .sector_end ) + "\n" +
+ Glib::ustring::compose( _("old size: %1 (%2)"),
partition_old .get_sector_length(),
Utils::format_size( partition_old .get_sector_length(), partition_old
.sector_size ) ),
STATUS_NONE,
@@ -2784,9 +2784,9 @@ bool GParted_Core::resize_move_partition( const Partition & partition_old,
//Change to partition succeeded
operationdetail .get_last_child() .add_child(
OperationDetail(
- String::ucompose( _("new start: %1"), new_start ) + "\n" +
- String::ucompose( _("new end: %1"), new_end ) + "\n" +
- String::ucompose( _("new size: %1 (%2)"),
+ Glib::ustring::compose( _("new start: %1"), new_start ) + "\n" +
+ Glib::ustring::compose( _("new end: %1"), new_end ) + "\n" +
+ Glib::ustring::compose( _("new size: %1 (%2)"),
new_end - new_start + 1,
Utils::format_size( new_end - new_start + 1, partition_new
.sector_size ) ),
STATUS_NONE,
@@ -2800,9 +2800,9 @@ bool GParted_Core::resize_move_partition( const Partition & partition_old,
//Change to partition failed
operationdetail .get_last_child() .add_child(
OperationDetail(
- String::ucompose( _("requested start: %1"), partition_new .sector_start ) +
"\n" +
- String::ucompose( _("requested end: %1"), partition_new . sector_end ) + "\n"
+
- String::ucompose( _("requested size: %1 (%2)"),
+ Glib::ustring::compose( _("requested start: %1"), partition_new .sector_start
) + "\n" +
+ Glib::ustring::compose( _("requested end: %1"), partition_new . sector_end )
+ "\n" +
+ Glib::ustring::compose( _("requested size: %1 (%2)"),
partition_new .get_sector_length(),
Utils::format_size( partition_new .get_sector_length(),
partition_new .sector_size ) ),
STATUS_NONE,
@@ -2835,9 +2835,9 @@ bool GParted_Core::resize_move_partition( const Partition & partition_old,
operationdetail.get_last_child().add_child(
OperationDetail(
- String::ucompose( _("original start: %1"), partition_restore->sector_start )
+ "\n" +
- String::ucompose( _("original end: %1"), partition_restore->sector_end ) +
"\n" +
- String::ucompose( _("original size: %1 (%2)"),
+ Glib::ustring::compose( _("original start: %1"),
partition_restore->sector_start ) + "\n" +
+ Glib::ustring::compose( _("original end: %1"), partition_restore->sector_end
) + "\n" +
+ Glib::ustring::compose( _("original size: %1 (%2)"),
partition_restore->get_sector_length(),
Utils::format_size( partition_restore->get_sector_length(),
partition_restore->sector_size ) ),
STATUS_NONE, FONT_ITALIC ) );
@@ -3044,7 +3044,7 @@ bool GParted_Core::recreate_linux_swap_filesystem( const Partition & partition,
{
operationdetail.add_child( OperationDetail(
/* TO TRANSLATORS: looks like not a linux-swap file system for a recreate
linux-swap only step */
- GPARTED_BUG + ": " + String::ucompose( _("not a %1 file system for a recreate %1 only
step"),
+ GPARTED_BUG + ": " + Glib::ustring::compose( _("not a %1 file system for a recreate
%1 only step"),
Utils::get_filesystem_string( FS_LINUX_SWAP ),
Utils::get_filesystem_string( FS_LINUX_SWAP )
),
STATUS_ERROR, FONT_ITALIC ) );
@@ -3056,7 +3056,7 @@ bool GParted_Core::recreate_linux_swap_filesystem( const Partition & partition,
operationdetail.add_child( OperationDetail(
/* TO TRANSLATORS: looks like recreate linux-swap file system */
- String::ucompose( _("recreate %1 file system"),
+ Glib::ustring::compose( _("recreate %1 file system"),
Utils::get_filesystem_string( FS_LINUX_SWAP ) ) ) );
// Linux-swap is recreated by using the linux_swap::resize() method
@@ -3189,7 +3189,7 @@ bool GParted_Core::copy_filesystem( const Partition & partition_src,
}
operationdetail.add_child( OperationDetail(
- String::ucompose( _("copy file system from %1 to %2"),
+ Glib::ustring::compose( _("copy file system from %1 to %2"),
partition_src.get_path(),
partition_dst.get_path() ) ) );
@@ -3272,7 +3272,7 @@ bool GParted_Core::copy_blocks( const Glib::ustring & src_device,
{
operationdetail .add_child( OperationDetail( _("using internal algorithm"), STATUS_NONE ) ) ;
operationdetail .add_child( OperationDetail(
- String::ucompose( /*TO TRANSLATORS: looks like copy 1.00 MiB */
+ Glib::ustring::compose( /*TO TRANSLATORS: looks like copy 1.00 MiB */
_("copy %1"), Utils::format_size( src_length, 1 ) ),
STATUS_NONE ) ) ;
@@ -3307,7 +3307,7 @@ bool GParted_Core::copy_blocks( const Glib::ustring & src_device,
{
benchmark_od.add_child( OperationDetail(
/*TO TRANSLATORS: looks like copy 16.00 MiB using a block size of 1.00 MiB
*/
- String::ucompose( _("copy %1 using a block size of %2"),
+ Glib::ustring::compose( _("copy %1 using a block size of %2"),
Utils::format_size( N, 1 ),
Utils::format_size( benchmark_blocksize, 1 ) ) ) );
@@ -3325,7 +3325,7 @@ bool GParted_Core::copy_blocks( const Glib::ustring & src_device,
timer.stop() ;
benchmark_od.get_last_child().add_child( OperationDetail(
- String::ucompose( _("%1 seconds"), timer .elapsed() ), STATUS_NONE, FONT_ITALIC ) ) ;
+ Glib::ustring::compose( _("%1 seconds"), timer .elapsed() ), STATUS_NONE, FONT_ITALIC
) ) ;
benchmark_od.get_last_child().set_success_and_capture_errors( succes );
if ( timer .elapsed() <= smallest_time )
@@ -3342,7 +3342,7 @@ bool GParted_Core::copy_blocks( const Glib::ustring & src_device,
}
if ( succes )
- operationdetail .get_last_child() .add_child( OperationDetail( String::ucompose(
+ operationdetail .get_last_child() .add_child( OperationDetail( Glib::ustring::compose(
/*TO TRANSLATORS: looks like optimal block size is 1.00 MiB */
_("optimal block size is %1"),
Utils::format_size( optimal_blocksize, 1 ) ),
@@ -3353,7 +3353,7 @@ bool GParted_Core::copy_blocks( const Glib::ustring & src_device,
Byte_Value remaining_length = src_length - llabs( done );
operationdetail.add_child( OperationDetail(
/*TO TRANSLATORS: looks like copy 16.00 MiB using a block size of 1.00 MiB
*/
- String::ucompose( _("copy %1 using a block size of %2"),
+ Glib::ustring::compose( _("copy %1 using a block size of %2"),
Utils::format_size( remaining_length, 1 ),
Utils::format_size( optimal_blocksize, 1 ) ) ) );
succes = CopyBlocks( src_device,
@@ -3370,7 +3370,7 @@ bool GParted_Core::copy_blocks( const Glib::ustring & src_device,
}
operationdetail .add_child( OperationDetail(
- String::ucompose( /*TO TRANSLATORS: looks like 1.00 MiB (1048576 B) copied */
+ Glib::ustring::compose( /*TO TRANSLATORS: looks like 1.00 MiB (1048576 B) copied */
_("%1 (%2 B) copied"), Utils::format_size( total_done, 1 ), total_done ),
STATUS_NONE ) ) ;
return succes ;
@@ -3442,7 +3442,7 @@ bool GParted_Core::check_repair_filesystem( const Partition & partition, Operati
return true;
operationdetail .add_child( OperationDetail(
- String::ucompose(
+ Glib::ustring::compose(
/* TO TRANSLATORS: looks like check file system on
/dev/sda5 for errors and (if possible) fix them */
_("check file system on %1 for errors and (if possible) fix
them"),
partition .get_path() ) ) ) ;
@@ -3518,7 +3518,7 @@ bool GParted_Core::set_partition_type( const Partition & partition, OperationDet
return true;
operationdetail .add_child( OperationDetail(
- String::ucompose( _("set partition type on %1"), partition .get_path() ) ) ) ;
+ Glib::ustring::compose( _("set partition type on %1"), partition .get_path()
) ) ) ;
//Set partition type appropriately for the type of file system stored in the partition.
// Libparted treats every type as a file system, except LVM which it treats as a flag.
@@ -3568,7 +3568,7 @@ bool GParted_Core::set_partition_type( const Partition & partition, OperationDet
{
operationdetail.get_last_child().add_child(
/* TO TRANSLATORS: looks like new partition type: ext4 */
- OperationDetail( String::ucompose( _("new partition type:
%1"),
+ OperationDetail( Glib::ustring::compose( _("new partition
type: %1"),
lp_partition->fs_type->name ),
STATUS_NONE,
FONT_ITALIC ) );
@@ -3583,7 +3583,7 @@ bool GParted_Core::set_partition_type( const Partition & partition, OperationDet
{
operationdetail.get_last_child().add_child(
/* TO TRANSLATORS: looks like new partition flag: lvm */
- OperationDetail( String::ucompose( _("new partition flag:
%1"),
+ OperationDetail( Glib::ustring::compose( _("new partition
flag: %1"),
ped_partition_flag_get_name( PED_PARTITION_LVM ) ),
STATUS_NONE,
FONT_ITALIC ) );
@@ -3612,7 +3612,7 @@ bool GParted_Core::calibrate_partition( Partition & partition, OperationDetail &
partition.type == TYPE_EXTENDED || partition.type == TYPE_UNPARTITIONED )
{
Glib::ustring curr_path = partition.get_path();
- operationdetail.add_child( OperationDetail( String::ucompose( _("calibrate %1"), curr_path )
) );
+ operationdetail.add_child( OperationDetail( Glib::ustring::compose( _("calibrate %1"),
curr_path ) ) );
bool success = false;
PedDevice* lp_device = NULL ;
@@ -3674,14 +3674,14 @@ bool GParted_Core::calibrate_partition( Partition & partition, OperationDetail &
* is a whole disk device or a partition
* within a device.
*/
- String::ucompose( _("path: %1 (%2)"),
+ Glib::ustring::compose( _("path: %1 (%2)"),
partition.get_path(),
( partition.type == TYPE_UNPARTITIONED )
? _("device")
: _("partition")
) + "\n" +
- String::ucompose( _("start: %1"), partition .sector_start ) +
"\n" +
- String::ucompose( _("end: %1"), partition .sector_end ) +
"\n" +
- String::ucompose( _("size: %1 (%2)"),
+ Glib::ustring::compose( _("start: %1"), partition
.sector_start ) + "\n" +
+ Glib::ustring::compose( _("end: %1"), partition .sector_end )
+ "\n" +
+ Glib::ustring::compose( _("size: %1 (%2)"),
partition .get_sector_length(),
Utils::format_size( partition
.get_sector_length(), partition .sector_size ) ),
STATUS_NONE,
@@ -3691,7 +3691,7 @@ bool GParted_Core::calibrate_partition( Partition & partition, OperationDetail &
{
const Partition & encrypted = dynamic_cast<const PartitionLUKS *>(
&partition )->get_encrypted();
operationdetail.get_last_child().add_child( OperationDetail(
- String::ucompose( _("encryption path: %1"),
encrypted.get_path() ),
+ Glib::ustring::compose( _("encryption path: %1"),
encrypted.get_path() ),
STATUS_NONE, FONT_ITALIC ) );
}
}
@@ -3717,13 +3717,13 @@ bool GParted_Core::calculate_exact_geom( const Partition & partition_old,
OperationDetail & operationdetail )
{
operationdetail .add_child( OperationDetail(
- String::ucompose( _("calculate new size and position of %1"), partition_new .get_path() ) ) )
;
+ Glib::ustring::compose( _("calculate new size and position of %1"), partition_new .get_path()
) ) ) ;
operationdetail .get_last_child() .add_child(
OperationDetail(
- String::ucompose( _("requested start: %1"), partition_new .sector_start ) + "\n" +
- String::ucompose( _("requested end: %1"), partition_new .sector_end ) + "\n" +
- String::ucompose( _("requested size: %1 (%2)"),
+ Glib::ustring::compose( _("requested start: %1"), partition_new .sector_start ) +
"\n" +
+ Glib::ustring::compose( _("requested end: %1"), partition_new .sector_end ) + "\n" +
+ Glib::ustring::compose( _("requested size: %1 (%2)"),
partition_new .get_sector_length(),
Utils::format_size( partition_new .get_sector_length(), partition_new
.sector_size ) ),
STATUS_NONE,
@@ -3768,9 +3768,9 @@ bool GParted_Core::calculate_exact_geom( const Partition & partition_old,
{
operationdetail .get_last_child() .add_child(
OperationDetail(
- String::ucompose( _("new start: %1"), partition_new .sector_start ) + "\n" +
- String::ucompose( _("new end: %1"), partition_new .sector_end ) + "\n" +
- String::ucompose( _("new size: %1 (%2)"),
+ Glib::ustring::compose( _("new start: %1"), partition_new .sector_start ) +
"\n" +
+ Glib::ustring::compose( _("new end: %1"), partition_new .sector_end ) + "\n" +
+ Glib::ustring::compose( _("new size: %1 (%2)"),
partition_new .get_sector_length(),
Utils::format_size( partition_new .get_sector_length(),
partition_new .sector_size ) ),
STATUS_NONE,
@@ -3853,7 +3853,7 @@ bool GParted_Core::erase_filesystem_signatures( const Partition & partition, Ope
bool overall_success = false ;
operationdetail .add_child( OperationDetail(
- String::ucompose( _("clear old file system signatures in %1"),
+ Glib::ustring::compose( _("clear old file system signatures in %1"),
partition .get_path() ) ) ) ;
//Get device, disk & partition and open the device. Allocate buffer and fill with
@@ -4010,7 +4010,7 @@ bool GParted_Core::erase_filesystem_signatures( const Partition & partition, Ope
{
od .add_child( OperationDetail(
/*TO TRANSLATORS: looks like write 68.00 KiB of zeros at byte offset
0 */
- String::ucompose( "write %1 of zeros at byte offset %2",
+ Glib::ustring::compose( "write %1 of zeros at byte offset %2",
Utils::format_size( byte_len, 1 ),
byte_offset ) ) ) ;
@@ -4059,7 +4059,7 @@ bool GParted_Core::erase_filesystem_signatures( const Partition & partition, Ope
if ( overall_success )
{
OperationDetail & od = operationdetail .get_last_child() ;
- od .add_child( OperationDetail( String::ucompose( _("flush operating system cache of %1"),
+ od .add_child( OperationDetail( Glib::ustring::compose( _("flush operating system cache of
%1"),
lp_device ->path ) ) ) ;
bool flush_success = false ;
@@ -4091,7 +4091,7 @@ bool GParted_Core::update_bootsector( const Partition & partition, OperationDeta
operationdetail .add_child( OperationDetail(
/*TO TRANSLATORS: update boot sector of ntfs file system on /dev/sdd1 */
- String::ucompose( _("update boot sector of %1 file system on %2"),
+ Glib::ustring::compose( _("update boot sector of %1 file system on %2"),
Utils::get_filesystem_string( partition .filesystem ),
partition .get_path() ) ) ) ;
@@ -4127,20 +4127,20 @@ bool GParted_Core::update_bootsector( const Partition & partition, OperationDeta
if ( dev_file .bad() )
{
/*TO TRANSLATORS: looks like Error trying to write to boot sector in
/dev/sdd1 */
- error_message = String::ucompose( _("Error trying to write to boot
sector in %1"), partition .get_path() ) ;
+ error_message = Glib::ustring::compose( _("Error trying to write to
boot sector in %1"), partition .get_path() ) ;
}
}
else
{
/*TO TRANSLATORS: looks like Error trying to seek to position 0x1C in
/dev/sdd1 */
- error_message = String::ucompose( _("Error trying to seek to position 0x1c in
%1"), partition .get_path() ) ;
+ error_message = Glib::ustring::compose( _("Error trying to seek to position
0x1c in %1"), partition .get_path() ) ;
}
dev_file .close( ) ;
}
else
{
/*TO TRANSLATORS: looks like Error trying to open /dev/sdd1 */
- error_message = String::ucompose( _("Error trying to open %1"), partition .get_path()
) ;
+ error_message = Glib::ustring::compose( _("Error trying to open %1"), partition
.get_path() ) ;
}
//append error messages if any found
@@ -4150,11 +4150,11 @@ bool GParted_Core::update_bootsector( const Partition & partition, OperationDeta
succes = false ;
error_message += "\n" ;
/*TO TRANSLATORS: looks like Failed to set the number of hidden sectors to 05ab4f00
in the ntfs boot record. */
- error_message += String::ucompose( _("Failed to set the number of hidden sectors to
%1 in the NTFS boot record."), reversed_hex ) ;
+ error_message += Glib::ustring::compose( _("Failed to set the number of hidden
sectors to %1 in the NTFS boot record."), reversed_hex ) ;
error_message += "\n" ;
- error_message += String::ucompose( _("You might try the following command to correct
the problem:"), reversed_hex ) ;
+ error_message += Glib::ustring::compose( _("You might try the following command to
correct the problem:"), reversed_hex ) ;
error_message += "\n" ;
- error_message += String::ucompose( "echo %1 | xxd -r -p | dd conv=notrunc of=%2 bs=1
seek=28", reversed_hex, partition .get_path() ) ;
+ error_message += Glib::ustring::compose( "echo %1 | xxd -r -p | dd conv=notrunc of=%2
bs=1 seek=28", reversed_hex, partition .get_path() ) ;
operationdetail .get_last_child() .add_child( OperationDetail( error_message,
STATUS_NONE, FONT_ITALIC ) ) ;
}
diff --git a/src/OperationChangeUUID.cc b/src/OperationChangeUUID.cc
index 16409be4..c2a079df 100644
--- a/src/OperationChangeUUID.cc
+++ b/src/OperationChangeUUID.cc
@@ -53,14 +53,14 @@ void OperationChangeUUID::create_description()
if ( partition_new->get_filesystem_partition().uuid == UUID_RANDOM_NTFS_HALF )
{
/*TO TRANSLATORS: looks like Set half the UUID to a new random value on ntfs file system on
/dev/sda1 */
- description = String::ucompose( _("Set half the UUID to a new random value on %1 file system
on %2"),
+ description = Glib::ustring::compose( _("Set half the UUID to a new random value on %1 file
system on %2"),
partition_new->get_filesystem_string(),
partition_new->get_path() );
}
else
{
/*TO TRANSLATORS: looks like Set a new random UUID on ext4 file system on /dev/sda1 */
- description = String::ucompose( _("Set a new random UUID on %1 file system on %2"),
+ description = Glib::ustring::compose( _("Set a new random UUID on %1 file system on %2"),
partition_new->get_filesystem_string(),
partition_new->get_path() );
}
diff --git a/src/OperationCheck.cc b/src/OperationCheck.cc
index 74b73f72..66aa7c53 100644
--- a/src/OperationCheck.cc
+++ b/src/OperationCheck.cc
@@ -47,7 +47,7 @@ void OperationCheck::create_description()
g_assert( partition_original != NULL ); // Bug: Not initialised by constructor or reset later
/*TO TRANSLATORS: looks like Check and repair file system (ext3) on /dev/hda4 */
- description = String::ucompose( _("Check and repair file system (%1) on %2"),
+ description = Glib::ustring::compose( _("Check and repair file system (%1) on %2"),
partition_original->get_filesystem_string(),
partition_original->get_path() );
}
diff --git a/src/OperationCopy.cc b/src/OperationCopy.cc
index f0672a12..2b6cef4b 100644
--- a/src/OperationCopy.cc
+++ b/src/OperationCopy.cc
@@ -80,7 +80,7 @@ void OperationCopy::create_description()
if ( partition_original->type == TYPE_UNALLOCATED )
{
/*TO TRANSLATORS: looks like Copy /dev/hda4 to /dev/hdd (start at 250 MiB) */
- description = String::ucompose( _("Copy %1 to %2 (start at %3)"),
+ description = Glib::ustring::compose( _("Copy %1 to %2 (start at %3)"),
partition_copied->get_path(),
device.get_path(),
Utils::format_size( partition_new->sector_start,
@@ -89,7 +89,7 @@ void OperationCopy::create_description()
else
{
/*TO TRANSLATORS: looks like Copy /dev/hda4 to /dev/hdd1 */
- description = String::ucompose( _("Copy %1 to %2"),
+ description = Glib::ustring::compose( _("Copy %1 to %2"),
partition_copied->get_path(),
partition_original->get_path() );
}
diff --git a/src/OperationCreate.cc b/src/OperationCreate.cc
index 1a629c6d..7cad7a18 100644
--- a/src/OperationCreate.cc
+++ b/src/OperationCreate.cc
@@ -68,7 +68,7 @@ void OperationCreate::create_description()
break;
}
/*TO TRANSLATORS: looks like Create Logical Partition #1 (ntfs, 345 MiB) on /dev/hda */
- description = String::ucompose( _("Create %1 #%2 (%3, %4) on %5"),
+ description = Glib::ustring::compose( _("Create %1 #%2 (%3, %4) on %5"),
description,
partition_new->partition_number,
partition_new->get_filesystem_string(),
diff --git a/src/OperationDelete.cc b/src/OperationDelete.cc
index 351c0f82..48476d18 100644
--- a/src/OperationDelete.cc
+++ b/src/OperationDelete.cc
@@ -111,7 +111,7 @@ void OperationDelete::create_description()
description = partition_original->get_path();
/*TO TRANSLATORS: looks like Delete /dev/hda2 (ntfs, 345 MiB) from /dev/hda */
- description = String::ucompose( _("Delete %1 (%2, %3) from %4"),
+ description = Glib::ustring::compose( _("Delete %1 (%2, %3) from %4"),
description,
partition_original->get_filesystem_string(),
Utils::format_size( partition_original->get_sector_length(),
diff --git a/src/OperationFormat.cc b/src/OperationFormat.cc
index 01b8aa79..d87253c5 100644
--- a/src/OperationFormat.cc
+++ b/src/OperationFormat.cc
@@ -72,7 +72,7 @@ void OperationFormat::create_description()
g_assert( partition_new != NULL ); // Bug: Not initialised by constructor or reset later
/*TO TRANSLATORS: looks like Format /dev/hda4 as linux-swap */
- description = String::ucompose( _("Format %1 as %2"),
+ description = Glib::ustring::compose( _("Format %1 as %2"),
partition_original->get_path(),
partition_new->get_filesystem_string() );
}
diff --git a/src/OperationLabelFileSystem.cc b/src/OperationLabelFileSystem.cc
index 85653178..93bf8da9 100644
--- a/src/OperationLabelFileSystem.cc
+++ b/src/OperationLabelFileSystem.cc
@@ -52,13 +52,13 @@ void OperationLabelFileSystem::create_description()
if( partition_new->get_filesystem_partition().get_filesystem_label().empty() )
{
/* TO TRANSLATORS: looks like Clear file system Label on /dev/hda3 */
- description = String::ucompose( _("Clear file system label on %1"),
+ description = Glib::ustring::compose( _("Clear file system label on %1"),
partition_new->get_path() );
}
else
{
/* TO TRANSLATORS: looks like Set file system label "My Label" on /dev/hda3 */
- description = String::ucompose( _("Set file system label \"%1\" on %2"),
+ description = Glib::ustring::compose( _("Set file system label \"%1\" on %2"),
partition_new->get_filesystem_partition().get_filesystem_label(),
partition_new->get_path() );
}
diff --git a/src/OperationNamePartition.cc b/src/OperationNamePartition.cc
index 808b82c9..98f17028 100644
--- a/src/OperationNamePartition.cc
+++ b/src/OperationNamePartition.cc
@@ -52,13 +52,13 @@ void OperationNamePartition::create_description()
if( partition_new->name.empty() )
{
/* TO TRANSLATORS: looks like Clear partition name on /dev/hda3 */
- description = String::ucompose( _("Clear partition name on %1"),
+ description = Glib::ustring::compose( _("Clear partition name on %1"),
partition_new->get_path() );
}
else
{
/* TO TRANSLATORS: looks like Set partition name "My Name" on /dev/hda3 */
- description = String::ucompose( _("Set partition name \"%1\" on %2"),
+ description = Glib::ustring::compose( _("Set partition name \"%1\" on %2"),
partition_new->name,
partition_new->get_path() );
}
diff --git a/src/OperationResizeMove.cc b/src/OperationResizeMove.cc
index ddcd531d..b291f59d 100644
--- a/src/OperationResizeMove.cc
+++ b/src/OperationResizeMove.cc
@@ -101,16 +101,16 @@ void OperationResizeMove::create_description()
switch ( action )
{
case NONE :
- description = String::ucompose( _("resize/move %1"), partition_original->get_path() );
+ description = Glib::ustring::compose( _("resize/move %1"),
partition_original->get_path() );
description += " (" ;
description += _("new and old partition have the same size and position. Hence
continuing anyway") ;
description += ")" ;
break ;
case MOVE_RIGHT :
- description = String::ucompose( _("Move %1 to the right"),
partition_original->get_path() );
+ description = Glib::ustring::compose( _("Move %1 to the right"),
partition_original->get_path() );
break ;
case MOVE_LEFT :
- description = String::ucompose( _("Move %1 to the left"),
partition_original->get_path() );
+ description = Glib::ustring::compose( _("Move %1 to the left"),
partition_original->get_path() );
break ;
case GROW :
description = _("Grow %1 from %2 to %3") ;
@@ -133,7 +133,7 @@ void OperationResizeMove::create_description()
}
if ( ! description .empty() && action != NONE && action != MOVE_LEFT && action != MOVE_RIGHT )
- description = String::ucompose( description,
+ description = Glib::ustring::compose( description,
partition_original->get_path(),
Utils::format_size( partition_original->get_sector_length(),
partition_original->sector_size ),
diff --git a/src/ProgressBar.cc b/src/ProgressBar.cc
index 10f47f27..85e5f7cb 100644
--- a/src/ProgressBar.cc
+++ b/src/ProgressBar.cc
@@ -94,7 +94,7 @@ void ProgressBar::do_update()
*/
std::time_t remaining = Utils::round( (m_target - m_progress) /
(m_progress / elapsed) );
- m_text = String::ucompose( /* TO TRANSLATORS: looks like 1.00 MiB of 16.00 MiB
copied (00:01:59 remaining) */
+ m_text = Glib::ustring::compose( /* TO TRANSLATORS: looks like 1.00 MiB of 16.00
MiB copied (00:01:59 remaining) */
_("%1 of %2 copied (%3 remaining)"),
Utils::format_size( (long long)m_progress, 1 ),
Utils::format_size( (long long)m_target, 1 ),
@@ -102,7 +102,7 @@ void ProgressBar::do_update()
}
else
{
- m_text = String::ucompose( /* TO TRANSLATORS: looks like 1.00 MiB of 16.00 MiB
copied */
+ m_text = Glib::ustring::compose( /* TO TRANSLATORS: looks like 1.00 MiB of 16.00
MiB copied */
_("%1 of %2 copied"),
Utils::format_size( m_progress, 1 ),
Utils::format_size( m_target, 1 ) );
diff --git a/src/Utils.cc b/src/Utils.cc
index 5833f9e1..bc31e766 100644
--- a/src/Utils.cc
+++ b/src/Utils.cc
@@ -450,27 +450,27 @@ Glib::ustring Utils::format_size( Sector sectors, Byte_Value sector_size )
if ( (sectors * sector_size) < KIBIBYTE )
{
ss << sector_to_unit( sectors, sector_size, UNIT_BYTE ) ;
- return String::ucompose( _("%1 B"), ss .str() ) ;
+ return Glib::ustring::compose( _("%1 B"), ss .str() ) ;
}
else if ( (sectors * sector_size) < MEBIBYTE )
{
ss << sector_to_unit( sectors, sector_size, UNIT_KIB ) ;
- return String::ucompose( _("%1 KiB"), ss .str() ) ;
+ return Glib::ustring::compose( _("%1 KiB"), ss .str() ) ;
}
else if ( (sectors * sector_size) < GIBIBYTE )
{
ss << sector_to_unit( sectors, sector_size, UNIT_MIB ) ;
- return String::ucompose( _("%1 MiB"), ss .str() ) ;
+ return Glib::ustring::compose( _("%1 MiB"), ss .str() ) ;
}
else if ( (sectors * sector_size) < TEBIBYTE )
{
ss << sector_to_unit( sectors, sector_size, UNIT_GIB ) ;
- return String::ucompose( _("%1 GiB"), ss .str() ) ;
+ return Glib::ustring::compose( _("%1 GiB"), ss .str() ) ;
}
else
{
ss << sector_to_unit( sectors, sector_size, UNIT_TIB ) ;
- return String::ucompose( _("%1 TiB"), ss .str() ) ;
+ return Glib::ustring::compose( _("%1 TiB"), ss .str() ) ;
}
}
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 94afab3f..26e73025 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -1022,7 +1022,7 @@ void Win_GParted::Refresh_Visual()
//set new statusbartext
statusbar .pop() ;
- statusbar .push( String::ucompose( ngettext( "%1 operation pending"
+ statusbar .push( Glib::ustring::compose( ngettext( "%1 operation pending"
, "%1 operations pending"
, operations .size()
)
@@ -1138,7 +1138,7 @@ bool Win_GParted::Quit_Check_Operations()
Gtk::BUTTONS_NONE,
true );
- dialog .set_secondary_text( String::ucompose( ngettext( "%1 operation is currently pending."
+ dialog .set_secondary_text( Glib::ustring::compose( ngettext( "%1 operation is currently
pending."
, "%1 operations are currently pending."
, operations .size()
)
@@ -1544,7 +1544,7 @@ void Win_GParted::combo_devices_changed()
current_device = old_current_device;
if ( current_device >= devices .size() )
current_device = 0 ;
- set_title( String::ucompose( _("%1 - GParted"), devices[ current_device ] .get_path() ) );
+ set_title( Glib::ustring::compose( _("%1 - GParted"), devices[ current_device ] .get_path() ) );
//refresh label_device_info
Fill_Label_Device_Info();
@@ -1739,7 +1739,7 @@ void Win_GParted::show_disklabel_unrecognized ( Glib::ustring device_name )
//Display dialog box indicating that no partition table was found on the device
Gtk::MessageDialog dialog( *this,
/*TO TRANSLATORS: looks like No partition table found on device /dev/sda */
- String::ucompose( _( "No partition table found on device %1" ), device_name ),
+ Glib::ustring::compose( _( "No partition table found on device %1" ), device_name ),
false,
Gtk::MESSAGE_INFO,
Gtk::BUTTONS_OK,
@@ -1758,7 +1758,7 @@ void Win_GParted::show_resize_readonly( const Glib::ustring & path )
{
Gtk::MessageDialog dialog( *this,
/* TO TRANSLATORS: looks like Unable to resize read-only file system
/dev/sda1 */
- String::ucompose( _("Unable to resize read-only file system %1"), path ),
+ Glib::ustring::compose( _("Unable to resize read-only file system %1"),
path ),
false,
Gtk::MESSAGE_INFO,
Gtk::BUTTONS_OK,
@@ -1939,7 +1939,7 @@ bool Win_GParted::max_amount_prim_reached()
{
Gtk::MessageDialog dialog(
*this,
- String::ucompose( ngettext( "It is not possible to create more than %1 primary
partition"
+ Glib::ustring::compose( ngettext( "It is not possible to create more than %1 primary
partition"
, "It is not possible to create more than %1 primary
partitions"
, devices[ current_device ] .max_prims
)
@@ -2079,7 +2079,7 @@ void Win_GParted::activate_resize()
true );
Glib::ustring tmp_msg =
/*TO TRANSLATORS: looks like You queued an operation to move the
start sector of partition /dev/sda3. */
- String::ucompose( _( "You have queued an operation to move the start
sector of partition %1." )
+ Glib::ustring::compose( _( "You have queued an operation to move the
start sector of partition %1." )
, operation->get_partition_original().get_path() );
tmp_msg += _(" Failure to boot is most likely to occur if you move the GNU/Linux
partition containing /boot, or if you move the Windows system partition C:.");
tmp_msg += "\n";
@@ -2162,7 +2162,7 @@ void Win_GParted::activate_paste()
// the partition is created and the real path queried.
OperationCopy * copy_op = static_cast<OperationCopy*>( operation );
copy_op->get_partition_new().set_path(
- String::ucompose( _("Copy of %1"),
+ Glib::ustring::compose( _("Copy of %1"),
copy_op->get_partition_copied().get_path() ) );
Add_Operation( devices[current_device], operation );
@@ -2271,7 +2271,7 @@ void Win_GParted::activate_paste()
) ;
dialog .set_secondary_text(
/*TO TRANSLATORS: looks like The data in /dev/sda3 will be lost if
you apply this operation. */
- String::ucompose( _( "The data in %1 will be lost if you apply this
operation." ),
+ Glib::ustring::compose( _( "The data in %1 will be lost if you apply
this operation." ),
selected_partition_ptr->get_path() ) );
dialog .run() ;
}
@@ -2345,14 +2345,14 @@ void Win_GParted::activate_delete()
selected_partition_ptr->partition_number < devices[current_device].highest_busy )
{
Gtk::MessageDialog dialog( *this,
- String::ucompose( _("Unable to delete %1!"),
selected_partition_ptr->get_path() ),
+ Glib::ustring::compose( _("Unable to delete %1!"),
selected_partition_ptr->get_path() ),
false,
Gtk::MESSAGE_ERROR,
Gtk::BUTTONS_OK,
true );
dialog .set_secondary_text(
- String::ucompose( _("Please unmount any logical partitions having a number higher
than %1"),
+ Glib::ustring::compose( _("Please unmount any logical partitions having a number
higher than %1"),
selected_partition_ptr->partition_number ) );
dialog .run() ;
@@ -2363,7 +2363,7 @@ void Win_GParted::activate_delete()
if ( copied_partition != NULL && selected_partition_ptr->get_path() == copied_partition->get_path() )
{
Gtk::MessageDialog dialog( *this,
- String::ucompose( _("Are you sure you want to delete %1?"),
+ Glib::ustring::compose( _("Are you sure you want to delete %1?"),
selected_partition_ptr->get_path() ),
false,
Gtk::MESSAGE_QUESTION,
@@ -2373,7 +2373,7 @@ void Win_GParted::activate_delete()
dialog .set_secondary_text( _("After deletion this partition is no longer available for
copying.") ) ;
/*TO TRANSLATORS: dialogtitle, looks like Delete /dev/hda2 (ntfs, 2345 MiB) */
- dialog.set_title( String::ucompose( _("Delete %1 (%2, %3)"),
+ dialog.set_title( Glib::ustring::compose( _("Delete %1 (%2, %3)"),
selected_partition_ptr->get_path(),
Utils::get_filesystem_string(
selected_partition_ptr->filesystem ),
Utils::format_size(
selected_partition_ptr->get_sector_length(), selected_partition_ptr->sector_size ) ) );
@@ -2526,7 +2526,7 @@ void Win_GParted::activate_format( FSType new_fs )
( fs_limits.max_size && selected_partition_ptr->get_byte_length() > fs_limits.max_size ) )
{
Gtk::MessageDialog dialog( *this,
- String::ucompose( /* TO TRANSLATORS: looks like
+ Glib::ustring::compose( /* TO TRANSLATORS: looks like
* Cannot format this file system to fat16.
*/
_("Cannot format this file system to %1"),
@@ -2537,7 +2537,7 @@ void Win_GParted::activate_format( FSType new_fs )
true );
if ( selected_partition_ptr->get_byte_length() < fs_limits.min_size )
- dialog.set_secondary_text( String::ucompose(
+ dialog.set_secondary_text( Glib::ustring::compose(
/* TO TRANSLATORS: looks like
* A fat16 file system requires a partition of at least 16.00 MiB.
*/
@@ -2545,7 +2545,7 @@ void Win_GParted::activate_format( FSType new_fs )
Utils::get_filesystem_string( encrypted, new_fs ),
Utils::format_size( fs_limits.min_size, 1 /* Byte */ ) ) );
else
- dialog.set_secondary_text( String::ucompose(
+ dialog.set_secondary_text( Glib::ustring::compose(
/* TO TRANSLATORS: looks like
* A partition with a hfs file system has a maximum size of 2.00 GiB.
*/
@@ -2628,7 +2628,7 @@ bool Win_GParted::open_encrypted_partition( const Partition & partition,
Glib::shell_quote( partition.get_path() ) + " " +
Glib::shell_quote( mapping_name );
- show_pulsebar( String::ucompose( _("Opening encryption on %1"), partition.get_path() ) );
+ show_pulsebar( Glib::ustring::compose( _("Opening encryption on %1"), partition.get_path() ) );
Glib::ustring output;
Glib::ustring error;
bool success = ! Utils::execute_command( cmd, pw, output, error );
@@ -2665,7 +2665,7 @@ void Win_GParted::toggle_crypt_busy_state()
{
action = LUKSCLOSE;
disallowed_msg = _("The close encryption action cannot be performed when there are operations
pending for the partition.");
- pulse_msg = String::ucompose( _("Closing encryption on %1"),
selected_partition_ptr->get_path() );
+ pulse_msg = Glib::ustring::compose( _("Closing encryption on %1"),
selected_partition_ptr->get_path() );
failure_msg = _("Could not close encryption");
}
else // ( ! selected_partition_ptr->busy )
@@ -2782,7 +2782,7 @@ bool Win_GParted::check_toggle_busy_allowed( const Glib::ustring & disallowed_ms
int operation_count = partition_in_operation_queue_count( *selected_partition_ptr );
if ( operation_count > 0 )
{
- Glib::ustring primary_msg = String::ucompose(
+ Glib::ustring primary_msg = Glib::ustring::compose(
/* TO TRANSLATORS: Singular case looks like 1 operation is currently pending for
partition /dev/sdb1 */
ngettext( "%1 operation is currently pending for partition %2",
/* TO TRANSLATORS: Plural case looks like 3 operations are currently pending for
partition /dev/sdb1 */
@@ -2843,21 +2843,21 @@ void Win_GParted::toggle_fs_busy_state()
{
action = SWAPOFF;
disallowed_msg = _("The swapoff action cannot be performed when there are operations pending
for the partition.");
- pulse_msg = String::ucompose( _("Deactivating swap on %1"), filesystem_ptn.get_path() );
+ pulse_msg = Glib::ustring::compose( _("Deactivating swap on %1"), filesystem_ptn.get_path() );
failure_msg = _("Could not deactivate swap");
}
else if ( filesystem_ptn.filesystem == FS_LINUX_SWAP && ! filesystem_ptn.busy )
{
action = SWAPON;
disallowed_msg = _("The swapon action cannot be performed when there are operations pending
for the partition.");
- pulse_msg = String::ucompose( _("Activating swap on %1"), filesystem_ptn.get_path() );
+ pulse_msg = Glib::ustring::compose( _("Activating swap on %1"), filesystem_ptn.get_path() );
failure_msg = _("Could not activate swap");
}
else if ( filesystem_ptn.filesystem == FS_LVM2_PV && filesystem_ptn.busy )
{
action = DEACTIVATE_VG;
disallowed_msg = _("The deactivate Volume Group action cannot be performed when there are
operations pending for the partition.");
- pulse_msg = String::ucompose( _("Deactivating Volume Group %1"),
+ pulse_msg = Glib::ustring::compose( _("Deactivating Volume Group %1"),
filesystem_ptn.get_mountpoint() ); // VGNAME from point point
failure_msg = _("Could not deactivate Volume Group");
}
@@ -2865,7 +2865,7 @@ void Win_GParted::toggle_fs_busy_state()
{
action = ACTIVATE_VG;
disallowed_msg = _("The activate Volume Group action cannot be performed when there are
operations pending for the partition.");
- pulse_msg = String::ucompose( _("Activating Volume Group %1"),
+ pulse_msg = Glib::ustring::compose( _("Activating Volume Group %1"),
filesystem_ptn.get_mountpoint() ); // VGNAME from point point
failure_msg = _("Could not activate Volume Group");
}
@@ -2873,8 +2873,8 @@ void Win_GParted::toggle_fs_busy_state()
{
action = UNMOUNT;
disallowed_msg = _("The unmount action cannot be performed when there are operations pending
for the partition.");
- pulse_msg = String::ucompose( _("Unmounting %1"), filesystem_ptn.get_path() );
- failure_msg = String::ucompose( _("Could not unmount %1"), filesystem_ptn.get_path() );
+ pulse_msg = Glib::ustring::compose( _("Unmounting %1"), filesystem_ptn.get_path() );
+ failure_msg = Glib::ustring::compose( _("Could not unmount %1"), filesystem_ptn.get_path() );
}
else
// Impossible. Mounting a file system calls activate_mount_partition().
@@ -2951,7 +2951,7 @@ void Win_GParted::activate_mount_partition( unsigned int index )
Glib::ustring error_msg;
const Partition & filesystem_ptn = selected_partition_ptr->get_filesystem_partition();
- show_pulsebar( String::ucompose( _("mounting %1 on %2"),
+ show_pulsebar( Glib::ustring::compose( _("mounting %1 on %2"),
filesystem_ptn.get_path(),
filesystem_ptn.get_mountpoints()[index] ) );
@@ -2979,7 +2979,7 @@ void Win_GParted::activate_mount_partition( unsigned int index )
hide_pulsebar();
if ( ! success )
{
- Glib::ustring failure_msg = String::ucompose( _("Could not mount %1 on %2"),
+ Glib::ustring failure_msg = Glib::ustring::compose( _("Could not mount %1 on %2"),
filesystem_ptn.get_path(),
filesystem_ptn.get_mountpoints()[index] );
show_toggle_failure_dialog( failure_msg, error_msg );
@@ -2997,7 +2997,7 @@ void Win_GParted::activate_disklabel()
if ( active_count > 0 )
{
Glib::ustring tmp_msg =
- String::ucompose( /*TO TRANSLATORS: Singular case looks like 1 partition is currently
active on device /dev/sda */
+ Glib::ustring::compose( /*TO TRANSLATORS: Singular case looks like 1 partition is
currently active on device /dev/sda */
ngettext( "%1 partition is currently active on device %2"
/*TO TRANSLATORS: Plural case looks like 3 partitions are currently
active on device /dev/sda */
, "%1 partitions are currently active on device %2"
@@ -3029,7 +3029,7 @@ void Win_GParted::activate_disklabel()
if ( operations .size() )
{
Glib::ustring tmp_msg =
- String::ucompose( ngettext( "%1 operation is currently pending"
+ Glib::ustring::compose( ngettext( "%1 operation is currently pending"
, "%1 operations are currently pending"
, operations .size()
)
@@ -3098,7 +3098,7 @@ void Win_GParted::activate_attempt_rescue_data()
Gtk::MessageDialog messageDialog(*this, "", true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_OK_CANCEL, true);
/*TO TRANSLATORS: looks like Search for file systems on /deb/sdb */
- messageDialog.set_message(String::ucompose(_("Search for file systems on %1"), devices[
current_device ] .get_path()));
+ messageDialog.set_message(Glib::ustring::compose(_("Search for file systems on %1"), devices[
current_device ] .get_path()));
messageDialog.set_secondary_text(sec_text);
if(messageDialog.run()!=Gtk::RESPONSE_OK)
@@ -3109,7 +3109,7 @@ void Win_GParted::activate_attempt_rescue_data()
messageDialog.hide();
/*TO TRANSLATORS: looks like Searching for file systems on /deb/sdb */
- show_pulsebar(String::ucompose( _("Searching for file systems on %1"), devices[ current_device ]
.get_path()));
+ show_pulsebar(Glib::ustring::compose( _("Searching for file systems on %1"), devices[ current_device
] .get_path()));
Glib::ustring gpart_output;
gparted_core.guess_partition_table(devices[ current_device ], gpart_output);
hide_pulsebar();
@@ -3125,7 +3125,7 @@ void Win_GParted::activate_attempt_rescue_data()
Gtk::MessageDialog errorDialog(*this, "", true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
/*TO TRANSLATORS: looks like No file systems found on /deb/sdb */
- errorDialog.set_message(String::ucompose(_("No file systems found on %1"), devices[
current_device ] .get_path()));
+ errorDialog.set_message(Glib::ustring::compose(_("No file systems found on %1"), devices[
current_device ] .get_path()));
errorDialog.set_secondary_text(_("The disk scan by gpart did not find any recognizable file
systems on this disk."));
errorDialog.run();
@@ -3452,15 +3452,15 @@ bool Win_GParted::remove_non_empty_lvm2_pv_dialog( const OperationType optype )
switch ( optype )
{
case OPERATION_DELETE:
- tmp_msg = String::ucompose( _( "You are deleting non-empty LVM2 Physical Volume %1" ),
+ tmp_msg = Glib::ustring::compose( _( "You are deleting non-empty LVM2 Physical Volume
%1" ),
selected_partition_ptr->get_path() );
break ;
case OPERATION_FORMAT:
- tmp_msg = String::ucompose( _( "You are formatting over non-empty LVM2 Physical
Volume %1" ),
+ tmp_msg = Glib::ustring::compose( _( "You are formatting over non-empty LVM2 Physical
Volume %1" ),
selected_partition_ptr->get_path() );
break ;
case OPERATION_COPY:
- tmp_msg = String::ucompose( _( "You are pasting over non-empty LVM2 Physical Volume
%1" ),
+ tmp_msg = Glib::ustring::compose( _( "You are pasting over non-empty LVM2 Physical
Volume %1" ),
selected_partition_ptr->get_path() );
break ;
default:
diff --git a/src/btrfs.cc b/src/btrfs.cc
index 9b70817f..f3b7bce3 100644
--- a/src/btrfs.cc
+++ b/src/btrfs.cc
@@ -277,7 +277,7 @@ bool btrfs::resize( const Partition & partition_new, OperationDetail & operation
if ( btrfs_dev .devid == -1 )
{
operationdetail .add_child( OperationDetail(
- String::ucompose( _("Failed to find devid for path %1"), path ), STATUS_ERROR
) ) ;
+ Glib::ustring::compose( _("Failed to find devid for path %1"), path ),
STATUS_ERROR ) ) ;
return false ;
}
Glib::ustring devid_str = Utils::num_to_str( btrfs_dev .devid ) ;
diff --git a/src/linux_swap.cc b/src/linux_swap.cc
index 86954cfe..e4399a13 100644
--- a/src/linux_swap.cc
+++ b/src/linux_swap.cc
@@ -192,7 +192,7 @@ bool linux_swap::move( const Partition & partition_new
operationdetail .add_child(
OperationDetail(
/* TO TRANSLATORS: looks like Partition move action skipped because linux-swap
file system does not contain data */
- String::ucompose( _("Partition move action skipped because %1 file system does
not contain data")
+ Glib::ustring::compose( _("Partition move action skipped because %1 file system
does not contain data")
, Utils::get_filesystem_string( FS_LINUX_SWAP )
)
, STATUS_NONE
@@ -211,7 +211,7 @@ bool linux_swap::copy( const Partition & src_part,
operationdetail .add_child(
OperationDetail(
/* TO TRANSLATORS: looks like Partition copy action skipped because linux-swap
file system does not contain data */
- String::ucompose( _("Partition copy action skipped because %1 file system does
not contain data")
+ Glib::ustring::compose( _("Partition copy action skipped because %1 file system
does not contain data")
, Utils::get_filesystem_string( FS_LINUX_SWAP )
)
, STATUS_NONE
diff --git a/src/udf.cc b/src/udf.cc
index 4903eec6..1c420a59 100644
--- a/src/udf.cc
+++ b/src/udf.cc
@@ -182,7 +182,7 @@ bool udf::create( const Partition & new_partition, OperationDetail & operationde
// limits and crashes.
if ( new_partition.get_sector_length() > MAX_UDF_BLOCKS )
{
- operationdetail.add_child( OperationDetail( String::ucompose(
+ operationdetail.add_child( OperationDetail( Glib::ustring::compose(
_("Partition is too large, maximum size is %1"),
Utils::format_size( MAX_UDF_BLOCKS, new_partition.sector_size ) ),
STATUS_ERROR ) );
@@ -190,7 +190,7 @@ bool udf::create( const Partition & new_partition, OperationDetail & operationde
}
else if ( new_partition.get_sector_length() < MIN_UDF_BLOCKS )
{
- operationdetail.add_child( OperationDetail( String::ucompose(
+ operationdetail.add_child( OperationDetail( Glib::ustring::compose(
_("Partition is too small, minimum size is %1"),
Utils::format_size( MIN_UDF_BLOCKS, new_partition.sector_size ) ),
STATUS_ERROR ) );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]