diff --git a/scripts/langindex.json b/scripts/langindex.json index 5e5c11a5d..b59baf983 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -2151,12 +2151,15 @@ "core.reminders.atthetime": "local_moodlemobileapp", "core.reminders.custom": "local_moodlemobileapp", "core.reminders.customreminder": "local_moodlemobileapp", - "core.reminders.daybefore": "local_moodlemobileapp", - "core.reminders.daysbefore": "local_moodlemobileapp", "core.reminders.delete": "moodle", + "core.reminders.reminderset": "local_moodlemobileapp", + "core.reminders.reminderunset": "local_moodlemobileapp", "core.reminders.setareminder": "local_moodlemobileapp", + "core.reminders.setareminderfor": "local_moodlemobileapp", + "core.reminders.setreminder": "local_moodlemobileapp", "core.reminders.timebefore": "local_moodlemobileapp", "core.reminders.units": "qtype_numerical", + "core.reminders.value": "local_moodlemobileapp", "core.remove": "moodle", "core.removefiles": "local_moodlemobileapp", "core.required": "moodle", diff --git a/src/core/features/reminders/components/set-button/set-button.ts b/src/core/features/reminders/components/set-button/set-button.ts index 28477c9ca..010b0baf7 100644 --- a/src/core/features/reminders/components/set-button/set-button.ts +++ b/src/core/features/reminders/components/set-button/set-button.ts @@ -16,6 +16,8 @@ import { CoreReminderData, CoreReminders, CoreRemindersService } from '@features import { Component, Input, OnInit } from '@angular/core'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreRemindersSetReminderMenuComponent } from '../set-reminder-menu/set-reminder-menu'; +import { Translate } from '@singletons'; +import { CoreTimeUtils } from '@services/utils/time'; /** * Component that displays a button to set a reminder. @@ -104,6 +106,8 @@ export class CoreRemindersSetButtonComponent implements OnInit { }); this.timebefore = undefined; + CoreDomUtils.showToast('core.reminders.reminderunset', true); + return; } @@ -121,6 +125,10 @@ export class CoreRemindersSetButtonComponent implements OnInit { // Save before. await CoreReminders.addReminder(reminder); + + const time = this.time - timebefore; + const text = Translate.instant('core.reminders.reminderset', { $a: CoreTimeUtils.userDate(time * 1000) }); + CoreDomUtils.showToast(text); } } diff --git a/src/core/features/reminders/lang.json b/src/core/features/reminders/lang.json index d305761ef..98351de60 100644 --- a/src/core/features/reminders/lang.json +++ b/src/core/features/reminders/lang.json @@ -2,10 +2,13 @@ "atthetime": "At the time of the event", "custom": "Custom...", "customreminder": "Custom reminder", - "setareminder": "Set a reminder", - "daybefore": "{{time}} day before", - "daysbefore": "{{time}} days before", "delete": "Delete reminder", + "reminderset": "Reminder set for {{$a}}", + "reminderunset": "Reminder deleted", + "setareminder": "Set a reminder", + "setareminderfor": "Set a reminder for \"{{title}}\" ({{label}})", + "setreminder": "Set reminder", "timebefore": "{{value}} {{units}} before", - "units": "units" + "units": "Units", + "value": "Value" }