- <%= content_tag(:p,link_to("Edit", :action => 'edit', :id => @project.id, :deliverable_id => deliverable.id)) if allowed_management? -%>
- <%= content_tag(:p,link_to("Delete", { :action => 'destroy', :id => @project.id, :deliverable_id => deliverable.id}, :confirm => l(:text_are_you_sure))) if allowed_management? %>
- <%= content_tag(:p,link_to("Issues", :action => 'issues', :id => @project.id, :deliverable_id => deliverable.id)) -%>
+ <%= content_tag(:p,link_to(l(:button_edit), :action => 'edit', :id => @project.id, :deliverable_id => deliverable.id)) if allowed_management? -%>
+ <%= content_tag(:p,link_to(l(:button_delete), { :action => 'destroy', :id => @project.id, :deliverable_id => deliverable.id}, :confirm => l(:text_are_you_sure))) if allowed_management? %>
+ <%= content_tag(:p,link_to(l(:label_issue_plural), :action => 'issues', :id => @project.id, :deliverable_id => deliverable.id)) -%>
<% if allowed_management? && @project.versions.size > 0 %>
<% form_for :deliverable, deliverable, :url => { :action => "bulk_assign_issues", :id => @project.id, :deliverable_id => deliverable.id} do |f| %>
<%= select("version", "id", @project.versions.sort.collect {|v| [v.name, v.id ] }, { :prompt => '-- Version --' }) %>
- <%= submit_tag("Bulk Assign") %>
+ <%= submit_tag(l(:label_bulk_assign)) %>
<% end %>
<% end %>
@@ -30,18 +30,18 @@
- <%= row_with_double_data "Progress: ", number_to_percentage(deliverable.progress, :precision => 0), '' %>
+ <%= row_with_double_data l(:label_progress), number_to_percentage(deliverable.progress, :precision => 0), '' %>
<% if allowed_management? %>
<% if deliverable.hourly? %>
- <%= row_with_double_data "Hours Estimated: ", number_with_precision(deliverable.total_hours, 0), '' %>
+ <%= row_with_double_data l(:label_hours_estimated), number_with_precision(deliverable.total_hours, 0), '' %>
<% end %>
<% if deliverable.fixed? %>
- <%= row_with_double_data "Fixed Amount: ", '', number_to_currency(deliverable.fixed_cost, :precision => 0) %>
+ <%= row_with_double_data l(:label_fixed_amount), '', number_to_currency(deliverable.fixed_cost, :precision => 0) %>
<% end %>
<% if deliverable.hours_used > 0 %>
- <%= row_with_double_data "Hours Used: ", number_with_precision(deliverable.hours_used,0), number_to_currency(deliverable.spent_by_members, :precision => 0) %>
+ <%= row_with_double_data l(:label_hours_used), number_with_precision(deliverable.hours_used,0), number_to_currency(deliverable.spent_by_members, :precision => 0) %>
@@ -55,13 +55,13 @@
- <%= row_with_data("Total Budget: ", number_to_currency(deliverable.budget, :precision => 0)) -%>
+ <%= row_with_data(l(:field_budget), number_to_currency(deliverable.budget, :precision => 0)) -%>
<% if allowed_management? %>
- <% base_price_label = deliverable.hourly? ? "Labor: " : "Fixed Amount: " %>
+ <% base_price_label = deliverable.hourly? ? l(:label_labor) : l(:label_fixed_amount) %>
<%= row_with_data(base_price_label, number_to_currency(deliverable.labor_budget || 0.0, :precision => 0)) -%>
- <%= row_with_data("Overhead: ", number_or_percent(deliverable.overhead, deliverable.overhead_percent)) -%>
- <%= row_with_data("Materials: ", number_or_percent(deliverable.materials, deliverable.materials_percent)) -%>
- <%= row_with_data("Potential Profit: ", number_or_percent(deliverable.profit, deliverable.profit_percent)) -%>
+ <%= row_with_data(l(:label_overhead), number_or_percent(deliverable.overhead, deliverable.overhead_percent)) -%>
+ <%= row_with_data(l(:label_materials), number_or_percent(deliverable.materials, deliverable.materials_percent)) -%>
+ <%= row_with_data(l(:label_potential_profit), number_or_percent(deliverable.profit, deliverable.profit_percent)) -%>
<% end %>
diff --git a/app/views/deliverables/_form.html.erb b/app/views/deliverables/_form.html.erb
index 4894020..cab9d6d 100644
--- a/app/views/deliverables/_form.html.erb
+++ b/app/views/deliverables/_form.html.erb
@@ -19,7 +19,7 @@
- Fixed Cost
+ <%= l(:label_fixed_cost) %>
<%= check_box(:deliverable, :type, {}, FixedDeliverable.name, HourlyDeliverable.name) %>
@@ -31,7 +31,7 @@
- Cost per hour
+ <%= l(:field_cost_per_hour)%>
<%= text_field :deliverable, :cost_per_hour, :size => 7 %>
@@ -42,7 +42,7 @@
- Total Hours
+ <%= l(:field_total_hours) %>
<%= text_field :deliverable, :total_hours, :size => 7 %>
@@ -54,7 +54,7 @@
- Fixed Bid
+ <%= l(:field_fixed_cost) %>
<%= text_field :deliverable, :fixed_cost, :size => 7 %>
@@ -69,7 +69,7 @@
<%= field_with_budget_observer_and_totals(f, @deliverable, :profit, :profit_percent, @settings[:budget_profit]) %>
- Total Budget:
+ <%= l(:field_budget) %>
<%= content_tag(:span, 0, :id => 'total-budget-calculation', :class => "budget-calculation") %>
diff --git a/app/views/deliverables/_list.html.erb b/app/views/deliverables/_list.html.erb
index d21c1bb..5349be6 100644
--- a/app/views/deliverables/_list.html.erb
+++ b/app/views/deliverables/_list.html.erb
@@ -2,12 +2,12 @@
<%= content_tag('th', " ") %>
<%= sort_header_tag("#{Deliverable.table_name}.id", :caption => '#', :default_order => 'desc') %>
- <%= sort_header_tag("score", :caption => 'Score', :default_order => 'desc') if allowed_management? %>
- <%= sort_header_tag("#{Deliverable.table_name}.subject", :caption => 'Subject') %>
- <%= sort_header_tag("labor_budget", :caption => 'Budget') if allowed_management? %>
- <%= sort_header_tag("spent", :caption => 'Spent') if allowed_management? %>
- <%= sort_header_tag("#{Deliverable.table_name}.due", :caption => 'Due') %>
- <%= sort_header_tag("progress", :caption => 'Progress') %>
+ <%= sort_header_tag("score", :caption => l(:caption_score), :default_order => 'desc') if allowed_management? %>
+ <%= sort_header_tag("#{Deliverable.table_name}.subject", :caption => l(:caption_subject)) %>
+ <%= sort_header_tag("labor_budget", :caption => l(:caption_budget)) if allowed_management? %>
+ <%= sort_header_tag("spent", :caption => l(:caption_spent)) if allowed_management? %>
+ <%= sort_header_tag("#{Deliverable.table_name}.due", :caption => l(:caption_due)) %>
+ <%= sort_header_tag("progress", :caption => l(:caption_progress)) %>
<% deliverables.each do |deliverable| -%>
diff --git a/app/views/deliverables/_sidebar.html.erb b/app/views/deliverables/_sidebar.html.erb
index c3f3b7c..977430b 100644
--- a/app/views/deliverables/_sidebar.html.erb
+++ b/app/views/deliverables/_sidebar.html.erb
@@ -1,3 +1,3 @@
-Budget
+<%= l(:budget_title) %>
<%= link_to l(:label_issue_view_all), { :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1 } %>
-<%= link_to_function "New Deliverable", "$('new-deliverable').toggle();" if allowed_management? %>
+<%= link_to_function l(:label_new_deliverable), "$('new-deliverable').toggle();" if allowed_management? %>
diff --git a/app/views/deliverables/edit.html.erb b/app/views/deliverables/edit.html.erb
index 8b7b16a..366599f 100644
--- a/app/views/deliverables/edit.html.erb
+++ b/app/views/deliverables/edit.html.erb
@@ -1,4 +1,4 @@
-Update Deliverable
+<%= l(:label_update_deliverable) %>
<% form_for :deliverable, @deliverable, :url => {:controller => 'deliverables', :action => 'update', :id => @project, :deliverable_id => @deliverable.id },
:method => :post, :builder => TabularFormBuilder, :lang => current_language,
:html => {:multipart => true, :id => 'deliverable-form', :class => 'tabular'} do |f| %>
diff --git a/app/views/deliverables/index.html.erb b/app/views/deliverables/index.html.erb
index 7912d63..cf13f99 100644
--- a/app/views/deliverables/index.html.erb
+++ b/app/views/deliverables/index.html.erb
@@ -4,7 +4,7 @@
<% if allowed_management? %>
-
New Deliverable
+
<%= l(:label_new_deliverable) %>
<% remote_form_for :deliverable, @deliverable, :url => {:controller => 'deliverables', :action => 'create', :id => @project },
:method => :post, :builder => TabularFormBuilder, :lang => current_language,
:html => {:multipart => true, :id => 'deliverable-form', :class => 'tabular'} do |f| %>
diff --git a/app/views/settings/_budget_settings.rhtml b/app/views/settings/_budget_settings.rhtml
index e582871..a9483f5 100644
--- a/app/views/settings/_budget_settings.rhtml
+++ b/app/views/settings/_budget_settings.rhtml
@@ -1,16 +1,16 @@
- Enter a dollar amount or percentage into each field to set your default amount. Use % in the field for percentages.
+ <%= l(:message_budget_settings) %>
- Non billable overhead <%= text_field_tag 'settings[budget_non_billable_overhead]', @settings['budget_non_billable_overhead'], :size => 15 %>
+ <%= l(:label_non_billable_overhead) %> <%= text_field_tag 'settings[budget_non_billable_overhead]', @settings['budget_non_billable_overhead'], :size => 15 %>
- Materials <%= text_field_tag 'settings[budget_materials]', @settings['budget_materials'], :size => 15 %>
+ <%= l(:label_materials) %> <%= text_field_tag 'settings[budget_materials]', @settings['budget_materials'], :size => 15 %>
- Profit <%= text_field_tag 'settings[budget_profit]', @settings['budget_profit'], :size => 15 %>
+ <%= l(:label_profit) %> <%= text_field_tag 'settings[budget_profit]', @settings['budget_profit'], :size => 15 %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index c3ff3d5..bd5237e 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1,10 +1,14 @@
en:
+ budget_title: Budget
field_cost_per_hour: Cost per hour
field_total_hours: Total hours
field_overhead: Overhead
+ label_overhead: "Overhead: "
field_materials: Material costs
+ label_materials: "Materials: "
field_profit: Profit
field_budget: Total Budget
+ label_budget: "Total Budget: "
field_fixed_cost: Fixed Bid
field_project_manager_signoff: Project Manager Signoff
field_client_signoff: Client Signoff
@@ -13,3 +17,31 @@ en:
field_due: Due Date
label_member_rate: Rate ($)
message_updated_issues: Updated %d issues
+ message_budget_settings: Enter a dollar amount or percentage into each field to set your default amount. Use
%% in the field for percentages.
+ label_non_billable_overhead: Non billable overhead
+ label_materials: Materials
+ label_profit: Profit
+ label_new_deliverable: New deliverable
+ label_fixed_cost: Fixed cost
+ caption_due: Due
+ caption_progress: Progress
+ caption_subject: Subject
+ caption_score: Score
+ caption_budget: Budget
+ caption_spent: Spent
+ label_update_deliverable: Update Deliverable
+ label_labor_budget: "Labor Budget: "
+ label_labor_budget_spent: "Labor Budget Spent: "
+ label_labor_budget_remaining: "Labor Budget Remaining: "
+ label_progress: "Progress: "
+ label_budget_score: "Budget Score: "
+ label_overruns: "Overruns: "
+ label_missing_on: Missing on
+ label_next_due_date: "Next Due Date: "
+ label_completion: "Completion: "
+ label_potential_profit: "Potential Profit: "
+ label_bulk_assign: Bulk Assign
+ label_labor: "Labor: "
+ label_fixed_amount: "Fixed Amount: "
+ label_hours_estimated: "Hours Estimated: "
+ label_hours_used: "Hours Used: "
diff --git a/init.rb b/init.rb
index 448c8b9..693ed5d 100644
--- a/init.rb
+++ b/init.rb
@@ -33,5 +33,5 @@ Redmine::Plugin.register :budget_plugin do
permission :manage_budget, { :deliverables => [:new, :edit, :create, :update, :destroy, :preview, :bulk_assign_issues]}
end
- menu :project_menu, :budget, :controller => "deliverables", :action => 'index'
+ menu :project_menu, :budget, {:controller => "deliverables", :action => 'index'}, :caption => :budget_title
end
diff --git a/lang/en.yml b/lang/en.yml
index 42da559..2432e1b 100644
--- a/lang/en.yml
+++ b/lang/en.yml
@@ -1,9 +1,13 @@
+budget_title: Budget
field_cost_per_hour: Cost per hour
field_total_hours: Total hours
field_overhead: Overhead
+label_overhead: "Overhead: "
field_materials: Material costs
+label_materials: "Materials: "
field_profit: Profit
field_budget: Total Budget
+label_budget: "Total Budget: "
field_fixed_cost: Fixed Bid
field_project_manager_signoff: Project Manager Signoff
field_client_signoff: Client Signoff
@@ -12,3 +16,31 @@ field_deliverable_subject: Deliverable
field_due: Due Date
label_member_rate: Rate ($)
message_updated_issues: Updated %d issues
+message_budget_settings: Enter a dollar amount or percentage into each field to set your default amount. Use
%% in the field for percentages.
+label_non_billable_overhead: Non billable overhead
+label_materials: Materials
+label_profit: Profit
+label_new_deliverable: New deliverable
+label_fixed_cost: Fixed cost
+caption_due: Due
+caption_progress: Progress
+caption_subject: Subject
+caption_score: Score
+caption_budget: Budget
+caption_spent: Spent
+label_update_deliverable: Update Deliverable
+label_labor_budget: "Labor Budget: "
+label_labor_budget_spent: "Labor Budget Spent: "
+label_labor_budget_remaining: "Labor Budget Remaining: "
+label_progress: "Progress: "
+label_budget_score: "Budget Score: "
+label_overruns: "Overruns: "
+label_missing_on: Missing on
+label_next_due_date: "Next Due Date: "
+label_completion: "Completion: "
+label_potential_profit: "Potential Profit: "
+label_bulk_assign: Bulk Assign
+label_labor: "Labor: "
+label_fixed_amount: "Fixed Amount: "
+label_hours_estimated: "Hours Estimated: "
+label_hours_used: "Hours Used: "