MOBILE-1928 ws: Save "notingroup" errors to the cache
parent
e987aeba98
commit
2420e3a6fb
|
@ -1551,6 +1551,7 @@
|
||||||
"core.noresults": "moodle",
|
"core.noresults": "moodle",
|
||||||
"core.notapplicable": "local_moodlemobileapp",
|
"core.notapplicable": "local_moodlemobileapp",
|
||||||
"core.notice": "moodle",
|
"core.notice": "moodle",
|
||||||
|
"core.notingroup": "moodle",
|
||||||
"core.notsent": "local_moodlemobileapp",
|
"core.notsent": "local_moodlemobileapp",
|
||||||
"core.now": "moodle",
|
"core.now": "moodle",
|
||||||
"core.numwords": "moodle",
|
"core.numwords": "moodle",
|
||||||
|
|
|
@ -1550,6 +1550,7 @@
|
||||||
"core.noresults": "No results",
|
"core.noresults": "No results",
|
||||||
"core.notapplicable": "n/a",
|
"core.notapplicable": "n/a",
|
||||||
"core.notice": "Notice",
|
"core.notice": "Notice",
|
||||||
|
"core.notingroup": "Sorry, but you need to be part of a group to see this page.",
|
||||||
"core.notsent": "Not sent",
|
"core.notsent": "Not sent",
|
||||||
"core.now": "now",
|
"core.now": "now",
|
||||||
"core.numwords": "{{$a}} words",
|
"core.numwords": "{{$a}} words",
|
||||||
|
|
|
@ -632,10 +632,13 @@ export class CoreSite {
|
||||||
error.message = this.translate.instant('core.unicodenotsupported');
|
error.message = this.translate.instant('core.unicodenotsupported');
|
||||||
|
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
} else if (error.exception === 'required_capability_exception' || error.errorcode === 'nopermission') {
|
} else if (error.exception === 'required_capability_exception' || error.errorcode === 'nopermission' ||
|
||||||
|
error.errorcode === 'notingroup') {
|
||||||
|
// Translate error messages with missing strings.
|
||||||
if (error.message === 'error/nopermission') {
|
if (error.message === 'error/nopermission') {
|
||||||
// This error message is returned by some web services but the string does not exist.
|
|
||||||
error.message = this.translate.instant('core.nopermissionerror');
|
error.message = this.translate.instant('core.nopermissionerror');
|
||||||
|
} else if (error.message === 'error/notingroup') {
|
||||||
|
error.message = this.translate.instant('core.notingroup');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save the error instead of deleting the cache entry so the same content is displayed in offline.
|
// Save the error instead of deleting the cache entry so the same content is displayed in offline.
|
||||||
|
|
|
@ -170,6 +170,7 @@
|
||||||
"noresults": "No results",
|
"noresults": "No results",
|
||||||
"notapplicable": "n/a",
|
"notapplicable": "n/a",
|
||||||
"notice": "Notice",
|
"notice": "Notice",
|
||||||
|
"notingroup": "Sorry, but you need to be part of a group to see this page.",
|
||||||
"notsent": "Not sent",
|
"notsent": "Not sent",
|
||||||
"now": "now",
|
"now": "now",
|
||||||
"numwords": "{{$a}} words",
|
"numwords": "{{$a}} words",
|
||||||
|
|
Loading…
Reference in New Issue