mirror of
https://github.com/borgbase/vorta
synced 2025-03-09 13:53:26 +00:00
Remove call to QTranslator.language()
in get_locale
. (#1316)
This commit is contained in:
parent
e58c83b5c9
commit
56e5c5049f
2 changed files with 12 additions and 3 deletions
|
@ -71,8 +71,11 @@ def init_translations(app):
|
||||||
|
|
||||||
def get_locale():
|
def get_locale():
|
||||||
"""Get the locale used for translation."""
|
"""Get the locale used for translation."""
|
||||||
global translator
|
# global translator
|
||||||
return QLocale(translator.language())
|
# QTranslator.language was added with Qt 15.15
|
||||||
|
# return QLocale(translator.language())
|
||||||
|
global locale
|
||||||
|
return locale
|
||||||
|
|
||||||
|
|
||||||
def translate(*args, **kwargs):
|
def translate(*args, **kwargs):
|
||||||
|
|
|
@ -68,5 +68,11 @@ def test_schedule_tab(qapp: VortaApp, qtbot, clockmock):
|
||||||
|
|
||||||
qapp.scheduler.set_timer_for_profile(profile.id)
|
qapp.scheduler.set_timer_for_profile(profile.id)
|
||||||
tab.draw_next_scheduled_backup()
|
tab.draw_next_scheduled_backup()
|
||||||
assert next_backup.strftime('%B %Y %H:%M:%S') in tab.nextBackupDateTimeLabel.text()
|
|
||||||
|
assert tab.nextBackupDateTimeLabel.text() not in [
|
||||||
|
"Run a manual backup first",
|
||||||
|
"None scheduled",
|
||||||
|
]
|
||||||
|
assert qapp.scheduler.next_job_for_profile(profile.id).time == next_backup
|
||||||
|
|
||||||
qapp.scheduler.remove_job(profile.id)
|
qapp.scheduler.remove_job(profile.id)
|
||||||
|
|
Loading…
Add table
Reference in a new issue