Skip to content

Commit

Permalink
Standardize on labels/help-text for media forms
Browse files Browse the repository at this point in the history
  • Loading branch information
cavis committed Aug 2, 2023
1 parent 63fd937 commit 5f39561
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
4 changes: 3 additions & 1 deletion app/views/episodes/_form_media.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
<div class="row">

<div class="col-12 mb-4">
<div class="form-floating" data-controller="dynamic-form">
<div class="form-floating input-group" data-controller="dynamic-form">
<%= form.select :medium, episode_medium_options, {}, data: {action: "dynamic-form#change"} %>
<%= form.label :medium %>
<%= field_help_text t(".help") %>
<% if episode.new_record? %>
<a hidden href="<%= new_podcast_episode_path(episode.podcast_id) %>" data-dynamic-form-target="link"></a>
<% else %>
Expand Down
1 change: 0 additions & 1 deletion app/views/podcast_planner/_form_draft.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<div class="card shadow border-0">
<div class="card-header card-header-info d-flex justify-content-between">
<h5 class="card-title flex-grow-1"><%= t(".title.settings") %></h5>
<%= help_text t(".help.settings") %>
</div>

<div class="card-body pt-4 pb-0" data-morph="false">
Expand Down
5 changes: 2 additions & 3 deletions app/views/podcast_planner/_form_draft_settings.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<div class="col-6 mb-4">
<div class="form-floating input-group">
<%= form.select :medium, episode_medium_options, {}, data: {action: "planner#setMedium"} %>
<%= form.label :medium, t(".label.medium") %>
<%= form.label :medium, t("helpers.label.episode.medium") %>
<%= field_help_text t(".help.medium") %>
</div>
</div>

<div class="col-3 mb-4">
<div class="form-floating input-group">
<%= form.number_field :ad_breaks, min: 0, max: Episode::MAX_SEGMENT_COUNT - 1, data: {planner_target: "adBreaks", action: "planner#setAdBreaks"} %>
<%= form.label :ad_breaks, t(".label.ad_breaks") %>
<%= form.label :ad_breaks, t("helpers.label.episode.ad_breaks") %>
<%= field_help_text t(".help.ad_breaks") %>
</div>
</div>
Expand All @@ -18,6 +18,5 @@
<div class="form-floating input-group">
<%= form.select :publish_time, time_options %>
<%= form.label :publish_time, t(".label.publish_time") %>
<%= field_help_text t(".help.publish_time") %>
</div>
</div>
18 changes: 6 additions & 12 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ en:
field_copy_tooltip: Copied!
label:
episode:
ad_breaks: How many ad breaks are there in this episode?
ad_breaks: Ad Breaks
author_email: Author Email
author_name: Author Name
categories: Categories
Expand All @@ -92,7 +92,7 @@ en:
full: Full
trailer: Trailer
bonus: Bonus
medium: How do you want to upload your files?
medium: File Format
mediums:
audio: Audio - upload multiple audio files
uncut: Audio - upload a single file and then segment
Expand Down Expand Up @@ -210,6 +210,7 @@ en:
title: Write a short, Tweetable title. Think newspaper headline.
form_media:
title: Media Files
help: Enter the file format for this episode.
form_status:
<<: *form_status
create: Create Draft
Expand Down Expand Up @@ -250,7 +251,7 @@ en:
processing:
hint: Processing
segment_count:
help: Enter the number of ad breaks in this episode.
help: Enter the number of ad breaks (midrolls) in this episode. This helps us to better predict ad inventory for your podcast.
missing_drafts:
message: The more drafts you add, the better we can support your podcast. Please add <a href="%{href}">all of your known upcoming episodes</a> to the Production Calendar.
okay: Okay
Expand Down Expand Up @@ -514,8 +515,6 @@ en:
selected_weeks: Weeks of Month
start_date: Start Date
form_draft:
help:
settings: Enter the number of ad-breaks in your episode (if applicable), and the time of day you plan to release your episodes.
label:
create: Create
draft: Draft
Expand All @@ -529,13 +528,8 @@ en:
settings: Draft Settings
form_draft_settings:
help:
ad_breaks: Do we need this?
medium: Do we need this?
publish_time: Do we need this?
label:
ad_breaks: Ad Breaks
medium: File Format
publish_time: Publish Time
ad_breaks: Enter the number of ad breaks (midrolls) these episodes will have. Accurately entering the number of ad breaks help us to better predict ad inventory for your podcast.
medium: Enter the file format you plan to upload for these episodes.
helper:
period_options:
every_one: Every week
Expand Down

0 comments on commit 5f39561

Please sign in to comment.