Skip to content
Browse files

fixes inconsistency with redmine i18n - Message class actually uses '…

…label_board' i18n token
  • Loading branch information...
1 parent fd5d96b commit 04b4eb9fd5a2fc6640254e0af2b14b87fdbcc76a @bshaffer committed Jun 14, 2011
Showing with 13 additions and 13 deletions.
  1. +3 −3 app/views/assets/by_type.html.erb
  2. +1 −1 app/views/assets/index.html.erb
  3. +9 −9 config/mappings.yml
View
6 app/views/assets/by_type.html.erb
@@ -1,8 +1,8 @@
<div id="project-assets">
- <h2><%= l('label_'+@type.underscore) %> <%= l(:assets_project_heading) %> <%= @project.name %></h2>
+ <h2><%= l(@mapping['i18n'].nil? ? 'label_'+@type.underscore : @mapping['i18n']) %> <%= l(:assets_project_heading) %> <%= @project.name %></h2>
<div style="" >
-
+
<%= render :partial => 'assets/links', :locals => {:attachments => @assets, :options => @options, :category_relation => @mapping['category'].nil? ? nil : @mapping['category']['relation']} %>
-
+
</div>
</div>
View
2 app/views/assets/index.html.erb
@@ -3,7 +3,7 @@
<% if !@types.blank? %>
<ul class="assets-list">
<% for type in @types %>
- <li><%= link_to l('label_'+type.underscore) + ' ' + l(:label_asset_plural), assets_by_type_path(:type => type, :project_id => params[:project_id]) %></li>
+ <li><%= link_to l(@mappings[type]['i18n'].nil? ? 'label_'+type.underscore : @mappings[type]['i18n']) + ' ' + l(:label_asset_plural), assets_by_type_path(:type => type, :project_id => params[:project_id]) %></li>
<% end %>
</ul>
<% else %>
View
18 config/mappings.yml
@@ -1,14 +1,14 @@
# Tells plugin where to find project_id and asset category on each item
Document:
- category:
+ category:
id: category_id
relation: category
name: name
table: enumerations
-
+
joins: enumerations on documents.category_id = enumerations.id AND type='DocumentCategory'
-
+
Issue:
category:
id: category_id
@@ -17,27 +17,27 @@ Issue:
table: issue_categories
joins: issue_categories on issues.category_id = issue_categories.id
-
+
Message:
category:
id: board_id
relation: board
table: boards
name: name
-
+
joins: boards on board_id = boards.id
project_id: boards.project_id
-
+ i18n: label_board
+
Version:
project_id: versions.project_id
-
+
WikiPage:
category:
id: id
relation: title
table: wiki_pages
name: wiki_pages.title
-
+
joins: wikis on wiki_id = wikis.id
project_id: wikis.project_id
-

0 comments on commit 04b4eb9

Please sign in to comment.
Something went wrong with that request. Please try again.