Hello,

The translatable strings used unnamed arguments which generated a
number of warnings, as noted by @sbeattie in a previous patch.

This patch:
- replaces unnamed arguments with named arguments wherever more than 1
one arguments ware present in a message
- minor fix in aa-unconfined for pname argument in 2 strings
- updated pot files (as a side-effect of testing with make)

PS:
Testing with make file I found two things:
1. running make check fails saying it doesn't recognise raw_input()
     apparmor/ui.py:179: undefined name 'raw_input'

I think pyflakes is being run for Python3 and hence the error. Is
there any easy way to make this work?

2. I also get a curious second trace,
    make[1]: Entering directory
`/home/kshitij/workspace/apparmor-workspace/4patch/original/apparmor/utils/test'
Makefile:21: common/Make.rules: No such file or directory
ln -sf ../../common/ .
make[1]: Leaving directory
`/home/kshitij/workspace/apparmor-workspace/4patch/original/apparmor/utils/test'
make[1]: Entering directory
`/home/kshitij/workspace/apparmor-workspace/4patch/original/apparmor/utils/test'
Traceback (most recent call last):
  File "test-pivot_root_parse.py", line 12, in <module>
    import apparmor.aa as aa
  File 
"/home/kshitij/workspace/apparmor-workspace/4patch/original/apparmor/utils/apparmor/aa.py",
line 29, in <module>
    import apparmor.logparser
  File 
"/home/kshitij/workspace/apparmor-workspace/4patch/original/apparmor/utils/apparmor/logparser.py",
line 18, in <module>
    import LibAppArmor
ImportError: No module named LibAppArmor
make[1]: *** [check] Error 1
make[1]: Leaving directory
`/home/kshitij/workspace/apparmor-workspace/4patch/original/apparmor/utils/test'
make: *** [check] Error 2


I dont know enough about make files to debug it. (I feel it has
something to do with Python2 not having the module)


Regards,

Kshitij Gupta
=== modified file 'utils/aa-genprof'
--- utils/aa-genprof	2014-06-09 21:47:36 +0000
+++ utils/aa-genprof	2014-09-14 13:02:55 +0000
@@ -91,7 +91,7 @@
 
 if not program or not os.path.exists(program):
     if '/' not in profiling:
-        raise apparmor.AppArmorException(_("Can't find %s in the system path list. If the name of the application\nis correct, please run 'which %s' as a user with correct PATH\nenvironment set up in order to find the fully-qualified path and\nuse the full path as parameter.") %(profiling, profiling))
+        raise apparmor.AppArmorException(_("Can't find %(profiling)s in the system path list. If the name of the application\nis correct, please run 'which %(profiling)s' as a user with correct PATH\nenvironment set up in order to find the fully-qualified path and\nuse the full path as parameter.") % { 'profiling': profiling })
     else:
         raise apparmor.AppArmorException(_('%s does not exists, please double-check the path.') %profiling)
 

=== modified file 'utils/aa-mergeprof'
--- utils/aa-mergeprof	2014-09-03 23:49:47 +0000
+++ utils/aa-mergeprof	2014-09-14 14:06:01 +0000
@@ -26,7 +26,7 @@
 from apparmor.translations import init_translation
 _ = init_translation()
 
