File tree Expand file tree Collapse file tree 3 files changed +28
-10
lines changed Expand file tree Collapse file tree 3 files changed +28
-10
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,17 @@ else # Remove access to settings
41
41
42
42
USER=\$ (id -un)
43
43
44
+ # Set the info text based on the chosen language
45
+ if echo \$ LANG | grep sv; then
46
+ INFO="Systeminställningarna är inte tillgängliga för allmänheten.\n\nKontakta personalen om det uppstår problem."
47
+ elif echo \$ LANG | grep en; then
48
+ INFO="The settings are not accessible to the public.\n\nContact the staff if there are issues."
49
+ else
50
+ INFO="Systemindstillingerne er ikke tilgængelige for publikum.\n\nKontakt personalet, hvis der er problemer."
51
+ fi
52
+
44
53
if [ \$ USER == "user" ]; then
45
- zenity --info --text="Systemindstillingerne er ikke tilgængelige for publikum.\n\n Kontakt personalet, hvis der er problemer. "
54
+ zenity --info --text="\$ INFO "
46
55
else
47
56
/usr/bin/gnome-control-center.real
48
57
fi
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ if [ "$ACTIVATE" = 'True' ]; then
53
53
# Prepend temporarily setting DESKTOP mutable before copying new files in, as otherwise that will fail
54
54
# We first determine the name of the user desktop directory as before
55
55
sed -i " /USERNAME=\" $USERNAME \" /a \
56
- export \$ (grep LANG= \/etc\/default\/locale)\n\
56
+ export \$ (grep LANG= \/etc\/default\/locale | tr -d \' \" \' )\n\
57
57
runuser -u $USERNAME xdg-user-dirs-update\n\
58
58
DESKTOP=\$ (runuser -u $USERNAME xdg-user-dir DESKTOP)\n\
59
59
chattr -i \$ DESKTOP" $USER_CLEANUP
Original file line number Diff line number Diff line change @@ -39,16 +39,25 @@ else # Deny access
39
39
fi
40
40
41
41
cat << - EOF > "$PROGRAM_OLD_PATH "
42
- #!/bin/bash
42
+ #!/bin/bash
43
43
44
- USER=\$ (id -un)
44
+ USER=\$ (id -un)
45
45
46
- if [ \$ USER == "user" ]; then
47
- zenity --info --text="Terminalen er ikke tilgængelig for publikum."
48
- else
49
- "$PROGRAM_NEW_PATH "
50
- fi
51
- EOF
46
+ # Set the info text based on the chosen language
47
+ if echo \$ LANG | grep sv; then
48
+ INFO="Terminalen är inte tillgänglig för allmänheten."
49
+ elif echo \$ LANG | grep en; then
50
+ INFO="The terminal is not accessible to the public."
51
+ else
52
+ INFO="Terminalen er ikke tilgængelig for publikum."
53
+ fi
54
+
55
+ if [ \$ USER == "user" ]; then
56
+ zenity --info --text="\$ INFO"
57
+ else
58
+ "$PROGRAM_NEW_PATH "
59
+ fi
60
+ EOF
52
61
53
62
chmod +x " $PROGRAM_OLD_PATH "
54
63
You can’t perform that action at this time.
0 commit comments