Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty error window #230

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dnfdragora/ui.py
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. BTW are you testing this functionality in master using dnf5daemon?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have dnf 4.14.0 on my distro. I think if anyway there's no error with dnf 5, this text won't be shown.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anaselli I suggest to change the text:

err = _('The list of packages cannot be installed:') + '\n' + '\n'.join(self.options['install'] + '\nMaybe some of them are already installed.')
We couldn't find this error in other cases rather than this. An empty error window appeared only when there were packages had been installed beforehand. Maybe it can help users.

Original file line number Diff line number Diff line change
Expand Up @@ -1993,6 +1993,8 @@ def _OnBuildTransaction(self, info):
self._status = DNFDragoraStatus.RUN_TRANSACTION
else:
err = "".join(resolve) if isinstance(resolve, list) else resolve if isinstance(resolve, list) else repr(resolve);
if not err:
err = _('The list of packages cannot be installed:') + '\n' + '\n'.join(self.options['install'])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "The list of packages that cannot be installed"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В этой фразе "the" переводится как "этот" или "данный". Всё правильно.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У тебя пропущено слово "которые" ("that" или, может, лучше "which", надо подумать)

dialogs.infoMsgBox({'title' : _('Build Transaction error',), 'text' : err.replace("\n", "<br>"), 'richtext' : True })
logger.warning("Transaction Cancelled: %s", repr(resolve))
self._enableAction(True)
Expand Down