diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | userdrake.spec | bin | 2348 -> 2353 bytes | |||
-rwxr-xr-x | userdrake2 | 26 |
3 files changed, 27 insertions, 5 deletions
@@ -1,6 +1,6 @@ VERSION = $(shell awk '/define version/ { print $$3 }' $(NAME).spec) NAME = userdrake -BINNAME = userdrake2 +BINNAME = userdrake SUBDIRS = po localedir = $(prefix)/usr/share/locale RPM=$(HOME)/rpm @@ -18,8 +18,8 @@ clean: install: all $(MAKE) -C po $@ install -d $(RPM_BUILD_ROOT){/etc/sysconfig,/usr/{sbin/,share/$(NAME)/pixmaps,share/icons/{mini,large}}} -# install -s -m755 $(BINNAME) $(RPM_BUILD_ROOT)/usr/sbin/ - install -s -m755 $(BINNAME) $(RPM_BUILD_ROOT)/usr/sbin/userdrake + install -s -m755 $(BINNAME) $(RPM_BUILD_ROOT)/usr/sbin/ +# install -s -m755 $(BINNAME) $(RPM_BUILD_ROOT)/usr/sbin/userdrake install -m644 userdrake.prefs $(RPM_BUILD_ROOT)/etc/sysconfig/userdrake install -m644 pixmaps/*.png $(RPM_BUILD_ROOT)/usr/share/$(NAME)/pixmaps install -m644 icons/$(NAME)16.png $(RPM_BUILD_ROOT)/usr/share/icons/mini/$(NAME).png diff --git a/userdrake.spec b/userdrake.spec Binary files differindex c949eb3..5b82470 100644 --- a/userdrake.spec +++ b/userdrake.spec @@ -36,7 +36,29 @@ my $conffile = '/etc/sysconfig/userdrake'; my $secfile = '/etc/sysconfig/msec'; my $pixdir = '/usr/share/userdrake/pixmaps/'; -my $in = interactive->vnew('su', 'default'); +c::bind_textdomain_codeset('userdrake', 'UTF8'); +sub translate { + my ($s) = @_; + my $r = ''; + if ($s) { + $r = c::dgettext('userdrake', $s); + $r eq $s and $r = Locale::gettext::iconv(c::dgettext('urpmi', $s), undef, "UTF-8"); + c::set_tagged_utf8($r); + } + $r; +} +sub sprintf_fixutf8 { + my $need_upgrade; + $need_upgrade |= to_bool(c::is_tagged_utf8($_)) + 1 foreach @_; + if ($need_upgrade == 3) { c::upgrade_utf8($_) foreach @_ }; + sprintf shift, @_; +} +sub N { + my $s = shift @_; my $t = translate($s); + sprintf_fixutf8 $t, @_; +} + +my $in = interactive->vnew('su'); my $us = {} ; $us->{VERSION} = 0.92; @@ -792,7 +814,7 @@ sub NewDialog { gtkset_modal($dialog, 1); } sub About { - my $window_about = NewDialog(N("Userdrake2")); + my $window_about = NewDialog(N("Userdrake")); my $tree_model = Gtk2::TreeStore->new(Gtk2::GType->STRING, Gtk2::GType->STRING, Gtk2::GType->STRING); my $list = Gtk2::TreeView->new_with_model($tree_model); $list->can_focus(0); |