Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
tails
tails
Commits
f9f6ba62
Commit
f9f6ba62
authored
Jul 02, 2018
by
Alan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ASP: better wording when working on more than 1 package
Refs:
#15381
.
parent
6dd44acb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
config/chroot_local-includes/usr/local/sbin/tails-additional-software
...t_local-includes/usr/local/sbin/tails-additional-software
+12
-12
No files found.
config/chroot_local-includes/usr/local/sbin/tails-additional-software
View file @
f9f6ba62
...
...
@@ -199,17 +199,17 @@ def _spawn_daemon(func):
func
()
def
_format_
list
(
lst
):
"""Return a nice formatted
version of list
."""
lst
=
sorted
(
lst
)
def
_format_
iterable
(
iterable
):
"""Return a nice formatted
string with the elements of iterable
."""
iterable
=
sorted
(
iterable
)
if
len
(
lst
)
==
1
:
if
len
(
iterable
)
==
1
:
return
lst
[
0
]
elif
len
(
lst
)
>
1
:
return
"{beginning} and {last}"
.
format
(
beginning
=
", "
.
join
(
lst
[:
-
1
]),
last
=
lst
[
-
1
])
elif
len
(
iterable
)
>
1
:
return
_
(
"{beginning} and {last}"
)
.
format
(
beginning
=
_
(
", "
).
join
(
iterable
[:
-
1
]),
last
=
iterable
[
-
1
])
else
:
return
str
(
lst
)
return
str
(
iterabl
)
def
has_additional_packages_list
(
search_new_persistence
=
False
):
...
...
@@ -272,7 +272,7 @@ def handle_installed_packages(packages):
logging
.
info
(
"New packages manually installed: %s"
%
packages
)
if
has_unlocked_persistence
(
search_new_persistence
=
True
):
if
_notify
(
_
(
"Add {packages} to your additional software?"
).
format
(
packages
=
_format_
list
(
packages
)),
packages
=
_format_
iterable
(
packages
)),
_
(
"To install it automatically from your persistent "
"storage when starting Tails."
),
_
(
"Add to Persistent Storage"
),
...
...
@@ -300,7 +300,7 @@ def handle_installed_packages(packages):
"additional software."
)
elif
is_tails_media_writable
():
if
_notify
(
_
(
"Add {packages} to your additional software?"
).
format
(
packages
=
_format_
list
(
packages
)),
packages
=
_format_
iterable
(
packages
)),
_
(
"To install it automatically when starting Tails, you "
"can create a persistent storage and activate the "
"<b>Additional Software</b> feature."
),
...
...
@@ -321,7 +321,7 @@ def handle_installed_packages(packages):
open
(
ASP_STATE_INSTALLER_ASKED
,
'a'
).
close
()
_notify
(
_
(
"You could install {packages} automatically when "
"starting Tails"
).
format
(
packages
=
_format_
list
(
packages
)),
packages
=
_format_
iterable
(
packages
)),
_
(
"To do so, you need to run Tails from a USB stick "
"installed using <i>Tails Installer</i>."
),
documentation_target
=
"install/clone"
,
...
...
@@ -336,7 +336,7 @@ def handle_removed_packages(packages):
"""
logging
.
info
(
"Additional packages removed: %s"
%
packages
)
if
_notify
(
_
(
"Remove {packages} from your additional software?"
).
format
(
packages
=
_format_
list
(
packages
)),
packages
=
_format_
iterable
(
packages
)),
""
,
_
(
"Remove"
),
_
(
"Cancel"
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment