Skip to content

Commit

Permalink
Merge pull request #6 from yast/fix_trans
Browse files Browse the repository at this point in the history
Fix trans
  • Loading branch information
jreidinger committed Jun 2, 2014
2 parents e5c2880 + a59c538 commit e5ff07f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 37 deletions.
7 changes: 7 additions & 0 deletions package/yast2-apparmor.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Jun 2 12:33:58 UTC 2014 - jreidinger@suse.com

- add translation for apparmor modes (bnc#878587)
- improvements of rpm spec file
- 3.1.2

-------------------------------------------------------------------
Fri May 9 13:47:26 UTC 2014 - jreidinger@suse.com

Expand Down
65 changes: 29 additions & 36 deletions package/yast2-apparmor.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# spec file for package yast2-apparmor
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
Expand All @@ -17,38 +17,31 @@


Name: yast2-apparmor
Version: 3.1.1
Version: 3.1.2
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2

Group: Productivity/Security
Summary: YaST2 - Plugins for AppArmor Profile Management
Url: https://github.com/yast/yast-apparmor
License: GPL-2.0

Group: Productivity/Security
Source0: %{name}-%{version}.tar.bz2
BuildRequires: update-desktop-files
BuildRequires: yast2
BuildRequires: yast2-devtools >= 3.1.10
Requires: perl(Data::Dumper)
Requires: perl(Encode)
Requires: perl(Getopt::Long)
Requires: perl(Immunix::AppArmor)
Requires: perl(Immunix::Notify)
Requires: perl(Locale::gettext)
Requires: perl(POSIX)
Requires: perl(ycp)
Requires: perl-TimeDate
Requires: yast2
Requires: yast2-ruby-bindings >= 1.0.0

Summary: YaST2 - Plugins for AppArmor Profile Management

Requires: yast2
Requires: perl-TimeDate
Requires: perl(Data::Dumper)
Requires: perl(Encode)
Requires: perl(Getopt::Long)
Requires: perl(Immunix::AppArmor)
Requires: perl(Immunix::Notify)
Requires: perl(Locale::gettext)
Requires: perl(POSIX)
Requires: perl(ycp)

BuildArch: noarch
Obsoletes: yast2-subdomain
Provides: yast2-subdomain
BuildRequires: update-desktop-files

BuildRequires: yast2
BuildRequires: yast2-devtools >= 3.1.10

Obsoletes: yast2-subdomain
Provides: yast2-subdomain
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%if 0%{?suse_version} >= 1140
# openSUSE-11.4 or newer
BuildRequires: perl-macros
Expand All @@ -63,7 +56,7 @@ This package is part of a suite of tools that used to be named
SubDomain.

%prep
%setup -n %{name}-%{version}
%setup -q

%build
%yast_build
Expand All @@ -72,9 +65,9 @@ SubDomain.
%yast_install


%files
%files
%defattr(-,root,root)
/usr/bin/*
%{_bindir}/*
%{yast_clientdir}
%{yast_yncludedir}/apparmor
%{yast_scrconfdir}
Expand All @@ -83,8 +76,8 @@ SubDomain.
%{yast_agentdir}
%dir %{perl_vendorlib}/Immunix
%{perl_vendorlib}/Immunix/Notify.pm
%dir %attr(-,root,root) /etc/apparmor
%config(noreplace) /etc/apparmor/reports.crontab
%config(noreplace) /etc/apparmor/reports.conf
%dir %{_sysconfdir}/apparmor
%config(noreplace) %{_sysconfdir}/apparmor/reports.crontab
%config(noreplace) %{_sysconfdir}/apparmor/reports.conf
%doc %{yast_docdir}

8 changes: 7 additions & 1 deletion src/include/apparmor/config_complain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,16 @@ def getRecordList(showAll)
)
end

translation_mapping = {
# translators: string is value in table for mode of apparmor
"enforce" => _("enforce"),
"complain" => _("complain"),
}

Builtins.foreach(db) do |record|
recList = Builtins.add(
recList,
Item(Id(key), Ops.get(record, "name"), Ops.get(record, "mode"))
Item(Id(key), Ops.get(record, "name"), translation_mapping[record["mode"]])
)
key = Ops.add(key, 1)
end
Expand Down

0 comments on commit e5ff07f

Please sign in to comment.