Skip to content

Commit 76a916f

Browse files
committed
refactor(trads): add trads for reminder_optouts feature
1 parent c238c61 commit 76a916f

2 files changed

Lines changed: 116 additions & 2 deletions

File tree

crates/rustmail/src/i18n/language/en.rs

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,14 @@ pub fn load_english_messages(dict: &mut ErrorDictionary) {
780780
"reminder.show_without_content".to_string(),
781781
DictionaryMessage::new("⏰ Reminder <@{user}>!"),
782782
);
783+
dict.messages.insert(
784+
"reminder.show_with_content_roles".to_string(),
785+
DictionaryMessage::new("⏰ Reminder for {roles}: \n\n{content} !"),
786+
);
787+
dict.messages.insert(
788+
"reminder.show_without_content_roles".to_string(),
789+
DictionaryMessage::new("⏰ Reminder for {roles}!"),
790+
);
783791
dict.messages.insert(
784792
"slash_command.add_reminder_command_description".to_string(),
785793
DictionaryMessage::new("Add a reminder for yourself"),
@@ -804,6 +812,56 @@ pub fn load_english_messages(dict: &mut ErrorDictionary) {
804812
"slash_command.remove_reminder_id_argument".to_string(),
805813
DictionaryMessage::new("The ID of the reminder to remove"),
806814
);
815+
dict.messages.insert(
816+
"reminder_subscription.subscribed".to_string(),
817+
DictionaryMessage::new("You are now subscribed to reminders for the **{role}** role."),
818+
);
819+
dict.messages.insert(
820+
"reminder_subscription.unsubscribed".to_string(),
821+
DictionaryMessage::new("You are now unsubscribed from reminders for the **{role}** role."),
822+
);
823+
dict.messages.insert(
824+
"reminder_subscription.already_subscribed".to_string(),
825+
DictionaryMessage::new("You are already subscribed to reminders for the **{role}** role."),
826+
);
827+
dict.messages.insert(
828+
"reminder_subscription.already_unsubscribed".to_string(),
829+
DictionaryMessage::new(
830+
"You are already unsubscribed from reminders for the **{role}** role.",
831+
),
832+
);
833+
dict.messages.insert(
834+
"reminder_subscription.role_required".to_string(),
835+
DictionaryMessage::new("You must have the **{role}** role to perform this action."),
836+
);
837+
dict.messages.insert(
838+
"reminder_subscription.role_not_found".to_string(),
839+
DictionaryMessage::new("The role **{role}** does not exist on this server."),
840+
);
841+
dict.messages.insert(
842+
"reminder_subscription.missing_role".to_string(),
843+
DictionaryMessage::new("Please specify a role. Usage: `{prefix}rem subscribe <role>` or `{prefix}rem unsubscribe <role>`"),
844+
);
845+
dict.messages.insert(
846+
"slash_command.reminder_subscribe_description".to_string(),
847+
DictionaryMessage::new("Subscribe or unsubscribe from role-based reminders"),
848+
);
849+
dict.messages.insert(
850+
"slash_command.reminder_action_argument".to_string(),
851+
DictionaryMessage::new("Action to perform (subscribe/unsubscribe)"),
852+
);
853+
dict.messages.insert(
854+
"slash_command.reminder_role_argument".to_string(),
855+
DictionaryMessage::new("The role to modify subscription for"),
856+
);
857+
dict.messages.insert(
858+
"slash_command.add_reminder_roles_argument_description".to_string(),
859+
DictionaryMessage::new("Roles to target (comma-separated, e.g., dev,mod)"),
860+
);
861+
dict.messages.insert(
862+
"help.reminder_subscription".to_string(),
863+
DictionaryMessage::new("Manage your role-based reminder subscriptions. Use `!rem subscribe <role>` to subscribe and `!rem unsubscribe <role>` to unsubscribe. You must have the role to modify your subscription."),
864+
);
807865
dict.messages.insert(
808866
"logs_command.next".to_string(),
809867
DictionaryMessage::new("Next"),
@@ -836,7 +894,7 @@ pub fn load_english_messages(dict: &mut ErrorDictionary) {
836894
);
837895
dict.messages.insert(
838896
"help.add_reminder".to_string(),
839-
DictionaryMessage::new("Sets a reminder for a specific time. To do so, use `!remind <HH:MM> <reminder content>` or `!rem <HH:MM> <reminder content>`. If the specified time has already passed today, the reminder will be scheduled for tomorrow."),
897+
DictionaryMessage::new("Sets a reminder for a specific time. Usage: `!rem <HH:MM> [content]` for a personal reminder, or `!rem <HH:MM> <roles> [content]` to target roles (e.g., `!rem 14:30 dev,mod Meeting`). If the time has passed, the reminder will be scheduled for tomorrow. Use `!rem subscribe <role>` or `!rem unsubscribe <role>` to manage your notifications."),
840898
);
841899
dict.messages.insert(
842900
"help.add_staff".to_string(),

crates/rustmail/src/i18n/language/fr.rs

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,14 @@ pub fn load_french_messages(dict: &mut ErrorDictionary) {
802802
"reminder.show_without_content".to_string(),
803803
DictionaryMessage::new("⏰ Rappel <@{user}> !"),
804804
);
805+
dict.messages.insert(
806+
"reminder.show_with_content_roles".to_string(),
807+
DictionaryMessage::new("⏰ Rappel pour {roles} : \n\n{content} !"),
808+
);
809+
dict.messages.insert(
810+
"reminder.show_without_content_roles".to_string(),
811+
DictionaryMessage::new("⏰ Rappel pour {roles} !"),
812+
);
805813
dict.messages.insert(
806814
"slash_command.add_reminder_command_description".to_string(),
807815
DictionaryMessage::new("Ajouter un rappel pour vous-même"),
@@ -826,6 +834,54 @@ pub fn load_french_messages(dict: &mut ErrorDictionary) {
826834
"slash_command.remove_reminder_id_argument".to_string(),
827835
DictionaryMessage::new("L'ID du rappel à supprimer."),
828836
);
837+
dict.messages.insert(
838+
"reminder_subscription.subscribed".to_string(),
839+
DictionaryMessage::new("Vous êtes maintenant inscrit aux rappels du rôle **{role}**."),
840+
);
841+
dict.messages.insert(
842+
"reminder_subscription.unsubscribed".to_string(),
843+
DictionaryMessage::new("Vous êtes maintenant désinscrit des rappels du rôle **{role}**."),
844+
);
845+
dict.messages.insert(
846+
"reminder_subscription.already_subscribed".to_string(),
847+
DictionaryMessage::new("Vous êtes déjà inscrit aux rappels du rôle **{role}**."),
848+
);
849+
dict.messages.insert(
850+
"reminder_subscription.already_unsubscribed".to_string(),
851+
DictionaryMessage::new("Vous êtes déjà désinscrit des rappels du rôle **{role}**."),
852+
);
853+
dict.messages.insert(
854+
"reminder_subscription.role_required".to_string(),
855+
DictionaryMessage::new("Vous devez avoir le rôle **{role}** pour effectuer cette action."),
856+
);
857+
dict.messages.insert(
858+
"reminder_subscription.role_not_found".to_string(),
859+
DictionaryMessage::new("Le rôle **{role}** n'existe pas sur ce serveur."),
860+
);
861+
dict.messages.insert(
862+
"reminder_subscription.missing_role".to_string(),
863+
DictionaryMessage::new("Veuillez spécifier un rôle. Usage : `{prefix}rem subscribe <role>` ou `{prefix}rem unsubscribe <role>`"),
864+
);
865+
dict.messages.insert(
866+
"slash_command.reminder_subscribe_description".to_string(),
867+
DictionaryMessage::new("S'inscrire ou se désinscrire des rappels d'un rôle"),
868+
);
869+
dict.messages.insert(
870+
"slash_command.reminder_action_argument".to_string(),
871+
DictionaryMessage::new("Action à effectuer (subscribe/unsubscribe)"),
872+
);
873+
dict.messages.insert(
874+
"slash_command.reminder_role_argument".to_string(),
875+
DictionaryMessage::new("Le rôle pour lequel modifier l'inscription"),
876+
);
877+
dict.messages.insert(
878+
"slash_command.add_reminder_roles_argument_description".to_string(),
879+
DictionaryMessage::new("Rôles à cibler (séparés par des virgules, ex: dev,mod)"),
880+
);
881+
dict.messages.insert(
882+
"help.reminder_subscription".to_string(),
883+
DictionaryMessage::new("Gérer vos inscriptions aux rappels par rôle. `!rem subscribe <role>` pour s'inscrire, `!rem unsubscribe <role>` pour se désinscrire. Vous devez avoir le rôle pour modifier votre inscription."),
884+
);
829885
dict.messages.insert(
830886
"logs_command.next".to_string(),
831887
DictionaryMessage::new("Suivant"),
@@ -856,7 +912,7 @@ pub fn load_french_messages(dict: &mut ErrorDictionary) {
856912
);
857913
dict.messages.insert(
858914
"help.add_reminder".to_string(),
859-
DictionaryMessage::new("Configure un rappel à une heure spécifique. Pour ce faire, faites `!remind <HH:MM> <contenu du rappel>` ou `!rem <HH:MM> <contenu du rappel>`. Si l'heure est déjà passée aujourd'hui, le rappel sera programmé pour demain."),
915+
DictionaryMessage::new("Configure un rappel à une heure spécifique. Usage : `!rem <HH:MM> [contenu]` pour un rappel personnel, ou `!rem <HH:MM> <rôles> [contenu]` pour cibler des rôles (ex: `!rem 14:30 dev,mod Réunion`). Si l'heure est déjà passée, le rappel sera programmé pour demain. Utilisez `!rem subscribe <rôle>` ou `!rem unsubscribe <rôle>` pour gérer vos notifications."),
860916
);
861917
dict.messages.insert(
862918
"help.add_staff".to_string(),

0 commit comments

Comments
 (0)