Message ID | 20230103083200.168385-1-lautrbach@redhat.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | sepolicy: Make generated boolean descriptions translatable | expand |
On Tue, Jan 3, 2023 at 3:40 AM Petr Lautrbach <lautrbach@redhat.com> wrote: > > Signed-off-by: Petr Lautrbach <lautrbach@redhat.com> Acked-by: James Carter <jwcart2@gmail.com> > --- > python/sepolicy/sepolicy/__init__.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/python/sepolicy/sepolicy/__init__.py b/python/sepolicy/sepolicy/__init__.py > index 68907a4f9759..be89dd2f9928 100644 > --- a/python/sepolicy/sepolicy/__init__.py > +++ b/python/sepolicy/sepolicy/__init__.py > @@ -1222,7 +1222,7 @@ def boolean_desc(boolean): > return _(booleans_dict[boolean][2]) > else: > desc = boolean.split("_") > - return "Allow %s to %s" % (desc[0], " ".join(desc[1:])) > + return _("Allow {subject} to {rest}").format(subject=desc[0], rest=" ".join(desc[1:])) > > > def get_os_version(): > -- > 2.39.0 >
On Wed, Jan 4, 2023 at 4:11 PM James Carter <jwcart2@gmail.com> wrote: > > On Tue, Jan 3, 2023 at 3:40 AM Petr Lautrbach <lautrbach@redhat.com> wrote: > > > > Signed-off-by: Petr Lautrbach <lautrbach@redhat.com> > > Acked-by: James Carter <jwcart2@gmail.com> Merged. Thanks, Jim > > > --- > > python/sepolicy/sepolicy/__init__.py | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/python/sepolicy/sepolicy/__init__.py b/python/sepolicy/sepolicy/__init__.py > > index 68907a4f9759..be89dd2f9928 100644 > > --- a/python/sepolicy/sepolicy/__init__.py > > +++ b/python/sepolicy/sepolicy/__init__.py > > @@ -1222,7 +1222,7 @@ def boolean_desc(boolean): > > return _(booleans_dict[boolean][2]) > > else: > > desc = boolean.split("_") > > - return "Allow %s to %s" % (desc[0], " ".join(desc[1:])) > > + return _("Allow {subject} to {rest}").format(subject=desc[0], rest=" ".join(desc[1:])) > > > > > > def get_os_version(): > > -- > > 2.39.0 > >
diff --git a/python/sepolicy/sepolicy/__init__.py b/python/sepolicy/sepolicy/__init__.py index 68907a4f9759..be89dd2f9928 100644 --- a/python/sepolicy/sepolicy/__init__.py +++ b/python/sepolicy/sepolicy/__init__.py @@ -1222,7 +1222,7 @@ def boolean_desc(boolean): return _(booleans_dict[boolean][2]) else: desc = boolean.split("_") - return "Allow %s to %s" % (desc[0], " ".join(desc[1:])) + return _("Allow {subject} to {rest}").format(subject=desc[0], rest=" ".join(desc[1:])) def get_os_version():
Signed-off-by: Petr Lautrbach <lautrbach@redhat.com> --- python/sepolicy/sepolicy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)