Skip to content

Commit

Permalink
Use conventional help translation ids
Browse files Browse the repository at this point in the history
  • Loading branch information
potomak committed Oct 8, 2017
1 parent b881807 commit 5deeede
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 61 deletions.
6 changes: 3 additions & 3 deletions app/views/projects/_form.html.erb
Expand Up @@ -2,8 +2,8 @@
<%= f.alert_message t('form_alert_message') %>
<%= f.text_field :name, placeholder: 'Butter cookies' %>
<%= f.text_field :tag_list, placeholder: 'cookie, butter', help: t('helpers.help.project.tag_list') %>
<%= f.number_field :money_budget, placeholder: '10', prepend: current_user.currency_unit, help: t('helpers.help.project.money_budget', currency_unit: current_user.currency_unit) %></p>
<%= f.number_field :time_budget, placeholder: '1', help: t('helpers.help.project.time_budget') %>
<%= f.text_field :tag_list, placeholder: 'cookie, butter' %>
<%= f.number_field :money_budget, placeholder: '10', prepend: current_user.currency_unit %></p>
<%= f.number_field :time_budget, placeholder: '1' %>
<%= f.submit %>
<% end %>
20 changes: 12 additions & 8 deletions app/views/users/_form.html.erb
Expand Up @@ -5,13 +5,17 @@
<%= f.text_field :email, placeholder: 'fcirillo@tomato.es' %>
<%= f.time_zone_select :time_zone, nil, { include_blank: true } %>
<%= f.select :currency, options_for_select(User::CURRENCIES.invert, @user.currency) %>
<%= f.number_field :work_hours_per_day, placeholder: '8', help: t('helpers.help.user.work_hours_per_day') %></p>
<%= f.number_field :average_hourly_rate, placeholder: '35.5', step: '0.1', prepend: current_user.currency_unit, help: t('helpers.help.user.average_hourly_rate') %></p>
<%= f.range_field :volume, min: 0, max: 3, help: t('helpers.help.user.volume_html') %></p>
<%= f.check_box :ticking, label: t('helpers.label.user.ticking') %>
<div class="form-group row">
<%= f.text_field :color, placeholder: '#ccff00', help: t('helpers.help.user.color') %>
<div id="colorpicker" class="col-sm-4"></div>
</div>
<%= f.number_field :work_hours_per_day, placeholder: '8' %></p>
<%= f.number_field :average_hourly_rate, placeholder: '35.5', step: '0.1', prepend: current_user.currency_unit %></p>
<%= f.range_field :volume, min: 0, max: 3 %></p>
<%= f.form_group do %>
<%= f.check_box :ticking, label: t('helpers.label.user.ticking') %>
<% end %>
<%= f.text_field :color, placeholder: '#ccff00' %>
<%= f.form_group do %>
<div class="row">
<div id="colorpicker" class="col-sm-4"></div>
</div>
<% end %>
<%= f.submit %>
<% end %>
23 changes: 11 additions & 12 deletions config/locales/en.yml
Expand Up @@ -40,18 +40,6 @@ en:
user:
color: Progress bar color
ticking: Enable timer ticking effect
help:
project:
tag_list: A list of project related tags.
money_budget: Available budget in %{currency_unit}.
time_budget: Estimated time budget in hours.
user:
work_hours_per_day: How many hours do you work per day?
average_hourly_rate: How much do you charge per hour?
volume_html: >
Default timer volume. <em>0</em> is <em>mute</em>, <em>3</em> is
<em>max volume</em>.
color: A hexadecimal color code.
submit:
create: Create %{model}
update: Update %{model}
Expand Down Expand Up @@ -124,6 +112,17 @@ en:
weekly: Weekly
monthly: Monthly
overall: Overall
activerecord:
help:
project:
tag_list: A list of project related tags.
money_budget: Available budget.
time_budget: Estimated time budget in hours.
user:
work_hours_per_day: How many hours do you work per day?
average_hourly_rate: How much do you charge per hour?
volume: Default timer volume. 0 is mute, 3 is max volume.
color: A hexadecimal color code.
mongoid:
models:
project:
Expand Down
25 changes: 13 additions & 12 deletions config/locales/es.yml
Expand Up @@ -40,18 +40,6 @@ es:
user:
color: Color de la barra de progreso
ticking: Habilitar el efecto de tictac del temporizador
help:
project:
tag_list: Listado de etiquetas relacionadas con el proyecto.
money_budget: Presupuesto disponible en %{currency_unit}.
time_budget: Presupuesto estimado en horas.
user:
work_hours_per_day: ¿Cuántas horas trabajas por día?
average_hourly_rate: ¿Cual es tu tarifa horaria?
volume_html: >
Volumen predeterminado del temporizador. <em>0</em> es <em>silencioso
</em>, <em>3</em> es <em>volumen máximo</em>.
color: Código hexadecimal del color.
submit:
create: Crear %{model}
update: Actualizar %{model}
Expand Down Expand Up @@ -126,6 +114,19 @@ es:
weekly: Semanal
monthly: Mensual
overall: General
activerecord:
help:
project:
tag_list: Listado de etiquetas relacionadas con el proyecto.
money_budget: Presupuesto disponible.
time_budget: Presupuesto estimado en horas.
user:
work_hours_per_day: ¿Cuántas horas trabajas por día?
average_hourly_rate: ¿Cual es tu tarifa horaria?
volume: >
Volumen predeterminado del temporizador. 0 es silencioso, 3 es volumen
máximo.
color: Código hexadecimal del color.
mongoid:
models:
project:
Expand Down
26 changes: 13 additions & 13 deletions config/locales/fr.yml
Expand Up @@ -38,19 +38,6 @@ fr:
user:
color: Couleur de la barre de progression
ticking: Activer l'effet de tic-tac
help:
project:
tag_list: Une liste d'étiquettes liées au projet.
money_budget: Budget disponible en %{currency_unit}.
time_budget: Budget de temps estimé en heures.
user:
work_hours_per_day: Combien d'heures travailles-tu par jour?
average_hourly_rate: Combien factures-tu de l'heure?
volume_html: >
Volume par défaut de l'alarme. <em>0</em> équivaut à <em>muet</em>,
<em>3</em> c'est le
<em>volume maximum</em>.
color: Code hexadécimal pour la couleur.
submit:
create: Créer %{model}
update: Mettre à jour %{model}
Expand Down Expand Up @@ -121,6 +108,19 @@ fr:
weekly: Cette semaine
monthly: Ce mois-ci
overall: Général
activerecord:
help:
project:
tag_list: Une liste d'étiquettes liées au projet.
money_budget: Budget disponible.
time_budget: Budget de temps estimé en heures.
user:
work_hours_per_day: Combien d'heures travailles-tu par jour?
average_hourly_rate: Combien factures-tu de l'heure?
volume: >
Volume par défaut de l'alarme. 0 équivaut à muet, 3 c'est le volume
maximum.
color: Code hexadécimal pour la couleur.
mongoid:
models:
project:
Expand Down
27 changes: 14 additions & 13 deletions config/locales/pt-BR.yml
Expand Up @@ -38,18 +38,6 @@ pt-BR:
user:
color: Cor da barra de progresso
ticking: Habilitar som de tic-tac
help:
project:
tag_list: Uma lista de tags relacionadas a projetos.
money_budget: Orçamento disponível em %{currency_unit}.
time_budget: Orçamento de tempo estimado em horas.
user:
work_hours_per_day: Quantas horas você trabalha por dia?
average_hourly_rate: Quanto você cobra por hora?
volume_html: >
Volume padrão do temporizador. <em>0</em> significa <em>mudo</em>, <em>3</em> significa
<em>volume máximo</em>.
color: Um código de cor hexadecimal.
submit:
create: Criar %{model}
update: Atualizar %{model}
Expand Down Expand Up @@ -77,7 +65,7 @@ pt-BR:
no_tomatoes_yet_html: >
Você ainda não registrou nada.<br/>Clique em "Começar" para iniciar o seu primeiro pomodoro.
no_projects_yet_html: >
Você ainda não trabalhou em nenhum projeto.<br/>Crie um %{new_project_link} para começar a
Você ainda não trabalhou em nenhum projeto.<br/>Crie um %{new_project_link} para começar a
coletar estatísticas agregadas.
counters:
day: Hoje
Expand Down Expand Up @@ -119,6 +107,19 @@ pt-BR:
weekly: Semanal
monthly: Mensal
overall: Geral
activerecord:
help:
project:
tag_list: Uma lista de tags relacionadas a projetos.
money_budget: Orçamento disponível.
time_budget: Orçamento de tempo estimado em horas.
user:
work_hours_per_day: Quantas horas você trabalha por dia?
average_hourly_rate: Quanto você cobra por hora?
volume: >
Volume padrão do temporizador. 0 significa mudo, 3 significa volume
máximo.
color: Um código de cor hexadecimal.
mongoid:
models:
project:
Expand Down

0 comments on commit 5deeede

Please sign in to comment.