mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-10 19:52:50 -03:00
Change how language selection setting looks
This commit is contained in:
parent
9d5f9d18ed
commit
23c55bc95b
2 changed files with 7 additions and 8 deletions
|
@ -228,20 +228,19 @@ class SettingsDialog(QtWidgets.QDialog):
|
|||
autoupdate_group.hide()
|
||||
|
||||
# Language settings
|
||||
|
||||
# Populate the dropdown with all of OnionShare's available languages
|
||||
language_label = QtWidgets.QLabel(strings._("gui_settings_language_label", True))
|
||||
self.language_combobox = QtWidgets.QComboBox()
|
||||
# Populate the dropdown with all of OnionShare's available languages
|
||||
language_names_to_locales = {v: k for k, v in self.common.settings.available_locales.items()}
|
||||
language_names = list(language_names_to_locales)
|
||||
language_names.sort()
|
||||
for language_name in language_names:
|
||||
locale = language_names_to_locales[language_name]
|
||||
self.language_combobox.addItem(language_name, QtCore.QVariant(locale))
|
||||
|
||||
language_layout = QtWidgets.QVBoxLayout()
|
||||
language_layout = QtWidgets.QHBoxLayout()
|
||||
language_layout.addWidget(language_label)
|
||||
language_layout.addWidget(self.language_combobox)
|
||||
language_group = QtWidgets.QGroupBox(strings._("gui_settings_language_label", True))
|
||||
language_group.setLayout(language_layout)
|
||||
language_layout.addStretch()
|
||||
|
||||
# Connection type: either automatic, control port, or socket file
|
||||
|
||||
|
@ -447,7 +446,7 @@ class SettingsDialog(QtWidgets.QDialog):
|
|||
left_col_layout.addWidget(sharing_group)
|
||||
left_col_layout.addWidget(receiving_group)
|
||||
left_col_layout.addWidget(autoupdate_group)
|
||||
left_col_layout.addWidget(language_group)
|
||||
left_col_layout.addLayout(language_layout)
|
||||
left_col_layout.addStretch()
|
||||
|
||||
right_col_layout = QtWidgets.QVBoxLayout()
|
||||
|
|
|
@ -181,5 +181,5 @@
|
|||
"gui_upload_finished_range": "Uploaded {} to {}",
|
||||
"gui_upload_finished": "Uploaded {}",
|
||||
"gui_open_folder_error_nautilus": "Cannot open folder because nautilus is not available. The file is here: {}",
|
||||
"gui_settings_language_label": "Select language"
|
||||
"gui_settings_language_label": "Preferred language"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue