Merge pull request #3448 from NoelDeMartin/MOBILE-4145

MOBILE-4145 utils: Update apk download copy
main
Dani Palou 2022-11-17 09:00:09 +01:00 committed by GitHub
commit cd8f81d332
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 6 deletions

View File

@ -1475,6 +1475,7 @@
"core.cannotconnect": "local_moodlemobileapp",
"core.cannotdownloadfiles": "local_moodlemobileapp",
"core.cannotinstallapk": "local_moodlemobileapp",
"core.cannotinstallapkinfo": "local_moodlemobileapp",
"core.cannotlogoutpageblocks": "local_moodlemobileapp",
"core.cannotopeninapp": "local_moodlemobileapp",
"core.cannotopeninappdownload": "local_moodlemobileapp",

View File

@ -16,7 +16,8 @@
"cancel": "Cancel",
"cannotconnect": "Can't connect to site",
"cannotdownloadfiles": "Your school or learning provider has disabled downloading files.",
"cannotinstallapk": "For security reasons, you can't install unknown apps on your device from this app. Please open the file using a browser.",
"cannotinstallapk": "Can't install .apk files",
"cannotinstallapkinfo": "For security reasons, you can't install unknown apps on your device from this app. If you still want to proceed with the installation, you need to open it in a browser.",
"cannotlogoutpageblocks": "Please save or discard your changes before continuing.",
"cannotopeninapp": "This file may not work as expected on this device. Would you like to open it anyway?",
"cannotopeninappdownload": "This file may not work as expected on this device. Would you like to download it anyway?",

View File

@ -999,13 +999,19 @@ export class CoreUtilsProvider {
// @todo MOBILE-4167: Handle urls with expired tokens.
throw new CoreErrorWithOptions(
Translate.instant('core.cannotinstallapkinfo'),
Translate.instant('core.cannotinstallapk'),
undefined,
url
? [{
text: Translate.instant('core.openinbrowser'),
handler: () => this.openInBrowser(url),
}]
? [
{
text: Translate.instant('core.openinbrowser'),
handler: () => this.openInBrowser(url),
},
{
text: Translate.instant('core.cancel'),
role: 'cancel',
},
]
: undefined,
);
}