mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 10:54:16 +02:00
0.9.0
This commit is contained in:
@@ -1,22 +1,31 @@
|
||||
from typing import Iterable
|
||||
|
||||
from bauh.api.abstract.handler import ProcessWatcher
|
||||
from bauh.api.abstract.view import MessageType
|
||||
from bauh.commons.html import bold
|
||||
from bauh.view.util.translation import I18n
|
||||
|
||||
|
||||
def show_dep_not_installed(watcher: ProcessWatcher, pkgname: str, depname: str, i18n: I18n):
|
||||
watcher.show_message(title=i18n['error'],
|
||||
body=i18n['arch.install.dependency.install.error'].format(bold(depname), bold(pkgname)),
|
||||
def show_deps_not_installed(watcher: ProcessWatcher, pkgname: str, depnames: Iterable[str], i18n: I18n):
|
||||
deps = ', '.join((bold(d) for d in depnames))
|
||||
watcher.show_message(title=i18n['error'].capitalize(),
|
||||
body=i18n['arch.install.dependency.install.error'].format(deps, bold(pkgname)),
|
||||
type_=MessageType.ERROR)
|
||||
|
||||
|
||||
def show_dep_not_found(depname: str, i18n: I18n, watcher: ProcessWatcher):
|
||||
watcher.show_message(title=i18n['arch.install.dep_not_found.title'],
|
||||
body=i18n['arch.install.dep_not_found.body'].format(bold(depname)),
|
||||
|
||||
body = '<p>{}</p><p>{}</p><p></p><p>{}</p>'.format(i18n['arch.install.dep_not_found.body.l1'].format(bold(depname)),
|
||||
i18n['arch.install.dep_not_found.body.l2'],
|
||||
i18n['arch.install.dep_not_found.body.l3'])
|
||||
|
||||
watcher.show_message(title=i18n['arch.install.dep_not_found.title'].capitalize(),
|
||||
body=body,
|
||||
type_=MessageType.ERROR)
|
||||
|
||||
|
||||
def show_optdep_not_installed(depname: str, watcher: ProcessWatcher, i18n: I18n):
|
||||
watcher.show_message(title=i18n['error'],
|
||||
body=i18n['arch.install.optdep.error'].format(bold(depname)),
|
||||
def show_optdeps_not_installed(depnames: Iterable[str], watcher: ProcessWatcher, i18n: I18n):
|
||||
deps = ', '.join((bold(d) for d in depnames))
|
||||
watcher.show_message(title=i18n['error'].capitalize(),
|
||||
body=i18n['arch.install.optdep.error'].format(deps),
|
||||
type_=MessageType.ERROR)
|
||||
|
||||
Reference in New Issue
Block a user