Skip to content

Commit

Permalink
Use 'empty_state' as locale key
Browse files Browse the repository at this point in the history
  • Loading branch information
jp524 committed Dec 17, 2024
1 parent 446f64a commit e072485
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion app/views/organizations/adoptable_pets/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<%== pagy_bootstrap_nav(@pagy) if @pagy.pages > 1 %>
</div>
<% else %>
<%= render partial: "shared/empty_state", locals: {text: t(".no_pets")} %>
<%= render partial: "shared/empty_state", locals: {text: t(".empty_state")} %>
<% end %>

<div class="row">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<% end %>
</div>
<% else %>
<%= render partial: "shared/empty_state", locals: {text: t(".no_adopted_pets")} %>
<%= render partial: "shared/empty_state", locals: {text: t(".empty_state")} %>
<% end %>
</div>
<turbo-frame id="pet_files">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<%= render partial:"application_cards", collection: @applications, as: :application %>
</div>
<% else %>
<%= render partial: "shared/empty_state", locals: {text: t(".no_applications")} %>
<%= render partial: "shared/empty_state", locals: {text: t(".empty_state")} %>
<% end %>
</div>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<% end %>
</div>
<% else %>
<%= render partial: "shared/empty_state", locals: {text: t(".no_fostered_pets")} %>
<%= render partial: "shared/empty_state", locals: {text: t(".empty_state")} %>
<% end %>
</div>
<turbo-frame id="pet_files">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</div>
<% end %>
<% else %>
<%= render partial: "shared/empty_state", locals: {text: t(".no_liked_pets")} %>
<%= render partial: "shared/empty_state", locals: {text: t(".empty_state")} %>
<% end %>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<%= render "organizations/staff/pets/tabs/applications", applications: pet.adopter_applications, pet: pet %>
<% end %>
<% else %>
<%= render partial: "shared/empty_state", locals: {text: t(".no_applications")} %>
<%= render partial: "shared/empty_state", locals: {text: t(".empty_state")} %>
<% end%>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<%= render partial:"default_pet_task_cards", collection: @default_pet_tasks, as: :default_pet_tasks %>
</div>
<% else %>
<%= render partial: "shared/empty_state", locals: {text: t(".no_default_pet_tasks")} %>
<%= render partial: "shared/empty_state", locals: {text: t(".empty_state")} %>
<% end %>
</div>
<div class="d-flex justify-content-center align-items-center mt-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<%= render "foster_cards", foster_pets: @foster_pets %>
</div>
<% else %>
<%= render partial: "shared/empty_state", locals: {text: t(".no_foster_pets")} %>
<%= render partial: "shared/empty_state", locals: {text: t(".empty_state")} %>
<% end %>
</section>
<div class="d-flex justify-content-center align-items-center mt-2">
Expand Down
2 changes: 1 addition & 1 deletion app/views/organizations/staff/pets/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<%= render partial:"pet_cards", collection: @pets, as: :pet %>
</div>
<% else %>
<%= render partial: "shared/empty_state", locals: {text: t(".no_pets")} %>
<%= render partial: "shared/empty_state", locals: {text: t(".empty_state")} %>
<% end %>
</div>
<div class="d-flex justify-content-center align-items-center mt-2">
Expand Down
2 changes: 1 addition & 1 deletion app/views/organizations/staff/pets/tabs/_photos.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<% if @pet.images.present? %>
<%= render ImageAttachmentTableComponent.new(images: @pet.images) %>
<% else %>
<%= render partial: "shared/empty_state", locals: {text: t(".no_photos")} %>
<%= render partial: "shared/empty_state", locals: {text: t(".empty_state")} %>
<% end %>
</div>
22 changes: 11 additions & 11 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ en:
adoptable_pets:
index:
header: "Up for adoption"
no_pets: "We don't have any pets matching your search criteria"
empty_state: "We don't have any pets matching your search criteria"
show:
application_status: "Application status:"
adoption_process: "Adoption Process"
Expand Down Expand Up @@ -458,7 +458,7 @@ en:
destroy:
success: "Foster for %{name} deleted."
index:
no_foster_pets: "No foster pets found"
empty_state: "No foster pets found"
invitations:
create:
success: "Invite sent!"
Expand All @@ -467,7 +467,7 @@ en:
success: "Application was successfully updated."
error: "Error updating application"
search_results:
no_applications: "No applications found"
empty_state: "No applications found"
default_pet_tasks:
create:
success: "Default pet task saved successfully."
Expand All @@ -494,7 +494,7 @@ en:
default_pet_tasks: "Default Pet Tasks"
create_default_task: "Create Default Task"
are_you_sure_delete: "Are you sure you want to delete this default pet task?"
no_default_pet_tasks: "No default pet tasks found"
empty_state: "No default pet tasks found"
default_pet_task_cards:
name: "Name"
description: "Description"
Expand Down Expand Up @@ -595,7 +595,7 @@ en:
application:
active: "Applications: active"
paused: "Applications: paused"
no_pets: "No pets found"
empty_state: "No pets found"
new:
new_pet_post: "New Pet Post"
applications:
Expand All @@ -619,7 +619,7 @@ en:
published: "Published"
draft: "Draft"
photos:
no_photos: "No photos exist for this pet"
empty_state: "No photos exist for this pet"
custom_form:
forms:
set_form:
Expand Down Expand Up @@ -700,16 +700,16 @@ en:
withdrew_by_accident_html: "If you withdrew by accident, <a href='/contact'>contact us</a>"
remove: "Remove"
withdraw: "Withdraw"
no_applications: You do not have any adoption applications
empty_state: "You do not have any adoption applications"
form_answers:
index:
header: "Form Responses"
description: "These are the responses from the last time you completed the questionnaire. Please review for accuracy. If changes are required, please fill out a new form"
submitted_on: "Submitted on %{date} at %{time}"
likes:
index:
header_title: 'Liked Pets'
no_liked_pets: 'You do not have any liked pets'
header_title: "Liked Pets"
empty_state: "You do not have any liked pets"
create:
success: "%{name} added to your liked pets."
failed: "Error, %{name} not added to your liked pets."
Expand All @@ -719,11 +719,11 @@ en:
adopted_pets:
index:
header_title: "Adopted pets"
no_adopted_pets: "You do not have any adopted pets"
empty_state: "You do not have any adopted pets"
fostered_pets:
index:
header_title: "Fostered pets"
no_fostered_pets: "You do not have any fostered pets"
empty_state: "You do not have any fostered pets"
dashboard:
index:
example: Example
Expand Down

0 comments on commit e072485

Please sign in to comment.