Merge branch 'VernissageApp:develop' into develop
This commit is contained in:
commit
4d2f63feda
|
@ -9,6 +9,8 @@
|
|||
"global.title.showMore" = "Show more";
|
||||
"global.title.showLess" = "Show less";
|
||||
"global.title.close" = "Close";
|
||||
"global.error.refreshingCredentialsTitle" = "Refreshing credentials error.";
|
||||
"global.error.refreshingCredentialsSubtitle" = "Please sign in again to Pixelfed.";
|
||||
|
||||
// MARK: Global errors.
|
||||
"global.error.unexpected" = "Unexpected error.";
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
"global.title.showMore" = "Erakutsi gehiago";
|
||||
"global.title.showLess" = "Erakutsi gutxiago";
|
||||
"global.title.close" = "Itxi";
|
||||
"global.error.refreshingCredentialsTitle" = "Refreshing credentials error.";
|
||||
"global.error.refreshingCredentialsSubtitle" = "Please sign in again to Pixelfed.";
|
||||
|
||||
// MARK: Global errors.
|
||||
"global.error.unexpected" = "Espero ez zen errorea.";
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
"global.title.showMore" = "Montrer plus";
|
||||
"global.title.showLess" = "Montrer moins";
|
||||
"global.title.close" = "Fermer";
|
||||
"global.error.refreshingCredentialsTitle" = "Refreshing credentials error.";
|
||||
"global.error.refreshingCredentialsSubtitle" = "Please sign in again to Pixelfed.";
|
||||
|
||||
// MARK: Global errors.
|
||||
"global.error.unexpected" = "Erreur inattendue.";
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
"global.title.showMore" = "Pokaż więcej";
|
||||
"global.title.showLess" = "Pokaż mniej";
|
||||
"global.title.close" = "Zamknij";
|
||||
"global.error.refreshingCredentialsTitle" = "Błąd odświeżania danych uwierzytelniających.";
|
||||
"global.error.refreshingCredentialsSubtitle" = "Prosimy o ponowne zalogowanie się do Pixelfed.";
|
||||
|
||||
// MARK: Global errors.
|
||||
"global.error.unexpected" = "Wystąpił nieoczekiwany błąd.";
|
||||
|
|
|
@ -12,16 +12,17 @@ public class ErrorService {
|
|||
private init() { }
|
||||
|
||||
public func handle(_ error: Error, message: String, showToastr: Bool = false) {
|
||||
let localizedMessage = NSLocalizedString(message, comment: "Error message")
|
||||
|
||||
if showToastr {
|
||||
switch error {
|
||||
case is LocalizedError:
|
||||
ToastrService.shared.showError(title: message, subtitle: error.localizedDescription)
|
||||
default:
|
||||
ToastrService.shared.showError(subtitle: message)
|
||||
ToastrService.shared.showError(subtitle: localizedMessage)
|
||||
}
|
||||
}
|
||||
|
||||
let localizedMessage = NSLocalizedString(message, comment: "Error message")
|
||||
print("Error ['\(localizedMessage)']: \(error.localizedDescription)")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1321,7 +1321,7 @@
|
|||
CODE_SIGN_ENTITLEMENTS = VernissageWidget/VernissageWidgetExtension.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 141;
|
||||
CURRENT_PROJECT_VERSION = 143;
|
||||
DEVELOPMENT_TEAM = B2U9FEKYP8;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = VernissageWidget/Info.plist;
|
||||
|
@ -1349,7 +1349,7 @@
|
|||
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
|
||||
CODE_SIGN_ENTITLEMENTS = VernissageWidget/VernissageWidgetExtension.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 141;
|
||||
CURRENT_PROJECT_VERSION = 143;
|
||||
DEVELOPMENT_TEAM = B2U9FEKYP8;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = VernissageWidget/Info.plist;
|
||||
|
@ -1376,7 +1376,7 @@
|
|||
CODE_SIGN_ENTITLEMENTS = VernissageShare/VernissageShareExtension.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 141;
|
||||
CURRENT_PROJECT_VERSION = 143;
|
||||
DEVELOPMENT_TEAM = B2U9FEKYP8;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = VernissageShare/Info.plist;
|
||||
|
@ -1403,7 +1403,7 @@
|
|||
buildSettings = {
|
||||
CODE_SIGN_ENTITLEMENTS = VernissageShare/VernissageShareExtension.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 141;
|
||||
CURRENT_PROJECT_VERSION = 143;
|
||||
DEVELOPMENT_TEAM = B2U9FEKYP8;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = VernissageShare/Info.plist;
|
||||
|
@ -1552,7 +1552,7 @@
|
|||
CODE_SIGN_ENTITLEMENTS = Vernissage/Vernissage.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 141;
|
||||
CURRENT_PROJECT_VERSION = 143;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"Vernissage/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = B2U9FEKYP8;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
|
@ -1594,7 +1594,7 @@
|
|||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
|
||||
CODE_SIGN_ENTITLEMENTS = Vernissage/Vernissage.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 141;
|
||||
CURRENT_PROJECT_VERSION = 143;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"Vernissage/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = B2U9FEKYP8;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
|
|
|
@ -41,7 +41,10 @@ public class AuthorizationService {
|
|||
let signedInAccountModel = try await self.refreshCredentials(for: accountModel, presentationContextProvider: session)
|
||||
result(signedInAccountModel)
|
||||
} catch {
|
||||
ErrorService.shared.handle(error, message: "Issues during refreshing credentials.", showToastr: true)
|
||||
ErrorService.shared.handle(error, message: "Issues during refreshing credentials.")
|
||||
ToastrService.shared.showError(title: "global.error.refreshingCredentialsTitle",
|
||||
subtitle: NSLocalizedString("global.error.refreshingCredentialsSubtitle", comment: ""))
|
||||
result(nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -279,7 +279,7 @@ struct MainView: View {
|
|||
|
||||
await AuthorizationService.shared.verifyAccount(session: authorizationSession, accountModel: accountModel) { signedInAccountModel in
|
||||
guard let signedInAccountModel else {
|
||||
ToastrService.shared.showError(subtitle: "mainview.error.switchAccounts")
|
||||
ToastrService.shared.showError(subtitle: NSLocalizedString("mainview.error.switchAccounts", comment: "Cannot switch accounts."))
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue