Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
fix: improve copy & text breaking in alerts (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
darccio committed Apr 22, 2023
1 parent e5029c0 commit f67d7d1
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/views/application/_flash.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<% if flash.notice %>
<div class="alert alert-<%= flash.notice['type'] %>">
<div class="alert alert-<%= flash.notice['type'] %> text-break">
<%= raw(flash.notice['message'])%>
</div>
<% end %>
<% if flash.alert %>
<div class="alert alert-<%= flash.alert['type'] %>">
<div class="alert alert-<%= flash.alert['type'] %> text-break">
<%= raw(flash.alert['message'])%>
</div>
<% end %>
2 changes: 1 addition & 1 deletion app/views/consultations/_archived.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="alert alert-primary" role="alert">
<div class="alert alert-primary text-break" role="alert">
<%= t('consultations.consultation_archived') %>
</div>
2 changes: 1 addition & 1 deletion app/views/consultations/_closed.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="alert alert-danger" role="alert">
<div class="alert alert-danger text-break" role="alert">
<%= t('consultations.consultation_closed') %>
</div>
2 changes: 1 addition & 1 deletion app/views/consultations/_draft.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="alert alert-primary" role="alert">
<div class="alert alert-primary text-break" role="alert">
<%= t('consultations.consultation_draft') %>
</div>
4 changes: 2 additions & 2 deletions app/views/consultations/_opened.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="alert alert-primary" role="alert">
<div class="alert alert-primary text-break" role="alert">
<% if @consultation.exhausted_for?(@current_user) %>
<%= t('consultations.consultation_finished') %>
<% else %>
<p><%= t('consultations.consultation_open') %></p>
<%= link_to t('application.refresh'), { controller: 'events', action: 'next_question', id: @event.id }, class: 'btn btn-primary btn-lg' %>
<%= link_to t('application.next'), { controller: 'events', action: 'next_question', id: @event.id }, class: 'btn btn-primary btn-lg' %>
<% end %>
</div>
2 changes: 1 addition & 1 deletion app/views/questions/_closed.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="alert alert-danger" role="alert">
<div class="alert alert-danger text-break" role="alert">
<%= t('questions.question_is_closed') %>
</div>
2 changes: 1 addition & 1 deletion app/views/questions/_draft.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="alert alert-primary" role="alert">
<div class="alert alert-primary text-break" role="alert">
<%= t('questions.question_still_draft') %>
</div>
<%= render 'booth' %>
4 changes: 2 additions & 2 deletions app/views/votes/create.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h2><%= @consultation.title %></h2>
<div class="alert alert-primary" role="alert">
<div class="alert alert-primary text-break" role="alert">
<p><%= t('votes.casted') %></p>
<p><%= t('votes.fingerprint', fingerprint: @receipt.fingerprint) %></p>
<%= link_to 'Next', { controller: 'events', action: 'next_question', id: @event.id }, class: 'btn btn-primary btn-lg' %>
<%= link_to t('application.next'), { controller: 'events', action: 'next_question', id: @event.id }, class: 'btn btn-primary btn-lg' %>
</div>
1 change: 1 addition & 0 deletions config/locales/ca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ ca:
delete: 'Eliminar'
create: 'Crear'
edit: 'Modificar'
next: 'Següent'
token:
exhausted: 'Exhaurit?'
log_in: 'Iniciar sessió'
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ en:
footer: Asembleo is a free software project developed by Coopanio
log_in: Log in
log_out: Log out
next: Next
refresh: Refresh
save: Save
sign_up: Sign up
Expand Down
1 change: 1 addition & 0 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ es:
token:
exhausted: '¿Agotado?'
no: 'No'
next: 'Siguiente'
log_in: 'Iniciar Sesión'
yes: ''
sign_up: 'Registrarse'
Expand Down

0 comments on commit f67d7d1

Please sign in to comment.