diff --git a/picard/ui/options/general.py b/picard/ui/options/general.py index 60f8ae60f..83623af6b 100644 --- a/picard/ui/options/general.py +++ b/picard/ui/options/general.py @@ -76,7 +76,9 @@ class GeneralOptionsPage(OptionsPage): self.ui.check_for_updates.setChecked(config.setting["check_for_updates"]) self.ui.update_level.clear() for level, description in PROGRAM_UPDATE_LEVELS.items(): - self.ui.update_level.addItem(_(description['title']), level) + # TODO: Remove temporary workaround once https://github.com/python-babel/babel/issues/415 has been resolved. + babel_415_workaround = description['title'] + self.ui.update_level.addItem(_(babel_415_workaround), level) self.ui.update_level.setCurrentIndex(self.ui.update_level.findData(config.setting["update_level"])) self.ui.update_check_days.setValue(config.setting["update_check_days"]) else: diff --git a/picard/ui/options/interface.py b/picard/ui/options/interface.py index e6d9f6a9b..3da29c800 100644 --- a/picard/ui/options/interface.py +++ b/picard/ui/options/interface.py @@ -218,7 +218,9 @@ class InterfaceOptionsPage(OptionsPage): list_item = ToolbarListItem(action) list_item.setToolTip(_('Drag and Drop to re-order')) if action in self.TOOLBAR_BUTTONS: - list_item.setText(_(self.TOOLBAR_BUTTONS[action]['label'])) + # TODO: Remove temporary workaround once https://github.com/python-babel/babel/issues/415 has been resolved. + babel_415_workaround = self.TOOLBAR_BUTTONS[action]['label'] + list_item.setText(_(babel_415_workaround)) list_item.setIcon(icontheme.lookup(self._get_icon_from_name(action), icontheme.ICON_SIZE_MENU)) else: list_item.setText(self.SEPARATOR) @@ -287,8 +289,12 @@ class AddActionDialog(QtWidgets.QDialog): layout = QtWidgets.QVBoxLayout(self) - self.action_list = sorted([[_(self.parent().TOOLBAR_BUTTONS[action]['label']), action] - for action in action_list]) + # TODO: Remove temporary workaround once https://github.com/python-babel/babel/issues/415 has been resolved. + babel_415_workaround_list = [] + for action in action_list: + babel_415_workaround = self.parent().TOOLBAR_BUTTONS[action]['label'] + temp_list.append([_(babel_415_workaround), action]) + self.action_list = sorted(babel_415_workaround_list) self.combo_box = QtWidgets.QComboBox(self) self.combo_box.addItems([label for label, action in self.action_list]) diff --git a/picard/util/checkupdate.py b/picard/util/checkupdate.py index 92bd10303..7ebe49eca 100644 --- a/picard/util/checkupdate.py +++ b/picard/util/checkupdate.py @@ -144,12 +144,16 @@ class UpdateCheckManager(QtCore.QObject): webbrowser2.open(self._available_versions[key]['urls']['download']) else: if self._show_always: + if self._update_level in PROGRAM_UPDATE_LEVELS: + update_level = PROGRAM_UPDATE_LEVELS[self._update_level]['title'] + else: + update_level = N_('unknown') QMessageBox.information( self._parent, _("Picard Update"), _("There is no update currently available for your subscribed update level: {update_level}\n\n" "Your version: {picard_old_version}\n").format( - update_level=_(PROGRAM_UPDATE_LEVELS[self._update_level]['title']) if self._update_level in PROGRAM_UPDATE_LEVELS else _('unknown'), + update_level=_(update_level), picard_old_version=PICARD_FANCY_VERSION_STR, ), QMessageBox.Ok, QMessageBox.Ok