diff --git a/scripts/langindex.json b/scripts/langindex.json index 07dfc6c83..a36006465 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -2396,6 +2396,7 @@ "core.user.sendemail": "local_moodlemobileapp", "core.user.student": "moodle/defaultcoursestudent", "core.user.support": "local_moodlemobileapp", + "core.user.supportsubject": "local_moodlemobileapp", "core.user.teacher": "moodle/noneditingteacher", "core.user.useraccount": "moodle", "core.user.userwithid": "local_moodlemobileapp", diff --git a/src/core/features/user/lang.json b/src/core/features/user/lang.json index ed6261dc1..8a71aee4c 100644 --- a/src/core/features/user/lang.json +++ b/src/core/features/user/lang.json @@ -31,6 +31,7 @@ "sendemail": "Email", "student": "Student", "support": "Contact site support", + "supportsubject": "[App] {{subject}}", "teacher": "Non-editing teacher", "userwithid": "User with ID {{id}}", "webpage": "Web page" diff --git a/src/core/features/user/services/support.ts b/src/core/features/user/services/support.ts index 9dbc745a9..dffbfc7be 100644 --- a/src/core/features/user/services/support.ts +++ b/src/core/features/user/services/support.ts @@ -90,6 +90,10 @@ export class CoreUserSupportService { return; } + if (subject) { + subject = Translate.instant('core.user.supportsubject', { subject }); + } + const unsubscribe = CoreSubscriptions.once(browser.on('loadstop'), () => { browser.executeScript({ code: `