improve task i18n (affects foodcoops#137)
This commit is contained in:
parent
b05c75aef3
commit
e42e27957d
5 changed files with 18 additions and 21 deletions
|
@ -13,4 +13,8 @@ module TasksHelper
|
|||
title: I18n.t('helpers.tasks.required_users', :count => task.still_required_users)
|
||||
end
|
||||
end
|
||||
|
||||
def task_title(task)
|
||||
I18n.t('helpers.tasks.task_title', name: task.name, duration: task.duration)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
%table.table.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%th= t '.due_date'
|
||||
%th= t '.task'
|
||||
%th= t '.who'
|
||||
%th= heading_helper Task, :due_date
|
||||
%th= heading_helper Task, :name
|
||||
%th= heading_helper Task, :user_list
|
||||
%th
|
||||
%tbody
|
||||
- @tasks.each do |task|
|
||||
%tr
|
||||
%td= task.due_date unless task.due_date.nil?
|
||||
%td= link_to t('.task_format', name: task.name, duration: task.duration), task_path(task)
|
||||
%td= link_to task_title(task), task_path(task)
|
||||
%td= task_assignments task
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
%table.table.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%th= t '.due_date'
|
||||
%th= heading_helper Task, :due_date
|
||||
%th
|
||||
%th= t '.task'
|
||||
%th= heading_helper Task, :name
|
||||
%th{:colspan => '2'}
|
||||
= t '.who'
|
||||
%small= t '.who_hint'
|
||||
|
@ -15,7 +15,7 @@
|
|||
%td
|
||||
- if task.periodic?
|
||||
%i.icon-repeat{title: t('tasks.repeated')}
|
||||
%td= link_to t('.task_format', name: task.name, duration: task.duration), task_path(task)
|
||||
%td= link_to task_title(task), task_path(task)
|
||||
%td
|
||||
= task_assignments task
|
||||
= highlighted_required_users task
|
||||
|
|
|
@ -3,22 +3,22 @@
|
|||
|
||||
%section
|
||||
%dl.dl-horizontal
|
||||
%dt= Task.human_attribute_name(:name)
|
||||
%dt= heading_helper Task, :name
|
||||
%dd= @task.name
|
||||
- if @task.description.present?
|
||||
%dt= Task.human_attribute_name(:description)
|
||||
%dt= heading_helper Task, :description
|
||||
%dd= simple_format(@task.description)
|
||||
- if @task.due_date.present?
|
||||
%dt= Task.human_attribute_name(:due_date)
|
||||
%dt= heading_helper Task, :due_date
|
||||
%dd
|
||||
= format_date(@task.due_date)
|
||||
- if @task.periodic?
|
||||
%i.icon-repeat{title: t('tasks.repeated')}
|
||||
%dt= Task.human_attribute_name(:duration)
|
||||
%dt= heading_helper Task, :duration
|
||||
%dd= t('.hours', count: @task.duration)
|
||||
%dt= Task.human_attribute_name(:user_list)
|
||||
%dt= heading_helper Task, :user_list
|
||||
%dd= task_assignments(@task)
|
||||
%dt= Task.human_attribute_name(:workgroup)
|
||||
%dt= heading_helper Task, :workgroup
|
||||
%dd
|
||||
- if @task.workgroup
|
||||
= link_to @task.workgroup.name, workgroup_tasks_path(workgroup_id: @task.workgroup_id)
|
||||
|
|
|
@ -802,6 +802,7 @@ en:
|
|||
message:
|
||||
create: send message
|
||||
tasks:
|
||||
task_title: ! '%{name} (%{duration}h)'
|
||||
required_users: ! '%{count} members are still needed!'
|
||||
home:
|
||||
apple_bar:
|
||||
|
@ -1491,11 +1492,6 @@ en:
|
|||
notice: You have accepted the task
|
||||
archive:
|
||||
title: Task archive
|
||||
archive_tasks:
|
||||
due_date: Due date
|
||||
task: Subject
|
||||
task_format: ! '%{name} (%{duration}h)'
|
||||
who: People in charge
|
||||
create:
|
||||
notice: Task has been created
|
||||
destroy:
|
||||
|
@ -1519,11 +1515,8 @@ en:
|
|||
accept_task: Accept task
|
||||
done: Done
|
||||
done_q: Done?
|
||||
due_date: Due date
|
||||
mark_done: Mark task as done
|
||||
reject_task: Reject task
|
||||
task: subject
|
||||
task_format: ! '%{name} (%{duration}h)'
|
||||
who: Who is doing it?
|
||||
who_hint: (How much are still needed?)
|
||||
nav:
|
||||
|
|
Loading…
Reference in a new issue