Remove the final traces of the translation indirection

CURA-6005
This commit is contained in:
Jaime van Kessel 2019-01-04 10:43:40 +01:00
parent 8ebd4282fd
commit 87eb863451
3 changed files with 5 additions and 11 deletions

View file

@ -47,7 +47,7 @@ class DriveApiService:
if backup_list_request.status_code >= 300:
Logger.log("w", "Could not get backups list from remote: %s", backup_list_request.text)
Message(catalog.i18nc("@info:backup_status", "There was an error listing your backups."), title = Settings.MESSAGE_TITLE).show()
Message(catalog.i18nc("@info:backup_status", "There was an error listing your backups."), title = catalog.i18nc("@info:title", "Backup")).show()
return []
return backup_list_request.json()["data"]

View file

@ -103,13 +103,13 @@ class DrivePluginExtension(QObject, Extension):
self._is_restoring_backup = is_restoring
self.restoringStateChanged.emit()
if error_message:
Message(error_message, title = Settings.MESSAGE_TITLE, lifetime = 5).show()
Message(error_message, title = catalog.i18nc("@info:title", "Backup")).show()
def _onCreatingStateChanged(self, is_creating: bool = False, error_message: str = None) -> None:
self._is_creating_backup = is_creating
self.creatingStateChanged.emit()
if error_message:
Message(error_message, title = Settings.MESSAGE_TITLE, lifetime = 5).show()
Message(error_message, title = catalog.i18nc("@info:title", "Backup")).show()
else:
self._storeBackupDate()
if not is_creating:

View file

@ -7,15 +7,9 @@ from cura import UltimakerCloudAuthentication
class Settings:
"""
Keeps the application settings.
"""
# Keeps the plugin settings.
DRIVE_API_VERSION = 1
DRIVE_API_URL = "{}/cura-drive/v{}".format(UltimakerCloudAuthentication.CuraCloudAPIRoot, str(DRIVE_API_VERSION))
AUTO_BACKUP_ENABLED_PREFERENCE_KEY = "cura_drive/auto_backup_enabled"
AUTO_BACKUP_LAST_DATE_PREFERENCE_KEY = "cura_drive/auto_backup_date"
I18N_CATALOG = i18nCatalog("cura")
MESSAGE_TITLE = I18N_CATALOG.i18nc("@info:title", "Backups")