From ed5dce9ab1ae0a019e16d1f2566d935a87e4a985 Mon Sep 17 00:00:00 2001 From: Mir Bhatia Date: Mon, 11 Nov 2024 00:48:56 +0100 Subject: [PATCH] Update documentation and strings --- lookbook/docs/patterns/05-dialogs.md.erb | 6 +++--- lookbook/docs/patterns/11-sub-header.md.erb | 1 + modules/meeting/app/forms/meeting/copy_attachments.rb | 2 +- modules/meeting/app/forms/meeting/copy_items.rb | 2 +- modules/meeting/app/forms/meeting/copy_participants.rb | 2 +- modules/meeting/app/forms/meeting/email_participants.rb | 4 ++-- modules/meeting/config/locales/en.yml | 3 +++ 7 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lookbook/docs/patterns/05-dialogs.md.erb b/lookbook/docs/patterns/05-dialogs.md.erb index 7890b6183e24..3a04a0ccff6b 100644 --- a/lookbook/docs/patterns/05-dialogs.md.erb +++ b/lookbook/docs/patterns/05-dialogs.md.erb @@ -9,7 +9,7 @@ attributes to it: - `tag: :a` so that the component is rendered as a link - `href: link_to_dialog_path` to specify where to request the dialog stream from -- `data: { controller: "async-dialog" }` to attach the async-dialog controller to the button. +- `data: { controller: "async-dialog" }` to attach the async-dialog controller to the button (In some cases, depending on the underlying html structure, `content_arguments: { data: { controller: "async-dialog" }}` might be needed instead) ```erb <%%= render(Primer::Beta::Button.new( @@ -39,7 +39,7 @@ class TestController < ApplicationControler end ``` -For this to work, the `OpTurbo::Streamable` module needs to be included in the modal component: +For this to work, the `OpTurbo::Streamable` module needs to be included in the modal component, along with the `OpTurbo::DialogStreamHelper` module in the corresponding controller: ```ruby class MyDialogComponent < ApplicationControler @@ -66,7 +66,7 @@ Assuming the MyDialogComponent template looks like this: %> ``` -You can also render the dialog in a manual turbo_stream template +You can also render the dialog in a manual turbo_stream template: ```ruby class TestController < ApplicationControler diff --git a/lookbook/docs/patterns/11-sub-header.md.erb b/lookbook/docs/patterns/11-sub-header.md.erb index 9d688a4b2972..5de0b93e1abe 100644 --- a/lookbook/docs/patterns/11-sub-header.md.erb +++ b/lookbook/docs/patterns/11-sub-header.md.erb @@ -27,6 +27,7 @@ This component is an own implementation for OpenProject requirements of contextu - Restrict SubHeader actions to the page's content-specific actions (e.g. filtering or creating a new object). - Use IconButtons instead of Buttons for actions only when the icon is clear enough to describe the action. +- When more actions are necessary, or if a menu is needed, use an ActionMenu instead of the ActionButtons. **Don't** diff --git a/modules/meeting/app/forms/meeting/copy_attachments.rb b/modules/meeting/app/forms/meeting/copy_attachments.rb index 72d41a96c189..a0ae325fc162 100644 --- a/modules/meeting/app/forms/meeting/copy_attachments.rb +++ b/modules/meeting/app/forms/meeting/copy_attachments.rb @@ -30,7 +30,7 @@ class Meeting::CopyAttachments < ApplicationForm form do |meeting_form| meeting_form.check_box( name: "copy_attachments", - label: "Copy attachments", + label: I18n.t("meeting.copy.attachments"), checked: false ) end diff --git a/modules/meeting/app/forms/meeting/copy_items.rb b/modules/meeting/app/forms/meeting/copy_items.rb index 56b5186ddd02..1a87082e3be5 100644 --- a/modules/meeting/app/forms/meeting/copy_items.rb +++ b/modules/meeting/app/forms/meeting/copy_items.rb @@ -30,7 +30,7 @@ class Meeting::CopyItems < ApplicationForm form do |meeting_form| meeting_form.check_box( name: "copy_agenda", - label: "Copy agenda items", + label: I18n.t("meeting.copy.agenda_items"), checked: true ) end diff --git a/modules/meeting/app/forms/meeting/copy_participants.rb b/modules/meeting/app/forms/meeting/copy_participants.rb index 72bfedb339d1..7361f73ca283 100644 --- a/modules/meeting/app/forms/meeting/copy_participants.rb +++ b/modules/meeting/app/forms/meeting/copy_participants.rb @@ -30,7 +30,7 @@ class Meeting::CopyParticipants < ApplicationForm form do |meeting_form| meeting_form.check_box( name: "copy_participants", - label: "Copy list of participants", + label: I18n.t("meeting.copy.participants"), checked: true ) end diff --git a/modules/meeting/app/forms/meeting/email_participants.rb b/modules/meeting/app/forms/meeting/email_participants.rb index 7d20692af9bd..4909af7fbf47 100644 --- a/modules/meeting/app/forms/meeting/email_participants.rb +++ b/modules/meeting/app/forms/meeting/email_participants.rb @@ -30,9 +30,9 @@ class Meeting::EmailParticipants < ApplicationForm form do |meeting_form| meeting_form.check_box( name: "send_notificationss", - label: "Email participants", + label: I18n.t("meeting.email.send_emails"), checked: false, - caption: I18n.t("meeting.email.send_invitation_emails") + caption: I18n.t("meeting.email.send_invitation_emails_structured") ) end end diff --git a/modules/meeting/config/locales/en.yml b/modules/meeting/config/locales/en.yml index 65a1a717de71..797124c433fb 100644 --- a/modules/meeting/config/locales/en.yml +++ b/modules/meeting/config/locales/en.yml @@ -143,11 +143,14 @@ en: attachments: "Copy attachments" attachments_text: "Copy over all attached files to the new meeting" agenda: "Copy agenda" + agenda_items: "Copy agenda items" agenda_text: "Copy the agenda of the old meeting" + participants: "Copy list of participants" email: send_emails: "Email participants" send_invitation_emails: > Send an email invitation immediately to the participants selected above. You can also do this manually at any time later. + send_invitation_emails_structured: "Send an email invitation immediately to all participants. You can also do this manually at any time later." open_meeting_link: "Open meeting" invited: summary: "%{actor} has sent you an invitation for the meeting %{title}"