From 0421855bf63af18344c86aa936cfa4e0ccd32173 Mon Sep 17 00:00:00 2001 From: Shay Pletcher <4468322+ThePletch@users.noreply.github.com> Date: Fri, 22 Dec 2023 07:30:28 -0500 Subject: [PATCH] Add Markdown link to description helper --- app/views/events/_form.html.haml | 2 +- config/locales/models/event/en.yml | 2 ++ config/locales/models/event/es.yml | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/events/_form.html.haml b/app/views/events/_form.html.haml index 0ac4212..85bc753 100644 --- a/app/views/events/_form.html.haml +++ b/app/views/events/_form.html.haml @@ -41,6 +41,6 @@ = form.hidden_field :address_id, id: 'existing_address_id' = render "addresses/form", parent_form: form .form-group - = form.text_area :description, class: 'form-control', style: "height: 10em;", floating: true + = form.text_area :description, class: 'form-control', style: "height: 10em;", floating: true, help: t('event.form.description_uses_markdown_html', link: link_to(t('event.form.description_uses_markdown_name'), 'https://www.markdownguide.org/basic-syntax/')) .actions = form.primary diff --git a/config/locales/models/event/en.yml b/config/locales/models/event/en.yml index e09a196..6ab42f2 100644 --- a/config/locales/models/event/en.yml +++ b/config/locales/models/event/en.yml @@ -42,6 +42,8 @@ en: Be sure to explain how to send you evidence of a negative test in your event description. header_photo_help: Photos are scaled and cropped to full-screen width (1900px by 500px). header_photo_crop_prompt: Click and drag the header image above to change how your header image will be cropped. + description_uses_markdown_html: You can format the event description with %{link} to make text bold, add links, or organize things into bullet points. + description_uses_markdown_name: Markdown labels: covid_testing: Require COVID testing secret: Make this event secret diff --git a/config/locales/models/event/es.yml b/config/locales/models/event/es.yml index fc08b45..dd5f3be 100644 --- a/config/locales/models/event/es.yml +++ b/config/locales/models/event/es.yml @@ -44,6 +44,8 @@ es: prueba. Asegúrese de explicar cómo enviarle evidencia de una prueba negativa en la descripción del evento. header_photo_help: Fotos se escalan y recortan al ancho de pantalla completo (1900px por 500px). header_photo_crop_prompt: Haga clic y arrastre la imagen de arriba para cambiar cómo se recortará su foto. + description_uses_markdown_html: Se puede formatear la descripción del evento con %{link} para poner el texto en negrita, agregar enlaces, o organizar cosas en viñetas. + description_uses_markdown_name: Markdown labels: secret: Haz que este evento sea secreto rsvp_list: