mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
Correct localization problems identified in code review.
This commit is contained in:
@@ -1933,7 +1933,8 @@ sub check_repo_for_newer {
|
|||||||
"Old Revision", $id,
|
"Old Revision", $id,
|
||||||
"New Revision", $p->{id},
|
"New Revision", $p->{id},
|
||||||
];
|
];
|
||||||
$q->{explanation} = "An updated version of this profile has been found in the profile repository. Would you like to use it?";
|
$q->{explanation} =
|
||||||
|
gettext( "An updated version of this profile has been found in the profile repository. Would you like to use it?");
|
||||||
$q->{functions} = [
|
$q->{functions} = [
|
||||||
"CMD_VIEW_CHANGES", "CMD_UPDATE_PROFILE", "CMD_IGNORE_UPDATE",
|
"CMD_VIEW_CHANGES", "CMD_UPDATE_PROFILE", "CMD_IGNORE_UPDATE",
|
||||||
"CMD_ABORT", "CMD_FINISHED"
|
"CMD_ABORT", "CMD_FINISHED"
|
||||||
@@ -1962,11 +1963,16 @@ sub check_repo_for_newer {
|
|||||||
|
|
||||||
set_repo_info($sd{$profile}{$profile}, $url, $user, $p->{id});
|
set_repo_info($sd{$profile}{$profile}, $url, $user, $p->{id});
|
||||||
|
|
||||||
UI_Info("Updated profile $profile to revision $p->{id}.");
|
UI_Info(
|
||||||
|
sprintf(
|
||||||
|
gettext("Updated profile %s to revision %s."),
|
||||||
|
$profile, $p->{id}
|
||||||
|
)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
if ($@) {
|
if ($@) {
|
||||||
UI_Info("Error parsing repository profile.");
|
UI_Info(gettext("Error parsing repository profile."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2393,7 +2399,8 @@ sub ask_to_enable_repo {
|
|||||||
$q->{headers} = [
|
$q->{headers} = [
|
||||||
"Repository", $cfg->{settings}{repository},
|
"Repository", $cfg->{settings}{repository},
|
||||||
];
|
];
|
||||||
$q->{explanation} = "Would you like to enable access to the profile repository?";
|
$q->{explanation} =
|
||||||
|
gettext( "Would you like to enable access to the profile repository?" );
|
||||||
$q->{functions} = [
|
$q->{functions} = [
|
||||||
"CMD_ENABLE_REPO", "CMD_DISABLE_REPO", "CMD_ASK_LATER",
|
"CMD_ENABLE_REPO", "CMD_DISABLE_REPO", "CMD_ASK_LATER",
|
||||||
"CMD_ABORT", "CMD_FINISHED",
|
"CMD_ABORT", "CMD_FINISHED",
|
||||||
@@ -2486,9 +2493,10 @@ sub ask_signup_info {
|
|||||||
"password [" . $pass . "]\n");
|
"password [" . $pass . "]\n");
|
||||||
} else {
|
} else {
|
||||||
$newuser = UI_YesNo(gettext("Create New User?"), "n");
|
$newuser = UI_YesNo(gettext("Create New User?"), "n");
|
||||||
$user = UI_GetString("Username: ", $user);
|
$user = UI_GetString(gettext("Username: "), $user);
|
||||||
$pass = UI_GetString("Password: ", $pass);
|
$pass = UI_GetString(gettext("Password: "), $pass);
|
||||||
$email = UI_GetString("Email Addr: ", $email) if ($newuser eq "y");
|
$email = UI_GetString(gettext("Email Addr: "), $email)
|
||||||
|
if ($newuser eq "y");
|
||||||
$save_config = UI_YesNo(gettext("Save Configuration? "), "y");
|
$save_config = UI_YesNo(gettext("Save Configuration? "), "y");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2670,7 +2678,7 @@ sub save_profiles {
|
|||||||
$q->{headers} = [];
|
$q->{headers} = [];
|
||||||
|
|
||||||
$q->{explanation} =
|
$q->{explanation} =
|
||||||
"The following local profiles were changed. Would you like to save them?";
|
gettext( "The following local profiles were changed. Would you like to save them?");
|
||||||
|
|
||||||
$q->{functions} = [ "CMD_SAVE_CHANGES",
|
$q->{functions} = [ "CMD_SAVE_CHANGES",
|
||||||
"CMD_VIEW_CHANGES",
|
"CMD_VIEW_CHANGES",
|
||||||
@@ -2855,7 +2863,7 @@ sub yast_select_and_upload_profiles {
|
|||||||
. $profile);
|
. $profile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UI_Info("Uploaded changes to repository.");
|
UI_Info(gettext("Uploaded changes to repository."));
|
||||||
} else {
|
} else {
|
||||||
UI_ShortMessage(gettext("Repository Error"),
|
UI_ShortMessage(gettext("Repository Error"),
|
||||||
gettext(
|
gettext(
|
||||||
@@ -2924,7 +2932,7 @@ sub console_select_and_upload_profiles {
|
|||||||
if ($ans eq "CMD_ASK_NEVER") {
|
if ($ans eq "CMD_ASK_NEVER") {
|
||||||
set_profiles_local_only( [ map { $_->[0] } @profiles ] );
|
set_profiles_local_only( [ map { $_->[0] } @profiles ] );
|
||||||
} elsif ($ans eq "CMD_UPLOAD_CHANGES") {
|
} elsif ($ans eq "CMD_UPLOAD_CHANGES") {
|
||||||
my $changelog = UI_GetString("Changelog Entry: ", "");
|
my $changelog = UI_GetString(gettext("Changelog Entry: "), "");
|
||||||
|
|
||||||
my ($user, $pass) = get_repo_user_pass();
|
my ($user, $pass) = get_repo_user_pass();
|
||||||
|
|
||||||
@@ -2941,7 +2949,9 @@ sub console_select_and_upload_profiles {
|
|||||||
my $newid = $newprofile->{id};
|
my $newid = $newprofile->{id};
|
||||||
set_repo_info($sd{$profile}{$profile}, $url, $user, $newid);
|
set_repo_info($sd{$profile}{$profile}, $url, $user, $newid);
|
||||||
writeprofile($profile);
|
writeprofile($profile);
|
||||||
UI_Info("Uploaded $profile to repository.");
|
UI_Info(
|
||||||
|
sprintf(gettext("Uploaded %s to repository."), $profile)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
print "Error: $res\n";
|
print "Error: $res\n";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user