Author: kmachalkova Date: Fri Jan 23 10:58:05 2009 New Revision: 54929 URL: http://svn.opensuse.org/viewcvs/yast?rev=54929&view=rev Log: Using the same trick as in trunk - __ is an alias for mygettext, to prevent strings getting lost on the next pot-file generation round (I hate this package :( ) Modified: branches/SuSE-Code-11-Branch/apparmor/VERSION branches/SuSE-Code-11-Branch/apparmor/package/yast2-apparmor.changes branches/SuSE-Code-11-Branch/apparmor/src/agents/ag_genprof Modified: branches/SuSE-Code-11-Branch/apparmor/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/apparmor/VERSION?rev=54929&r1=54928&r2=54929&view=diff ============================================================================== --- branches/SuSE-Code-11-Branch/apparmor/VERSION (original) +++ branches/SuSE-Code-11-Branch/apparmor/VERSION Fri Jan 23 10:58:05 2009 @@ -1 +1 @@ -2.17.5 +2.17.6 Modified: branches/SuSE-Code-11-Branch/apparmor/package/yast2-apparmor.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/apparmor/package/yast2-apparmor.changes?rev=54929&r1=54928&r2=54929&view=diff ============================================================================== --- branches/SuSE-Code-11-Branch/apparmor/package/yast2-apparmor.changes (original) +++ branches/SuSE-Code-11-Branch/apparmor/package/yast2-apparmor.changes Fri Jan 23 10:58:05 2009 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Fri Jan 23 10:37:54 CET 2009 - kmachalkova@suse.cz + +- Marking strings for translation in a standard way (using the same + trick as in trunk - '__' is an alias for 'mygettext') (bnc#446599) +- 2.17.6 + +------------------------------------------------------------------- Wed Dec 17 13:56:32 CET 2008 - kmachalkova@suse.cz - Handle switching between two textdomains (yast2-apparmor & Modified: branches/SuSE-Code-11-Branch/apparmor/src/agents/ag_genprof URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-Branch/apparmor/src/agents/ag_genprof?rev=54929&r1=54928&r2=54929&view=diff ============================================================================== --- branches/SuSE-Code-11-Branch/apparmor/src/agents/ag_genprof (original) +++ branches/SuSE-Code-11-Branch/apparmor/src/agents/ag_genprof Fri Jan 23 10:58:05 2009 @@ -20,18 +20,20 @@ use Locale::gettext; use POSIX; -use Immunix::SubDomain; +# define textdomain so that y2makepot does not complain .. +textdomain("yast2-apparmor"); +# .. and re-define it here. y2makepot does not mind +# and strings from y2-apparmor are translated differently anyway +textdomain("apparmor-utils"); +use Immunix::SubDomain; setup_yast(); -#ugly, but we need UTF-8 characters in correct encoding -#binmode STDOUT, ":raw"; -#binmode STDIN, ":raw"; - # !hack hack hack! # Can't use YaST _macro for marking strings # for translation, so we need to do it Perl-way setlocale(LC_MESSAGES, ""); + my $dom = Locale::gettext->domain_raw("yast2-apparmor"); $dom->dir("/usr/share/YaST2/locale"); $dom->codeset("UTF-8"); @@ -44,6 +46,10 @@ return $dom->get("$msgid"); } +# __ is an alias for mygettext - this is necessary because +# y2makepot does not know mygettext keyword +*__ = \&mygettext; + $running_under_genprof = 1; # options variables @@ -59,14 +65,14 @@ &usage && exit if $help; my $sd_mountpoint = check_for_subdomain(); unless($sd_mountpoint) { - fatal_error( mygettext("SubDomain does not appear to be started. Please enable SubDomain and try again.")); + fatal_error( __("SubDomain does not appear to be started. Please enable SubDomain and try again.")); } # let's convert it to full path... $profiledir = get_full_path($profiledir); unless(-d $profiledir) { - fatal_error(sprintf(mygettext("Can't find subdomain profiles in %s.", $profiledir))); + fatal_error(sprintf(__("Can't find subdomain profiles in %s."), $profiledir)); } # what are we profiling? @@ -78,7 +84,7 @@ my $f = { description => -mygettext("This wizard will help you create a new AppArmor security +__("This wizard will help you create a new AppArmor security profile for an application, or you can use it to enhance an existing profile by allowing AppArmor to learn new application behavior. @@ -86,10 +92,10 @@ Please enter the application name for which you would like to create a profile, or select Browse to find the application on your system.") , - file_label => mygettext("&Application to Profile"), - okay_label => mygettext("&Create"), - cancel_label => mygettext("&Abort"), - browse_desc => mygettext("Select Program to Profile"), + file_label => __("&Application to Profile"), + okay_label => __("&Create"), + cancel_label => __("&Abort"), + browse_desc => __("Select Program to Profile"), }; my $profiling = UI_GetFile( $f ); @@ -108,14 +114,14 @@ chomp($fqdbin); unless(-x $fqdbin) { - UI_Important( mygettext("The specified file is not executable. + UI_Important( __("The specified file is not executable. Please enter an application name to continue generating a profile or press Abort to cancel this wizard.")); } } elsif(-d $profiling) { - UI_Important( mygettext("The specified pathname is a directory. + UI_Important( __("The specified pathname is a directory. Please enter an application name to continue generating a profile or press @@ -129,7 +135,7 @@ } unless(-f $fqdbin) { - UI_Important( mygettext("The specified file does not exist. + UI_Important( __("The specified file does not exist. Please enter an application name to continue generating a profile or press @@ -139,7 +145,7 @@ } else { # they hit okay without entering anything - UI_Important( mygettext("You have not entered or selected an + UI_Important( __("You have not entered or selected an application to profile. Please enter an application name to @@ -149,7 +155,6 @@ } until($fqdbin && -x $fqdbin); -textdomain("apparmor-utils"); # make sure that the app they're requesting to profile is not marked as # not allowed to have it's own profile check_qualifiers($fqdbin); @@ -187,8 +192,8 @@ } my $q = { }; - $q->{headers} = [ mygettext("Profiling"), $fqdbin ]; - $q->{explanation} = mygettext("Please start the application to be profiled in + $q->{headers} = [ __("Profiling"), $fqdbin ]; + $q->{explanation} = __("Please start the application to be profiled in another window and exercise its functionality now. Once completed, select the 'Scan' option below in @@ -212,7 +217,7 @@ } else { # make them confirm the exit command - my $ans = UI_YesNo( mygettext("Are you sure you want to exit?"), "n"); + my $ans = UI_YesNo( __("Are you sure you want to exit?"), "n"); if($ans eq "y") { $done_profiling = 1; } @@ -235,8 +240,8 @@ } } -UI_Info(mygettext("Reloaded SubDomain profiles in enforce mode.")); -UI_Info( sprintf(mygettext('Finished generating profile for %s.'), $fqdbin)); +UI_Info(__("Reloaded SubDomain profiles in enforce mode.")); +UI_Info( sprintf(__('Finished generating profile for %s.'), $fqdbin)); shutdown_yast(); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org