mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Fix warnings generated due to unnamed arguments in translatable strings.
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) Acked-by: Christian Boltz <apparmor@cboltz.de>
This commit is contained in:
parent
bc06f9f23a
commit
b7ff639d73
7 changed files with 141 additions and 97 deletions
|
@ -91,7 +91,7 @@ else:
|
|||
|
||||
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)
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import apparmor.ui as aaui
|
|||
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 @@ class Merge(object):
|
|||
|
||||
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 @@ class Merge(object):
|
|||
|
||||
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
|
||||
|
|
|
@ -78,17 +78,17 @@ for pid in sorted(pids):
|
|||
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 })
|
||||
|
|
|
@ -298,7 +298,7 @@ def create_symlink(subdir, filename):
|
|||
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 @@ def get_output(params):
|
|||
# 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 @@ def yast_select_and_upload_profiles(title, message, profiles_up):
|
|||
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 @@ def console_select_and_upload_profiles(title, message, profiles_up):
|
|||
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 @@ def ask_the_questions():
|
|||
|
||||
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 @@ def ask_the_questions():
|
|||
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 @@ def ask_the_questions():
|
|||
|
||||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
# 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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
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 @@ def parse_profile_data(data, file, do_include):
|
|||
|
||||
# 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 @@ def store_list_var(var, list_var, value, var_operation, filename):
|
|||
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):
|
||||
|
|
|
@ -81,7 +81,7 @@ class aa_tools:
|
|||
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 @@ class aa_tools:
|
|||
|
||||
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 @@ class aa_tools:
|
|||
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'] = []
|
||||
|
|
|
@ -348,7 +348,7 @@ def Text_PromptUser(question):
|
|||
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
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: apparmor@lists.ubuntu.com\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 <LL@li.org>\n"
|
||||
|
@ -50,11 +50,12 @@ msgstr ""
|
|||
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 @@ msgstr ""
|
|||
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 @@ msgstr ""
|
|||
|
||||
#: ../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 @@ msgstr ""
|
|||
|
||||
#: ../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 @@ msgstr ""
|
|||
|
||||
#: ../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 @@ msgstr ""
|
|||
#: ../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 @@ msgstr ""
|
|||
#: ../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 @@ msgstr ""
|
|||
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 @@ msgstr ""
|
|||
|
||||
#: ../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 @@ msgstr ""
|
|||
|
||||
#: ../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 @@ msgstr ""
|
|||
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 @@ msgstr ""
|
|||
#: ../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 @@ msgstr ""
|
|||
|
||||
#: ../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
|
||||
|
|
Loading…
Add table
Reference in a new issue