From 02d5d7cc1ca0da4869935911a22793db955d73f0 Mon Sep 17 00:00:00 2001 From: Sheldan <5037282+Sheldan@users.noreply.github.com> Date: Wed, 1 Dec 2021 01:13:44 +0100 Subject: [PATCH] [AB-291] adding templates for new pagination system adding templates for mutes command --- ...mmand_confirmation_message_embed_en_US.ftl | 2 +- .../paginator/paginator_buttons_en_US.ftl | 60 +++++++++++++++++++ .../paginator/paginator_footer_en_US.ftl | 3 + ...mutes_display_response_paginator_en_US.ftl | 11 ++++ .../command/mutes/mutes_mute_entry_en_US.ftl | 10 ++++ .../mutes_no_mutes_found_embed_en_US.ftl | 4 ++ .../mutes/mutes_response_entry_en_US.ftl | 6 ++ ...nings_display_response_paginator_en_US.ftl | 9 +++ .../warnings_response_entry_en_US.ftl | 6 ++ .../warnings_response_paginator_en_US.ftl | 7 --- .../paginator_exit_button_label_en_US.ftl | 1 + .../paginator/paginator_footer_text_en_US.ftl | 1 + .../paginator_last_button_label_en_US.ftl | 1 + .../paginator_next_button_label_en_US.ftl | 1 + .../paginator_previous_button_label_en_US.ftl | 1 + .../paginator_start_button_label_en_US.ftl | 1 + .../mutes/help/mutes_description_en_US.ftl | 1 + .../mutes/help/mutes_long_help_en_US.ftl | 2 + .../help/mutes_parameter_member_en_US.ftl | 1 + .../mutes/mutes_header_text_en_US.ftl | 1 + .../mutes/mutes_mute_entry_text_en_US.ftl | 2 + .../mutes/mutes_no_mutes_found_text_en_US.ftl | 1 + 22 files changed, 124 insertions(+), 8 deletions(-) create mode 100644 abstracto-modules/core/src/main/resources/en_US/general/paginator/paginator_buttons_en_US.ftl create mode 100644 abstracto-modules/core/src/main/resources/en_US/general/paginator/paginator_footer_en_US.ftl create mode 100644 abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_display_response_paginator_en_US.ftl create mode 100644 abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_mute_entry_en_US.ftl create mode 100644 abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_no_mutes_found_embed_en_US.ftl create mode 100644 abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_response_entry_en_US.ftl create mode 100644 abstracto-modules/moderation/src/main/resources/en_US/command/warnings/warnings_display_response_paginator_en_US.ftl create mode 100644 abstracto-modules/moderation/src/main/resources/en_US/command/warnings/warnings_response_entry_en_US.ftl delete mode 100644 abstracto-modules/moderation/src/main/resources/en_US/command/warnings/warnings_response_paginator_en_US.ftl create mode 100644 translations/core/src/main/resources/en_US/general/paginator/paginator_exit_button_label_en_US.ftl create mode 100644 translations/core/src/main/resources/en_US/general/paginator/paginator_footer_text_en_US.ftl create mode 100644 translations/core/src/main/resources/en_US/general/paginator/paginator_last_button_label_en_US.ftl create mode 100644 translations/core/src/main/resources/en_US/general/paginator/paginator_next_button_label_en_US.ftl create mode 100644 translations/core/src/main/resources/en_US/general/paginator/paginator_previous_button_label_en_US.ftl create mode 100644 translations/core/src/main/resources/en_US/general/paginator/paginator_start_button_label_en_US.ftl create mode 100644 translations/moderation/src/main/resources/en_US/commands/mutes/help/mutes_description_en_US.ftl create mode 100644 translations/moderation/src/main/resources/en_US/commands/mutes/help/mutes_long_help_en_US.ftl create mode 100644 translations/moderation/src/main/resources/en_US/commands/mutes/help/mutes_parameter_member_en_US.ftl create mode 100644 translations/moderation/src/main/resources/en_US/commands/mutes/mutes_header_text_en_US.ftl create mode 100644 translations/moderation/src/main/resources/en_US/commands/mutes/mutes_mute_entry_text_en_US.ftl create mode 100644 translations/moderation/src/main/resources/en_US/commands/mutes/mutes_no_mutes_found_text_en_US.ftl diff --git a/abstracto-modules/core/src/main/resources/en_US/command/command_confirmation_message_embed_en_US.ftl b/abstracto-modules/core/src/main/resources/en_US/command/command_confirmation_message_embed_en_US.ftl index aaf10135..9ca20dbc 100644 --- a/abstracto-modules/core/src/main/resources/en_US/command/command_confirmation_message_embed_en_US.ftl +++ b/abstracto-modules/core/src/main/resources/en_US/command/command_confirmation_message_embed_en_US.ftl @@ -1,5 +1,5 @@ { - <#include "assignable_place_color">, + <#include "abstracto_color">, <#assign text><#include "${commandName}_confirmation"> "description": "${text?json_string}", "buttons": [ diff --git a/abstracto-modules/core/src/main/resources/en_US/general/paginator/paginator_buttons_en_US.ftl b/abstracto-modules/core/src/main/resources/en_US/general/paginator/paginator_buttons_en_US.ftl new file mode 100644 index 00000000..44fadc5f --- /dev/null +++ b/abstracto-modules/core/src/main/resources/en_US/general/paginator/paginator_buttons_en_US.ftl @@ -0,0 +1,60 @@ +{ + "label": "<@safe_include "paginator_exit_button_label"/>", + "id": "${exitButtonId}", + "buttonStyle": "secondary", + "emoteMarkdown": "⏹️", + "metaConfig": { + "persistCallback": false + } +} +<#if !exitOnly> +, +{ + "label": "<@safe_include "paginator_start_button_label"/>", + "id": "${startButtonId}", + "buttonStyle": "secondary", + <#if counter = 0> + "disabled": true, + + "emoteMarkdown": "⏮", + "metaConfig": { + "persistCallback": false + } +}, +{ + "label": "<@safe_include "paginator_previous_button_label"/>", + "id": "${previousButtonId}", + "buttonStyle": "secondary", + <#if counter = 0> + "disabled": true, + + "emoteMarkdown": "◀️", + "metaConfig": { + "persistCallback": false + } +}, +{ + "label": "<@safe_include "paginator_next_button_label"/>", + "id": "${nextButtonId}", + "buttonStyle": "secondary", + <#if counter = chunks?size -1> + "disabled": true, + + "emoteMarkdown": "▶", + "metaConfig": { + "persistCallback": false + } +}, +{ + "label": "<@safe_include "paginator_last_button_label"/>", + "id": "${lastButtonId}", + "buttonStyle": "secondary", + <#if counter = chunks?size -1> + "disabled": true, + + "emoteMarkdown": "⏭", + "metaConfig": { + "persistCallback": false + } +} + \ No newline at end of file diff --git a/abstracto-modules/core/src/main/resources/en_US/general/paginator/paginator_footer_en_US.ftl b/abstracto-modules/core/src/main/resources/en_US/general/paginator/paginator_footer_en_US.ftl new file mode 100644 index 00000000..6abd8742 --- /dev/null +++ b/abstracto-modules/core/src/main/resources/en_US/general/paginator/paginator_footer_en_US.ftl @@ -0,0 +1,3 @@ +<#assign page=page> +<#assign pageCount=pageCount> +<#include "paginator_footer_text"> \ No newline at end of file diff --git a/abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_display_response_paginator_en_US.ftl b/abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_display_response_paginator_en_US.ftl new file mode 100644 index 00000000..e6fa44cc --- /dev/null +++ b/abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_display_response_paginator_en_US.ftl @@ -0,0 +1,11 @@ +{ +<#assign exitOnly=innerModel.mutes?size lt 6/> + "embedConfigs": [ + <#assign chunks=innerModel.mutes?chunk(5)> + <#-- we have to separate the chunk, so we can re-use it to disable the last buttons, and also we have to assign the for loop value, --> + <#-- so it available in sub templates, also the counter needs to be defined, else it doesnt the detect its a loop variable it seems --> + <#list chunks as row><#assign row=row><#include "mutes_response_entry"><#sep>, + ], + "timeoutSeconds": 120, + "restrictUser": true +} \ No newline at end of file diff --git a/abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_mute_entry_en_US.ftl b/abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_mute_entry_en_US.ftl new file mode 100644 index 00000000..4f6102d3 --- /dev/null +++ b/abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_mute_entry_en_US.ftl @@ -0,0 +1,10 @@ +<#include "format_instant"> +<#assign muteId>${mute.mute.muteId.id} +<#assign reason>${mute.mute.reason} +<#assign mutedUserText><#if mute.mutedUser.member??>${mute.mutedUser.member.asMention}(${mute.mutedUser.member.user.id})<#else>${mute.mutedUser.userId?c} +<#assign mutingUserText><#if mute.mutingUser.member??>${mute.mutingUser.member.asMention}(${mute.mutingUser.member.user.id})<#else>${mute.mutingUser.userId?c} +<#assign muteDate><@format_instant_date_time instant=mute.mute.muteDate/> +<#assign muteEnded>${mute.mute.muteEnded?string('✅', '❌')} +<#assign muteDuration>${fmtDuration(mute.muteDuration)} + +<#include "mutes_mute_entry_text"> \ No newline at end of file diff --git a/abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_no_mutes_found_embed_en_US.ftl b/abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_no_mutes_found_embed_en_US.ftl new file mode 100644 index 00000000..caaf95d5 --- /dev/null +++ b/abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_no_mutes_found_embed_en_US.ftl @@ -0,0 +1,4 @@ +{ + <#include "moderation_action_color">, + "description": "<@safe_include "mutes_no_mutes_found_text"/>" +} \ No newline at end of file diff --git a/abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_response_entry_en_US.ftl b/abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_response_entry_en_US.ftl new file mode 100644 index 00000000..9cd5d5f9 --- /dev/null +++ b/abstracto-modules/moderation/src/main/resources/en_US/command/mutes/mutes_response_entry_en_US.ftl @@ -0,0 +1,6 @@ +{ + "description": "<#list row as mute><#assign mute=mute><@safe_include "mutes_mute_entry"/>", + "buttons": [ + <#include "paginator_buttons"> + ] +} \ No newline at end of file diff --git a/abstracto-modules/moderation/src/main/resources/en_US/command/warnings/warnings_display_response_paginator_en_US.ftl b/abstracto-modules/moderation/src/main/resources/en_US/command/warnings/warnings_display_response_paginator_en_US.ftl new file mode 100644 index 00000000..c0f7cad6 --- /dev/null +++ b/abstracto-modules/moderation/src/main/resources/en_US/command/warnings/warnings_display_response_paginator_en_US.ftl @@ -0,0 +1,9 @@ +{ +<#assign exitOnly=innerModel.warnings?size lt 6/> + "embedConfigs": [ + <#assign chunks=innerModel.warnings?chunk(5)> + <#list chunks as row><#assign counter=row?counter><#assign row=row><#include "warnings_response_entry"><#sep>, + ], + "timeoutSeconds": 120, + "restrictUser": true +} \ No newline at end of file diff --git a/abstracto-modules/moderation/src/main/resources/en_US/command/warnings/warnings_response_entry_en_US.ftl b/abstracto-modules/moderation/src/main/resources/en_US/command/warnings/warnings_response_entry_en_US.ftl new file mode 100644 index 00000000..d59ff9ed --- /dev/null +++ b/abstracto-modules/moderation/src/main/resources/en_US/command/warnings/warnings_response_entry_en_US.ftl @@ -0,0 +1,6 @@ +{ + "description": "<#list row as warning><#assign warning=warning><@safe_include "warnings_warn_entry"/>", + "buttons": [ + <#include "paginator_buttons"> + ] +} \ No newline at end of file diff --git a/abstracto-modules/moderation/src/main/resources/en_US/command/warnings/warnings_response_paginator_en_US.ftl b/abstracto-modules/moderation/src/main/resources/en_US/command/warnings/warnings_response_paginator_en_US.ftl deleted file mode 100644 index 3df09baa..00000000 --- a/abstracto-modules/moderation/src/main/resources/en_US/command/warnings/warnings_response_paginator_en_US.ftl +++ /dev/null @@ -1,7 +0,0 @@ -{ -<#assign warnCount>${warnings?size} - "headerText": "<@safe_include "warnings_header_text"/>", - "items": [ - <#list warnings as warning><#assign warning=warning/>"<@safe_include "warnings_warn_entry"/>"<#sep>, - ] -} \ No newline at end of file diff --git a/translations/core/src/main/resources/en_US/general/paginator/paginator_exit_button_label_en_US.ftl b/translations/core/src/main/resources/en_US/general/paginator/paginator_exit_button_label_en_US.ftl new file mode 100644 index 00000000..1105a55f --- /dev/null +++ b/translations/core/src/main/resources/en_US/general/paginator/paginator_exit_button_label_en_US.ftl @@ -0,0 +1 @@ +Exit \ No newline at end of file diff --git a/translations/core/src/main/resources/en_US/general/paginator/paginator_footer_text_en_US.ftl b/translations/core/src/main/resources/en_US/general/paginator/paginator_footer_text_en_US.ftl new file mode 100644 index 00000000..92fc9334 --- /dev/null +++ b/translations/core/src/main/resources/en_US/general/paginator/paginator_footer_text_en_US.ftl @@ -0,0 +1 @@ +Page ${page}/${pageCount} \ No newline at end of file diff --git a/translations/core/src/main/resources/en_US/general/paginator/paginator_last_button_label_en_US.ftl b/translations/core/src/main/resources/en_US/general/paginator/paginator_last_button_label_en_US.ftl new file mode 100644 index 00000000..6cb46e5b --- /dev/null +++ b/translations/core/src/main/resources/en_US/general/paginator/paginator_last_button_label_en_US.ftl @@ -0,0 +1 @@ +Last \ No newline at end of file diff --git a/translations/core/src/main/resources/en_US/general/paginator/paginator_next_button_label_en_US.ftl b/translations/core/src/main/resources/en_US/general/paginator/paginator_next_button_label_en_US.ftl new file mode 100644 index 00000000..e2e838e0 --- /dev/null +++ b/translations/core/src/main/resources/en_US/general/paginator/paginator_next_button_label_en_US.ftl @@ -0,0 +1 @@ +Next \ No newline at end of file diff --git a/translations/core/src/main/resources/en_US/general/paginator/paginator_previous_button_label_en_US.ftl b/translations/core/src/main/resources/en_US/general/paginator/paginator_previous_button_label_en_US.ftl new file mode 100644 index 00000000..e1857172 --- /dev/null +++ b/translations/core/src/main/resources/en_US/general/paginator/paginator_previous_button_label_en_US.ftl @@ -0,0 +1 @@ +Previous \ No newline at end of file diff --git a/translations/core/src/main/resources/en_US/general/paginator/paginator_start_button_label_en_US.ftl b/translations/core/src/main/resources/en_US/general/paginator/paginator_start_button_label_en_US.ftl new file mode 100644 index 00000000..99c261c3 --- /dev/null +++ b/translations/core/src/main/resources/en_US/general/paginator/paginator_start_button_label_en_US.ftl @@ -0,0 +1 @@ +Start \ No newline at end of file diff --git a/translations/moderation/src/main/resources/en_US/commands/mutes/help/mutes_description_en_US.ftl b/translations/moderation/src/main/resources/en_US/commands/mutes/help/mutes_description_en_US.ftl new file mode 100644 index 00000000..0ceb4bb1 --- /dev/null +++ b/translations/moderation/src/main/resources/en_US/commands/mutes/help/mutes_description_en_US.ftl @@ -0,0 +1 @@ +Shows all the warnings on the server \ No newline at end of file diff --git a/translations/moderation/src/main/resources/en_US/commands/mutes/help/mutes_long_help_en_US.ftl b/translations/moderation/src/main/resources/en_US/commands/mutes/help/mutes_long_help_en_US.ftl new file mode 100644 index 00000000..fb1c616e --- /dev/null +++ b/translations/moderation/src/main/resources/en_US/commands/mutes/help/mutes_long_help_en_US.ftl @@ -0,0 +1,2 @@ +Shows all the still existing mutes on the server in a paginated way. +Optionally you can provide a member to show the mutes for. \ No newline at end of file diff --git a/translations/moderation/src/main/resources/en_US/commands/mutes/help/mutes_parameter_member_en_US.ftl b/translations/moderation/src/main/resources/en_US/commands/mutes/help/mutes_parameter_member_en_US.ftl new file mode 100644 index 00000000..3817057c --- /dev/null +++ b/translations/moderation/src/main/resources/en_US/commands/mutes/help/mutes_parameter_member_en_US.ftl @@ -0,0 +1 @@ +The member to show the mutes for. \ No newline at end of file diff --git a/translations/moderation/src/main/resources/en_US/commands/mutes/mutes_header_text_en_US.ftl b/translations/moderation/src/main/resources/en_US/commands/mutes/mutes_header_text_en_US.ftl new file mode 100644 index 00000000..ed885526 --- /dev/null +++ b/translations/moderation/src/main/resources/en_US/commands/mutes/mutes_header_text_en_US.ftl @@ -0,0 +1 @@ +Amount of mutes: ${muteCount}. \ No newline at end of file diff --git a/translations/moderation/src/main/resources/en_US/commands/mutes/mutes_mute_entry_text_en_US.ftl b/translations/moderation/src/main/resources/en_US/commands/mutes/mutes_mute_entry_text_en_US.ftl new file mode 100644 index 00000000..d8d58df7 --- /dev/null +++ b/translations/moderation/src/main/resources/en_US/commands/mutes/mutes_mute_entry_text_en_US.ftl @@ -0,0 +1,2 @@ +Mute #${muteId} of user ${mutedUserText} by user ${mutingUserText} on ${muteDate} which lasted ${muteDuration} (Mute ended: ${muteEnded}). +Reason: `${reason}` \ No newline at end of file diff --git a/translations/moderation/src/main/resources/en_US/commands/mutes/mutes_no_mutes_found_text_en_US.ftl b/translations/moderation/src/main/resources/en_US/commands/mutes/mutes_no_mutes_found_text_en_US.ftl new file mode 100644 index 00000000..5b7738b0 --- /dev/null +++ b/translations/moderation/src/main/resources/en_US/commands/mutes/mutes_no_mutes_found_text_en_US.ftl @@ -0,0 +1 @@ +No mutes found. \ No newline at end of file