Commit d4587481eb77bbf607c3b2799e06aea99a2a9a85

Authored by Antonio Terceiro
1 parent 0a086af9

Deduplicate strings from plugins

I have deduplicated every message in plugin code that was already in the
core. Going forward, plugins should use c_() is they want to reuse the
message from the core. If they want to force their own translation, they
should probably use _('plugin_name|The message') to avoid overriding
translations from the core.
Showing 92 changed files with 200 additions and 200 deletions   Show diff stats
plugins/anti_spam/views/anti_spam_plugin_admin/index.html.erb
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <%= labelled_form_field _('API key'), f.text_field(:api_key, :size => 40) %> 7 <%= labelled_form_field _('API key'), f.text_field(:api_key, :size => 40) %>
8 8
9 <% button_bar do %> 9 <% button_bar do %>
10 - <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %> 10 + <%= submit_button(:save, c_('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
11 <% end %> 11 <% end %>
12 12
13 <% end %> 13 <% end %>
plugins/breadcrumbs/lib/breadcrumbs_plugin/content_breadcrumbs_block.rb
@@ -53,7 +53,7 @@ class BreadcrumbsPlugin::ContentBreadcrumbsBlock &lt; Block @@ -53,7 +53,7 @@ class BreadcrumbsPlugin::ContentBreadcrumbsBlock &lt; Block
53 53
54 protected 54 protected
55 55
56 - CMS_ACTIONS = {:edit => _('Edit'), :upload_files => _('Upload Files'), :new => _('New')} 56 + CMS_ACTIONS = {:edit => c_('Edit'), :upload_files => _('Upload Files'), :new => c_('New')}
57 57
58 def cms_action(action) 58 def cms_action(action)
59 CMS_ACTIONS[action.to_sym] || action 59 CMS_ACTIONS[action.to_sym] || action
plugins/bsc/lib/bsc_plugin.rb
@@ -101,7 +101,7 @@ class BscPlugin &lt; Noosfero::Plugin @@ -101,7 +101,7 @@ class BscPlugin &lt; Noosfero::Plugin
101 else 101 else
102 content = lambda { product.enterprise.name } 102 content = lambda { product.enterprise.name }
103 end 103 end
104 - properties << { :name => _('Supplier'), :content => content } 104 + properties << { :name => c_('Supplier'), :content => content }
105 end 105 end
106 106
107 def profile_tabs 107 def profile_tabs
plugins/bsc/lib/bsc_plugin/bsc_helper.rb
@@ -4,9 +4,9 @@ module BscPlugin::BscHelper @@ -4,9 +4,9 @@ module BscPlugin::BscHelper
4 4
5 def token_input_field_tag(name, element_id, search_action, options = {}, text_field_options = {}, html_options = {}) 5 def token_input_field_tag(name, element_id, search_action, options = {}, text_field_options = {}, html_options = {})
6 options[:min_chars] ||= 3 6 options[:min_chars] ||= 3
7 - options[:hint_text] ||= _("Type in a search term")  
8 - options[:no_results_text] ||= _("No results")  
9 - options[:searching_text] ||= _("Searching...") 7 + options[:hint_text] ||= c_("Type in a search term")
  8 + options[:no_results_text] ||= c_("No results")
  9 + options[:searching_text] ||= c_("Searching...")
10 options[:search_delay] ||= 1000 10 options[:search_delay] ||= 1000
11 options[:prevent_duplicates] ||= true 11 options[:prevent_duplicates] ||= true
12 options[:backspace_delete_item] ||= false 12 options[:backspace_delete_item] ||= false
plugins/bsc/lib/bsc_plugin/contract.rb
@@ -43,7 +43,7 @@ class BscPlugin::Contract &lt; Noosfero::Plugin::ActiveRecord @@ -43,7 +43,7 @@ class BscPlugin::Contract &lt; Noosfero::Plugin::ActiveRecord
43 end 43 end
44 44
45 def self.names 45 def self.names
46 - [_('State'), _('Federal')] 46 + [c_('State'), _('Federal')]
47 end 47 end
48 end 48 end
49 49
plugins/bsc/views/bsc_plugin_admin/new.html.erb
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <%= render :partial => 'shared/fields', :locals => {:f => f, :profile => @bsc} %> 5 <%= render :partial => 'shared/fields', :locals => {:f => f, :profile => @bsc} %>
6 6
7 <% button_bar do %> 7 <% button_bar do %>
8 - <%= submit_button('save', _('Save')) %>  
9 - <%= button('cancel', _('Cancel'), {:controller => 'admin_panel'}) %> 8 + <%= submit_button('save', c_('Save')) %>
  9 + <%= button('cancel', c_('Cancel'), {:controller => 'admin_panel'}) %>
10 <% end %> 10 <% end %>
11 <% end %> 11 <% end %>
plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 :focus => true }) %> 6 :focus => true }) %>
7 7
8 <% button_bar do %> 8 <% button_bar do %>
9 - <%= submit_button('save', _('Save'))%>  
10 - <%= button('cancel', _('Cancel'), {:controller => 'admin_panel'})%> 9 + <%= submit_button('save', c_('Save'))%>
  10 + <%= button('cancel', c_('Cancel'), {:controller => 'admin_panel'})%>
11 <% end %> 11 <% end %>
12 <% end %> 12 <% end %>
plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 <%= labelled_form_field(_('Status'), f.select(:status, BscPlugin::Contract::Status.types. 10 <%= labelled_form_field(_('Status'), f.select(:status, BscPlugin::Contract::Status.types.
11 map { |s| [BscPlugin::Contract::Status.names[s], s] })) %> 11 map { |s| [BscPlugin::Contract::Status.names[s], s] })) %>
12 <%= f.text_field(:number_of_producers, :size => 8, :id => 'bsc-plugin-contract-spinner') %> 12 <%= f.text_field(:number_of_producers, :size => 8, :id => 'bsc-plugin-contract-spinner') %>
13 - <%= _('Enterprises')+':' %> 13 + <%= c_('Enterprises')+':' %>
14 14
15 <% search_action = {:action => 'search_contract_enterprises', :profile => profile.identifier} %> 15 <% search_action = {:action => 'search_contract_enterprises', :profile => profile.identifier} %>
16 <%= token_input_field_tag(:enterprises, 'involved-enterprises', search_action, 16 <%= token_input_field_tag(:enterprises, 'involved-enterprises', search_action,
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 19
20 <table id="bsc-plugin-sales-table" class="alternate-colors"> 20 <table id="bsc-plugin-sales-table" class="alternate-colors">
21 <tr> 21 <tr>
22 - <th class="bsc-plugin-sales-products-column"><%= _('Products') %></th> 22 + <th class="bsc-plugin-sales-products-column"><%= c_('Products') %></th>
23 <th class="bsc-plugin-sales-quantity-column" ><%= _('Quantity') %></th> 23 <th class="bsc-plugin-sales-quantity-column" ><%= _('Quantity') %></th>
24 <th class="bsc-plugin-sales-price-column" ><%= _('Unit price') %></th> 24 <th class="bsc-plugin-sales-price-column" ><%= _('Unit price') %></th>
25 </tr> 25 </tr>
@@ -34,13 +34,13 @@ @@ -34,13 +34,13 @@
34 34
35 <%= labelled_form_field( _('Supply period'), 35 <%= labelled_form_field( _('Supply period'),
36 text_field_tag('contract[supply_start]', (@contract.supply_start ? @contract.supply_start.strftime("%Y-%m-%d") : nil), :id => 'from', :size => 9) + 36 text_field_tag('contract[supply_start]', (@contract.supply_start ? @contract.supply_start.strftime("%Y-%m-%d") : nil), :id => 'from', :size => 9) +
37 - _(' to ') + 37 + c_(' to ') +
38 text_field_tag('contract[supply_end]', (@contract.supply_end ? @contract.supply_end.strftime("%Y-%m-%d") : nil), :id => 'to', :size => 9) ) 38 text_field_tag('contract[supply_end]', (@contract.supply_end ? @contract.supply_end.strftime("%Y-%m-%d") : nil), :id => 'to', :size => 9) )
39 %> 39 %>
40 40
41 <%= f.text_area(:annotations, :rows => 5, :cols => 68) %> 41 <%= f.text_area(:annotations, :rows => 5, :cols => 68) %>
42 <% button_bar do%> 42 <% button_bar do%>
43 - <%= submit_button(:save, _('Save'), :cancel => {:action => 'manage_contracts'})%> 43 + <%= submit_button(:save, c_('Save'), :cancel => {:action => 'manage_contracts'})%>
44 <% end %> 44 <% end %>
45 <% end %> 45 <% end %>
46 46
@@ -55,8 +55,8 @@ @@ -55,8 +55,8 @@
55 BSCContracts.tokenInputOptions = { 55 BSCContracts.tokenInputOptions = {
56 minChars: 3, 56 minChars: 3,
57 hintText: <%= _('Type in a search term for product').to_json %>, 57 hintText: <%= _('Type in a search term for product').to_json %>,
58 - noResultsText: <%= _("No results").to_json %>,  
59 - searchingText: <%= _("Searching...").to_json %>, 58 + noResultsText: <%= c_("No results").to_json %>,
  59 + searchingText: <%= c_("Searching...").to_json %>,
60 searchDelay: 1000, 60 searchDelay: 1000,
61 preventDuplicates: true, 61 preventDuplicates: true,
62 backspaceDeleteItem: false, 62 backspaceDeleteItem: false,
plugins/bsc/views/bsc_plugin_myprofile/create_enterprise.html.erb
@@ -9,12 +9,12 @@ @@ -9,12 +9,12 @@
9 <%= required f.text_field 'name', :onchange => "updateUrlField(this, 'create_enterprise_identifier')", :size => 40 %> 9 <%= required f.text_field 'name', :onchange => "updateUrlField(this, 'create_enterprise_identifier')", :size => 40 %>
10 <%= render :partial => 'shared/organization_custom_fields', :locals => { :f => f, :object_name => :create_enterprise, :profile => @create_enterprise } %> 10 <%= render :partial => 'shared/organization_custom_fields', :locals => { :f => f, :object_name => :create_enterprise, :profile => @create_enterprise } %>
11 <p style="border-bottom: 2px solid #babdb6"></p> 11 <p style="border-bottom: 2px solid #babdb6"></p>
12 - <%= required labelled_form_field(_('Address'), content_tag('code', environment.top_url + "/" + text_field(:create_enterprise, 'identifier', :size => 26))) %> 12 + <%= required labelled_form_field(c_('Address'), content_tag('code', environment.top_url + "/" + text_field(:create_enterprise, 'identifier', :size => 26))) %>
13 <p style="border-bottom: 2px solid #babdb6"></p> 13 <p style="border-bottom: 2px solid #babdb6"></p>
14 <%= render :partial => 'similar_enterprises', :locals => {:bsc => profile}%> 14 <%= render :partial => 'similar_enterprises', :locals => {:bsc => profile}%>
15 15
16 <% button_bar do %> 16 <% button_bar do %>
17 - <%= submit_button('save', _('Save'), :cancel => {:controller => 'profile_editor', :profile => profile.identifier}) %> 17 + <%= submit_button('save', c_('Save'), :cancel => {:controller => 'profile_editor', :profile => profile.identifier}) %>
18 <% end %> 18 <% end %>
19 <% end %> 19 <% end %>
20 20
plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb
@@ -19,8 +19,8 @@ @@ -19,8 +19,8 @@
19 <%= button('add', _('Add new enterprise'), {:action => 'create_enterprise'}) %> 19 <%= button('add', _('Add new enterprise'), {:action => 'create_enterprise'}) %>
20 20
21 <% button_bar do %> 21 <% button_bar do %>
22 - <%= submit_button('save', _('Save'))%>  
23 - <%= button('cancel', _('Cancel'), {:controller => 'profile_editor'})%> 22 + <%= submit_button('save', c_('Save'))%>
  23 + <%= button('cancel', c_('Cancel'), {:controller => 'profile_editor'})%>
24 <% end %> 24 <% end %>
25 25
26 <% end %> 26 <% end %>
plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <br style="clear:both" /> 9 <br style="clear:both" />
10 <% end %> 10 <% end %>
11 <br style="clear:both" /> 11 <br style="clear:both" />
12 - <%= submit_button(:save, _('Filter')) %> 12 + <%= submit_button(:save, c_('Filter')) %>
13 </div> 13 </div>
14 14
15 <div id='bsc-plugin-contracts-results'> 15 <div id='bsc-plugin-contracts-results'>
@@ -31,8 +31,8 @@ @@ -31,8 +31,8 @@
31 <%= content_tag('i', show_date(contract.created_at)) %> 31 <%= content_tag('i', show_date(contract.created_at)) %>
32 </td> 32 </td>
33 <td class="links"> 33 <td class="links">
34 - <%= link_to(_('Edit'), :action => 'edit_contract', :contract_id => contract.id)%>  
35 - <%= link_to(_('Remove'), {:action => 'destroy_contract', :contract_id => contract.id}, :confirm => _('Are you sure?'))%> 34 + <%= link_to(c_('Edit'), :action => 'edit_contract', :contract_id => contract.id)%>
  35 + <%= link_to(c_('Remove'), {:action => 'destroy_contract', :contract_id => contract.id}, :confirm => _('Are you sure?'))%>
36 </td> 36 </td>
37 </tr> 37 </tr>
38 <% end %> 38 <% end %>
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 <% end %> 41 <% end %>
42 42
43 <% button_bar do %> 43 <% button_bar do %>
44 - <%= button(:back, _('Go back'), :controller => 'profile_editor') %> 44 + <%= button(:back, c_('Go back'), :controller => 'profile_editor') %>
45 <%= button(:new, _('Create new contract'), :action => 'new_contract')%> 45 <%= button(:new, _('Create new contract'), :action => 'new_contract')%>
46 <% end %> 46 <% end %>
47 </div> 47 </div>
plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 <% end %> 26 <% end %>
27 27
28 <% button_bar do %> 28 <% button_bar do %>
29 - <%= submit_button('save', _('Save'))%>  
30 - <%= button('cancel', _('Cancel'), {:controller => 'profile_editor'})%> 29 + <%= submit_button('save', c_('Save'))%>
  30 + <%= button('cancel', c_('Cancel'), {:controller => 'profile_editor'})%>
31 <% end %> 31 <% end %>
32 <% end %> 32 <% end %>
plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb
@@ -6,8 +6,8 @@ @@ -6,8 +6,8 @@
6 </tr> 6 </tr>
7 <%= display_text_field(_('Client type'), BscPlugin::Contract::ClientType.names[@contract.client_type]) %> 7 <%= display_text_field(_('Client type'), BscPlugin::Contract::ClientType.names[@contract.client_type]) %>
8 <%= display_text_field(_('Business type'), BscPlugin::Contract::BusinessType.names[@contract.business_type]) %> 8 <%= display_text_field(_('Business type'), BscPlugin::Contract::BusinessType.names[@contract.business_type]) %>
9 - <%= display_text_field(_('State'), @contract.state) %>  
10 - <%= display_text_field(_('City'), @contract.city) %> 9 + <%= display_text_field(c_('State'), @contract.state) %>
  10 + <%= display_text_field(c_('City'), @contract.city) %>
11 <%= display_text_field(_('Status'), BscPlugin::Contract::Status.names[@contract.status]) %> 11 <%= display_text_field(_('Status'), BscPlugin::Contract::Status.names[@contract.status]) %>
12 <%= display_text_field(_('Number of producers'), @contract.number_of_producers) %> 12 <%= display_text_field(_('Number of producers'), @contract.number_of_producers) %>
13 <%= display_text_field(_('Supply period'), show_period(@contract.supply_start, @contract.supply_end, true)) %> 13 <%= display_text_field(_('Supply period'), show_period(@contract.supply_start, @contract.supply_end, true)) %>
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 15
16 <table class='bsc-fields-table' style="float: right;"> 16 <table class='bsc-fields-table' style="float: right;">
17 <tr> 17 <tr>
18 - <th colspan='2'><%= _('Enterprises') %></th> 18 + <th colspan='2'><%= c_('Enterprises') %></th>
19 </tr> 19 </tr>
20 <%= display_list_field(@contract.enterprises.map {|enterprise| link_to(enterprise.short_name(60), enterprise.url)}) %> 20 <%= display_list_field(@contract.enterprises.map {|enterprise| link_to(enterprise.short_name(60), enterprise.url)}) %>
21 </table> 21 </table>
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 <% if !@contract.sales.blank?%> 23 <% if !@contract.sales.blank?%>
24 <table id='bsc-plugin-sales-table' class="bsc-plugin-view-contract alternate-colors"> 24 <table id='bsc-plugin-sales-table' class="bsc-plugin-view-contract alternate-colors">
25 <tr> 25 <tr>
26 - <th><%= _('Product') %></th> 26 + <th><%= c_('Product') %></th>
27 <th align="center"><%= _('Quantity') %></th> 27 <th align="center"><%= _('Quantity') %></th>
28 <th><%= _('Unit price') %></th> 28 <th><%= _('Unit price') %></th>
29 </tr> 29 </tr>
@@ -51,5 +51,5 @@ @@ -51,5 +51,5 @@
51 <% end %> 51 <% end %>
52 52
53 <% button_bar do %> 53 <% button_bar do %>
54 - <%= button(:back, _('Go back'), :action => 'manage_contracts') %> 54 + <%= button(:back, c_('Go back'), :action => 'manage_contracts') %>
55 <% end %> 55 <% end %>
plugins/bsc/views/profile/_profile_tab.html.erb
1 <ul> 1 <ul>
2 <%= content_tag('li', content_tag('b', _('Contact phone: ')) + profile.contact_phone) if !profile.contact_phone.blank? %> 2 <%= content_tag('li', content_tag('b', _('Contact phone: ')) + profile.contact_phone) if !profile.contact_phone.blank? %>
3 <%= content_tag('li', content_tag('b', _('Email: ')) + profile.contact_email) if !profile.contact_email.blank? %> 3 <%= content_tag('li', content_tag('b', _('Email: ')) + profile.contact_email) if !profile.contact_email.blank? %>
4 - <%= content_tag('li', content_tag('b', _('Location: ')) + profile.state) if !profile.state.blank? %>  
5 - <%= content_tag('li', content_tag('b', _('Address: ')) + profile.address) if !profile.address.blank? %> 4 + <%= content_tag('li', content_tag('b', c_('Location: ')) + profile.state) if !profile.state.blank? %>
  5 + <%= content_tag('li', content_tag('b', c_('Address: ')) + profile.address) if !profile.address.blank? %>
6 </ul> 6 </ul>
plugins/bsc/views/shared/_fields.html.erb
@@ -35,11 +35,11 @@ @@ -35,11 +35,11 @@
35 text_field(:profile_data, :identifier, :onchange => "warn_value_change()", :size => 25) 35 text_field(:profile_data, :identifier, :onchange => "warn_value_change()", :size => 25)
36 ) + 36 ) +
37 content_tag('div', 37 content_tag('div',
38 - content_tag('strong', _('WARNING!')) + '&nbsp;' + 38 + content_tag('strong', c_('WARNING!')) + '&nbsp;' +
39 _("You are about to change the address, and this will break external links to this bsc or to posts inside it. Do you really want to change?") + 39 _("You are about to change the address, and this will break external links to this bsc or to posts inside it. Do you really want to change?") +
40 content_tag('div', 40 content_tag('div',
41 - button_to_function(:ok, _("Yes"), "confirm_change()") + ' ' +  
42 - button_to_function(:cancel, _('No'), 'no_change()') 41 + button_to_function(:ok, c_("Yes"), "confirm_change()") + ' ' +
  42 + button_to_function(:cancel, c_('No'), 'no_change()')
43 ), 43 ),
44 :id => 'identifier-change-confirmation', 44 :id => 'identifier-change-confirmation',
45 :class => 'change-confirmation', 45 :class => 'change-confirmation',
@@ -57,10 +57,10 @@ @@ -57,10 +57,10 @@
57 </fieldset> 57 </fieldset>
58 58
59 <fieldset> 59 <fieldset>
60 - <legend><%= _('Location')%></legend> 60 + <legend><%= c_('Location')%></legend>
61 <%= f.text_field(:address) %> 61 <%= f.text_field(:address) %>
62 <%= f.text_field(:zip_code) %> 62 <%= f.text_field(:zip_code) %>
63 <%= f.text_field(:city) %> 63 <%= f.text_field(:city) %>
64 <%= f.text_field(:state) %> 64 <%= f.text_field(:state) %>
65 - <%= select_country(_('Country'), :profile_data, 'country', {:class => 'type-select'}) %> 65 + <%= select_country(c_('Country'), :profile_data, 'country', {:class => 'type-select'}) %>
66 </fieldset> 66 </fieldset>
plugins/comment_classification/views/comment_classification_plugin_labels/_form.html.erb
@@ -8,6 +8,6 @@ @@ -8,6 +8,6 @@
8 <%= labelled_form_field(f.check_box(:enabled) + _('Enable this label?'),'') %> 8 <%= labelled_form_field(f.check_box(:enabled) + _('Enable this label?'),'') %>
9 9
10 <% button_bar do %> 10 <% button_bar do %>
11 - <%= submit_button('save', _('Save'), :cancel => {:action => 'index'} ) %> 11 + <%= submit_button('save', c_('Save'), :cancel => {:action => 'index'} ) %>
12 <% end %> 12 <% end %>
13 <% end %> 13 <% end %>
plugins/comment_classification/views/comment_classification_plugin_labels/index.html.erb
@@ -17,8 +17,8 @@ @@ -17,8 +17,8 @@
17 <td><%= label.color %></td> 17 <td><%= label.color %></td>
18 <td><%= label.enabled %></td> 18 <td><%= label.enabled %></td>
19 <td> 19 <td>
20 - <%= button_without_text :edit, _('Edit'), {:action => 'edit', :id => label} %>  
21 - <%= button_without_text :delete, _('Remove'), {:action => 'destroy', :id => label}, :confirm => _('Are you sure you want to remove this label?') %> 20 + <%= button_without_text :edit, c_('Edit'), {:action => 'edit', :id => label} %>
  21 + <%= button_without_text :delete, c_('Remove'), {:action => 'destroy', :id => label}, :confirm => _('Are you sure you want to remove this label?') %>
22 </td> 22 </td>
23 </tr> 23 </tr>
24 <% end %> 24 <% end %>
@@ -27,6 +27,6 @@ @@ -27,6 +27,6 @@
27 27
28 <% button_bar do %> 28 <% button_bar do %>
29 <%= button(:add, _('Add a new label'), :action => 'create')%> 29 <%= button(:add, _('Add a new label'), :action => 'create')%>
30 - <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %> 30 + <%= button :back, c_('Back to admin panel'), :controller => 'admin_panel' %>
31 <% end %> 31 <% end %>
32 </div> 32 </div>
plugins/comment_classification/views/comment_classification_plugin_myprofile/_status_form.html.erb
@@ -7,6 +7,6 @@ @@ -7,6 +7,6 @@
7 <%= labelled_form_field(_('Reason:'), f.text_area(:reason, :rows => 5)) %> 7 <%= labelled_form_field(_('Reason:'), f.text_area(:reason, :rows => 5)) %>
8 8
9 <% button_bar do %> 9 <% button_bar do %>
10 - <%= submit_button('save', _('Save') ) %> 10 + <%= submit_button('save', c_('Save') ) %>
11 <% end %> 11 <% end %>
12 <% end %> 12 <% end %>
plugins/comment_classification/views/comment_classification_plugin_myprofile/add_status.html.erb
@@ -2,13 +2,13 @@ @@ -2,13 +2,13 @@
2 2
3 <div id='comment-classification-status-list'> 3 <div id='comment-classification-status-list'>
4 <% unless @comment.title.blank? %> 4 <% unless @comment.title.blank? %>
5 - <div class='comment-title'><%= _("Title: %s") % @comment.title %></div> 5 + <div class='comment-title'><%= c_("Title: %s") % @comment.title %></div>
6 <% end %> 6 <% end %>
7 7
8 - <b><%= _('Body:') %></b> 8 + <b><%= c_('Body:') %></b>
9 <p><%= @comment.body %></p> 9 <p><%= @comment.body %></p>
10 10
11 - <h2> <%= _("History") %> </h2> 11 + <h2> <%= c_("History") %> </h2>
12 12
13 <ul> 13 <ul>
14 <% @comment.comment_classification_plugin_comment_status_users.each do |relation| %> 14 <% @comment.comment_classification_plugin_comment_status_users.each do |relation| %>
plugins/comment_classification/views/comment_classification_plugin_status/_form.html.erb
@@ -8,6 +8,6 @@ @@ -8,6 +8,6 @@
8 <%#= labelled_form_field(f.check_box(:enable_reason) + _('This status allows reason?'),'') %> 8 <%#= labelled_form_field(f.check_box(:enable_reason) + _('This status allows reason?'),'') %>
9 9
10 <% button_bar do %> 10 <% button_bar do %>
11 - <%= submit_button('save', _('Save'), :cancel => {:action => 'index'} ) %> 11 + <%= submit_button('save', c_('Save'), :cancel => {:action => 'index'} ) %>
12 <% end %> 12 <% end %>
13 <% end %> 13 <% end %>
plugins/comment_classification/views/comment_classification_plugin_status/index.html.erb
@@ -17,8 +17,8 @@ @@ -17,8 +17,8 @@
17 <td><%= st.enabled %></td> 17 <td><%= st.enabled %></td>
18 <td><%= st.enable_reason %></td> 18 <td><%= st.enable_reason %></td>
19 <td> 19 <td>
20 - <%= button_without_text :edit, _('Edit'), {:action => 'edit', :id => st} %>  
21 - <%= button_without_text :delete, _('Remove'), {:action => 'destroy', :id => st}, :confirm => _('Are you sure you want to remove this status?') %> 20 + <%= button_without_text :edit, c_('Edit'), {:action => 'edit', :id => st} %>
  21 + <%= button_without_text :delete, c_('Remove'), {:action => 'destroy', :id => st}, :confirm => _('Are you sure you want to remove this status?') %>
22 </td> 22 </td>
23 </tr> 23 </tr>
24 <% end %> 24 <% end %>
@@ -27,6 +27,6 @@ @@ -27,6 +27,6 @@
27 27
28 <% button_bar do %> 28 <% button_bar do %>
29 <%= button(:add, _('Add a new status'), :action => 'create')%> 29 <%= button(:add, _('Add a new status'), :action => 'create')%>
30 - <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %> 30 + <%= button :back, c_('Back to admin panel'), :controller => 'admin_panel' %>
31 <% end %> 31 <% end %>
32 </div> 32 </div>
plugins/comment_group/views/comment_group_plugin_profile/view_comments.rjs
@@ -8,5 +8,5 @@ page.replace_html &quot;comment-count-#{@group_id}&quot;, @comments_count @@ -8,5 +8,5 @@ page.replace_html &quot;comment-count-#{@group_id}&quot;, @comments_count
8 if @no_more_pages 8 if @no_more_pages
9 page.replace_html "comments_list_group_#{@group_id}_more", "" 9 page.replace_html "comments_list_group_#{@group_id}_more", ""
10 else 10 else
11 - page.replace_html "comments_list_group_#{@group_id}_more", link_to_remote(_('More'), :url => { :profile => profile.identifier, :controller => 'comment_group_plugin_profile', :action => 'view_comments', :group_id => @group_id, :article_id => @article_id, :group_comment_page => @group_comment_page + 1}, :method => :get) 11 + page.replace_html "comments_list_group_#{@group_id}_more", link_to_remote(c_('More'), :url => { :profile => profile.identifier, :controller => 'comment_group_plugin_profile', :action => 'view_comments', :group_id => @group_id, :article_id => @article_id, :group_comment_page => @group_comment_page + 1}, :method => :get)
12 end 12 end
plugins/community_block/views/community_block.html.erb
@@ -11,13 +11,13 @@ @@ -11,13 +11,13 @@
11 if logged_in? 11 if logged_in?
12 12
13 if profile.enable_contact? 13 if profile.enable_contact?
14 - links.push(_('Send an e-mail') => {:href => url_for({:controller => 'contact', :action => 'new', :profile => profile.identifier})}) 14 + links.push(c_('Send an e-mail') => {:href => url_for({:controller => 'contact', :action => 'new', :profile => profile.identifier})})
15 end 15 end
16 16
17 - links.push(_('Report abuse') => {:href => url_for({:controller => 'profile', :action => 'report_abuse', :profile => profile.identifier})}) 17 + links.push(c_('Report abuse') => {:href => url_for({:controller => 'profile', :action => 'report_abuse', :profile => profile.identifier})})
18 18
19 if !user.nil? && user.has_permission?('edit_profile', profile) 19 if !user.nil? && user.has_permission?('edit_profile', profile)
20 - links.push(_('Control panel') => {:href => url_for({:controller => 'profile_editor', :profile => profile.identifier})}) 20 + links.push(c_('Control panel') => {:href => url_for({:controller => 'profile_editor', :profile => profile.identifier})})
21 end %> 21 end %>
22 22
23 <%= link_to( 23 <%= link_to(
plugins/community_track/views/blocks/_track_card.html.erb
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 <div class="track_stats"> 18 <div class="track_stats">
19 <div class="comments"> 19 <div class="comments">
20 <span class="counter"><%= "#{track_card.comments_count}" %></span> 20 <span class="counter"><%= "#{track_card.comments_count}" %></span>
21 - <span class="label"><%= _('comments') %></span> 21 + <span class="label"><%= c_('comments') %></span>
22 </div> 22 </div>
23 <div class="hits"> 23 <div class="hits">
24 <span class="counter"><%= "#{track_card.hits}" %></span> 24 <span class="counter"><%= "#{track_card.hits}" %></span>
plugins/community_track/views/blocks/_track_list_more.html.erb
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 </div> 6 </div>
7 <% else %> 7 <% else %>
8 <div class="more"> 8 <div class="more">
9 - <%= link_to_remote(_('More'), :url => {:id => block.id, :controller => 'community_track_plugin_public', :action => 'view_tracks', :page => page, :per_page => per_page, :force_same_page => force_same_page}, :loaded => visual_effect(:highlight, "track_card_list_#{block.id}")) %> 9 + <%= link_to_remote(c_('More'), :url => {:id => block.id, :controller => 'community_track_plugin_public', :action => 'view_tracks', :page => page, :per_page => per_page, :force_same_page => force_same_page}, :loaded => visual_effect(:highlight, "track_card_list_#{block.id}")) %>
10 </div> 10 </div>
11 <% end %> 11 <% end %>
12 </div> 12 </div>
plugins/community_track/views/box_organizer/community_track_plugin/_track_list_block.html.erb
1 <div id='edit-track-list-block'> 1 <div id='edit-track-list-block'>
2 - <%= labelled_form_field _('Limit of items'), text_field(:block, :limit, :size => 3) %> 2 + <%= labelled_form_field c_('Limit of items'), text_field(:block, :limit, :size => 3) %>
3 <%= labelled_form_field check_box(:block, :more_another_page) + _('Show more at another page'), '' %> 3 <%= labelled_form_field check_box(:block, :more_another_page) + _('Show more at another page'), '' %>
4 <%= select_categories(:block, _('Select Categories')) %> 4 <%= select_categories(:block, _('Select Categories')) %>
5 <br/> 5 <br/>
plugins/community_track/views/cms/community_track_plugin/_track.html.erb
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <%= render :file => 'shared/tiny_mce' %> 4 <%= render :file => 'shared/tiny_mce' %>
5 5
6 <div> 6 <div>
7 - <%= required labelled_form_field(_('Title'), text_field(:article, 'name', :size => '64', :maxlength => 150)) %> 7 + <%= required labelled_form_field(c_('Title'), text_field(:article, 'name', :size => '64', :maxlength => 150)) %>
8 </div> 8 </div>
9 9
10 <%= render :partial => 'shared/lead_and_body', :locals => {:tiny_mce => true, :body_label => 'Description:'} %> 10 <%= render :partial => 'shared/lead_and_body', :locals => {:tiny_mce => true, :body_label => 'Description:'} %>
plugins/community_track/views/community_track_plugin_public/select_community.html.erb
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <% end %> 13 <% end %>
14 14
15 <% button_bar do %> 15 <% button_bar do %>
16 - <%= button(:add, _('Create a new community'), :controller => 'memberships', :action => 'new_community', :profile => user.identifier, :back_to => @back_to) %> 16 + <%= button(:add, c_('Create a new community'), :controller => 'memberships', :action => 'new_community', :profile => user.identifier, :back_to => @back_to) %>
17 <% end %> 17 <% end %>
18 18
19 <%= form_tag({:controller => 'community_track_plugin_public', :action => 'select_community', :profile => user.identifier}) do %> 19 <%= form_tag({:controller => 'community_track_plugin_public', :action => 'select_community', :profile => user.identifier}) do %>
plugins/community_track/views/content_viewer/_step_item.html.erb
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 <%= expirable_button step_item, :edit, content, url %> 35 <%= expirable_button step_item, :edit, content, url %>
36 <% end %> 36 <% end %>
37 <% if step_item.accept_uploads? && step_item.allow_create?(user) %> 37 <% if step_item.accept_uploads? && step_item.allow_create?(user) %>
38 - <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => step_item)) unless remove_content_button(:upload)%> 38 + <%= button('upload-file', c_('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => step_item)) unless remove_content_button(:upload)%>
39 <% end %> 39 <% end %>
40 </div> 40 </div>
41 </li> 41 </li>
plugins/community_track/views/content_viewer/step.html.erb
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div class="event-info"> 2 <div class="event-info">
3 <ul class="event-data"> 3 <ul class="event-data">
4 <li class="event-dates"> 4 <li class="event-dates">
5 - <span><%= _('When:') %></span><%= show_period(step.start_date, step.end_date) %> 5 + <span><%= c_('When:') %></span><%= show_period(step.start_date, step.end_date) %>
6 </li> 6 </li>
7 </ul> 7 </ul>
8 </div> 8 </div>
plugins/community_track/views/content_viewer/track.html.erb
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 <% if track.allow_create?(user) %> 11 <% if track.allow_create?(user) %>
12 <div class="track actions"> 12 <div class="track actions">
13 <%= content_tag('a', :href => url_for({:controller => 'cms', :action => 'new', :type => "CommunityTrackPlugin::Step", :parent_id => track.id}), :class => 'button with-text icon-add') do %> 13 <%= content_tag('a', :href => url_for({:controller => 'cms', :action => 'new', :type => "CommunityTrackPlugin::Step", :parent_id => track.id}), :class => 'button with-text icon-add') do %>
14 - <strong><%= _("New %s") % CommunityTrackPlugin::Step.short_description %></strong> 14 + <strong><%= c_("New %s") % CommunityTrackPlugin::Step.short_description %></strong>
15 <% end %> 15 <% end %>
16 <a href="#" class="reorder_button button with-text icon-up" onclick="enableReorder();"><%= _('Reorder Steps') %></a> 16 <a href="#" class="reorder_button button with-text icon-up" onclick="enableReorder();"><%= _('Reorder Steps') %></a>
17 <%= submit_button :save, _('Save Order'), :class => "save_button" %> 17 <%= submit_button :save, _('Save Order'), :class => "save_button" %>
plugins/container_block/lib/container_block_plugin/container_block.rb
@@ -10,7 +10,7 @@ class ContainerBlockPlugin::ContainerBlock &lt; Block @@ -10,7 +10,7 @@ class ContainerBlockPlugin::ContainerBlock &lt; Block
10 validate :no_cyclical_reference, :if => 'container_box_id.present?' 10 validate :no_cyclical_reference, :if => 'container_box_id.present?'
11 11
12 def no_cyclical_reference 12 def no_cyclical_reference
13 - errors.add(:box_id, _('cyclical reference is not allowed.')) if box_id == container_box_id 13 + errors.add(:box_id, c_('cyclical reference is not allowed.')) if box_id == container_box_id
14 end 14 end
15 15
16 before_save do |b| 16 before_save do |b|
plugins/container_block/views/blocks/container.html.erb
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 <div class="container-block-button-bar button-bar"> 30 <div class="container-block-button-bar button-bar">
31 <%= link_to_remote '', :url => { :controller => controller.boxes_holder.kind_of?(Environment) ? 'container_block_plugin_admin' : 'container_block_plugin_myprofile', :action => 'saveWidths', :id => block.id }, 31 <%= link_to_remote '', :url => { :controller => controller.boxes_holder.kind_of?(Environment) ? 'container_block_plugin_admin' : 'container_block_plugin_myprofile', :action => 'saveWidths', :id => block.id },
32 :with => "containerChildrenWidth(#{block.id}, #{block.container_box.id})", 32 :with => "containerChildrenWidth(#{block.id}, #{block.container_box.id})",
33 - :html => {:class => "button icon-save container_block_save", :id => "container_block_save_#{block.id}", :title => _('Save') }, 33 + :html => {:class => "button icon-save container_block_save", :id => "container_block_save_#{block.id}", :title => c_('Save') },
34 :loading => "open_loading(DEFAULT_LOADING_MESSAGE);", 34 :loading => "open_loading(DEFAULT_LOADING_MESSAGE);",
35 :loaded => "close_loading();", 35 :loaded => "close_loading();",
36 :complete => "display_notice(request.responseText);"%> 36 :complete => "display_notice(request.responseText);"%>
plugins/context_content/views/box_organizer/context_content_plugin/_context_content_block.html.erb
1 <div id='edit-context-content-block'> 1 <div id='edit-context-content-block'>
2 - <%= labelled_form_field _('Limit of items'), text_field(:block, :limit, :size => 3) %> 2 + <%= labelled_form_field c_('Limit of items'), text_field(:block, :limit, :size => 3) %>
3 <%= labelled_form_field check_box(:block, :show_name) + _('Show content name'), '' %> 3 <%= labelled_form_field check_box(:block, :show_name) + _('Show content name'), '' %>
4 <%= labelled_form_field check_box(:block, :show_image) + _('Show content image'), '' %> 4 <%= labelled_form_field check_box(:block, :show_image) + _('Show content image'), '' %>
5 <%= labelled_form_field check_box(:block, :show_parent_content) + _('Show parent content when children is empty'), '' %> 5 <%= labelled_form_field check_box(:block, :show_parent_content) + _('Show parent content when children is empty'), '' %>
plugins/custom_forms/lib/custom_forms_plugin/helper.rb
@@ -10,11 +10,11 @@ module CustomFormsPlugin::Helper @@ -10,11 +10,11 @@ module CustomFormsPlugin::Helper
10 end 10 end
11 11
12 def access_text(form) 12 def access_text(form)
13 - return _('Public') if form.access.nil? 13 + return c_('Public') if form.access.nil?
14 return _('Logged users') if form.access == 'logged' 14 return _('Logged users') if form.access == 'logged'
15 if form.access == 'associated' 15 if form.access == 'associated'
16 - return _('Members') if form.profile.organization?  
17 - return _('Friends') if form.profile.person? 16 + return c_('Members') if form.profile.organization?
  17 + return c_('Friends') if form.profile.person?
18 end 18 end
19 return _('Custom') 19 return _('Custom')
20 end 20 end
@@ -41,9 +41,9 @@ module CustomFormsPlugin::Helper @@ -41,9 +41,9 @@ module CustomFormsPlugin::Helper
41 # TODO add the custom option that should offer the user the hability to 41 # TODO add the custom option that should offer the user the hability to
42 # choose the profiles one by one, using something like tokeninput 42 # choose the profiles one by one, using something like tokeninput
43 def access_options(profile) 43 def access_options(profile)
44 - associated = profile.organization? ? _('Members') : _('Friends') 44 + associated = profile.organization? ? c_('Members') : c_('Friends')
45 [ 45 [
46 - [_('Public'), nil ], 46 + [c_('Public'), nil ],
47 [_('Logged users'), 'logged' ], 47 [_('Logged users'), 'logged' ],
48 [ associated, 'associated'], 48 [ associated, 'associated'],
49 ] 49 ]
@@ -51,7 +51,7 @@ module CustomFormsPlugin::Helper @@ -51,7 +51,7 @@ module CustomFormsPlugin::Helper
51 51
52 def type_options 52 def type_options
53 [ 53 [
54 - [_('Text'), 'text_field' ], 54 + [c_('Text'), 'text_field' ],
55 [_('Select'), 'select_field'] 55 [_('Select'), 'select_field']
56 ] 56 ]
57 end 57 end
plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_select.html.erb
1 <div class='edit-information edit-select'> 1 <div class='edit-information edit-select'>
2 - <h2><%= _('Options') %></h2> 2 + <h2><%= c_('Options') %></h2>
3 <table class='action-table' style='width: 420px'> 3 <table class='action-table' style='width: 420px'>
4 <tr> 4 <tr>
5 <th style='width: 40%'><%= _('Name') %></th> 5 <th style='width: 40%'><%= _('Name') %></th>
6 <th style='width: 40%'><%= _('Value') %></th> 6 <th style='width: 40%'><%= _('Value') %></th>
7 - <th style='width: 20%'><%= _('Delete') %></th> 7 + <th style='width: 20%'><%= c_('Delete') %></th>
8 </tr> 8 </tr>
9 <% option_counter = 1 %> 9 <% option_counter = 1 %>
10 <% (field.choices || {}).each do |name, value| %> 10 <% (field.choices || {}).each do |name, value| %>
@@ -19,14 +19,14 @@ @@ -19,14 +19,14 @@
19 </tr> 19 </tr>
20 </table> 20 </table>
21 21
22 - <h3><%= _('Type') %></h3> 22 + <h3><%= c_('Type') %></h3>
23 <%= labelled_radio_button 'Radio', "fields[#{counter}][kind]", 'radio', !field.multiple && !field.list %><br /> 23 <%= labelled_radio_button 'Radio', "fields[#{counter}][kind]", 'radio', !field.multiple && !field.list %><br />
24 <%= labelled_radio_button 'Checkbox', "fields[#{counter}][kind]", 'check_box', field.multiple && !field.list %><br /> 24 <%= labelled_radio_button 'Checkbox', "fields[#{counter}][kind]", 'check_box', field.multiple && !field.list %><br />
25 <%= labelled_radio_button 'Select', "fields[#{counter}][kind]", 'select', !field.multiple && field.list %><br /> 25 <%= labelled_radio_button 'Select', "fields[#{counter}][kind]", 'select', !field.multiple && field.list %><br />
26 <%= labelled_radio_button 'Multiple Select', "fields[#{counter}][kind]", 'multiple_select', field.multiple && field.list %><br /> 26 <%= labelled_radio_button 'Multiple Select', "fields[#{counter}][kind]", 'multiple_select', field.multiple && field.list %><br />
27 27
28 <% button_bar do %> 28 <% button_bar do %>
29 - <%= button :ok, _('Ok'), '#', :class => 'colorbox-ok-button', :div_id => elem_id %> 29 + <%= button :ok, c_('Ok'), '#', :class => 'colorbox-ok-button', :div_id => elem_id %>
30 <% end %> 30 <% end %>
31 </div> 31 </div>
32 32
plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_field.html.erb
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <td><%= check_box "fields[#{counter}]", :mandatory %></td> 4 <td><%= check_box "fields[#{counter}]", :mandatory %></td>
5 <%= hidden_field "fields[#{counter}]", :form_id, :value => @form.id %> 5 <%= hidden_field "fields[#{counter}]", :form_id, :value => @form.id %>
6 <td class='actions'> 6 <td class='actions'>
7 - <%= button_without_text :edit, _('Edit'), '', :field_id => counter %>  
8 - <%= button_without_text :remove, _('Remove'), '#', :class => 'remove-field', :field_id => counter, :confirm => _('Are you sure you want to remove this field?') %> 7 + <%= button_without_text :edit, c_('Edit'), '', :field_id => counter %>
  8 + <%= button_without_text :remove, c_('Remove'), '#', :class => 'remove-field', :field_id => counter, :confirm => _('Are you sure you want to remove this field?') %>
9 </td> 9 </td>
10 </tr> 10 </tr>
plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_option.html.erb
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <td><%= text_field_tag("fields[#{counter}][choices][#{option_counter}][name]") %></td> 2 <td><%= text_field_tag("fields[#{counter}][choices][#{option_counter}][name]") %></td>
3 <td><%= text_field_tag("fields[#{counter}][choices][#{option_counter}][value]") %></td> 3 <td><%= text_field_tag("fields[#{counter}][choices][#{option_counter}][value]") %></td>
4 <td class='actions'> 4 <td class='actions'>
5 - <%= button_without_text :remove, _('Remove'), '#', :class => 'remove-option', :field_id => counter, :option_id => option_counter, :confirm => _('Are you sure you want to remove this option?') %> 5 + <%= button_without_text :remove, c_('Remove'), '#', :class => 'remove-option', :field_id => counter, :option_id => option_counter, :confirm => _('Are you sure you want to remove this option?') %>
6 </td> 6 </td>
7 </tr> 7 </tr>
8 8
plugins/custom_forms/views/custom_forms_plugin_myprofile/_field.html.erb
1 <fieldset class="field-box" <%='style="display:none"' if f.object._destroy %> > 1 <fieldset class="field-box" <%='style="display:none"' if f.object._destroy %> >
2 <legend><%= type_to_label(f.object.type) %></legend> 2 <legend><%= type_to_label(f.object.type) %></legend>
3 <div> 3 <div>
4 - <%= required f.label :name, _('Name:') %> 4 + <%= required f.label :name, c_('Name:') %>
5 <%= f.text_field :name, :style => 'width: 14em' %> 5 <%= f.text_field :name, :style => 'width: 14em' %>
6 6
7 <%= f.hidden_field :type %> 7 <%= f.hidden_field :type %>
plugins/custom_forms/views/custom_forms_plugin_myprofile/_form.html.erb
@@ -18,9 +18,9 @@ @@ -18,9 +18,9 @@
18 <%= labelled_check_box _('Triggered after membership'), 'form[on_membership]', '1', @form.on_membership %> 18 <%= labelled_check_box _('Triggered after membership'), 'form[on_membership]', '1', @form.on_membership %>
19 </p> 19 </p>
20 <% end %> 20 <% end %>
21 -<%= labelled_form_field _('Description'), f.text_area(:description, :style => 'width: 100%', :class => 'mceEditor') %> 21 +<%= labelled_form_field c_('Description'), f.text_area(:description, :style => 'width: 100%', :class => 'mceEditor') %>
22 22
23 -<h2><%= _('Fields') %></h2> 23 +<h2><%= c_('Fields') %></h2>
24 24
25 <ul class='field-list'> 25 <ul class='field-list'>
26 <%= f.fields_for :fields do |builder| %> 26 <%= f.fields_for :fields do |builder| %>
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
36 </div> 36 </div>
37 37
38 <% button_bar do %> 38 <% button_bar do %>
39 - <%= submit_button :save, _('Save'), :cancel => {:action => 'index'}%> 39 + <%= submit_button :save, c_('Save'), :cancel => {:action => 'index'}%>
40 <% end %> 40 <% end %>
41 41
42 <%= javascript_include_tag '../plugins/custom_forms/field' %> 42 <%= javascript_include_tag '../plugins/custom_forms/field' %>
plugins/custom_forms/views/custom_forms_plugin_myprofile/custom_forms_plugin/_select_field.html.erb
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 <tr <%='style="display:none"' if f.object.alternatives.empty? %>> 16 <tr <%='style="display:none"' if f.object.alternatives.empty? %>>
17 <th><%= _('Alternative') %></th> 17 <th><%= _('Alternative') %></th>
18 <th><%= _('Preselected') %></th> 18 <th><%= _('Preselected') %></th>
19 - <th><%= _('Remove') %></th> 19 + <th><%= c_('Remove') %></th>
20 </tr> 20 </tr>
21 </thead> 21 </thead>
22 <tfoot> 22 <tfoot>
plugins/custom_forms/views/custom_forms_plugin_myprofile/index.html.erb
@@ -16,9 +16,9 @@ @@ -16,9 +16,9 @@
16 <td><%= form.submissions.count > 0 ? link_to(form.submissions.count, {:action => 'submissions', :id => form.id}) : 0 %></td> 16 <td><%= form.submissions.count > 0 ? link_to(form.submissions.count, {:action => 'submissions', :id => form.id}) : 0 %></td>
17 <td><%= access_text(form) %></td> 17 <td><%= access_text(form) %></td>
18 <td class="actions"> 18 <td class="actions">
19 - <%= button_without_text :edit, _('Edit'), :action => 'edit', :id => form.id %> 19 + <%= button_without_text :edit, c_('Edit'), :action => 'edit', :id => form.id %>
20 <%= button_without_text :search, _('Pending'), :action => 'pending', :id => form.id if form.for_admission %> 20 <%= button_without_text :search, _('Pending'), :action => 'pending', :id => form.id if form.for_admission %>
21 - <%= button_without_text :remove, _('Remove'), {:action => 'remove', :id => form.id}, :confirm => _('Are you sure you want to remove this form?') %> 21 + <%= button_without_text :remove, c_('Remove'), {:action => 'remove', :id => form.id}, :confirm => _('Are you sure you want to remove this form?') %>
22 </td> 22 </td>
23 </tr> 23 </tr>
24 <% end %> 24 <% end %>
plugins/custom_forms/views/custom_forms_plugin_myprofile/submissions.html.erb
@@ -10,11 +10,11 @@ @@ -10,11 +10,11 @@
10 <%= link_to '[CSV]', :format => 'csv' %> 10 <%= link_to '[CSV]', :format => 'csv' %>
11 </p> 11 </p>
12 <p> 12 <p>
13 - <%= labelled_select(_('Sort by')+': ', :sort_by, :first, :last, @sort_by, [['created_at', _('Time')], ['author_name', _('Author')]], :class => 'filter') %> 13 + <%= labelled_select(_('Sort by')+': ', :sort_by, :first, :last, @sort_by, [['created_at', _('Time')], ['author_name', c_('Author')]], :class => 'filter') %>
14 </p> 14 </p>
15 <table class="action-table"> 15 <table class="action-table">
16 <tr> 16 <tr>
17 - <th style='width: 50%'><%= _('Author') %></th> 17 + <th style='width: 50%'><%= c_('Author') %></th>
18 <th style='width: 50%'><%= _('Time') %></th> 18 <th style='width: 50%'><%= _('Time') %></th>
19 </tr> 19 </tr>
20 <% @submissions.each do |submission| %> 20 <% @submissions.each do |submission| %>
plugins/custom_forms/views/custom_forms_plugin_profile/show.html.erb
@@ -22,9 +22,9 @@ @@ -22,9 +22,9 @@
22 22
23 <% button_bar do %> 23 <% button_bar do %>
24 <% if @form.expired? %> 24 <% if @form.expired? %>
25 - <%= submit_button :save, _('Save'), :disabled => '', :class => 'disabled', :cancel => {:controller => :profile, :profile => profile.identifier} %> 25 + <%= submit_button :save, c_('Save'), :disabled => '', :class => 'disabled', :cancel => {:controller => :profile, :profile => profile.identifier} %>
26 <% else %> 26 <% else %>
27 - <%= submit_button :save, _('Save'), :cancel => {:controller => :profile, :profile => profile.identifier} %> 27 + <%= submit_button :save, c_('Save'), :cancel => {:controller => :profile, :profile => profile.identifier} %>
28 <% end %> 28 <% end %>
29 <% end %> 29 <% end %>
30 30
plugins/display_content/lib/display_content_block.rb
1 class DisplayContentBlock < Block 1 class DisplayContentBlock < Block
2 2
3 MONTHS = [ 3 MONTHS = [
4 - N_('January'),  
5 - N_('February'),  
6 - N_('March'),  
7 - N_('April'),  
8 - N_('May'),  
9 - N_('June'),  
10 - N_('July'),  
11 - N_('August'),  
12 - N_('September'),  
13 - N_('October'),  
14 - N_('November'),  
15 - N_('December') 4 + cN_('January'),
  5 + cN_('February'),
  6 + cN_('March'),
  7 + cN_('April'),
  8 + cN_('May'),
  9 + cN_('June'),
  10 + cN_('July'),
  11 + cN_('August'),
  12 + cN_('September'),
  13 + cN_('October'),
  14 + cN_('November'),
  15 + cN_('December')
16 ] 16 ]
17 17
18 AVAILABLE_SECTIONS = ['publish_date', 'title', 'abstract', 'body', 'image' ,'tags'] 18 AVAILABLE_SECTIONS = ['publish_date', 'title', 'abstract', 'body', 'image' ,'tags']
@@ -39,11 +39,11 @@ class DisplayContentBlock &lt; Block @@ -39,11 +39,11 @@ class DisplayContentBlock &lt; Block
39 def section_name(section) 39 def section_name(section)
40 { 40 {
41 'publish_date' => _('Publish date'), 41 'publish_date' => _('Publish date'),
42 - 'title' => _('Title'), 42 + 'title' => c_('Title'),
43 'abstract' => _('Abstract'), 43 'abstract' => _('Abstract'),
44 - 'body' => _('Body'),  
45 - 'image' => _('Image'),  
46 - 'tags' => _('Tags') 44 + 'body' => c_('Body'),
  45 + 'image' => c_('Image'),
  46 + 'tags' => c_('Tags')
47 }[section] || section 47 }[section] || section
48 end 48 end
49 49
plugins/google_analytics/views/profile-editor-extras.rhtml
1 <% extend ApplicationHelper %> 1 <% extend ApplicationHelper %>
2 2
3 -<h2><%= _('Statistics') %></h2> 3 +<h2><%= c_('Statistics') %></h2>
4 <%= labelled_form_field(_('Google Analytics Profile ID'), text_field(:profile_data, :google_analytics_profile_id, :value => profile_id)) %> 4 <%= labelled_form_field(_('Google Analytics Profile ID'), text_field(:profile_data, :google_analytics_profile_id, :value => profile_id)) %>
5 <%= link_to(_('See how to configure statistics for your profile'), '/doc/plugins/google_analytics', :target => '_blank') %> 5 <%= link_to(_('See how to configure statistics for your profile'), '/doc/plugins/google_analytics', :target => '_blank') %>
plugins/ldap/views/ldap_plugin_admin/index.html.erb
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 4
5 <table> 5 <table>
6 <tr> 6 <tr>
7 - <th><%= _('Configuration') %></th> 7 + <th><%= c_('Configuration') %></th>
8 <th><%= _('Value') %></th> 8 <th><%= _('Value') %></th>
9 </tr> 9 </tr>
10 <tr> 10 <tr>
@@ -46,7 +46,7 @@ @@ -46,7 +46,7 @@
46 <th colspan='2'> <%= _('Attributes') %> </th> 46 <th colspan='2'> <%= _('Attributes') %> </th>
47 </tr> 47 </tr>
48 <tr> 48 <tr>
49 - <td><%= _('Login') %></td> 49 + <td><%= c_('Login') %></td>
50 <td><%= text_field :environment, :ldap_plugin_attr_login %></td> 50 <td><%= text_field :environment, :ldap_plugin_attr_login %></td>
51 </tr> 51 </tr>
52 <tr> 52 <tr>
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 61
62 <div> 62 <div>
63 <% button_bar do %> 63 <% button_bar do %>
64 - <%= submit_button('save', _('Save changes')) %> 64 + <%= submit_button('save', c_('Save changes')) %>
65 <%= button :back, _('Back to plugins administration panel'), :controller => 'plugins' %> 65 <%= button :back, _('Back to plugins administration panel'), :controller => 'plugins' %>
66 <% end %> 66 <% end %>
67 </div> 67 </div>
plugins/people_block/lib/friends_block.rb
1 class FriendsBlock < PeopleBlockBase 1 class FriendsBlock < PeopleBlockBase
2 2
3 def self.description 3 def self.description
4 - _('Friends') 4 + c_('Friends')
5 end 5 end
6 6
7 def help 7 def help
plugins/people_block/lib/members_block.rb
@@ -4,7 +4,7 @@ class MembersBlock &lt; PeopleBlockBase @@ -4,7 +4,7 @@ class MembersBlock &lt; PeopleBlockBase
4 attr_accessible :show_join_leave_button, :visible_role 4 attr_accessible :show_join_leave_button, :visible_role
5 5
6 def self.description 6 def self.description
7 - _('Members') 7 + c_('Members')
8 end 8 end
9 9
10 def help 10 def help
plugins/people_block/lib/people_block.rb
1 class PeopleBlock < PeopleBlockBase 1 class PeopleBlock < PeopleBlockBase
2 2
3 def self.description 3 def self.description
4 - _('People') 4 + c_('People')
5 end 5 end
6 6
7 def help 7 def help
plugins/people_block/lib/people_block_base.rb
@@ -10,7 +10,7 @@ class PeopleBlockBase &lt; Block @@ -10,7 +10,7 @@ class PeopleBlockBase &lt; Block
10 end 10 end
11 11
12 def help 12 def help
13 - _('Clicking on the people or groups will take you to their home page.') 13 + c_('Clicking on the people or groups will take you to their home page.')
14 end 14 end
15 15
16 def default_title 16 def default_title
@@ -58,7 +58,7 @@ class PeopleBlockBase &lt; Block @@ -58,7 +58,7 @@ class PeopleBlockBase &lt; Block
58 send(:profile_image_link, item, :minor ) 58 send(:profile_image_link, item, :minor )
59 }.join("\n") 59 }.join("\n")
60 if list.empty? 60 if list.empty?
61 - list = content_tag 'div', _('None'), :class => 'common-profile-list-block-none' 61 + list = content_tag 'div', c_('None'), :class => 'common-profile-list-block-none'
62 else 62 else
63 if !name.blank? && !expanded_address.blank? 63 if !name.blank? && !expanded_address.blank?
64 list << content_tag( 64 list << content_tag(
plugins/people_block/views/blocks/members.html.erb
1 -<%= link_to _('View all'), {:profile => profile.identifier, :controller => 'people_block_plugin_profile', :action => 'members', :role_key => role_key}, :class => 'view-all' %> 1 +<%= link_to c_('View all'), {:profile => profile.identifier, :controller => 'people_block_plugin_profile', :action => 'members', :role_key => role_key}, :class => 'view-all' %>
2 2
3 <% if show_join_leave_button %> 3 <% if show_join_leave_button %>
4 <%= render :partial => 'blocks/profile_info_actions/join_leave_community' %> 4 <%= render :partial => 'blocks/profile_info_actions/join_leave_community' %>
plugins/people_block/views/blocks/people.html.erb
1 -<%= link_to _('View all'), {:controller => 'search', :action => 'people'}, :class => 'view-all' %> 1 +<%= link_to c_('View all'), {:controller => 'search', :action => 'people'}, :class => 'view-all' %>
plugins/people_block/views/box_organizer/_people_block_base.html.erb
1 -<%= labelled_form_field _('Name:'), text_field(:block, :name) %> 1 +<%= labelled_form_field c_('Name:'), text_field(:block, :name) %>
2 2
3 -<%= labelled_form_field _('Address:'), text_field(:block, :address) %> 3 +<%= labelled_form_field c_('Address:'), text_field(:block, :address) %>
4 4
5 <% if @block.kind_of?(MembersBlock) %> 5 <% if @block.kind_of?(MembersBlock) %>
6 <%= labelled_form_field _('Filter by role:'), '' %> 6 <%= labelled_form_field _('Filter by role:'), '' %>
plugins/piwik/views/piwik_plugin_admin/index.html.erb
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <%= labelled_form_field _('Piwik site id'), f.text_field(:piwik_site_id) %> 7 <%= labelled_form_field _('Piwik site id'), f.text_field(:piwik_site_id) %>
8 8
9 <% button_bar do %> 9 <% button_bar do %>
10 - <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %> 10 + <%= submit_button(:save, c_('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
11 <% end %> 11 <% end %>
12 12
13 <% end %> 13 <% end %>
plugins/recent_content/lib/recent_content_block.rb
@@ -10,7 +10,7 @@ class RecentContentBlock &lt; Block @@ -10,7 +10,7 @@ class RecentContentBlock &lt; Block
10 VALID_CONTENT = ['RawHTMLArticle', 'TextArticle', 'TextileArticle', 'TinyMceArticle'] 10 VALID_CONTENT = ['RawHTMLArticle', 'TextArticle', 'TextileArticle', 'TinyMceArticle']
11 11
12 def self.description 12 def self.description
13 - _('Recent content') 13 + c_('Recent content')
14 end 14 end
15 15
16 def help 16 def help
plugins/recent_content/views/blocks/recent_content_block.html.erb
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div id="recent-content-block"> 2 <div id="recent-content-block">
3 <% children = block.articles_of_folder(root, block.total_items)%> 3 <% children = block.articles_of_folder(root, block.total_items)%>
4 <div class="recent-content"> 4 <div class="recent-content">
5 - <%= block_title(block.title.blank? ? _("Recent content") : block.title ) %> 5 + <%= block_title(block.title.blank? ? c_("Recent content") : block.title ) %>
6 <% if block.show_blog_picture and !root.image.nil? %> 6 <% if block.show_blog_picture and !root.image.nil? %>
7 <div class="recent-content-cover"> 7 <div class="recent-content-cover">
8 <%= image_tag(root.image.public_filename(:big)) %> 8 <%= image_tag(root.image.public_filename(:big)) %>
plugins/send_email/lib/send_email_plugin/mail.rb
1 class SendEmailPlugin::Mail 1 class SendEmailPlugin::Mail
2 include ActiveModel::Validations 2 include ActiveModel::Validations
3 3
4 - N_('Subject'); N_('Message'); N_('To'); N_('From') 4 + cN_('Subject'); cN_('Message'); N_('To'); cN_('From')
5 5
6 attr_accessor :environment, :from, :to, :subject, :message, :params 6 attr_accessor :environment, :from, :to, :subject, :message, :params
7 7
plugins/send_email/views/send_email_plugin/fail.html.erb
1 <%= error_messages_for 'mail', :header_message => _('The message could not be sent') %> 1 <%= error_messages_for 'mail', :header_message => _('The message could not be sent') %>
2 2
3 -<%= button :back, _('Back'), :back %> 3 +<%= button :back, c_('Back'), :back %>
plugins/send_email/views/send_email_plugin/success.html.erb
1 <h2><%= _('Message sent') %></h2> 1 <h2><%= _('Message sent') %></h2>
2 2
3 <table class='sendemail-plugin-message-sent'> 3 <table class='sendemail-plugin-message-sent'>
4 - <tr><td class='label'><strong><%= _('Subject') %>:</strong></td><td class='value'><em><%=h @mail.subject %></em></td></tr>  
5 - <tr><td class='label'><strong><%= _('Message') %>:</strong></td><td class='value'><pre><%=h render :file => 'send_email_plugin/sender/message' %></pre></td></tr> 4 + <tr><td class='label'><strong><%= c_('Subject') %>:</strong></td><td class='value'><em><%=h @mail.subject %></em></td></tr>
  5 + <tr><td class='label'><strong><%= c_('Message') %>:</strong></td><td class='value'><pre><%=h render :file => 'send_email_plugin/sender/message' %></pre></td></tr>
6 </table> 6 </table>
7 7
8 -<p><%= button :back, _('Back'), :back %></p> 8 +<p><%= button :back, c_('Back'), :back %></p>
plugins/send_email/views/send_email_plugin_admin/index.html.erb
@@ -4,6 +4,6 @@ @@ -4,6 +4,6 @@
4 <%= labelled_form_field(_("E-Mail addresses you want to allow to send"), f.text_area(:send_email_plugin_allow_to, :rows => 8)) %> 4 <%= labelled_form_field(_("E-Mail addresses you want to allow to send"), f.text_area(:send_email_plugin_allow_to, :rows => 8)) %>
5 <small><%= _('(list of email addresses separated by comma)') %></small> 5 <small><%= _('(list of email addresses separated by comma)') %></small>
6 <% button_bar do %> 6 <% button_bar do %>
7 - <%= submit_button 'save', _('Save'), :cancel => {:controller => 'plugins'} %> 7 + <%= submit_button 'save', c_('Save'), :cancel => {:controller => 'plugins'} %>
8 <% end %> 8 <% end %>
9 <% end %> 9 <% end %>
plugins/shopping_cart/lib/shopping_cart_plugin/cart_helper.rb
@@ -52,7 +52,7 @@ module ShoppingCartPlugin::CartHelper @@ -52,7 +52,7 @@ module ShoppingCartPlugin::CartHelper
52 content_tag('tr', 52 content_tag('tr',
53 content_tag('th', _('Item name')) + 53 content_tag('th', _('Item name')) +
54 content_tag('th', by_mail ? '&nbsp;#&nbsp;' : '#') + 54 content_tag('th', by_mail ? '&nbsp;#&nbsp;' : '#') +
55 - content_tag('th', _('Price')) 55 + content_tag('th', c_('Price'))
56 ) + 56 ) +
57 items.map do |id, quantity| 57 items.map do |id, quantity|
58 product = Product.find(id) 58 product = Product.find(id)
plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb
@@ -3,19 +3,19 @@ @@ -3,19 +3,19 @@
3 :html => {:onsubmit => "return Cart.send_request(this)", :id => 'cart-request-form'}) do |f| %> 3 :html => {:onsubmit => "return Cart.send_request(this)", :id => 'cart-request-form'}) do |f| %>
4 <div id="cart-form-main"> 4 <div id="cart-form-main">
5 <%= labelled_form_field('* ' + _("Name"), f.text_field(:name, :class => 'required') ) %> 5 <%= labelled_form_field('* ' + _("Name"), f.text_field(:name, :class => 'required') ) %>
6 - <%= labelled_form_field('* ' + _("Email"), f.text_field(:email, :class => 'required email') ) %>  
7 - <%= labelled_form_field('* ' + _("Contact phone"), f.text_field(:contact_phone, :class => 'required') ) %> 6 + <%= labelled_form_field('* ' + c_("Email"), f.text_field(:email, :class => 'required email') ) %>
  7 + <%= labelled_form_field('* ' + c_("Contact phone"), f.text_field(:contact_phone, :class => 'required') ) %>
8 <%= labelled_form_field(_('Delivery option'), select_tag(:delivery_option, options_for_select(select_delivery_options(@settings.delivery_options, environment)), 'data-profile-identifier' => @profile.identifier)) unless !@settings.delivery || (@settings.free_delivery_price && get_total(@cart[:items]) >= @settings.free_delivery_price) %> 8 <%= labelled_form_field(_('Delivery option'), select_tag(:delivery_option, options_for_select(select_delivery_options(@settings.delivery_options, environment)), 'data-profile-identifier' => @profile.identifier)) unless !@settings.delivery || (@settings.free_delivery_price && get_total(@cart[:items]) >= @settings.free_delivery_price) %>
9 <%= labelled_form_field(_('Payment'), select_tag('customer[payment]', options_for_select([[_("Money"), :money],[_('shopping_cart|Check'), :check]]))) %> 9 <%= labelled_form_field(_('Payment'), select_tag('customer[payment]', options_for_select([[_("Money"), :money],[_('shopping_cart|Check'), :check]]))) %>
10 <%= labelled_form_field(s_('shopping_cart|Change'), text_field_tag('customer[change]')) %> 10 <%= labelled_form_field(s_('shopping_cart|Change'), text_field_tag('customer[change]')) %>
11 </div> 11 </div>
12 <% if @settings.delivery %> 12 <% if @settings.delivery %>
13 <fieldset><legend><%=_('Delivery Address')%></legend> 13 <fieldset><legend><%=_('Delivery Address')%></legend>
14 - <%= labelled_form_field(_('Address (street and number)'), f.text_field(:address)) %>  
15 - <%= labelled_form_field(_('Address reference'), f.text_field(:address_reference)) %>  
16 - <%= labelled_form_field(_('District'), f.text_field(:district)) %>  
17 - <%= labelled_form_field( _("City"), f.text_field(:city)) %>  
18 - <%= labelled_form_field(_('ZIP code'), f.text_field(:zip_code)) %> 14 + <%= labelled_form_field(c_('Address (street and number)'), f.text_field(:address)) %>
  15 + <%= labelled_form_field(c_('Address reference'), f.text_field(:address_reference)) %>
  16 + <%= labelled_form_field(c_('District'), f.text_field(:district)) %>
  17 + <%= labelled_form_field( c_("City"), f.text_field(:city)) %>
  18 + <%= labelled_form_field(c_('ZIP code'), f.text_field(:zip_code)) %>
19 </fieldset> 19 </fieldset>
20 <% end %> 20 <% end %>
21 <div id="cart-form-actions"> 21 <div id="cart-form-actions">
plugins/shopping_cart/views/shopping_cart_plugin/mailer/customer_notification.html.erb
@@ -14,15 +14,15 @@ @@ -14,15 +14,15 @@
14 </p> 14 </p>
15 15
16 <ul> 16 <ul>
17 - <li><b><%= _('Full name') %>: </b><%= @customer[:name] %></li>  
18 - <li><b><%= _('Email') %>: </b><%= @customer[:email] %></li> 17 + <li><b><%= c_('Full name') %>: </b><%= @customer[:name] %></li>
  18 + <li><b><%= c_('Email') %>: </b><%= @customer[:email] %></li>
19 <li><b><%= _('Phone number') %>: </b><%= @customer[:contact_phone] %></li> 19 <li><b><%= _('Phone number') %>: </b><%= @customer[:contact_phone] %></li>
20 <li><b><%= _('Payment') %>: </b><%= @customer[:payment] == 'money' ? _('Money') : _('shopping_cart|Check') %></li> 20 <li><b><%= _('Payment') %>: </b><%= @customer[:payment] == 'money' ? _('Money') : _('shopping_cart|Check') %></li>
21 <% if @customer[:payment] == 'money' %> 21 <% if @customer[:payment] == 'money' %>
22 <li><b><%= _('shopping_cart|Change') %>: </b><%= @customer[:change] %></li> 22 <li><b><%= _('shopping_cart|Change') %>: </b><%= @customer[:change] %></li>
23 <% end %> 23 <% end %>
24 <% if !@customer[:address].blank? || !@customer[:city].blank? || !@customer[:zip_code].blank? || !@customer[:district].blank? || !@customer[:address_reference].blank? %> 24 <% if !@customer[:address].blank? || !@customer[:city].blank? || !@customer[:zip_code].blank? || !@customer[:district].blank? || !@customer[:address_reference].blank? %>
25 - <li><b><%= _('Address') %>:</b> 25 + <li><b><%= c_('Address') %>:</b>
26 <% end %> 26 <% end %>
27 <% if !@customer[:address].blank? %> 27 <% if !@customer[:address].blank? %>
28 <%= @customer[:address] %><br \> 28 <%= @customer[:address] %><br \>
plugins/shopping_cart/views/shopping_cart_plugin/mailer/supplier_notification.html.erb
@@ -12,15 +12,15 @@ @@ -12,15 +12,15 @@
12 </p> 12 </p>
13 13
14 <ul> 14 <ul>
15 - <li><b><%= _('Full name') %>: </b><%= @customer[:name] %></li>  
16 - <li><b><%= _('Email') %>: </b><%= @customer[:email] %></li> 15 + <li><b><%= c_('Full name') %>: </b><%= @customer[:name] %></li>
  16 + <li><b><%= c_('Email') %>: </b><%= @customer[:email] %></li>
17 <li><b><%= _('Phone number') %>: </b><%= @customer[:contact_phone] %></li> 17 <li><b><%= _('Phone number') %>: </b><%= @customer[:contact_phone] %></li>
18 <li><b><%= _('Payment') %>: </b><%= @customer[:payment] == 'money' ? _('Money') : _('shopping_cart|Check') %></li> 18 <li><b><%= _('Payment') %>: </b><%= @customer[:payment] == 'money' ? _('Money') : _('shopping_cart|Check') %></li>
19 <% if @customer[:payment] == 'money' %> 19 <% if @customer[:payment] == 'money' %>
20 <li><b><%= _('shopping_cart|Change') %>: </b><%= @customer[:change] %></li> 20 <li><b><%= _('shopping_cart|Change') %>: </b><%= @customer[:change] %></li>
21 <% end %> 21 <% end %>
22 <% if !@customer[:address].blank? || !@customer[:city].blank? || !@customer[:zip_code].blank? || !@customer[:district].blank? || !@customer[:address_reference].blank? %> 22 <% if !@customer[:address].blank? || !@customer[:city].blank? || !@customer[:zip_code].blank? || !@customer[:district].blank? || !@customer[:address_reference].blank? %>
23 - <li><b><%= _('Address') %>:</b> 23 + <li><b><%= c_('Address') %>:</b>
24 <% end %> 24 <% end %>
25 <% if !@customer[:address].blank? %> 25 <% if !@customer[:address].blank? %>
26 <%= @customer[:address] %><br \> 26 <%= @customer[:address] %><br \>
plugins/shopping_cart/views/shopping_cart_plugin_myprofile/_orders_list.html.erb
@@ -26,13 +26,13 @@ @@ -26,13 +26,13 @@
26 %> 26 %>
27 <% end %> 27 <% end %>
28 </td> 28 </td>
29 - <td><button class="view-order-details" data-order="<%=order.id%>"><%=_('View details')%></button></td> 29 + <td><button class="view-order-details" data-order="<%=order.id%>"><%=c_('View details')%></button></td>
30 </tr> 30 </tr>
31 <tr id="order-details-<%=order.id%>" style="display:none"> 31 <tr id="order-details-<%=order.id%>" style="display:none">
32 <td class="order-info" colspan="5"> 32 <td class="order-info" colspan="5">
33 <div style="display:none"> 33 <div style="display:none">
34 <ul class="customer-details"> 34 <ul class="customer-details">
35 - <% [['name', _('Name')], ['email', _('E-mail')], ['contact_phone', _('Contact phone')], ['address', _('Address')], ['district', _('District')], ['city', _('City')], ['zip_code', _('Zip code')], ['delivery_option', _('Delivery option')], ['payment', _('Payment')], ['change', _('shopping_cart|Change')]].each do |field| %> 35 + <% [['name', _('Name')], ['email', _('E-mail')], ['contact_phone', c_('Contact phone')], ['address', c_('Address')], ['district', c_('District')], ['city', c_('City')], ['zip_code', c_('Zip code')], ['delivery_option', _('Delivery option')], ['payment', _('Payment')], ['change', _('shopping_cart|Change')]].each do |field| %>
36 <% attribute = field.first %> 36 <% attribute = field.first %>
37 <% name = field.last %> 37 <% name = field.last %>
38 <%= content_tag('li', content_tag('strong', name+': ') + order.send('customer_'+attribute)) if !order.send('customer_'+attribute).blank? %> 38 <%= content_tag('li', content_tag('strong', name+': ') + order.send('customer_'+attribute)) if !order.send('customer_'+attribute).blank? %>
plugins/shopping_cart/views/shopping_cart_plugin_myprofile/_products_list.html.erb
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <% else %> 3 <% else %>
4 <table> 4 <table>
5 <tr> 5 <tr>
6 - <th><%= _('Product') %></th> 6 + <th><%= c_('Product') %></th>
7 <th><%= _('Quantity') %></th> 7 <th><%= _('Quantity') %></th>
8 </tr> 8 </tr>
9 <% @products.each do |id, item|%> 9 <% @products.each do |id, item|%>
plugins/shopping_cart/views/shopping_cart_plugin_myprofile/edit.html.erb
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <table> 8 <table>
9 <tr> 9 <tr>
10 <th><%= _('Option') %></th> 10 <th><%= _('Option') %></th>
11 - <th><%= _('Price') %></th> 11 + <th><%= c_('Price') %></th>
12 <th>&nbsp;</th> 12 <th>&nbsp;</th>
13 </tr> 13 </tr>
14 <% @settings.delivery_options.each do |option, price| %> 14 <% @settings.delivery_options.each do |option, price| %>
@@ -39,8 +39,8 @@ @@ -39,8 +39,8 @@
39 <br style='clear: both'/> 39 <br style='clear: both'/>
40 <br style='clear: both'/> 40 <br style='clear: both'/>
41 <div> 41 <div>
42 - <%= submit_button(:save, _('Save')) %>  
43 - <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %> 42 + <%= submit_button(:save, c_('Save')) %>
  43 + <%= button :back, c_('Back to control panel'), :controller => 'profile_editor' %>
44 </div> 44 </div>
45 <% end%> 45 <% end%>
46 46
plugins/shopping_cart/views/shopping_cart_plugin_myprofile/reports.html.erb
@@ -4,15 +4,15 @@ @@ -4,15 +4,15 @@
4 <% extend ShoppingCartPlugin::CartHelper %> 4 <% extend ShoppingCartPlugin::CartHelper %>
5 5
6 <% status = ShoppingCartPlugin::PurchaseOrder::Status.name; pos=-1 %> 6 <% status = ShoppingCartPlugin::PurchaseOrder::Status.name; pos=-1 %>
7 -<% status_collection = [[nil, _('All')]] %> 7 +<% status_collection = [[nil, c_('All')]] %>
8 <% status_collection += status.map{|s| [pos+=1, s] } %> 8 <% status_collection += status.map{|s| [pos+=1, s] } %>
9 9
10 <% form_tag({}, {:id => 'cart-order-filter'}) do %> 10 <% form_tag({}, {:id => 'cart-order-filter'}) do %>
11 - <%= labelled_text_field(_('From')+' ', :from, @from.strftime("%Y-%m-%d"), :id => 'from', :size => 9) %> 11 + <%= labelled_text_field(c_('From')+' ', :from, @from.strftime("%Y-%m-%d"), :id => 'from', :size => 9) %>
12 <%= labelled_text_field(_('to')+' ', :to, @to.strftime("%Y-%m-%d"), :id => 'to', :size => 9) %> 12 <%= labelled_text_field(_('to')+' ', :to, @to.strftime("%Y-%m-%d"), :id => 'to', :size => 9) %>
13 <span style="white-space:nowrap"><%= labelled_select(_('Status')+' ', :filter_status, :first, :last, @status, status_collection)%></span> 13 <span style="white-space:nowrap"><%= labelled_select(_('Status')+' ', :filter_status, :first, :last, @status, status_collection)%></span>
14 &nbsp; 14 &nbsp;
15 - <%= submit_button('save', _('Filter')) %> 15 + <%= submit_button('save', c_('Filter')) %>
16 <% end %> 16 <% end %>
17 17
18 <% tabs = [] %> 18 <% tabs = [] %>
plugins/shopping_cart/views/shopping_cart_plugin_profile/buy.html.erb
@@ -4,13 +4,13 @@ @@ -4,13 +4,13 @@
4 :html => {:onsubmit => "return Cart.send_request(this)", :id => 'cart-request-form' }) do |f| %> 4 :html => {:onsubmit => "return Cart.send_request(this)", :id => 'cart-request-form' }) do |f| %>
5 <div id="cart-form-main"> 5 <div id="cart-form-main">
6 <%= labelled_form_field('* ' + _("Name"), f.text_field(:name, :class => 'required') ) %> 6 <%= labelled_form_field('* ' + _("Name"), f.text_field(:name, :class => 'required') ) %>
7 - <%= labelled_form_field('* ' + _("Email"), f.text_field(:email, :class => 'required email') ) %>  
8 - <%= labelled_form_field('* ' + _("Contact phone"), f.text_field(:contact_phone, :class => 'required') ) %> 7 + <%= labelled_form_field('* ' + c_("Email"), f.text_field(:email, :class => 'required email') ) %>
  8 + <%= labelled_form_field('* ' + c_("Contact phone"), f.text_field(:contact_phone, :class => 'required') ) %>
9 </div> 9 </div>
10 <fieldset><legend><%=_('Delivery Address')%></legend> 10 <fieldset><legend><%=_('Delivery Address')%></legend>
11 - <%= labelled_form_field(_('Address (street and number)'), f.text_field(:address)) %>  
12 - <%= labelled_form_field( _("City"), f.text_field(:city)) %>  
13 - <%= labelled_form_field(_('ZIP code'), f.text_field(:zip_code)) %> 11 + <%= labelled_form_field(c_('Address (street and number)'), f.text_field(:address)) %>
  12 + <%= labelled_form_field( c_("City"), f.text_field(:city)) %>
  13 + <%= labelled_form_field(c_('ZIP code'), f.text_field(:zip_code)) %>
14 </fieldset> 14 </fieldset>
15 <div id="cart-form-actions"> 15 <div id="cart-form-actions">
16 <%= submit_button(:send, _('Send buy request')) %> 16 <%= submit_button(:send, _('Send buy request')) %>
plugins/solr/lib/acts_as_faceted.rb
@@ -7,11 +7,11 @@ module ActsAsFaceted @@ -7,11 +7,11 @@ module ActsAsFaceted
7 # Example: 7 # Example:
8 # 8 #
9 #acts_as_faceted :fields => { 9 #acts_as_faceted :fields => {
10 - # :f_type => {:label => _('Type'), :proc => proc{|klass| f_type_proc(klass)}}, 10 + # :f_type => {:label => c_('Type'), :proc => proc{|klass| f_type_proc(klass)}},
11 # :f_published_at => {:type => :date, :label => _('Published date'), :queries => {'[* TO NOW-1YEARS/DAY]' => _("Older than one year"), 11 # :f_published_at => {:type => :date, :label => _('Published date'), :queries => {'[* TO NOW-1YEARS/DAY]' => _("Older than one year"),
12 # '[NOW-1YEARS TO NOW/DAY]' => _("Last year"), '[NOW-1MONTHS TO NOW/DAY]' => _("Last month"), '[NOW-7DAYS TO NOW/DAY]' => _("Last week"), '[NOW-1DAYS TO NOW/DAY]' => _("Last day")}}, 12 # '[NOW-1YEARS TO NOW/DAY]' => _("Last year"), '[NOW-1MONTHS TO NOW/DAY]' => _("Last month"), '[NOW-7DAYS TO NOW/DAY]' => _("Last week"), '[NOW-1DAYS TO NOW/DAY]' => _("Last day")}},
13 - # :f_profile_type => {:label => _('Author'), :proc => proc{|klass| f_profile_type_proc(klass)}},  
14 - # :f_category => {:label => _('Categories')}}, 13 + # :f_profile_type => {:label => c_('Author'), :proc => proc{|klass| f_profile_type_proc(klass)}},
  14 + # :f_category => {:label => c_('Categories')}},
15 # :order => [:f_type, :f_published_at, :f_profile_type, :f_category] 15 # :order => [:f_type, :f_published_at, :f_profile_type, :f_category]
16 # 16 #
17 #acts_as_searchable :additional_fields => [ {:name => {:type => :string, :as => :name_sort, :boost => 5.0}} ] + facets_fields_for_solr, 17 #acts_as_searchable :additional_fields => [ {:name => {:type => :string, :as => :name_sort, :boost => 5.0}} ] + facets_fields_for_solr,
plugins/solr/lib/ext/article.rb
@@ -5,16 +5,16 @@ class Article @@ -5,16 +5,16 @@ class Article
5 # use for internationalizable human type names in search facets 5 # use for internationalizable human type names in search facets
6 # reimplement on subclasses 6 # reimplement on subclasses
7 def self.type_name 7 def self.type_name
8 - _('Content') 8 + c_('Content')
9 end 9 end
10 10
11 acts_as_faceted :fields => { 11 acts_as_faceted :fields => {
12 - :solr_plugin_f_type => {:label => _('Type'), :proc => proc{|klass| solr_plugin_f_type_proc(klass)}}, 12 + :solr_plugin_f_type => {:label => c_('Type'), :proc => proc{|klass| solr_plugin_f_type_proc(klass)}},
13 :solr_plugin_f_published_at => {:type => :date, :label => _('Published date'), :queries => {'[* TO NOW-1YEARS/DAY]' => _("Older than one year"), 13 :solr_plugin_f_published_at => {:type => :date, :label => _('Published date'), :queries => {'[* TO NOW-1YEARS/DAY]' => _("Older than one year"),
14 '[NOW-1YEARS TO NOW/DAY]' => _("In the last year"), '[NOW-1MONTHS TO NOW/DAY]' => _("In the last month"), '[NOW-7DAYS TO NOW/DAY]' => _("In the last week"), '[NOW-1DAYS TO NOW/DAY]' => _("In the last day")}, 14 '[NOW-1YEARS TO NOW/DAY]' => _("In the last year"), '[NOW-1MONTHS TO NOW/DAY]' => _("In the last month"), '[NOW-7DAYS TO NOW/DAY]' => _("In the last week"), '[NOW-1DAYS TO NOW/DAY]' => _("In the last day")},
15 :queries_order => ['[NOW-1DAYS TO NOW/DAY]', '[NOW-7DAYS TO NOW/DAY]', '[NOW-1MONTHS TO NOW/DAY]', '[NOW-1YEARS TO NOW/DAY]', '[* TO NOW-1YEARS/DAY]']}, 15 :queries_order => ['[NOW-1DAYS TO NOW/DAY]', '[NOW-7DAYS TO NOW/DAY]', '[NOW-1MONTHS TO NOW/DAY]', '[NOW-1YEARS TO NOW/DAY]', '[* TO NOW-1YEARS/DAY]']},
16 - :solr_plugin_f_profile_type => {:label => _('Profile'), :proc => proc{|klass| solr_plugin_f_profile_type_proc(klass)}},  
17 - :solr_plugin_f_category => {:label => _('Categories')}, 16 + :solr_plugin_f_profile_type => {:label => c_('Profile'), :proc => proc{|klass| solr_plugin_f_profile_type_proc(klass)}},
  17 + :solr_plugin_f_category => {:label => c_('Categories')},
18 }, :category_query => proc { |c| "solr_plugin_category_filter:\"#{c.id}\"" }, 18 }, :category_query => proc { |c| "solr_plugin_category_filter:\"#{c.id}\"" },
19 :order => [:solr_plugin_f_type, :solr_plugin_f_published_at, :solr_plugin_f_profile_type, :solr_plugin_f_category] 19 :order => [:solr_plugin_f_type, :solr_plugin_f_published_at, :solr_plugin_f_profile_type, :solr_plugin_f_category]
20 20
plugins/solr/lib/ext/product.rb
@@ -5,8 +5,8 @@ class Product @@ -5,8 +5,8 @@ class Product
5 5
6 acts_as_faceted :fields => { 6 acts_as_faceted :fields => {
7 :solr_plugin_f_category => {:label => _('Related products')}, 7 :solr_plugin_f_category => {:label => _('Related products')},
8 - :solr_plugin_f_region => {:label => _('City'), :proc => proc { |id| solr_plugin_f_region_proc(id) }},  
9 - :solr_plugin_f_qualifier => {:label => _('Qualifiers'), :proc => proc { |id| solr_plugin_f_qualifier_proc(id) }}, 8 + :solr_plugin_f_region => {:label => c_('City'), :proc => proc { |id| solr_plugin_f_region_proc(id) }},
  9 + :solr_plugin_f_qualifier => {:label => c_('Qualifiers'), :proc => proc { |id| solr_plugin_f_qualifier_proc(id) }},
10 }, :category_query => proc { |c| "solr_plugin_category_filter:#{c.id}" }, 10 }, :category_query => proc { |c| "solr_plugin_category_filter:#{c.id}" },
11 :order => [:solr_plugin_f_category, :solr_plugin_f_region, :solr_plugin_f_qualifier] 11 :order => [:solr_plugin_f_category, :solr_plugin_f_region, :solr_plugin_f_qualifier]
12 12
plugins/solr/lib/ext/profile.rb
@@ -5,7 +5,7 @@ class Profile @@ -5,7 +5,7 @@ class Profile
5 # use for internationalizable human type names in search facets 5 # use for internationalizable human type names in search facets
6 # reimplement on subclasses 6 # reimplement on subclasses
7 def self.type_name 7 def self.type_name
8 - _('Profile') 8 + c_('Profile')
9 end 9 end
10 10
11 after_save_reindex [:articles], :with => :delayed_job 11 after_save_reindex [:articles], :with => :delayed_job
@@ -13,8 +13,8 @@ class Profile @@ -13,8 +13,8 @@ class Profile
13 acts_as_faceted :fields => { 13 acts_as_faceted :fields => {
14 :solr_plugin_f_enabled => {:label => _('Situation'), :type_if => proc { |klass| klass.kind_of?(Enterprise) }, 14 :solr_plugin_f_enabled => {:label => _('Situation'), :type_if => proc { |klass| klass.kind_of?(Enterprise) },
15 :proc => proc { |id| solr_plugin_f_enabled_proc(id) }}, 15 :proc => proc { |id| solr_plugin_f_enabled_proc(id) }},
16 - :solr_plugin_f_region => {:label => _('City'), :proc => proc { |id| solr_plugin_f_region_proc(id) }},  
17 - :solr_plugin_f_profile_type => {:label => _('Type'), :proc => proc{|klass| solr_plugin_f_profile_type_proc(klass)}}, 16 + :solr_plugin_f_region => {:label => c_('City'), :proc => proc { |id| solr_plugin_f_region_proc(id) }},
  17 + :solr_plugin_f_profile_type => {:label => c_('Type'), :proc => proc{|klass| solr_plugin_f_profile_type_proc(klass)}},
18 :solr_plugin_f_categories => {:multi => true, :proc => proc {|facet, id| solr_plugin_f_categories_proc(facet, id)}, 18 :solr_plugin_f_categories => {:multi => true, :proc => proc {|facet, id| solr_plugin_f_categories_proc(facet, id)},
19 :label => proc { |env| solr_plugin_f_categories_label_proc(env) }, :label_abbrev => proc{ |env| solr_plugin_f_categories_label_abbrev_proc(env) }}, 19 :label => proc { |env| solr_plugin_f_categories_label_proc(env) }, :label_abbrev => proc{ |env| solr_plugin_f_categories_label_abbrev_proc(env) }},
20 }, :category_query => proc { |c| "solr_plugin_category_filter:#{c.id}" }, 20 }, :category_query => proc { |c| "solr_plugin_category_filter:#{c.id}" },
plugins/solr/lib/solr_plugin/search_helper.rb
@@ -10,7 +10,7 @@ module SolrPlugin::SearchHelper @@ -10,7 +10,7 @@ module SolrPlugin::SearchHelper
10 10
11 SortOptions = { 11 SortOptions = {
12 :products => ActiveSupport::OrderedHash[ :none, {:label => _('Relevance')}, 12 :products => ActiveSupport::OrderedHash[ :none, {:label => _('Relevance')},
13 - :more_recent, {:label => _('More recent'), :solr_opts => {:sort => 'updated_at desc, score desc'}}, 13 + :more_recent, {:label => c_('More recent'), :solr_opts => {:sort => 'updated_at desc, score desc'}},
14 :name, {:label => _('Name'), :solr_opts => {:sort => 'solr_plugin_name_sortable asc'}}, 14 :name, {:label => _('Name'), :solr_opts => {:sort => 'solr_plugin_name_sortable asc'}},
15 :closest, {:label => _('Closest to me'), :if => proc{ logged_in? && (profile=current_user.person).lat && profile.lng }, 15 :closest, {:label => _('Closest to me'), :if => proc{ logged_in? && (profile=current_user.person).lat && profile.lng },
16 :solr_opts => {:sort => "geodist() asc", 16 :solr_opts => {:sort => "geodist() asc",
@@ -21,7 +21,7 @@ module SolrPlugin::SearchHelper @@ -21,7 +21,7 @@ module SolrPlugin::SearchHelper
21 ], 21 ],
22 :articles => ActiveSupport::OrderedHash[ :none, {:label => _('Relevance')}, 22 :articles => ActiveSupport::OrderedHash[ :none, {:label => _('Relevance')},
23 :name, {:label => _('Name'), :solr_opts => {:sort => 'solr_plugin_name_sortable asc'}}, 23 :name, {:label => _('Name'), :solr_opts => {:sort => 'solr_plugin_name_sortable asc'}},
24 - :more_recent, {:label => _('More recent'), :solr_opts => {:sort => 'updated_at desc, score desc'}}, 24 + :more_recent, {:label => c_('More recent'), :solr_opts => {:sort => 'updated_at desc, score desc'}},
25 ], 25 ],
26 :enterprises => ActiveSupport::OrderedHash[ :none, {:label => _('Relevance')}, 26 :enterprises => ActiveSupport::OrderedHash[ :none, {:label => _('Relevance')},
27 :name, {:label => _('Name'), :solr_opts => {:sort => 'solr_plugin_name_sortable asc'}}, 27 :name, {:label => _('Name'), :solr_opts => {:sort => 'solr_plugin_name_sortable asc'}},
plugins/solr/views/search/_facets_menu.html.erb
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 </div> <br /> 22 </div> <br />
23 23
24 <% if facet_count > less_options_limit %> 24 <% if facet_count > less_options_limit %>
25 - <%= link_to_function _("Options"), 25 + <%= link_to_function c_("Options"),
26 "facet_options_toggle('#{facet[:id].to_s}', '#{url_for(params.merge(:action => 'facets_browse', :facet_id => facet[:id], :asset_key => @asset, :escape => false))}'); " + 26 "facet_options_toggle('#{facet[:id].to_s}', '#{url_for(params.merge(:action => 'facets_browse', :facet_id => facet[:id], :asset_key => @asset, :escape => false))}'); " +
27 "jQuery(this).toggleClass('facet-less-options')", :class => "facet-options-toggle" %> 27 "jQuery(this).toggleClass('facet-less-options')", :class => "facet-options-toggle" %>
28 <br /> 28 <br />
plugins/solr/views/search/_results.html.erb
1 -<%= render :partial => 'search_form', :locals => { :hint => _("Type words about the %s you're looking for") % @asset.to_s.singularize } %> 1 +<%= render :partial => 'search_form', :locals => { :hint => c_("Type words about the %s you're looking for") % @asset.to_s.singularize } %>
2 <%= render :partial => 'results_header' %> 2 <%= render :partial => 'results_header' %>
3 3
4 <%= display_results(@searches, @asset) %> 4 <%= display_results(@searches, @asset) %>
plugins/spaminator/views/spaminator_plugin_admin/index.html.erb
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 <% end %> 31 <% end %>
32 32
33 <% button_bar do %> 33 <% button_bar do %>
34 - <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %> 34 + <%= submit_button(:save, c_('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
35 <% end %> 35 <% end %>
36 </div> 36 </div>
37 37
plugins/spaminator/views/spaminator_plugin_admin/reports.html.erb
@@ -30,5 +30,5 @@ @@ -30,5 +30,5 @@
30 <br style='clear: both'/> 30 <br style='clear: both'/>
31 31
32 <% button_bar do %> 32 <% button_bar do %>
33 - <%= button(:back, _('Back'), :action => 'index') %> 33 + <%= button(:back, c_('Back'), :action => 'index') %>
34 <% end %> 34 <% end %>
plugins/statistics/lib/statistics_block.rb
@@ -16,7 +16,7 @@ class StatisticsBlock &lt; Block @@ -16,7 +16,7 @@ class StatisticsBlock &lt; Block
16 ENTERPRISE_COUNTERS = [:user_counter, :tag_counter, :comment_counter, :hit_counter] 16 ENTERPRISE_COUNTERS = [:user_counter, :tag_counter, :comment_counter, :hit_counter]
17 17
18 def self.description 18 def self.description
19 - _('Statistics') 19 + c_('Statistics')
20 end 20 end
21 21
22 def default_title 22 def default_title
plugins/statistics/views/statistics_block.html.erb
@@ -16,10 +16,10 @@ @@ -16,10 +16,10 @@
16 <li class="categories"><span class="amount"><%= block.categories%> </span><span class="label"><%= _('categories')%></span></li> 16 <li class="categories"><span class="amount"><%= block.categories%> </span><span class="label"><%= _('categories')%></span></li>
17 <% end %> 17 <% end %>
18 <% if block.is_visible?('tag_counter') %> 18 <% if block.is_visible?('tag_counter') %>
19 - <li class="tags"><span class="amount"><%= block.tags%> </span><span class="label"><%= _('tags')%></span></li> 19 + <li class="tags"><span class="amount"><%= block.tags%> </span><span class="label"><%= c_('tags')%></span></li>
20 <% end %> 20 <% end %>
21 <% if block.is_visible?('comment_counter') %> 21 <% if block.is_visible?('comment_counter') %>
22 - <li class="comments"><span class="amount"><%= block.comments%> </span><span class="label"><%= _('comments')%></span></li> 22 + <li class="comments"><span class="amount"><%= block.comments%> </span><span class="label"><%= c_('comments')%></span></li>
23 <% end %> 23 <% end %>
24 <% if block.is_visible?('hit_counter') %> 24 <% if block.is_visible?('hit_counter') %>
25 <li class="hits"><span class="amount"><%= block.hits%> </span><span class="label"><%= _('hits')%></span></li> 25 <li class="hits"><span class="amount"><%= block.hits%> </span><span class="label"><%= _('hits')%></span></li>
plugins/stoa/lib/stoa_plugin.rb
@@ -34,7 +34,7 @@ class StoaPlugin &lt; Noosfero::Plugin @@ -34,7 +34,7 @@ class StoaPlugin &lt; Noosfero::Plugin
34 lambda { 34 lambda {
35 content_tag('div', labelled_form_field(_('USP number'), text_field_tag('profile_data[usp_id]', usp_id, :id => 'usp_id_field', :disabled => usp_id.present?)) + 35 content_tag('div', labelled_form_field(_('USP number'), text_field_tag('profile_data[usp_id]', usp_id, :id => 'usp_id_field', :disabled => usp_id.present?)) +
36 content_tag(:small, _('The usp id grants you special powers in the network. Don\'t forget to fill it if you have one.')) + 36 content_tag(:small, _('The usp id grants you special powers in the network. Don\'t forget to fill it if you have one.')) +
37 - content_tag('div', labelled_check_box(_('Public'), '', '', false, :disabled => true, :title => _('This field must be private'), :class => 'disabled'), :class => 'field-privacy-selector'), :class => 'field-with-privacy-selector') + 37 + content_tag('div', labelled_check_box(c_('Public'), '', '', false, :disabled => true, :title => _('This field must be private'), :class => 'disabled'), :class => 'field-privacy-selector'), :class => 'field-with-privacy-selector') +
38 content_tag('div', required(labelled_form_field(_('Birth date (yyyy-mm-dd)'), text_field_tag('birth_date', ''))), :id => 'signup-birth-date', :style => 'display: none') + 38 content_tag('div', required(labelled_form_field(_('Birth date (yyyy-mm-dd)'), text_field_tag('birth_date', ''))), :id => 'signup-birth-date', :style => 'display: none') +
39 content_tag('div', required(labelled_form_field(_('CPF'), text_field_tag('cpf', ''))), :id => 'signup-cpf', :style => 'display:none') + 39 content_tag('div', required(labelled_form_field(_('CPF'), text_field_tag('cpf', ''))), :id => 'signup-cpf', :style => 'display:none') +
40 javascript_include_tag('../plugins/stoa/javascripts/jquery.observe_field', '../plugins/stoa/javascripts/signup_complement') 40 javascript_include_tag('../plugins/stoa/javascripts/jquery.observe_field', '../plugins/stoa/javascripts/signup_complement')
@@ -45,7 +45,7 @@ class StoaPlugin &lt; Noosfero::Plugin @@ -45,7 +45,7 @@ class StoaPlugin &lt; Noosfero::Plugin
45 def login_extra_contents 45 def login_extra_contents
46 proc { 46 proc {
47 content_tag('div', labelled_form_field(_('USP number / Username'), text_field_tag('usp_id_login', '', :id => 'stoa_field_login')) + 47 content_tag('div', labelled_form_field(_('USP number / Username'), text_field_tag('usp_id_login', '', :id => 'stoa_field_login')) +
48 - labelled_form_field(_('Password'), password_field_tag('password', '', :id => 'stoa_field_password')), :id => 'stoa-login-fields') 48 + labelled_form_field(c_('Password'), password_field_tag('password', '', :id => 'stoa_field_password')), :id => 'stoa-login-fields')
49 } 49 }
50 end 50 end
51 51
@@ -107,7 +107,7 @@ class StoaPlugin &lt; Noosfero::Plugin @@ -107,7 +107,7 @@ class StoaPlugin &lt; Noosfero::Plugin
107 end 107 end
108 108
109 def control_panel_buttons 109 def control_panel_buttons
110 - { :title => _('Invite friends'), 110 + { :title => c_('Invite friends'),
111 :icon => 'invite-friends', 111 :icon => 'invite-friends',
112 :url => {:controller => 'invite', 112 :url => {:controller => 'invite',
113 :action => 'select_address_book'} } if context.send(:user) && context.send(:user).usp_id.present? 113 :action => 'select_address_book'} } if context.send(:user) && context.send(:user).usp_id.present?
plugins/sub_organizations/lib/related_organizations_block.rb
@@ -45,7 +45,7 @@ class RelatedOrganizationsBlock &lt; ProfileListBlock @@ -45,7 +45,7 @@ class RelatedOrganizationsBlock &lt; ProfileListBlock
45 params = {:profile => profile.identifier, :controller => 'sub_organizations_plugin_profile', :action => display_type[:action]} 45 params = {:profile => profile.identifier, :controller => 'sub_organizations_plugin_profile', :action => display_type[:action]}
46 params[:type] = type if type == 'enterprise' || type == 'community' 46 params[:type] = type if type == 'enterprise' || type == 'community'
47 proc do 47 proc do
48 - link_to _('View all'), params.merge(params) 48 + link_to c_('View all'), params.merge(params)
49 end 49 end
50 end 50 end
51 51
plugins/sub_organizations/lib/sub_organizations_plugin/relation.rb
@@ -10,12 +10,12 @@ class SubOrganizationsPlugin::Relation &lt; Noosfero::Plugin::ActiveRecord @@ -10,12 +10,12 @@ class SubOrganizationsPlugin::Relation &lt; Noosfero::Plugin::ActiveRecord
10 attr_accessible :parent, :child 10 attr_accessible :parent, :child
11 11
12 def no_self_reference 12 def no_self_reference
13 - errors.add(:child, _('self-reference is not allowed.')) if parent == child 13 + errors.add(:child, c_('self-reference is not allowed.')) if parent == child
14 end 14 end
15 15
16 def no_cyclical_reference 16 def no_cyclical_reference
17 if Organization.children(child).include?(parent) 17 if Organization.children(child).include?(parent)
18 - errors.add(:child, _('cyclical reference is not allowed.')) 18 + errors.add(:child, c_('cyclical reference is not allowed.'))
19 end 19 end
20 end 20 end
21 21
plugins/sub_organizations/lib/sub_organizations_plugin/search_helper.rb
@@ -6,10 +6,10 @@ module SubOrganizationsPlugin::SearchHelper @@ -6,10 +6,10 @@ module SubOrganizationsPlugin::SearchHelper
6 6
7 def display_selectors(display, float = 'right') 7 def display_selectors(display, float = 'right')
8 display = 'compact' if display.blank? 8 display = 'compact' if display.blank?
9 - compact_link = display == 'compact' ? _('Compact') : link_to(_('Compact'), params.merge(:display => 'compact'))  
10 - full_link = display == 'full' ? _('Full') : link_to(_('Full'), params.merge(:display => 'full')) 9 + compact_link = display == 'compact' ? c_('Compact') : link_to(c_('Compact'), params.merge(:display => 'compact'))
  10 + full_link = display == 'full' ? c_('Full') : link_to(c_('Full'), params.merge(:display => 'full'))
11 content_tag('div', 11 content_tag('div',
12 - content_tag('strong', _('Display')) + ': ' + [compact_link,full_link].compact.join(' | ').html_safe, 12 + content_tag('strong', c_('Display')) + ': ' + [compact_link,full_link].compact.join(' | ').html_safe,
13 :class => 'search-customize-options' 13 :class => 'search-customize-options'
14 ) 14 )
15 end 15 end
plugins/sub_organizations/views/box_organizer/_related_organizations_block.html.erb
1 <div id='edit-related-organizations-block'> 1 <div id='edit-related-organizations-block'>
2 <label for="block_organization_type"><%= _('Type of organizations to be displayed') %></label><br/> 2 <label for="block_organization_type"><%= _('Type of organizations to be displayed') %></label><br/>
3 - <%= select_tag('block[organization_type]', options_for_select([[_('Both'), 'both'], [_('Community'), 'community'], [_('Enterprise'), 'enterprise']], @block.organization_type)) %>  
4 - <%= labelled_form_field _('Limit of items'), text_field(:block, :limit, :size => 3) %> 3 + <%= select_tag('block[organization_type]', options_for_select([[_('Both'), 'both'], [c_('Community'), 'community'], [c_('Enterprise'), 'enterprise']], @block.organization_type)) %>
  4 + <%= labelled_form_field c_('Limit of items'), text_field(:block, :limit, :size => 3) %>
5 <%= check_box(:block, :prioritize_profiles_with_image) %> 5 <%= check_box(:block, :prioritize_profiles_with_image) %>
6 - <label for="block_prioritize_profiles_with_image"><%= _('Prioritize profiles with image') %></label> 6 + <label for="block_prioritize_profiles_with_image"><%= c_('Prioritize profiles with image') %></label>
7 </div> 7 </div>
plugins/sub_organizations/views/sub_organizations_plugin_myprofile/index.html.erb
@@ -22,8 +22,8 @@ @@ -22,8 +22,8 @@
22 :pre_populate => @tokenized_children}) %> 22 :pre_populate => @tokenized_children}) %>
23 23
24 <% button_bar do %> 24 <% button_bar do %>
25 - <%= submit_button('save', _('Save'))%>  
26 - <%= button('cancel', _('Cancel'), {:controller => 'profile_editor'})%> 25 + <%= submit_button('save', c_('Save'))%>
  26 + <%= button('cancel', c_('Cancel'), {:controller => 'profile_editor'})%>
27 <% end %> 27 <% end %>
28 <% end %> 28 <% end %>
29 29
plugins/sub_organizations/views/sub_organizations_plugin_profile/_full_related_organizations.html.erb
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 <%= excerpt(body_stripped, body_stripped.first(3), 200) if body_stripped %> 20 <%= excerpt(body_stripped, body_stripped.first(3), 200) if body_stripped %>
21 </div> 21 </div>
22 <div class="related-organizations-region"> 22 <div class="related-organizations-region">
23 - <span class="related-organizations-region-label"><%= _("City") %></span> 23 + <span class="related-organizations-region-label"><%= c_("City") %></span>
24 <% if organization.region %> 24 <% if organization.region %>
25 <span class="related-organizations-region-name"><%= city_with_state(organization.region) %></span> 25 <span class="related-organizations-region-name"><%= city_with_state(organization.region) %></span>
26 <% elsif organization.city and organization.state %> 26 <% elsif organization.city and organization.state %>
@@ -52,11 +52,11 @@ @@ -52,11 +52,11 @@
52 </div> 52 </div>
53 53
54 <% button_bar(:class => "related-organizations-button-bar") do %> 54 <% button_bar(:class => "related-organizations-button-bar") do %>
55 - <%= button :back, _('Go back'), { :controller => 'profile' } %> 55 + <%= button :back, c_('Go back'), { :controller => 'profile' } %>
56 <%= button :add, _("Add a new #{organization_type}"), :controller => 'sub_organizations_plugin_myprofile', :action => 'index' if logged_in? && user.has_permission?(:edit_profile, profile) && !environment.enabled?("disable_asset_#{organization_type.pluralize}") %> 56 <%= button :add, _("Add a new #{organization_type}"), :controller => 'sub_organizations_plugin_myprofile', :action => 'index' if logged_in? && user.has_permission?(:edit_profile, profile) && !environment.enabled?("disable_asset_#{organization_type.pluralize}") %>
57 57
58 <% if !@full %> 58 <% if !@full %>
59 - <%= button :more, _('View all'), { :controller => 'sub_organizations_plugin_profile', :action => params[:action], :type => organization_type } %> 59 + <%= button :more, c_('View all'), { :controller => 'sub_organizations_plugin_profile', :action => params[:action], :type => organization_type } %>
60 <% end %> 60 <% end %>
61 <% end %> 61 <% end %>
62 62
plugins/sub_organizations/views/sub_organizations_plugin_profile/_related_organizations.html.erb
@@ -10,11 +10,11 @@ @@ -10,11 +10,11 @@
10 <li><%= _("There are no sub-#{organization_type.pluralize} yet. " ) %></li> 10 <li><%= _("There are no sub-#{organization_type.pluralize} yet. " ) %></li>
11 <% end %> 11 <% end %>
12 <% button_bar(:class => "related-organizations-button-bar") do %> 12 <% button_bar(:class => "related-organizations-button-bar") do %>
13 - <%= button :back, _('Go back'), { :controller => 'profile' } %> 13 + <%= button :back, c_('Go back'), { :controller => 'profile' } %>
14 <%= button :add, _("Add a new #{organization_type}"), :controller => 'sub_organizations_plugin_myprofile', :action => 'index' if logged_in? && user.has_permission?(:edit_profile, profile) && !environment.enabled?("disable_asset_#{organization_type.pluralize}") %> 14 <%= button :add, _("Add a new #{organization_type}"), :controller => 'sub_organizations_plugin_myprofile', :action => 'index' if logged_in? && user.has_permission?(:edit_profile, profile) && !environment.enabled?("disable_asset_#{organization_type.pluralize}") %>
15 15
16 <% if !@full %> 16 <% if !@full %>
17 - <%= button :more, _('View all'), { :controller => 'sub_organizations_plugin_profile', :action => params[:action], :type => organization_type } %> 17 + <%= button :more, c_('View all'), { :controller => 'sub_organizations_plugin_profile', :action => params[:action], :type => organization_type } %>
18 <% end %> 18 <% end %>
19 <% end %> 19 <% end %>
20 </div> 20 </div>
plugins/tolerance_time/views/tolerance_time_plugin_myprofile/index.html.erb
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 <%= content_tag( 'small', _('Empty means unlimited and zero means right away.') ) %> 18 <%= content_tag( 'small', _('Empty means unlimited and zero means right away.') ) %>
19 19
20 <% button_bar do %> 20 <% button_bar do %>
21 - <%= submit_button('save', _('Save'))%>  
22 - <%= button('back', _('Back'), {:controller => 'profile_editor'})%> 21 + <%= submit_button('save', c_('Save'))%>
  22 + <%= button('back', c_('Back'), {:controller => 'profile_editor'})%>
23 <% end %> 23 <% end %>
24 <% end %> 24 <% end %>
plugins/vote/views/vote_plugin_admin/index.html.erb
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </strong> 14 </strong>
15 15
16 <% button_bar do %> 16 <% button_bar do %>
17 - <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %> 17 + <%= submit_button(:save, c_('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
18 <% end %> 18 <% end %>
19 19
20 <% end %> 20 <% end %>
plugins/work_assignment/lib/work_assignment_plugin/helper.rb
@@ -3,7 +3,7 @@ module WorkAssignmentPlugin::Helper @@ -3,7 +3,7 @@ module WorkAssignmentPlugin::Helper
3 return if work_assignment.submissions.empty? 3 return if work_assignment.submissions.empty?
4 content_tag('table', 4 content_tag('table',
5 content_tag('tr', 5 content_tag('tr',
6 - content_tag('th', _('Author'), :style => 'width: 50%') + 6 + content_tag('th', c_('Author'), :style => 'width: 50%') +
7 content_tag('th', _('Submission date')) + 7 content_tag('th', _('Submission date')) +
8 content_tag('th', _('Versions'), :style => 'text-align: center') + 8 content_tag('th', _('Versions'), :style => 'text-align: center') +
9 content_tag('th', '') 9 content_tag('th', '')