From 0d27cb26a5819f7c8644b453496112e0c1d6ba40 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 18 Dec 2008 16:20:01 +0000 Subject: enable to alter branding (eg: for OEM) --- control-center | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'control-center') diff --git a/control-center b/control-center index a4877d0b..99f11ea4 100755 --- a/control-center +++ b/control-center @@ -87,16 +87,22 @@ mygtk2::import_style_ressources(); my $rc = find { -r $_ } ("$themes_dir/$theme/gtkrc", if_($theme ne 'default', "$themes_dir/default/gtkrc")); Gtk2::Rc->parse($rc) if -r $rc; +my $branding = N("Mandriva Linux"); +my $product_id = common::parse_LDAP_namespace_structure(cat_('/etc/product.id')); +# allow OEM branding: +$branding = translate($product_id->{distribution}); + + #------------------------------------------------------------- # Splash window: please wait ... my $window_splash = Gtk2::Window->new('popup'); $window_splash->signal_connect(delete_event => \&quit_global); -$window_splash->set_title(N("Mandriva Linux Control Center")); +$window_splash->set_title(N("%s Control Center", $branding)); $window_splash->set_position('center_always'); $window_splash->add(gtknew('Fixed', widget_name => 'Steps', children => [ [ gtknew('Image_using_pixbuf', file => 'splash_screen'), 0, 0 ], - [ gtknew('Label', text => N("Mandriva Linux Control Center")), 21, 60 ], + [ gtknew('Label', text => N("%s Control Center", $branding)), 21, 60 ], [ gtknew('Label', text => N("Loading... Please wait")), 21, 175 ], ]), ); @@ -188,7 +194,7 @@ my @tree = ( N("Set up a web server"), 'Apache.pm', ], [ "Installation server wizard", "installsrv", 'wizard-mdk', N("Configure installation server"), - N("Set up server for network installations of Mandriva Linux"), 'Installsrv.pm', 1, + N("Set up server for network installations of %s", $branding), 'Installsrv.pm', 1, ], ), ), @@ -728,7 +734,7 @@ $window_global->signal_connect(delete_event => \&quit_global); use POSIX qw(:sys_utsname_h :math_h :sys_wait_h :unistd_h); my (undef, $nodename) = POSIX::uname(); -$window_global->set_title(N("Mandriva Linux Control Center %s [on %s]", $version, $nodename)); +$window_global->set_title(N("%s Control Center %s [on %s]", $branding, $version, $nodename)); $window_global->set_position('center'); foreach my $notebook ($banner_notebook) { @@ -740,7 +746,7 @@ foreach my $notebook ($banner_notebook) { # banner : #add2notebook($banner_notebook, "", Gtk2::Banner->new("/usr/share/icons/large/drakconf.png", -# N("Welcome to the Mandriva Linux Control Center"))); +# N("Welcome to the %s Control Center", $branding))); my ($_hand_cursor, $wait_cursor) = map { Gtk2::Gdk::Cursor->new($_) } qw(hand2 watch); @@ -1318,7 +1324,7 @@ sub more_themes() { } sub about_mdk_cc() { - my $window_about = new_dialog(N("About - Mandriva Linux Control Center")); + my $window_about = new_dialog(N("About - %s Control Center", $branding)); my $tree_model = Gtk2::TreeStore->new("Glib::String", "Glib::String", "Glib::String"); my $credits = Gtk2::TextView->new; @@ -1390,9 +1396,10 @@ sub about_mdk_cc() { gtkpack_($window_about->vbox, (0, Gtk2::Banner->new('/usr/share/icons/large/drakconf.png', - #-PO: here, %s will be replaced by the version (eg: "Mandriva Linux 2007.1 (Discovery) Control Center") - N("Mandriva Linux %s (%s) Control Center", - @$release{qw(version product)}))), + #-PO: Here, first %s will be replaced by 'Mandriva Linux' + #-PO: second %s will be replaced by the version (eg: "Mandriva Linux 2007.1 (Discovery) Control Center") + N("%s %s (%s) Control Center", + $branding, @$release{qw(version product)}))), 0, Gtk2::Label->new(""), 0, Gtk2::Label->new( #-PO: here %s is eg: "1999-2008" -- cgit v1.2.1