diff --git a/src/yasi-webclient b/src/yasi-webclient
index d415514..b2f1bf6 100755
--- a/src/yasi-webclient
+++ b/src/yasi-webclient
@@ -15,13 +15,14 @@ window = webview.create_window('System Installer', LOCATION,
transparent=True, easy_drag=False, frameless=True,
width=1050, focus=True, zoomable=True,
confirm_close=True, resizable=True, shadow=True,
- text_select=False
+ text_select=False, draggable=False
)
webview.settings = {
'ALLOW_DOWNLOADS': False,
'ALLOW_FILE_URLS': False,
- 'DRAG_REGION_SELECTOR': 'pywebview-drag-region',
+ 'DRAG_REGION_SELECTOR': '.pywebview-drag-region',
+ 'DRAG_REGION_DIRECT_TARGET_ONLY': True,
'OPEN_EXTERNAL_LINKS_IN_BROWSER': True,
'OPEN_DEVTOOLS_IN_DEBUG': True,
'IGNORE_SSL_ERRORS': False,
diff --git a/src/yasi_applets/disks/disks.html b/src/yasi_applets/disks/disks.html
index aef73d7..9d61cb8 100644
--- a/src/yasi_applets/disks/disks.html
+++ b/src/yasi_applets/disks/disks.html
@@ -24,8 +24,8 @@
Edit existing partitions
-
-->
+
-
\ No newline at end of file
diff --git a/src/yasi_applets/main/static/system-installer-dark.css b/src/yasi_applets/main/static/system-installer-dark.css
index 054cc0a..3d9ef3d 100644
--- a/src/yasi_applets/main/static/system-installer-dark.css
+++ b/src/yasi_applets/main/static/system-installer-dark.css
@@ -10,6 +10,7 @@ body {
overflow: hidden;
min-width: 1050px;
min-height: 600px;
+ user-select: none;
}
html, body {margin: 0; height: 100%; overflow: hidden;}
@@ -23,6 +24,7 @@ html, body {margin: 0; height: 100%; overflow: hidden;}
position: absolute;
top: 0px;
bottom: 0px;
+ user-select: none;
}
.applet a:link a:hover a:active {
@@ -36,7 +38,7 @@ html, body {margin: 0; height: 100%; overflow: hidden;}
.applet {
width: 100%;
- height: 442px;
+ height: 512px;
overflow-y: scroll;
overflow-x: hidden;
overflow: -moz-scrollbars-none;
@@ -45,3 +47,8 @@ html, body {margin: 0; height: 100%; overflow: hidden;}
.radio:hover {
color: #f1f1f1;
}
+
+.pywebview-drag-region {
+ width: 100%;
+ height: 85px;
+}
diff --git a/src/yasi_applets/users/routes.py b/src/yasi_applets/users/routes.py
index 719cd62..f917f96 100644
--- a/src/yasi_applets/users/routes.py
+++ b/src/yasi_applets/users/routes.py
@@ -10,7 +10,7 @@ def set_language(LANG):
"""
Sets language for this applet
"""
- translations = gettext.translation("users", './applets/users/locales',
+ translations = gettext.translation("users", '/usr/share/yasi-daemon/yasi_applets/users/locales',
fallback=True, languages=[LANG])
translations.install()
_ = translations.gettext
@@ -101,6 +101,8 @@ def build_stringlist():
string_dict['password_confirm'] = _("Password (confirm)")
string_dict['password_nomatch'] = _("These passwords do now match")
string_dict['password_tooshort'] = _("This password is too short")
+ string_dict['next_text'] = _("Next")
+ string_dict['back_text'] = _("Back")
return string_dict
diff --git a/src/yasi_applets/welcome/locales/af/LC_MESSAGES/welcome.mo b/src/yasi_applets/welcome/locales/af/LC_MESSAGES/welcome.mo
index 1c850e9..49c441b 100644
Binary files a/src/yasi_applets/welcome/locales/af/LC_MESSAGES/welcome.mo and b/src/yasi_applets/welcome/locales/af/LC_MESSAGES/welcome.mo differ
diff --git a/src/yasi_applets/welcome/locales/af/LC_MESSAGES/welcome.po b/src/yasi_applets/welcome/locales/af/LC_MESSAGES/welcome.po
index 2f33cb4..bd0f470 100644
--- a/src/yasi_applets/welcome/locales/af/LC_MESSAGES/welcome.po
+++ b/src/yasi_applets/welcome/locales/af/LC_MESSAGES/welcome.po
@@ -12,6 +12,33 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: UTF-8\n"
+msgid "Welcome"
+msgstr "Welkom"
+
+msgid "Users"
+msgstr "Gebruikers"
+
+msgid "Disks"
+msgstr "Skywe"
+
+msgid "Software"
+msgstr "Sagteware"
+
+msgid "Summary"
+msgstr "Opsomming"
+
+msgid "Power"
+msgstr "Krag"
+
+msgid "Internet"
+msgstr "Internet"
+
+msgid "Back"
+msgstr "Terug"
+
+msgid "Next"
+msgstr "Volgende"
+
#: routes.py:27
msgid "Welcome! This setup program will install Debian on to your system."
msgstr "Welkom! Hierdie program sal jou deur die proses lei om Debian te installeer na jou sisteem."
diff --git a/src/yasi_applets/welcome/routes.py b/src/yasi_applets/welcome/routes.py
index e1fdd0b..520b9f1 100644
--- a/src/yasi_applets/welcome/routes.py
+++ b/src/yasi_applets/welcome/routes.py
@@ -14,7 +14,8 @@ def set_language(LANG):
"""
Sets language for this applet
"""
- translations = gettext.translation("welcome", './applets/welcome/locales',
+ # TODO: unhardcode this path
+ translations = gettext.translation("welcome", '/usr/share/yasi-daemon/yasi_applets/welcome/locales',
fallback=True, languages=[LANG])
translations.install()
_ = translations.gettext
@@ -40,6 +41,7 @@ def welcome_index():
global lang
lang = current_app.config['CONFIG']['settings']['language']
set_language(lang)
+ global string_dict
string_dict = build_stringlist()
blkid = lsblk.list_scsi_devices()
build_menu()
@@ -54,8 +56,8 @@ def welcome_index():
else:
previous_step_url = menu[menu.index("users")-1]
- power_button = '
Power '
- internet_button = '
Internet '
+ power_button = '
'
+ internet_button = '
'
bottom_menu = power_button + internet_button
@@ -99,7 +101,7 @@ def welcome_battery_button():
if on_battery:
power_button = '
Power: Battery: ' + percentage + '% '
else:
- power_button = '
Power '
+ power_button = """
""" + string_dict["power_text"] + " """
return str(power_button)
@@ -135,12 +137,21 @@ def build_stringlist():
"""
string_dict = {}
string_dict['menu_item'] = _("Welcome")
+ # In the future, these will be loaded from their own modules
+ string_dict['menu_item_users'] = _("Users")
+ string_dict['menu_item_disks'] = _("Disks")
+ string_dict['menu_item_software'] = _("Software")
+ string_dict['menu_item_summary'] = _("Summary")
string_dict['welcome_text'] = _("Welcome! This setup program will install Debian on to your system.")
string_dict['confirm_text'] = _("Please confirm the following details:")
string_dict['language_text'] = _("Language:")
string_dict['keylayout_text'] = _("Keyboard Layout:")
string_dict['timezone_text'] = _("Time Zone:")
string_dict['basicsettings_text'] = _("Basic Settings:")
+ string_dict['power_text'] = _("Power")
+ string_dict['internet_text'] = _("Internet")
+ string_dict['next_text'] = _("Next")
+ string_dict['back_text'] = _("Back")
lang_dict = {}
lang_dict['af'] = _("Afrikaans")
lang_dict['en'] = _("English (International)")
@@ -157,6 +168,12 @@ def build_menu():
"""
current_app.config['CONFIG']['settings']['menu']['welcome'] = (build_stringlist()['menu_item'], "/welcome", 10)
+ #TODO: temporary hack: We need an automated way to translate all menu items
+ current_app.config['CONFIG']['settings']['menu']['users'] = (build_stringlist()['menu_item_users'], "/users", 20)
+ current_app.config['CONFIG']['settings']['menu']['disks'] = (build_stringlist()['menu_item_disks'], "/disks", 30)
+ current_app.config['CONFIG']['settings']['menu']['software'] = (build_stringlist()['menu_item_software'], "/software", 40)
+ current_app.config['CONFIG']['settings']['menu']['summary'] = (build_stringlist()['menu_item_summary'], "/summary", 50)
+
def build_summary():
"""
diff --git a/src/yasi_applets/welcome/welcome.html b/src/yasi_applets/welcome/welcome.html
index b5f8a26..e415ebf 100644
--- a/src/yasi_applets/welcome/welcome.html
+++ b/src/yasi_applets/welcome/welcome.html
@@ -5,34 +5,52 @@
src="/welcome/static/img/banner.png"
alt="Debian Image banner" />
+
+
+
+
+
+
+
+
+
{{ string_dict['welcome_text'] }}
{{ string_dict['confirm_text'] }}
-