diff --git a/Translate/messages.pot b/Translate/messages.pot new file mode 100644 index 000000000..f73b67656 --- /dev/null +++ b/Translate/messages.pot @@ -0,0 +1,646 @@ +# Translations for AppArmor Profile Tools. +# Copyright (C) 2013 +# Kshitij Gupta , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2013-09-19 21:16+IST\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: ENCODING\n" +"Generated-By: pygettext.py 1.5\n" + + +#: ./../Tools/aa-genprof:48 ./../Tools/aa-logprof:20 +#: ./../Tools/aa-unconfined:17 +msgid "It seems AppArmor was not started. Please enable AppArmor and try again." +msgstr "" + +#: ./../Tools/aa-genprof:67 +msgid "Can't find %s in the system path list. If the name of the application is correct, please run 'which %s' in another window in order to find the fully-qualified path and use the full path as parameter." +msgstr "" + +#: ./../Tools/aa-genprof:69 +msgid "%s does not exists, please double-check the path." +msgstr "" + +#: ./../Tools/aa-genprof:97 +msgid "" +"\n" +"Before you begin, you may wish to check if a\n" +"profile already exists for the application you\n" +"wish to confine. See the following wiki page for\n" +"more information:\n" +"http://wiki.apparmor.net/index.php/Profiles" +msgstr "" + +#: ./../Tools/aa-genprof:99 +msgid "" +"Please start the application to be profiled in\n" +"another window and exercise its functionality now.\n" +"\n" +"Once completed, select the \"Scan\" option below in \n" +"order to scan the system logs for AppArmor events. \n" +"\n" +"For each AppArmor event, you will be given the \n" +"opportunity to choose whether the access should be \n" +"allowed or denied." +msgstr "" + +#: ./../Tools/aa-genprof:120 +msgid "Profiling" +msgstr "" + +#: ./../Tools/aa-genprof:138 +msgid "" +"\n" +"Reloaded AppArmor profiles in enforce mode." +msgstr "" + +#: ./../Tools/aa-genprof:139 +msgid "" +"\n" +"Please consider contributing your new profile!\n" +"See the following wiki page for more information:\n" +"http://wiki.apparmor.net/index.php/Profiles\n" +msgstr "" + +#: ./../Tools/aa-genprof:140 +msgid "Finished generating profile for %s." +msgstr "" + +#: ./../Tools/aa-unconfined:56 +msgid "" +"%s %s (%s) not confined\n" +msgstr "" + +#: ./../Tools/aa-unconfined:60 +msgid "" +"%s %s %snot confined\n" +msgstr "" + +#: ./../Tools/aa-unconfined:65 +msgid "" +"%s %s (%s) confined by '%s'\n" +msgstr "" + +#: ./../Tools/aa-unconfined:69 +msgid "" +"%s %s %sconfined by '%s'\n" +msgstr "" + +#: aa.py:263 +msgid "Unable to find basename for %s." +msgstr "" + +#: aa.py:420 ui.py:270 +msgid "Are you sure you want to abandon this set of profile changes and exit?" +msgstr "" + +#: aa.py:422 ui.py:272 +msgid "Abandoning all changes." +msgstr "" + +#: aa.py:564 +msgid "%s contains no profile" +msgstr "" + +#: aa.py:936 aa.py:1192 aa.py:1496 aa.py:1532 aa.py:1695 aa.py:1897 aa.py:1928 +msgid "Profile" +msgstr "" + +#: aa.py:939 +msgid "Default Hat" +msgstr "" + +#: aa.py:941 +msgid "Requested Hat" +msgstr "" + +#: aa.py:1194 +msgid "Program" +msgstr "" + +#: aa.py:1197 +msgid "Execute" +msgstr "" + +#: aa.py:1198 aa.py:1498 aa.py:1534 aa.py:1746 +msgid "Severity" +msgstr "" + +#: aa.py:1221 +msgid "Are you specifying a transition to a local profile?" +msgstr "" + +#: aa.py:1233 +msgid "Enter profile name to transition to: " +msgstr "" + +#: aa.py:1242 +msgid "" +"Should AppArmor sanitise the environment when\n" +"switching profiles?\n" +"\n" +"Sanitising environment is more secure,\n" +"but some applications depend on the presence\n" +"of LD_PRELOAD or LD_LIBRARY_PATH." +msgstr "" + +#: aa.py:1244 +msgid "" +"Should AppArmor sanitise the environment when\n" +"switching profiles?\n" +"\n" +"Sanitising environment is more secure,\n" +"but this application appears to be using LD_PRELOAD\n" +"or LD_LIBRARY_PATH and sanitising the environment\n" +"could cause functionality problems." +msgstr "" + +#: aa.py:1252 +msgid "" +"Launching processes in an unconfined state is a very\n" +"dangerous operation and can cause serious security holes.\n" +"\n" +"Are you absolutely certain you wish to remove all\n" +"AppArmor protection when executing : %s ?" +msgstr "" + +#: aa.py:1254 +msgid "" +"Should AppArmor sanitise the environment when\n" +"running this program unconfined?\n" +"\n" +"Not sanitising the environment when unconfining\n" +"a program opens up significant security holes\n" +"and should be avoided if at all possible." +msgstr "" + +#: aa.py:1330 +msgid "" +"A profile for %s does not exist.\n" +"Do you want to create one?" +msgstr "" + +#: aa.py:1348 +msgid "A local profile for %s does not exit. Create one?" +msgstr "" + +#: aa.py:1457 +msgid "Complain-mode changes:" +msgstr "" + +#: aa.py:1459 +msgid "Enforce-mode changes:" +msgstr "" + +#: aa.py:1462 +msgid "Invalid mode found: %s" +msgstr "" + +#: aa.py:1497 aa.py:1533 +msgid "Capability" +msgstr "" + +#: aa.py:1547 aa.py:1782 +msgid "Adding %s to profile." +msgstr "" + +#: aa.py:1549 aa.py:1784 aa.py:1824 aa.py:1946 +msgid "Deleted %s previous matching profile entries." +msgstr "" + +#: aa.py:1556 +msgid "Adding capability %s to profile." +msgstr "" + +#: aa.py:1563 +msgid "Denying capability %s to profile." +msgstr "" + +#: aa.py:1696 +msgid "Path" +msgstr "" + +#: aa.py:1705 aa.py:1736 +msgid "(owner permissions off)" +msgstr "" + +#: aa.py:1710 +msgid "(force new perms to owner)" +msgstr "" + +#: aa.py:1713 +msgid "(force all rule perms to owner)" +msgstr "" + +#: aa.py:1725 +msgid "Old Mode" +msgstr "" + +#: aa.py:1726 +msgid "New Mode" +msgstr "" + +#: aa.py:1741 +msgid "(force perms to owner)" +msgstr "" + +#: aa.py:1744 +msgid "Mode" +msgstr "" + +#: aa.py:1822 +msgid "Adding %s %s to profile" +msgstr "" + +#: aa.py:1840 +msgid "Enter new path:" +msgstr "" + +#: aa.py:1843 +msgid "The specified path does not match this log entry:" +msgstr "" + +#: aa.py:1844 +msgid "Log Entry" +msgstr "" + +#: aa.py:1845 +msgid "Entered Path" +msgstr "" + +#: aa.py:1846 +msgid "Do you really want to use this path?" +msgstr "" + +#: aa.py:1898 aa.py:1929 +msgid "Network Family" +msgstr "" + +#: aa.py:1899 aa.py:1930 +msgid "Socket Type" +msgstr "" + +#: aa.py:1944 +msgid "Adding %s to profile" +msgstr "" + +#: aa.py:1954 +msgid "Adding network access %s %s to profile." +msgstr "" + +#: aa.py:1960 +msgid "Denying network access %s %s to profile" +msgstr "" + +#: aa.py:2171 +msgid "Reading log entries from %s." +msgstr "" + +#: aa.py:2174 +msgid "Updating AppArmor profiles in %s." +msgstr "" + +#: aa.py:2178 +msgid "unknown" +msgstr "" + +#: aa.py:2241 +msgid "" +"Select which profile changes you would like to save to the\n" +"local profile set." +msgstr "" + +#: aa.py:2242 +msgid "Local profile changes" +msgstr "" + +#: aa.py:2264 +msgid "The following local profiles were changed. Would you like to save them?" +msgstr "" + +#: aa.py:2338 +msgid "Profile Changes" +msgstr "" + +#: aa.py:3831 +msgid "Writing updated profile for %s." +msgstr "" + +#: aa.py:4074 +msgid "" +"%s is currently marked as a program that should not have its own\n" +"profile. Usually, programs are marked this way if creating a profile for \n" +"them is likely to break the rest of the system. If you know what you're\n" +"doing and are certain you want to create a profile for this program, edit\n" +"the corresponding entry in the [qualifiers] section in /etc/apparmor/logprof.conf." +msgstr "" + +#: logparser.py:117 logparser.py:122 +msgid "Log contains unknown mode %s" +msgstr "" + +#: tools.py:51 +msgid "The given program cannot be found, please try with the fully qualified path name of the program: " +msgstr "" + +#: tools.py:53 tools.py:107 +msgid "%s does not exist, please double-check the path." +msgstr "" + +#: tools.py:70 +msgid "Profile for %s not found, skipping" +msgstr "" + +#: tools.py:74 +msgid "" +"Disabling %s.\n" +msgstr "" + +#: tools.py:77 +msgid "" +"Enabling %s.\n" +msgstr "" + +#: tools.py:82 +msgid "" +"Setting %s to audit mode.\n" +msgstr "" + +#: tools.py:84 +msgid "" +"Removing audit mode from %s.\n" +msgstr "" + +#: tools.py:105 +msgid "" +"Can't find %s in the system path list. If the name of the application is correct, please run 'which %s' as a user with correct PATH environment set up in order to find the fully-qualified path.\n" +"Please use the full path as parameter" +msgstr "" + +#: tools.py:122 +msgid "The profile for %s does not exists. Nothing to clean." +msgstr "" + +#: ui.py:46 +msgid "Invalid hotkey for" +msgstr "" + +#: ui.py:60 ui.py:98 ui.py:238 +msgid "(Y)es" +msgstr "" + +#: ui.py:61 ui.py:99 ui.py:239 +msgid "(N)o" +msgstr "" + +#: ui.py:100 +msgid "(C)ancel" +msgstr "" + +#: ui.py:186 +msgid "(A)llow" +msgstr "" + +#: ui.py:187 +msgid "(M)ore" +msgstr "" + +#: ui.py:188 +msgid "Audi(t)" +msgstr "" + +#: ui.py:189 +msgid "Audi(t) off" +msgstr "" + +#: ui.py:190 +msgid "Audit (A)ll" +msgstr "" + +#: ui.py:192 +msgid "(O)wner permissions on" +msgstr "" + +#: ui.py:193 +msgid "(O)wner permissions off" +msgstr "" + +#: ui.py:194 +msgid "(D)eny" +msgstr "" + +#: ui.py:195 +msgid "Abo(r)t" +msgstr "" + +#: ui.py:196 +msgid "(F)inish" +msgstr "" + +#: ui.py:197 +msgid "(I)nherit" +msgstr "" + +#: ui.py:198 +msgid "(P)rofile" +msgstr "" + +#: ui.py:199 +msgid "(P)rofile Clean Exec" +msgstr "" + +#: ui.py:200 +msgid "(C)hild" +msgstr "" + +#: ui.py:201 +msgid "(C)hild Clean Exec" +msgstr "" + +#: ui.py:202 +msgid "Named" +msgstr "" + +#: ui.py:203 +msgid "Named Clean Exec" +msgstr "" + +#: ui.py:204 +msgid "(U)nconfined" +msgstr "" + +#: ui.py:205 +msgid "(U)nconfined Clean Exec" +msgstr "" + +#: ui.py:206 +msgid "(P)rofile Inherit" +msgstr "" + +#: ui.py:207 +msgid "(P)rofile Inherit Clean Exec" +msgstr "" + +#: ui.py:208 +msgid "(C)hild Inherit" +msgstr "" + +#: ui.py:209 +msgid "(C)hild Inherit Clean Exec" +msgstr "" + +#: ui.py:210 +msgid "(N)amed Inherit" +msgstr "" + +#: ui.py:211 +msgid "(N)amed Inherit Clean Exec" +msgstr "" + +#: ui.py:212 +msgid "(X) ix On" +msgstr "" + +#: ui.py:213 +msgid "(X) ix Off" +msgstr "" + +#: ui.py:214 ui.py:228 +msgid "(S)ave Changes" +msgstr "" + +#: ui.py:215 +msgid "(C)ontinue Profiling" +msgstr "" + +#: ui.py:216 +msgid "(N)ew" +msgstr "" + +#: ui.py:217 +msgid "(G)lob" +msgstr "" + +#: ui.py:218 +msgid "Glob with (E)xtension" +msgstr "" + +#: ui.py:219 +msgid "(A)dd Requested Hat" +msgstr "" + +#: ui.py:220 +msgid "(U)se Default Hat" +msgstr "" + +#: ui.py:221 +msgid "(S)can system log for AppArmor events" +msgstr "" + +#: ui.py:222 +msgid "(H)elp" +msgstr "" + +#: ui.py:223 +msgid "(V)iew Profile" +msgstr "" + +#: ui.py:224 +msgid "(U)se Profile" +msgstr "" + +#: ui.py:225 +msgid "(C)reate New Profile" +msgstr "" + +#: ui.py:226 +msgid "(U)pdate Profile" +msgstr "" + +#: ui.py:227 +msgid "(I)gnore Update" +msgstr "" + +#: ui.py:229 +msgid "Save Selec(t)ed Profile" +msgstr "" + +#: ui.py:230 +msgid "(U)pload Changes" +msgstr "" + +#: ui.py:231 +msgid "(V)iew Changes" +msgstr "" + +#: ui.py:232 +msgid "View Changes b/w (C)lean profiles" +msgstr "" + +#: ui.py:233 +msgid "(V)iew" +msgstr "" + +#: ui.py:234 +msgid "(E)nable Repository" +msgstr "" + +#: ui.py:235 +msgid "(D)isable Repository" +msgstr "" + +#: ui.py:236 +msgid "(N)ever Ask Again" +msgstr "" + +#: ui.py:237 +msgid "Ask Me (L)ater" +msgstr "" + +#: ui.py:240 +msgid "Allow All (N)etwork" +msgstr "" + +#: ui.py:241 +msgid "Allow Network Fa(m)ily" +msgstr "" + +#: ui.py:242 +msgid "(O)verwrite Profile" +msgstr "" + +#: ui.py:243 +msgid "(K)eep Profile" +msgstr "" + +#: ui.py:244 +msgid "(C)ontinue" +msgstr "" + +#: ui.py:245 +msgid "(I)gnore" +msgstr "" + +#: ui.py:316 +msgid "Unknown command" +msgstr "" + +#: ui.py:323 +msgid "Duplicate hotkey for" +msgstr "" + +#: ui.py:335 +msgid "Invalid hotkey in default item" +msgstr "" + +#: ui.py:340 +msgid "Invalid default" +msgstr "" + diff --git a/apparmor/aa.py b/apparmor/aa.py index 39791c0ba..adb1c8282 100644 --- a/apparmor/aa.py +++ b/apparmor/aa.py @@ -1239,18 +1239,9 @@ def handle_children(profile, hat, root): match = regex_optmode.search(ans).groups()[0] exec_mode = str_to_mode(match) px_default = 'n' - px_msg = _('Should AppArmor sanitise the environment when\n' + - 'switching profiles?\n\n' + - 'Sanitising environment is more secure,\n' + - 'but some applications depend on the presence\n' + - 'of LD_PRELOAD or LD_LIBRARY_PATH.') + px_msg = _("""Should AppArmor sanitise the environment when\nswitching profiles?\n\nSanitising environment is more secure,\nbut some applications depend on the presence\nof LD_PRELOAD or LD_LIBRARY_PATH.""") if parent_uses_ld_xxx: - px_msg = _('Should AppArmor sanitise the environment when\n' + - 'switching profiles?\n\n' + - 'Sanitising environment is more secure,\n' + - 'but this application appears to be using LD_PRELOAD\n' + - 'or LD_LIBRARY_PATH and sanitising the environment\n' + - 'could cause functionality problems.') + px_msg = _("""Should AppArmor sanitise the environment when\nswitching profiles?\n\nSanitising environment is more secure,\nbut this application appears to be using LD_PRELOAD\nor LD_LIBRARY_PATH and sanitising the environment\ncould cause functionality problems.""") ynans = UI_YesNo(px_msg, px_default) if ynans == 'y': @@ -1258,16 +1249,9 @@ def handle_children(profile, hat, root): exec_mode = exec_mode - (AA_EXEC_UNSAFE | AA_OTHER(AA_EXEC_UNSAFE)) elif ans == 'CMD_ux': exec_mode = str_to_mode('ux') - ynans = UI_YesNo(_('Launching processes in an unconfined state is a very\n' + - 'dangerous operation and can cause serious security holes.\n\n' + - 'Are you absolutely certain you wish to remove all\n' + - 'AppArmor protection when executing :') + '%s ?' % exec_target, 'n') + ynans = UI_YesNo(_("""Launching processes in an unconfined state is a very\ndangerous operation and can cause serious security holes.\n\nAre you absolutely certain you wish to remove all\nAppArmor protection when executing : %s ?""") % exec_target, 'n') if ynans == 'y': - ynans = UI_YesNo(_('Should AppArmor sanitise the environment when\n' + - 'running this program unconfined?\n\n' + - 'Not sanitising the environment when unconfining\n' + - 'a program opens up significant security holes\n' + - 'and should be avoided if at all possible.'), 'y') + ynans = UI_YesNo(_("""Should AppArmor sanitise the environment when\nrunning this program unconfined?\n\nNot sanitising the environment when unconfining\na program opens up significant security holes\nand should be avoided if at all possible."""), 'y') if ynans == 'y': # Disable the unsafe mode exec_mode = exec_mode - (AA_EXEC_UNSAFE | AA_OTHER(AA_EXEC_UNSAFE)) @@ -1967,7 +1951,7 @@ def ask_the_questions(): changed[profile] = True - UI_Info(_('Adding network access %s %s to profile.' % (family, sock_type))) + UI_Info(_('Adding network access %s %s to profile.') % (family, sock_type)) elif ans == 'CMD_DENY': done = True @@ -4087,11 +4071,7 @@ def suggest_incs_for_path(incname, path, allow): def check_qualifiers(program): if cfg['qualifiers'].get(program, False): if cfg['qualifiers'][program] != 'p': - fatal_error(_('%s is currently marked as a program that should not have its own\n' + - 'profile. Usually, programs are marked this way if creating a profile for \n' + - 'them is likely to break the rest of the system. If you know what you\'re\n' + - 'doing and are certain you want to create a profile for this program, edit\n' + - 'the corresponding entry in the [qualifiers] section in /etc/apparmor/logprof.conf.') %program) + fatal_error(_("""%s is currently marked as a program that should not have its own\nprofile. Usually, programs are marked this way if creating a profile for \nthem is likely to break the rest of the system. If you know what you\'re\ndoing and are certain you want to create a profile for this program, edit\nthe corresponding entry in the [qualifiers] section in /etc/apparmor/logprof.conf.""") %program) return False def get_subdirectories(current_dir): diff --git a/apparmor/tools.py b/apparmor/tools.py index a01ab4f09..7d5df9ac5 100644 --- a/apparmor/tools.py +++ b/apparmor/tools.py @@ -7,7 +7,7 @@ import apparmor.aa as apparmor class aa_tools: def __init__(self, tool_name, args): self.name = tool_name - self.profiledir = args.d + self.profiledir = args.dir self.profiling = args.program self.check_profile_dir() diff --git a/apparmor/ui.py b/apparmor/ui.py index aa1e3645e..ced5b2c09 100644 --- a/apparmor/ui.py +++ b/apparmor/ui.py @@ -183,66 +183,66 @@ def UI_BusyStop(): ypath, yarg = GetDataFromYast() CMDS = { - 'CMD_ALLOW': '(A)llow', - 'CMD_OTHER': '(M)ore', - 'CMD_AUDIT_NEW': 'Audi(t)', - 'CMD_AUDIT_OFF': 'Audi(t) off', - 'CMD_AUDIT_FULL': 'Audit (A)ll', + 'CMD_ALLOW': _('(A)llow'), + 'CMD_OTHER': _('(M)ore'), + 'CMD_AUDIT_NEW': _('Audi(t)'), + 'CMD_AUDIT_OFF': _('Audi(t) off'), + 'CMD_AUDIT_FULL': _('Audit (A)ll'), #'CMD_OTHER': '(O)pts', - 'CMD_USER_ON': '(O)wner permissions on', - 'CMD_USER_OFF': '(O)wner permissions off', - 'CMD_DENY': '(D)eny', - 'CMD_ABORT': 'Abo(r)t', - 'CMD_FINISHED': '(F)inish', - 'CMD_ix': '(I)nherit', - 'CMD_px': '(P)rofile', - 'CMD_px_safe': '(P)rofile Clean Exec', - 'CMD_cx': '(C)hild', - 'CMD_cx_safe': '(C)hild Clean Exec', - 'CMD_nx': 'Named', - 'CMD_nx_safe': 'Named Clean Exec', - 'CMD_ux': '(U)nconfined', - 'CMD_ux_safe': '(U)nconfined Clean Exec', - 'CMD_pix': '(P)rofile Inherit', - 'CMD_pix_safe': '(P)rofile Inherit Clean Exec', - 'CMD_cix': '(C)hild Inherit', - 'CMD_cix_safe': '(C)hild Inherit Clean Exec', - 'CMD_nix': '(N)amed Inherit', - 'CMD_nix_safe': '(N)amed Inherit Clean Exec', - 'CMD_EXEC_IX_ON': '(X) ix On', - 'CMD_EXEC_IX_OFF': '(X) ix Off', - 'CMD_SAVE': '(S)ave Changes', - 'CMD_CONTINUE': '(C)ontinue Profiling', - 'CMD_NEW': '(N)ew', - 'CMD_GLOB': '(G)lob', - 'CMD_GLOBEXT': 'Glob with (E)xtension', - 'CMD_ADDHAT': '(A)dd Requested Hat', - 'CMD_USEDEFAULT': '(U)se Default Hat', - 'CMD_SCAN': '(S)can system log for AppArmor events', - 'CMD_HELP': '(H)elp', - 'CMD_VIEW_PROFILE': '(V)iew Profile', - 'CMD_USE_PROFILE': '(U)se Profile', - 'CMD_CREATE_PROFILE': '(C)reate New Profile', - 'CMD_UPDATE_PROFILE': '(U)pdate Profile', - 'CMD_IGNORE_UPDATE': '(I)gnore Update', - 'CMD_SAVE_CHANGES': '(S)ave Changes', - 'CMD_SAVE_SELECTED': 'Save Selec(t)ed Profile', - 'CMD_UPLOAD_CHANGES': '(U)pload Changes', - 'CMD_VIEW_CHANGES': '(V)iew Changes', - 'CMD_VIEW_CHANGES_CLEAN': 'View Changes b/w (C)lean profiles', - 'CMD_VIEW': '(V)iew', - 'CMD_ENABLE_REPO': '(E)nable Repository', - 'CMD_DISABLE_REPO': '(D)isable Repository', - 'CMD_ASK_NEVER': '(N)ever Ask Again', - 'CMD_ASK_LATER': 'Ask Me (L)ater', - 'CMD_YES': '(Y)es', - 'CMD_NO': '(N)o', - 'CMD_ALL_NET': 'Allow All (N)etwork', - 'CMD_NET_FAMILY': 'Allow Network Fa(m)ily', - 'CMD_OVERWRITE': '(O)verwrite Profile', - 'CMD_KEEP': '(K)eep Profile', - 'CMD_CONTINUE': '(C)ontinue', - 'CMD_IGNORE_ENTRY': '(I)gnore' + 'CMD_USER_ON': _('(O)wner permissions on'), + 'CMD_USER_OFF': _('(O)wner permissions off'), + 'CMD_DENY': _('(D)eny'), + 'CMD_ABORT': _('Abo(r)t'), + 'CMD_FINISHED': _('(F)inish'), + 'CMD_ix': _('(I)nherit'), + 'CMD_px': _('(P)rofile'), + 'CMD_px_safe': _('(P)rofile Clean Exec'), + 'CMD_cx': _('(C)hild'), + 'CMD_cx_safe': _('(C)hild Clean Exec'), + 'CMD_nx': _('Named'), + 'CMD_nx_safe': _('Named Clean Exec'), + 'CMD_ux': _('(U)nconfined'), + 'CMD_ux_safe': _('(U)nconfined Clean Exec'), + 'CMD_pix': _('(P)rofile Inherit'), + 'CMD_pix_safe': _('(P)rofile Inherit Clean Exec'), + 'CMD_cix': _('(C)hild Inherit'), + 'CMD_cix_safe': _('(C)hild Inherit Clean Exec'), + 'CMD_nix': _('(N)amed Inherit'), + 'CMD_nix_safe': _('(N)amed Inherit Clean Exec'), + 'CMD_EXEC_IX_ON': _('(X) ix On'), + 'CMD_EXEC_IX_OFF': _('(X) ix Off'), + 'CMD_SAVE': _('(S)ave Changes'), + 'CMD_CONTINUE': _('(C)ontinue Profiling'), + 'CMD_NEW': _('(N)ew'), + 'CMD_GLOB': _('(G)lob'), + 'CMD_GLOBEXT': _('Glob with (E)xtension'), + 'CMD_ADDHAT': _('(A)dd Requested Hat'), + 'CMD_USEDEFAULT': _('(U)se Default Hat'), + 'CMD_SCAN': _('(S)can system log for AppArmor events'), + 'CMD_HELP': _('(H)elp'), + 'CMD_VIEW_PROFILE': _('(V)iew Profile'), + 'CMD_USE_PROFILE': _('(U)se Profile'), + 'CMD_CREATE_PROFILE': _('(C)reate New Profile'), + 'CMD_UPDATE_PROFILE': _('(U)pdate Profile'), + 'CMD_IGNORE_UPDATE': _('(I)gnore Update'), + 'CMD_SAVE_CHANGES': _('(S)ave Changes'), + 'CMD_SAVE_SELECTED': _('Save Selec(t)ed Profile'), + 'CMD_UPLOAD_CHANGES': _('(U)pload Changes'), + 'CMD_VIEW_CHANGES': _('(V)iew Changes'), + 'CMD_VIEW_CHANGES_CLEAN': _('View Changes b/w (C)lean profiles'), + 'CMD_VIEW': _('(V)iew'), + 'CMD_ENABLE_REPO': _('(E)nable Repository'), + 'CMD_DISABLE_REPO': _('(D)isable Repository'), + 'CMD_ASK_NEVER': _('(N)ever Ask Again'), + 'CMD_ASK_LATER': _('Ask Me (L)ater'), + 'CMD_YES': _('(Y)es'), + 'CMD_NO': _('(N)o'), + 'CMD_ALL_NET': _('Allow All (N)etwork'), + 'CMD_NET_FAMILY': _('Allow Network Fa(m)ily'), + 'CMD_OVERWRITE': _('(O)verwrite Profile'), + 'CMD_KEEP': _('(K)eep Profile'), + 'CMD_CONTINUE': _('(C)ontinue'), + 'CMD_IGNORE_ENTRY': _('(I)gnore') } def UI_PromptUser(q, params=''): @@ -315,7 +315,7 @@ def Text_PromptUser(question): if not CMDS.get(cmd, False): raise AppArmorException('PromptUser: %s %s' %(_('Unknown command'), cmd)) - menutext = _(CMDS[cmd]) + menutext = CMDS[cmd] key = get_translated_hotkey(menutext).lower() # Duplicate hotkey @@ -331,7 +331,7 @@ def Text_PromptUser(question): default_key = 0 if default and CMDS[default]: - defaulttext = _(CMDS[default]) + defaulttext = CMDS[default] defmsg = 'PromptUser: ' + _('Invalid hotkey in default item') default_key = get_translated_hotkey(defaulttext, defmsg).lower()