diff mbox series

sepolicy: Make generated boolean descriptions translatable

Message ID 20230103083200.168385-1-lautrbach@redhat.com (mailing list archive)
State Accepted, archived
Headers show
Series sepolicy: Make generated boolean descriptions translatable | expand

Commit Message

Petr Lautrbach Jan. 3, 2023, 8:32 a.m. UTC
Signed-off-by: Petr Lautrbach <lautrbach@redhat.com>
---
 python/sepolicy/sepolicy/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Carter Jan. 4, 2023, 9:11 p.m. UTC | #1
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
>
James Carter Jan. 11, 2023, 3:52 p.m. UTC | #2
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 mbox series

Patch

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():