MOBILE-4301 core: Drop core.sitenotfound string

String dropped in favour of core.cannotconnect
main
Noel De Martin 2023-04-12 13:08:22 +02:00
parent 43ef30bbaf
commit 4d5c18459c
5 changed files with 4 additions and 10 deletions

View File

@ -2395,7 +2395,6 @@
"core.sitehome.sitehome": "moodle",
"core.sitehome.sitenews": "moodle",
"core.sitemaintenance": "admin",
"core.sitenotfound": "local_moodlemobileapp",
"core.sitenotfoundhelp": "local_moodlemobileapp",
"core.siteunavailablehelp": "local_moodlemobileapp",
"core.size": "moodle",

View File

@ -436,11 +436,7 @@ export class CoreLoginSitePage implements OnInit {
].filter(button => !!button);
const alertElement = await CoreDomUtils.showAlertWithOptions({
header: errorTitle ?? (
siteExists
? Translate.instant('core.cannotconnect')
: Translate.instant('core.sitenotfound')
),
header: errorTitle ?? Translate.instant('core.cannotconnect'),
message: errorMessage ?? Translate.instant('core.sitenotfoundhelp'),
buttons: buttons as AlertButton[],
});

View File

@ -45,7 +45,7 @@ Feature: Test basic usage of login in app
When I launch the app
And I set the field "Your site" to "wrongsiteaddress" in the app
And I press "Connect to your site" in the app
Then I should find "Site not found" in the app
Then I should find "Can't connect to site" in the app
Scenario: Add a non existing account from accounts switcher
When I enter the app
@ -56,7 +56,7 @@ Feature: Test basic usage of login in app
And I wait the app to restart
And I set the field "Your site" to "wrongsiteaddress" in the app
And I press "Connect to your site" in the app
Then I should find "Site not found" in the app
Then I should find "Can't connect to site" in the app
Scenario: Log out from the app
Given I entered the app as "student1"

View File

@ -283,7 +283,6 @@
"showmore": "Show more...",
"site": "Site",
"sitemaintenance": "The site is undergoing maintenance and is currently not available",
"sitenotfound": "Site not found",
"sitenotfoundhelp": "We can't find the site you entered. Please check for typos or try again later. If you keep seeing this message, contact your school or learning provider.",
"siteunavailablehelp": "The site \"{{site}}\" is not available right now. Please try again later or contact your school or learning provider.",
"size": "Size",

View File

@ -1369,7 +1369,7 @@ export class CoreDomUtilsProvider {
if (typeof error !== 'string' && 'title' in error && error.title) {
alertOptions.header = error.title || undefined;
} else if (message === Translate.instant('core.sitenotfoundhelp')) {
alertOptions.header = Translate.instant('core.sitenotfound');
alertOptions.header = Translate.instant('core.cannotconnect');
} else if (this.isSiteUnavailableError(message)) {
alertOptions.header = CoreSites.isLoggedIn()
? Translate.instant('core.connectionlost')