From 8e92e4b38166cce6f7375bb55ac133239d41978d Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Wed, 24 Nov 2004 15:05:36 +0000 Subject: [PATCH] marked some strings for translation ('unknown', 'used', 'unused') and * include/Utils.h, src/GParted_Core.cc, src/Partition.cc, src/TreeView_Detail.cc, src/VBox_VisualDisk.cc: marked some strings for translation ('unknown', 'used', 'unused') and replaced lowercase 'unallocated' with '---'. --- ChangeLog | 8 ++++++++ include/Utils.h | 2 +- src/GParted_Core.cc | 5 +++-- src/Partition.cc | 2 +- src/TreeView_Detail.cc | 2 +- src/VBox_VisualDisk.cc | 21 ++++++++++++++------- 6 files changed, 28 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 96e49d0b..11e41243 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-11-24 Bart Hakvoort + + * include/Utils.h, + src/GParted_Core.cc, + src/Partition.cc, + src/TreeView_Detail.cc, + src/VBox_VisualDisk.cc: marked some strings for translation ('unknown', 'used', 'unused') and replaced lowercase 'unallocated' with '---'. + 2004-11-24 Bart Hakvoort * include/GParted_Core.h, diff --git a/include/Utils.h b/include/Utils.h index d41c665d..01c47f91 100644 --- a/include/Utils.h +++ b/include/Utils.h @@ -133,7 +133,7 @@ inline Glib::ustring Get_Color( const Glib::ustring & filesystem ) else if ( filesystem == "XFS" ) return "yellow" ; //darkgrey and ligthblue - else if ( filesystem == "unallocated" ) return "darkgrey"; + else if ( filesystem == "---" ) return "darkgrey"; else if ( filesystem == "extended" ) return "#7DFCFE" ; //unknown filesystem ( damaged, unknown or simply no filesystem ) diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc index a898fd67..3bae8690 100644 --- a/src/GParted_Core.cc +++ b/src/GParted_Core.cc @@ -123,7 +123,7 @@ void GParted_Core::set_device_partitions( Device & device, bool deep_scan ) temp = c_partition ->fs_type ->name ; else { - temp = "unknown" ; + temp = _("unknown") ; partition_temp .error = _( "Unable to detect filesystem! Possible reasons are:" ) ; partition_temp .error += "\n-"; partition_temp .error += _( "The filesystem is damaged" ) ; @@ -412,7 +412,8 @@ Glib::ustring GParted_Core::get_sym_path( const Glib::ustring & real_path ) void GParted_Core::Set_Used_Sectors( Partition & partition ) { - if ( partition .filesystem == "unknown" || partition .filesystem == "linux-swap" ) + //if ( partition .filesystem == "unknown" ) + if ( Get_FS( partition .filesystem, FILESYSTEMS ) .filesystem == "unknown" ) partition .Set_Unused( -1 ) ; else if ( partition .busy ) diff --git a/src/Partition.cc b/src/Partition.cc index 69e2e373..f1290ee2 100644 --- a/src/Partition.cc +++ b/src/Partition.cc @@ -67,7 +67,7 @@ void Partition::Set_Unused( Sector sectors_unused ) void Partition::Set_Unallocated( Sector sector_start, Sector sector_end, bool inside_extended ) { - this ->Set( _("Unallocated"), -1, GParted::UNALLOCATED, "unallocated", sector_start, sector_end , inside_extended, false ); + this ->Set( _("Unallocated"), -1, GParted::UNALLOCATED, "---", sector_start, sector_end , inside_extended, false ); this ->error = this ->flags = "" ; this ->status = GParted::STAT_REAL ; } diff --git a/src/TreeView_Detail.cc b/src/TreeView_Detail.cc index 9afe88d6..f47c2346 100644 --- a/src/TreeView_Detail.cc +++ b/src/TreeView_Detail.cc @@ -137,7 +137,7 @@ void TreeView_Detail::Create_Row( const Gtk::TreeRow & treerow, const Partition //hereby i assume these 2 are mutual exclusive. is this wise?? Time (and bugreports) will tell :) if ( partition .busy ) treerow[ treeview_detail_columns .status_icon ] = render_icon( Gtk::Stock::DIALOG_AUTHENTICATION, Gtk::ICON_SIZE_BUTTON ); - else if ( partition .filesystem == "unknown" || partition .error != "" ) + else if ( partition .error != "" ) treerow[ treeview_detail_columns .status_icon ] = render_icon( Gtk::Stock::DIALOG_WARNING, Gtk::ICON_SIZE_BUTTON ); treerow[ treeview_detail_columns .partition ] = partition .partition; diff --git a/src/VBox_VisualDisk.cc b/src/VBox_VisualDisk.cc index 21989f17..ce6dc6fe 100644 --- a/src/VBox_VisualDisk.cc +++ b/src/VBox_VisualDisk.cc @@ -194,7 +194,7 @@ void VBox_VisualDisk::Build_Legend( ) frame_disk_legend = manage( new Gtk::Frame( ) ) ; hbox_legend_main.pack_start( *frame_disk_legend, Gtk::PACK_EXPAND_PADDING ); - hbox_legend = manage( new Gtk::HBox ( ) ); + hbox_legend = manage( new Gtk::HBox( ) ); frame_disk_legend ->add( *hbox_legend ) ; this ->pack_start( hbox_legend_main ); @@ -204,17 +204,23 @@ void VBox_VisualDisk::Build_Legend( ) bool hide_used_unused = true; for ( unsigned int t = 0 ; t < legend .size( ) ; t++ ) { - if ( legend[ t ] != "unallocated" && legend[ t ] != "extended" && legend[ t ] != "linux-swap" ) + if ( legend[ t ] != "---" && legend[ t ] != "extended" && legend[ t ] != "linux-swap" ) hide_used_unused = false ; - if ( t ) hbox_legend ->pack_start( * mk_label( " " ), Gtk::PACK_SHRINK ); else hbox_legend ->pack_start( * mk_label( " " ), Gtk::PACK_SHRINK ); hbox_legend ->pack_start( * mk_label( "██ ", false, false, false, Get_Color( legend[ t ] ) ), Gtk::PACK_SHRINK ); - hbox_legend ->pack_start( * mk_label( legend[ t ] + " " ), Gtk::PACK_SHRINK ); + + if ( legend[ t ] == "---" ) + { + str_temp = _("unallocated") ; + hbox_legend ->pack_start( * mk_label( str_temp + " " ), Gtk::PACK_SHRINK ); + } + else + hbox_legend ->pack_start( * mk_label( legend[ t ] + " " ), Gtk::PACK_SHRINK ); } //if there are any partitions add used/unused @@ -227,11 +233,12 @@ void VBox_VisualDisk::Build_Legend( ) frame_disk_legend ->add( *hbox_legend ); hbox_legend ->pack_start( * mk_label( " ██ ", false, false, false, "#F8F8BA" ), Gtk::PACK_SHRINK ); - hbox_legend ->pack_start( * mk_label( "used " ), Gtk::PACK_SHRINK ); + str_temp = _("used") ; + hbox_legend ->pack_start( * mk_label( str_temp + " " ), Gtk::PACK_SHRINK ); hbox_legend ->pack_start( * mk_label( "██ ", false, false, false, "white" ), Gtk::PACK_SHRINK ); - hbox_legend ->pack_start( * mk_label( "unused " ), Gtk::PACK_SHRINK ); + str_temp = _("unused") ; + hbox_legend ->pack_start( * mk_label( str_temp + " " ), Gtk::PACK_SHRINK ); } - } void VBox_VisualDisk::Set_Selected( const Partition & partition )