-parser = argparse.ArgumentParser(description=_('Perform a 2-way or 3-way merge on the given profiles'), 
+parser = argparse.ArgumentParser(description=_('Perform a 2-way or 3-way merge on the given profiles'),
     epilog='WARNING: the arguments will change in a future version!')
 parser.add_argument('mine', type=str, help=_('your profile'))
 parser.add_argument('base', type=str, help=_('base profile'))
@@ -553,7 +553,7 @@
 
                                         apparmor.aa.changed[profile] = True
 
-                                        aaui.UI_Info(_('Adding %s %s to profile') % (path, apparmor.aa.mode_to_str_user(mode)))
+                                        aaui.UI_Info(_('Adding %(path)s %(mode)s to profile') % { 'path': path, 'mode': apparmor.aa.mode_to_str_user(mode) })
                                         if deleted:
                                             aaui.UI_Info(_('Deleted %s previous matching profile entries.') % deleted)
 
@@ -680,13 +680,13 @@
 
                                         apparmor.aa.changed[profile] = True
 
-                                        aaui.UI_Info(_('Adding network access %s %s to profile.') % (family, sock_type))
+                                        aaui.UI_Info(_('Adding network access %(family)s %(type)s to profile.') % { 'family': family, 'type': sock_type })
 
                                 elif ans == 'CMD_DENY':
                                     done = True
                                     self.user.aa[profile][hat]['deny']['netdomain']['rule'][family][sock_type] = True
                                     apparmor.aa.changed[profile] = True
-                                    aaui.UI_Info(_('Denying network access %s %s to profile') % (family, sock_type))
+                                    aaui.UI_Info(_('Denying network access %(family)s %(type)s to profile') % { 'family': family, 'type': sock_type })
 
                                 else:
                                     done = False

=== modified file 'utils/aa-unconfined'
--- utils/aa-unconfined	2014-02-27 22:53:25 +0000
+++ utils/aa-unconfined	2014-09-14 13:15:31 +0000
@@ -78,17 +78,17 @@
             cmdline = re.sub(r"\x00", " ", cmdline)
             cmdline = re.sub(r"\s+$", "", cmdline).strip()
 
-            ui.UI_Info(_("%s %s (%s) not confined")%(pid, prog, cmdline))
+            ui.UI_Info(_("%(pid)s %(program)s (%(commandline)s) not confined") % { 'pid': pid, 'program': prog, 'commandline': cmdline })
         else:
             if pname and pname[-1] == ')':
-                pname += ' '
-            ui.UI_Info(_("%s %s %snot confined")%(pid, prog, pname))
+                pname = ' ' + pname
+            ui.UI_Info(_("%(pid)s %(program)s%(pname)s not confined") % { 'pid': pid, 'program': prog, 'pname': pname })
     else:
         if regex_interpreter.search(prog):
             cmdline = re.sub(r"\0", " ", cmdline)
             cmdline = re.sub(r"\s+$", "", cmdline).strip()
-            ui.UI_Info(_("%s %s (%s) confined by '%s'")%(pid, prog, cmdline, attr))
+            ui.UI_Info(_("%(pid)s %(program)s (%(commandline)s) confined by '%(attribute)s'") % { 'pid': pid, 'program': prog, 'commandline': cmdline, 'attribute': attr })
         else:
             if pname and pname[-1] == ')':
-                pname += ' '
-            ui.UI_Info(_("%s %s %sconfined by '%s'")%(pid, prog, pname, attr))
+                pname = ' ' + pname
+            ui.UI_Info(_("%(pid)s %(program)s%(pname)s confined by '%(attribute)s'") % { 'pid': pid, 'program': prog, 'pname': pname, 'attribute': attr })

=== modified file 'utils/apparmor/aa.py'
--- utils/apparmor/aa.py	2014-09-08 12:31:18 +0000
+++ utils/apparmor/aa.py	2014-09-14 14:08:51 +0000
@@ -298,7 +298,7 @@
         try:
             os.symlink(filename, link)
         except:
-            raise AppArmorException(_('Could not create %s symlink to %s.') % (link, filename))
+            raise AppArmorException(_('Could not create %(link)s symlink to %(file)s.') % { 'link': link, 'file': filename })
 
 def head(file):
     """Returns the first/head line of the file"""
@@ -325,7 +325,7 @@
             # Get the output of the program
             output = subprocess.check_output(params)
         except OSError as e:
-            raise AppArmorException(_("Unable to fork: %s\n\t%s") % (program, str(e)))
+            raise AppArmorException(_("Unable to fork: %(program)s\n\t%(error)s") % { 'program': program, 'error': str(e) })
             # If exit-codes besides 0
         except subprocess.CalledProcessError as e:
             output = e.output
@@ -829,7 +829,7 @@
         else:
             if not ret:
                 ret = 'UNKNOWN ERROR'
-            aaui.UI_Important(_('WARNING: An error occurred while uploading the profile %s\n%s') % (p, ret))
+            aaui.UI_Important(_('WARNING: An error occurred while uploading the profile %(profile)s\n%(ret)s') % { 'profile': p, 'ret': ret })
     aaui.UI_Info(_('Uploaded changes to repository.'))
     if yarg.get('NEVER_ASK_AGAIN'):
         unselected_profiles = []
@@ -880,7 +880,7 @@
                 else:
                     if not ret:
                         ret = 'UNKNOWN ERROR'
-                    aaui.UI_Important(_('WARNING: An error occurred while uploading the profile %s\n%s') % (prof, ret))
+                    aaui.UI_Important(_('WARNING: An error occurred while uploading the profile %(profile)s\n%(ret)s') % { 'profile': prof, 'ret': ret })
         else:
             aaui.UI_Important(_('Repository Error\nRegistration or Signin was unsuccessful. User login\ninformation is required to upload profiles to the repository.\nThese changes could not be sent.'))
 
@@ -1894,7 +1894,7 @@
 
                                     changed[profile] = True
 
-                                    aaui.UI_Info(_('Adding %s %s to profile') % (path, mode_to_str_user(mode)))
+                                    aaui.UI_Info(_('Adding %(path)s %(mode)s to profile') % { 'path': path, 'mode': mode_to_str_user(mode) })
                                     if deleted:
                                         aaui.UI_Info(_('Deleted %s previous matching profile entries.') % deleted)
 
@@ -1915,7 +1915,7 @@
                                     ans = aaui.UI_GetString(_('Enter new path: '), arg)
                                     if ans:
                                         if not matchliteral(ans, path):
-                                            ynprompt = _('The specified path does not match this log entry:\n\n  Log Entry: %s\n  Entered Path:  %s\nDo you really want to use this path?') % (path, ans)
+                                            ynprompt = _('The specified path does not match this log entry:\n\n  Log Entry: %(path)s\n  Entered Path:  %(ans)s\nDo you really want to use this path?') % { 'path': path, 'ans': ans }
                                             key = aaui.UI_YesNo(ynprompt, 'n')
                                             if key == 'n':
                                                 continue
@@ -2017,13 +2017,13 @@
 
                                     changed[profile] = True
 
-                                    aaui.UI_Info(_('Adding network access %s %s to profile.') % (family, sock_type))
+                                    aaui.UI_Info(_('Adding network access %(family)s %(type)s to profile.') % { 'family': family, 'type': sock_type })
 
                             elif ans == 'CMD_DENY':
                                 done = True
                                 aa[profile][hat]['deny']['netdomain']['rule'][family][sock_type] = True
                                 changed[profile] = True
-                                aaui.UI_Info(_('Denying network access %s %s to profile') % (family, sock_type))
+                                aaui.UI_Info(_('Denying network access %(family)s %(type)s to profile') % { 'family': family, 'type': sock_type })
 
                             else:
                                 done = False
@@ -2674,7 +2674,7 @@
             if profile:
                 #print(profile, hat)
                 if profile != hat or not matches[3]:
-                    raise AppArmorException(_('%s profile in %s contains syntax errors in line: %s.') % (profile, file, lineno + 1))
+                    raise AppArmorException(_('%(profile)s profile in %(file)s contains syntax errors in line: %(line)s.') % { 'profile': profile, 'file': file, 'line': lineno + 1 })
             # Keep track of the start of a profile
             if profile and profile == hat and matches[3]:
                 # local profile
@@ -2731,7 +2731,7 @@
         elif RE_PROFILE_END.search(line):
             # If profile ends and we're not in one
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected End of Profile reached in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected End of Profile reached in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             if in_contained_hat:
                 hat = profile
@@ -2746,7 +2746,7 @@
             matches = RE_PROFILE_CAP.search(line).groups()
 
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected capability entry found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected capability entry found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             audit = False
             if matches[0]:
@@ -2767,7 +2767,7 @@
             matches = RE_PROFILE_LINK.search(line).groups()
 
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected link entry found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected link entry found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             audit = False
             if matches[0]:
@@ -2795,7 +2795,7 @@
             matches = RE_PROFILE_CHANGE_PROFILE.search(line).groups()
 
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected change profile entry found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected change profile entry found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             cp = strip_quotes(matches[0])
             profile_data[profile][hat]['changes_profile'][cp] = True
@@ -2817,7 +2817,7 @@
             matches = RE_PROFILE_RLIMIT.search(line).groups()
 
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected rlimit entry found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected rlimit entry found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             from_name = matches[0]
             to_name = matches[2]
@@ -2828,7 +2828,7 @@
             matches = RE_PROFILE_BOOLEAN.search(line)
 
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected boolean definition found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected boolean definition found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             bool_var = matches[0]
             value = matches[1]
@@ -2868,7 +2868,7 @@
             matches = RE_PROFILE_BARE_FILE_ENTRY.search(line).groups()
 
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected bare file rule found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected bare file rule found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             allow = 'allow'
             if matches[1] and matches[1].strip() == 'deny':
@@ -2891,7 +2891,7 @@
             matches = RE_PROFILE_PATH_ENTRY.search(line).groups()
 
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected path entry found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected path entry found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             audit = False
             if matches[0]:
@@ -2919,10 +2919,10 @@
             try:
                 re.compile(p_re)
             except:
-                raise AppArmorException(_('Syntax Error: Invalid Regex %s in file: %s line: %s') % (path, file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Invalid Regex %(path)s in file: %(file)s line: %(line)s') % { 'path': path, 'file': file, 'line': lineno + 1 })
 
             if not validate_profile_mode(mode, allow, nt_name):
-                raise AppArmorException(_('Invalid mode %s in file: %s line: %s') % (mode, file, lineno + 1))
+                raise AppArmorException(_('Invalid mode %(mode)s in file: %(file)s line: %(line)s') % {'mode': mode, 'file': file, 'line': lineno + 1 })
 
             tmpmode = set()
             if user:
@@ -2974,7 +2974,7 @@
             matches = RE_PROFILE_NETWORK.search(line).groups()
 
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected network entry found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected network entry found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             audit = False
             if matches[0]:
@@ -3004,7 +3004,7 @@
             matches = RE_PROFILE_DBUS.search(line).groups()
 
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected dbus entry found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected dbus entry found in file: %(file)s line: %(line)s') % {'file': file, 'line': lineno + 1 })
 
             audit = False
             if matches[0]:
@@ -3027,7 +3027,7 @@
             matches = RE_PROFILE_MOUNT.search(line).groups()
 
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected mount entry found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected mount entry found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             audit = False
             if matches[0]:
@@ -3049,7 +3049,7 @@
             matches = RE_PROFILE_SIGNAL.search(line).groups()
 
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected signal entry found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected signal entry found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             audit = False
             if matches[0]:
@@ -3071,7 +3071,7 @@
             matches = RE_PROFILE_PTRACE.search(line).groups()
 
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected ptrace entry found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected ptrace entry found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             audit = False
             if matches[0]:
@@ -3093,7 +3093,7 @@
             matches = RE_PROFILE_PIVOT_ROOT.search(line).groups()
 
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected pivot_root entry found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected pivot_root entry found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             audit = False
             if matches[0]:
@@ -3115,7 +3115,7 @@
             matches = RE_PROFILE_UNIX.search(line).groups()
 
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected unix entry found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected unix entry found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             audit = False
             if matches[0]:
@@ -3137,7 +3137,7 @@
             matches = RE_PROFILE_CHANGE_HAT.search(line).groups()
 
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected change hat declaration found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected change hat declaration found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             hat = matches[0]
             hat = strip_quotes(hat)
@@ -3149,7 +3149,7 @@
             # An embedded hat syntax definition starts
             matches = RE_PROFILE_HAT_DEF.search(line).groups()
             if not profile:
-                raise AppArmorException(_('Syntax Error: Unexpected hat definition found in file: %s line: %s') % (file, lineno + 1))
+                raise AppArmorException(_('Syntax Error: Unexpected hat definition found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
             in_contained_hat = True
             hat = matches[0]
@@ -3165,7 +3165,7 @@
                 profile_data[profile][hat]['initial_comment'] = initial_comment
             initial_comment = ''
             if filelist[file]['profiles'][profile].get(hat, False):
-                raise AppArmorException(_('Error: Multiple definitions for hat %s in profile %s.') % (hat, profile))
+                raise AppArmorException(_('Error: Multiple definitions for hat %(hat)s in profile %(profile)s.') % { 'hat': hat, 'profile': profile })
             filelist[file]['profiles'][profile][hat] = True
 
         elif line[0] == '#':
@@ -3195,7 +3195,7 @@
             else:
                 lastline = line
         else:
-            raise AppArmorException(_('Syntax Error: Unknown line found in file: %s line: %s') % (file, lineno + 1))
+            raise AppArmorException(_('Syntax Error: Unknown line found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno + 1 })
 
     # Below is not required I'd say
     if not do_include:
@@ -3208,7 +3208,7 @@
 
     # End of file reached but we're stuck in a profile
     if profile and not do_include:
-        raise AppArmorException(_("Syntax Error: Missing '}' or ','. Reached end of file %s while inside profile %s") % (file, profile))
+        raise AppArmorException(_("Syntax Error: Missing '}' or ','. Reached end of file %(file)s while inside profile %(profile)s") % { 'file': file, 'profile': profile })
 
     return profile_data
 
@@ -3274,14 +3274,14 @@
             var[list_var] = set(vlist)
         else:
             #print('Ignored: New definition for variable for:',list_var,'=', value, 'operation was:',var_operation,'old value=', var[list_var])
-            raise AppArmorException(_('Redefining existing variable %s: %s in %s') % (list_var, value, filename))
+            raise AppArmorException(_('Redefining existing variable %(variable)s: %(value)s in %(file)s') % { 'variable': list_var, 'value': value, 'file': filename })
     elif var_operation == '+=':
         if var.get(list_var, False):
             var[list_var] = set(var[list_var] + vlist)
         else:
-            raise AppArmorException(_('Values added to a non-existing variable %s: %s in %s') % (list_var, value, filename))
+            raise AppArmorException(_('Values added to a non-existing variable %(variable)s: %(value)s in %(file)s') % { 'variable': list_var, 'value': value, 'file': filename })
     else:
-        raise AppArmorException(_('Unknown variable operation %s for variable %s in %s') % (var_operation, list_var, filename))
+        raise AppArmorException(_('Unknown variable operation %(operation)s for variable %(variable)s in %(file)s') % { 'operation': var_operation, 'variable': list_var, 'file': filename })
 
 
 def strip_quotes(data):

=== modified file 'utils/apparmor/tools.py'
--- utils/apparmor/tools.py	2014-03-06 19:54:38 +0000
+++ utils/apparmor/tools.py	2014-09-14 13:41:05 +0000
@@ -81,7 +81,7 @@
                     profile = apparmor.get_full_path(os.path.join(apparmor.profile_dir, p)).strip()
                 else:
                     if '/' not in p:
-                        aaui.UI_Info(_("Can't find %s in the system path list. If the name of the application\nis correct, please run 'which %s' as a user with correct PATH\nenvironment set up in order to find the fully-qualified path and\nuse the full path as parameter.") % (p, p))
+                        aaui.UI_Info(_("Can't find %(program)s in the system path list. If the name of the application\nis correct, please run 'which %(program)s' as a user with correct PATH\nenvironment set up in order to find the fully-qualified path and\nuse the full path as parameter.") % { 'program': p })
                     else:
                         aaui.UI_Info(_("%s does not exist, please double-check the path.") % p)
                     continue
@@ -123,7 +123,7 @@
 
             else:
                 if '/' not in program:
-                    aaui.UI_Info(_("Can't find %s in the system path list. If the name of the application\nis correct, please run 'which %s' as a user with correct PATH\nenvironment set up in order to find the fully-qualified path and\nuse the full path as parameter.") % (program, program))
+                    aaui.UI_Info(_("Can't find %(program)s in the system path list. If the name of the application\nis correct, please run 'which %(program)s' as a user with correct PATH\nenvironment set up in order to find the fully-qualified path and\nuse the full path as parameter.") % { 'program': program })
                 else:
                     aaui.UI_Info(_("%s does not exist, please double-check the path.") % program)
                     sys.exit(1)
@@ -237,7 +237,7 @@
                 q = apparmor.hasher()
                 q['title'] = 'Changed Local Profiles'
                 q['headers'] = []
-                q['explanation'] = _('The local profile for %s in file %s was changed. Would you like to save it?') % (program, filename)
+                q['explanation'] = _('The local profile for %(program)s in file %(file)s was changed. Would you like to save it?') % { 'program': program, 'file': filename }
                 q['functions'] = ['CMD_SAVE_CHANGES', 'CMD_VIEW_CHANGES', 'CMD_ABORT']
                 q['default'] = 'CMD_VIEW_CHANGES'
                 q['options'] = []

=== modified file 'utils/apparmor/ui.py'
--- utils/apparmor/ui.py	2014-08-06 17:07:41 +0000
+++ utils/apparmor/ui.py	2014-09-14 13:58:14 +0000
@@ -348,7 +348,7 @@
         key = get_translated_hotkey(menutext).lower()
         # Duplicate hotkey
         if keys.get(key, False):
-            raise AppArmorException(_('PromptUser: Duplicate hotkey for %s: %s ') % (cmd, menutext))
+            raise AppArmorException(_('PromptUser: Duplicate hotkey for %(command)s: %(menutext)s ') % { 'command': cmd, 'menutext': menutext })
 
         keys[key] = cmd
 

=== modified file 'utils/po/apparmor-utils.pot'
--- utils/po/apparmor-utils.pot	2014-09-10 18:15:56 +0000
+++ utils/po/apparmor-utils.pot	2014-09-14 13:59:10 +0000
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: [email protected]\n"
-"POT-Creation-Date: 2014-09-10 11:15-0700\n"
+"POT-Creation-Date: 2014-09-14 19:29+0530\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <[email protected]>\n"
@@ -50,11 +50,12 @@
 msgid "%s is not a directory."
 msgstr ""
 
-#: ../aa-genprof:94 ../apparmor/tools.py:84 ../apparmor/tools.py:126
+#: ../aa-genprof:94
 #, python-format
 msgid ""
-"Can't find %s in the system path list. If the name of the application\n"
-"is correct, please run 'which %s' as a user with correct PATH\n"
+"Can't find %(profiling)s in the system path list. If the name of the "
+"application\n"
+"is correct, please run 'which %(profiling)s' as a user with correct PATH\n"
 "environment set up in order to find the fully-qualified path and\n"
 "use the full path as parameter."
 msgstr ""
@@ -246,9 +247,9 @@
 msgid "Mode"
 msgstr ""
 
-#: ../aa-mergeprof:556 ../apparmor/aa.py:1897
+#: ../aa-mergeprof:556
 #, python-format
-msgid "Adding %s %s to profile"
+msgid "Adding %(path)s %(mod)s to profile"
 msgstr ""
 
 #: ../aa-mergeprof:574 ../apparmor/aa.py:1915
@@ -272,12 +273,12 @@
 
 #: ../aa-mergeprof:683 ../apparmor/aa.py:2020
 #, python-format
-msgid "Adding network access %s %s to profile."
+msgid "Adding network access %(family)s %(type)s to profile."
 msgstr ""
 
 #: ../aa-mergeprof:689 ../apparmor/aa.py:2026
 #, python-format
-msgid "Denying network access %s %s to profile"
+msgid "Denying network access %(family)s %(type)s to profile"
 msgstr ""
 
 #: ../aa-autodep:23
@@ -322,22 +323,22 @@
 
 #: ../aa-unconfined:81
 #, python-format
-msgid "%s %s (%s) not confined"
+msgid "%(pid)s %(program)s (%(commandline)s) not confined"
 msgstr ""
 
 #: ../aa-unconfined:85
 #, python-format
-msgid "%s %s %snot confined"
+msgid "%(pid)s %(program)s%(pname)s not confined"
 msgstr ""
 
 #: ../aa-unconfined:90
 #, python-format
-msgid "%s %s (%s) confined by '%s'"
+msgid "%(pid)s %(program)s (%(commandline)s) confined by '%(attribute)s'"
 msgstr ""
 
 #: ../aa-unconfined:94
 #, python-format
-msgid "%s %s %sconfined by '%s'"
+msgid "%(pid)s %(program)s%(pname)s confined by '%(attribute)s'"
 msgstr ""
 
 #: ../apparmor/aa.py:196
@@ -367,7 +368,7 @@
 
 #: ../apparmor/aa.py:301
 #, python-format
-msgid "Could not create %s symlink to %s."
+msgid "Could not create %(link)s symlink to %(filename)s."
 msgstr ""
 
 #: ../apparmor/aa.py:314
@@ -378,8 +379,8 @@
 #: ../apparmor/aa.py:328
 #, python-format
 msgid ""
-"Unable to fork: %s\n"
-"\t%s"
+"Unable to fork: %(program)s\n"
+"\t%(error)s"
 msgstr ""
 
 #: ../apparmor/aa.py:449 ../apparmor/ui.py:303
@@ -425,8 +426,8 @@
 #: ../apparmor/aa.py:832 ../apparmor/aa.py:883
 #, python-format
 msgid ""
-"WARNING: An error occurred while uploading the profile %s\n"
-"%s"
+"WARNING: An error occurred while uploading the profile %(profile)s\n"
+"%(ret)s"
 msgstr ""
 
 #: ../apparmor/aa.py:833
@@ -540,13 +541,18 @@
 msgid "Invalid mode found: %s"
 msgstr ""
 
+#: ../apparmor/aa.py:1897
+#, python-format
+msgid "Adding %(path)s %(mode)s to profile"
+msgstr ""
+
 #: ../apparmor/aa.py:1918
 #, python-format
 msgid ""
 "The specified path does not match this log entry:\n"
 "\n"
-"  Log Entry: %s\n"
-"  Entered Path:  %s\n"
+"  Log Entry: %(path)s\n"
+"  Entered Path:  %(ans)s\n"
 "Do you really want to use this path?"
 msgstr ""
 
@@ -586,109 +592,133 @@
 
 #: ../apparmor/aa.py:2677
 #, python-format
-msgid "%s profile in %s contains syntax errors in line: %s."
+msgid ""
+"%(profile)s profile in %(file)s contains syntax errors in line: %(line)s."
 msgstr ""
 
 #: ../apparmor/aa.py:2734
 #, python-format
-msgid "Syntax Error: Unexpected End of Profile reached in file: %s line: %s"
+msgid ""
+"Syntax Error: Unexpected End of Profile reached in file: %(file)s line: "
+"%(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:2749
 #, python-format
-msgid "Syntax Error: Unexpected capability entry found in file: %s line: %s"
+msgid ""
+"Syntax Error: Unexpected capability entry found in file: %(file)s line: "
+"%(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:2770
 #, python-format
-msgid "Syntax Error: Unexpected link entry found in file: %s line: %s"
+msgid ""
+"Syntax Error: Unexpected link entry found in file: %(file)s line: %(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:2798
 #, python-format
 msgid ""
-"Syntax Error: Unexpected change profile entry found in file: %s line: %s"
+"Syntax Error: Unexpected change profile entry found in file: %(file)s line: "
+"%(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:2820
 #, python-format
-msgid "Syntax Error: Unexpected rlimit entry found in file: %s line: %s"
+msgid ""
+"Syntax Error: Unexpected rlimit entry found in file: %(file)s line: %(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:2831
 #, python-format
-msgid "Syntax Error: Unexpected boolean definition found in file: %s line: %s"
+msgid ""
+"Syntax Error: Unexpected boolean definition found in file: %(file)s line: "
+"%(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:2871
 #, python-format
-msgid "Syntax Error: Unexpected bare file rule found in file: %s line: %s"
+msgid ""
+"Syntax Error: Unexpected bare file rule found in file: %(file)s line: "
+"%(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:2894
 #, python-format
-msgid "Syntax Error: Unexpected path entry found in file: %s line: %s"
+msgid ""
+"Syntax Error: Unexpected path entry found in file: %(file)s line: %(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:2922
 #, python-format
-msgid "Syntax Error: Invalid Regex %s in file: %s line: %s"
+msgid "Syntax Error: Invalid Regex %(path)s in file: %(file)s line: %(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:2925
 #, python-format
-msgid "Invalid mode %s in file: %s line: %s"
+msgid "Invalid mode %(mode)s in file: %(file)s line: %(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:2977
 #, python-format
-msgid "Syntax Error: Unexpected network entry found in file: %s line: %s"
+msgid ""
+"Syntax Error: Unexpected network entry found in file: %(file)s line: %(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:3007
 #, python-format
-msgid "Syntax Error: Unexpected dbus entry found in file: %s line: %s"
+msgid ""
+"Syntax Error: Unexpected dbus entry found in file: %(file)s line: %(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:3030
 #, python-format
-msgid "Syntax Error: Unexpected mount entry found in file: %s line: %s"
+msgid ""
+"Syntax Error: Unexpected mount entry found in file: %(file)s line: %(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:3052
 #, python-format
-msgid "Syntax Error: Unexpected signal entry found in file: %s line: %s"
+msgid ""
+"Syntax Error: Unexpected signal entry found in file: %(file)s line: %(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:3074
 #, python-format
-msgid "Syntax Error: Unexpected ptrace entry found in file: %s line: %s"
+msgid ""
+"Syntax Error: Unexpected ptrace entry found in file: %(file)s line: %(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:3096
 #, python-format
-msgid "Syntax Error: Unexpected pivot_root entry found in file: %s line: %s"
+msgid ""
+"Syntax Error: Unexpected pivot_root entry found in file: %(file)s line: "
+"%(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:3118
 #, python-format
-msgid "Syntax Error: Unexpected unix entry found in file: %s line: %s"
+msgid ""
+"Syntax Error: Unexpected unix entry found in file: %(file)s line: %(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:3140
 #, python-format
 msgid ""
-"Syntax Error: Unexpected change hat declaration found in file: %s line: %s"
+"Syntax Error: Unexpected change hat declaration found in file: %(file)s "
+"line: %(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:3152
 #, python-format
-msgid "Syntax Error: Unexpected hat definition found in file: %s line: %s"
+msgid ""
+"Syntax Error: Unexpected hat definition found in file: %(file)s line: "
+"%(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:3168
 #, python-format
-msgid "Error: Multiple definitions for hat %s in profile %s."
+msgid "Error: Multiple definitions for hat %(hat)s in profile %(profile)s."
 msgstr ""
 
 #: ../apparmor/aa.py:3185
@@ -698,29 +728,32 @@
 
 #: ../apparmor/aa.py:3198
 #, python-format
-msgid "Syntax Error: Unknown line found in file: %s line: %s"
+msgid "Syntax Error: Unknown line found in file: %(file)s line: %(line)s"
 msgstr ""
 
 #: ../apparmor/aa.py:3211
 #, python-format
 msgid ""
-"Syntax Error: Missing '}' or ','. Reached end of file %s while inside "
-"profile %s"
+"Syntax Error: Missing '}' or ','. Reached end of file %(file)s while inside "
+"profile %(profile)s"
 msgstr ""
 
 #: ../apparmor/aa.py:3277
 #, python-format
-msgid "Redefining existing variable %s: %s in %s"
+msgid "Redefining existing variable %(variable)s: %(value)s in %(file)s"
 msgstr ""
 
 #: ../apparmor/aa.py:3282
 #, python-format
-msgid "Values added to a non-existing variable %s: %s in %s"
+msgid ""
+"Values added to a non-existing variable %(variable)s: %(value)s in %(file)s"
 msgstr ""
 
 #: ../apparmor/aa.py:3284
 #, python-format
-msgid "Unknown variable operation %s for variable %s in %s"
+msgid ""
+"Unknown variable operation %(operation)s for variable %(variable)s in "
+"%(file)s"
 msgstr ""
 
 #: ../apparmor/aa.py:3343
@@ -758,6 +791,16 @@
 msgid "Log contains unknown mode %s"
 msgstr ""
 
+#: ../apparmor/tools.py:84 ../apparmor/tools.py:126
+#, python-format
+msgid ""
+"Can't find %(program)s in the system path list. If the name of the "
+"application\n"
+"is correct, please run 'which %(program)s' as a user with correct PATH\n"
+"environment set up in order to find the fully-qualified path and\n"
+"use the full path as parameter."
+msgstr ""
+
 #: ../apparmor/tools.py:86 ../apparmor/tools.py:102 ../apparmor/tools.py:128
 #, python-format
 msgid "%s does not exist, please double-check the path."
@@ -812,7 +855,8 @@
 #: ../apparmor/tools.py:240
 #, python-format
 msgid ""
-"The local profile for %s in file %s was changed. Would you like to save it?"
+"The local profile for %(program)s in file %(file)s was changed. Would you "
+"like to save it?"
 msgstr ""
 
 #: ../apparmor/tools.py:260
@@ -1067,7 +1111,7 @@
 
 #: ../apparmor/ui.py:351
 #, python-format
-msgid "PromptUser: Duplicate hotkey for %s: %s "
+msgid "PromptUser: Duplicate hotkey for %(command)s: %(menutext)s "
 msgstr ""
 
 #: ../apparmor/ui.py:363

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to