From d4587481eb77bbf607c3b2799e06aea99a2a9a85 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Thu, 15 Jan 2015 10:33:21 -0200 Subject: [PATCH] Deduplicate strings from plugins --- plugins/anti_spam/views/anti_spam_plugin_admin/index.html.erb | 2 +- plugins/breadcrumbs/lib/breadcrumbs_plugin/content_breadcrumbs_block.rb | 2 +- plugins/bsc/lib/bsc_plugin.rb | 2 +- plugins/bsc/lib/bsc_plugin/bsc_helper.rb | 6 +++--- plugins/bsc/lib/bsc_plugin/contract.rb | 2 +- plugins/bsc/views/bsc_plugin_admin/new.html.erb | 4 ++-- plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb | 4 ++-- plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb | 12 ++++++------ plugins/bsc/views/bsc_plugin_myprofile/create_enterprise.html.erb | 4 ++-- plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb | 4 ++-- plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb | 8 ++++---- plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb | 4 ++-- plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb | 10 +++++----- plugins/bsc/views/profile/_profile_tab.html.erb | 4 ++-- plugins/bsc/views/shared/_fields.html.erb | 10 +++++----- plugins/comment_classification/views/comment_classification_plugin_labels/_form.html.erb | 2 +- plugins/comment_classification/views/comment_classification_plugin_labels/index.html.erb | 6 +++--- plugins/comment_classification/views/comment_classification_plugin_myprofile/_status_form.html.erb | 2 +- plugins/comment_classification/views/comment_classification_plugin_myprofile/add_status.html.erb | 6 +++--- plugins/comment_classification/views/comment_classification_plugin_status/_form.html.erb | 2 +- plugins/comment_classification/views/comment_classification_plugin_status/index.html.erb | 6 +++--- plugins/comment_group/views/comment_group_plugin_profile/view_comments.rjs | 2 +- plugins/community_block/views/community_block.html.erb | 6 +++--- plugins/community_track/views/blocks/_track_card.html.erb | 2 +- plugins/community_track/views/blocks/_track_list_more.html.erb | 2 +- plugins/community_track/views/box_organizer/community_track_plugin/_track_list_block.html.erb | 2 +- plugins/community_track/views/cms/community_track_plugin/_track.html.erb | 2 +- plugins/community_track/views/community_track_plugin_public/select_community.html.erb | 2 +- plugins/community_track/views/content_viewer/_step_item.html.erb | 2 +- plugins/community_track/views/content_viewer/step.html.erb | 2 +- plugins/community_track/views/content_viewer/track.html.erb | 2 +- plugins/container_block/lib/container_block_plugin/container_block.rb | 2 +- plugins/container_block/views/blocks/container.html.erb | 2 +- plugins/context_content/views/box_organizer/context_content_plugin/_context_content_block.html.erb | 2 +- plugins/custom_forms/lib/custom_forms_plugin/helper.rb | 12 ++++++------ plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_select.html.erb | 8 ++++---- plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_field.html.erb | 4 ++-- plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_option.html.erb | 2 +- plugins/custom_forms/views/custom_forms_plugin_myprofile/_field.html.erb | 2 +- plugins/custom_forms/views/custom_forms_plugin_myprofile/_form.html.erb | 6 +++--- plugins/custom_forms/views/custom_forms_plugin_myprofile/custom_forms_plugin/_select_field.html.erb | 2 +- plugins/custom_forms/views/custom_forms_plugin_myprofile/index.html.erb | 4 ++-- plugins/custom_forms/views/custom_forms_plugin_myprofile/submissions.html.erb | 4 ++-- plugins/custom_forms/views/custom_forms_plugin_profile/show.html.erb | 4 ++-- plugins/display_content/lib/display_content_block.rb | 32 ++++++++++++++++---------------- plugins/google_analytics/views/profile-editor-extras.rhtml | 2 +- plugins/ldap/views/ldap_plugin_admin/index.html.erb | 6 +++--- plugins/people_block/lib/friends_block.rb | 2 +- plugins/people_block/lib/members_block.rb | 2 +- plugins/people_block/lib/people_block.rb | 2 +- plugins/people_block/lib/people_block_base.rb | 4 ++-- plugins/people_block/views/blocks/members.html.erb | 2 +- plugins/people_block/views/blocks/people.html.erb | 2 +- plugins/people_block/views/box_organizer/_people_block_base.html.erb | 4 ++-- plugins/piwik/views/piwik_plugin_admin/index.html.erb | 2 +- plugins/recent_content/lib/recent_content_block.rb | 2 +- plugins/recent_content/views/blocks/recent_content_block.html.erb | 2 +- plugins/send_email/lib/send_email_plugin/mail.rb | 2 +- plugins/send_email/views/send_email_plugin/fail.html.erb | 2 +- plugins/send_email/views/send_email_plugin/success.html.erb | 6 +++--- plugins/send_email/views/send_email_plugin_admin/index.html.erb | 2 +- plugins/shopping_cart/lib/shopping_cart_plugin/cart_helper.rb | 2 +- plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb | 14 +++++++------- plugins/shopping_cart/views/shopping_cart_plugin/mailer/customer_notification.html.erb | 6 +++--- plugins/shopping_cart/views/shopping_cart_plugin/mailer/supplier_notification.html.erb | 6 +++--- plugins/shopping_cart/views/shopping_cart_plugin_myprofile/_orders_list.html.erb | 4 ++-- plugins/shopping_cart/views/shopping_cart_plugin_myprofile/_products_list.html.erb | 2 +- plugins/shopping_cart/views/shopping_cart_plugin_myprofile/edit.html.erb | 6 +++--- plugins/shopping_cart/views/shopping_cart_plugin_myprofile/reports.html.erb | 6 +++--- plugins/shopping_cart/views/shopping_cart_plugin_profile/buy.html.erb | 10 +++++----- plugins/solr/lib/acts_as_faceted.rb | 6 +++--- plugins/solr/lib/ext/article.rb | 8 ++++---- plugins/solr/lib/ext/product.rb | 4 ++-- plugins/solr/lib/ext/profile.rb | 6 +++--- plugins/solr/lib/solr_plugin/search_helper.rb | 4 ++-- plugins/solr/views/search/_facets_menu.html.erb | 2 +- plugins/solr/views/search/_results.html.erb | 2 +- plugins/spaminator/views/spaminator_plugin_admin/index.html.erb | 2 +- plugins/spaminator/views/spaminator_plugin_admin/reports.html.erb | 2 +- plugins/statistics/lib/statistics_block.rb | 2 +- plugins/statistics/views/statistics_block.html.erb | 4 ++-- plugins/stoa/lib/stoa_plugin.rb | 6 +++--- plugins/sub_organizations/lib/related_organizations_block.rb | 2 +- plugins/sub_organizations/lib/sub_organizations_plugin/relation.rb | 4 ++-- plugins/sub_organizations/lib/sub_organizations_plugin/search_helper.rb | 6 +++--- plugins/sub_organizations/views/box_organizer/_related_organizations_block.html.erb | 6 +++--- plugins/sub_organizations/views/sub_organizations_plugin_myprofile/index.html.erb | 4 ++-- plugins/sub_organizations/views/sub_organizations_plugin_profile/_full_related_organizations.html.erb | 6 +++--- plugins/sub_organizations/views/sub_organizations_plugin_profile/_related_organizations.html.erb | 4 ++-- plugins/tolerance_time/views/tolerance_time_plugin_myprofile/index.html.erb | 4 ++-- plugins/vote/views/vote_plugin_admin/index.html.erb | 2 +- plugins/work_assignment/lib/work_assignment_plugin/helper.rb | 2 +- 92 files changed, 200 insertions(+), 200 deletions(-) diff --git a/plugins/anti_spam/views/anti_spam_plugin_admin/index.html.erb b/plugins/anti_spam/views/anti_spam_plugin_admin/index.html.erb index 2494f3f..c539b4d 100644 --- a/plugins/anti_spam/views/anti_spam_plugin_admin/index.html.erb +++ b/plugins/anti_spam/views/anti_spam_plugin_admin/index.html.erb @@ -7,7 +7,7 @@ <%= labelled_form_field _('API key'), f.text_field(:api_key, :size => 40) %> <% button_bar do %> - <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %> + <%= submit_button(:save, c_('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %> <% end %> <% end %> diff --git a/plugins/breadcrumbs/lib/breadcrumbs_plugin/content_breadcrumbs_block.rb b/plugins/breadcrumbs/lib/breadcrumbs_plugin/content_breadcrumbs_block.rb index 2cd4749..1f1a649 100644 --- a/plugins/breadcrumbs/lib/breadcrumbs_plugin/content_breadcrumbs_block.rb +++ b/plugins/breadcrumbs/lib/breadcrumbs_plugin/content_breadcrumbs_block.rb @@ -53,7 +53,7 @@ class BreadcrumbsPlugin::ContentBreadcrumbsBlock < Block protected - CMS_ACTIONS = {:edit => _('Edit'), :upload_files => _('Upload Files'), :new => _('New')} + CMS_ACTIONS = {:edit => c_('Edit'), :upload_files => _('Upload Files'), :new => c_('New')} def cms_action(action) CMS_ACTIONS[action.to_sym] || action diff --git a/plugins/bsc/lib/bsc_plugin.rb b/plugins/bsc/lib/bsc_plugin.rb index 3f70c39..17eca13 100644 --- a/plugins/bsc/lib/bsc_plugin.rb +++ b/plugins/bsc/lib/bsc_plugin.rb @@ -101,7 +101,7 @@ class BscPlugin < Noosfero::Plugin else content = lambda { product.enterprise.name } end - properties << { :name => _('Supplier'), :content => content } + properties << { :name => c_('Supplier'), :content => content } end def profile_tabs diff --git a/plugins/bsc/lib/bsc_plugin/bsc_helper.rb b/plugins/bsc/lib/bsc_plugin/bsc_helper.rb index 04bba0a..01da4c4 100644 --- a/plugins/bsc/lib/bsc_plugin/bsc_helper.rb +++ b/plugins/bsc/lib/bsc_plugin/bsc_helper.rb @@ -4,9 +4,9 @@ module BscPlugin::BscHelper def token_input_field_tag(name, element_id, search_action, options = {}, text_field_options = {}, html_options = {}) options[:min_chars] ||= 3 - options[:hint_text] ||= _("Type in a search term") - options[:no_results_text] ||= _("No results") - options[:searching_text] ||= _("Searching...") + options[:hint_text] ||= c_("Type in a search term") + options[:no_results_text] ||= c_("No results") + options[:searching_text] ||= c_("Searching...") options[:search_delay] ||= 1000 options[:prevent_duplicates] ||= true options[:backspace_delete_item] ||= false diff --git a/plugins/bsc/lib/bsc_plugin/contract.rb b/plugins/bsc/lib/bsc_plugin/contract.rb index 9184d48..d89cf60 100644 --- a/plugins/bsc/lib/bsc_plugin/contract.rb +++ b/plugins/bsc/lib/bsc_plugin/contract.rb @@ -43,7 +43,7 @@ class BscPlugin::Contract < Noosfero::Plugin::ActiveRecord end def self.names - [_('State'), _('Federal')] + [c_('State'), _('Federal')] end end diff --git a/plugins/bsc/views/bsc_plugin_admin/new.html.erb b/plugins/bsc/views/bsc_plugin_admin/new.html.erb index 8989365..af3baba 100644 --- a/plugins/bsc/views/bsc_plugin_admin/new.html.erb +++ b/plugins/bsc/views/bsc_plugin_admin/new.html.erb @@ -5,7 +5,7 @@ <%= render :partial => 'shared/fields', :locals => {:f => f, :profile => @bsc} %> <% button_bar do %> - <%= submit_button('save', _('Save')) %> - <%= button('cancel', _('Cancel'), {:controller => 'admin_panel'}) %> + <%= submit_button('save', c_('Save')) %> + <%= button('cancel', c_('Cancel'), {:controller => 'admin_panel'}) %> <% end %> <% end %> diff --git a/plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb b/plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb index 57c04f9..de8a293 100644 --- a/plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb +++ b/plugins/bsc/views/bsc_plugin_admin/validate_enterprises.html.erb @@ -6,7 +6,7 @@ :focus => true }) %> <% button_bar do %> - <%= submit_button('save', _('Save'))%> - <%= button('cancel', _('Cancel'), {:controller => 'admin_panel'})%> + <%= submit_button('save', c_('Save'))%> + <%= button('cancel', c_('Cancel'), {:controller => 'admin_panel'})%> <% end %> <% end %> diff --git a/plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb b/plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb index e746aa3..e70dd2f 100644 --- a/plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb +++ b/plugins/bsc/views/bsc_plugin_myprofile/_contract_form.html.erb @@ -10,7 +10,7 @@ <%= labelled_form_field(_('Status'), f.select(:status, BscPlugin::Contract::Status.types. map { |s| [BscPlugin::Contract::Status.names[s], s] })) %> <%= f.text_field(:number_of_producers, :size => 8, :id => 'bsc-plugin-contract-spinner') %> - <%= _('Enterprises')+':' %> + <%= c_('Enterprises')+':' %> <% search_action = {:action => 'search_contract_enterprises', :profile => profile.identifier} %> <%= token_input_field_tag(:enterprises, 'involved-enterprises', search_action, @@ -19,7 +19,7 @@ - + @@ -34,13 +34,13 @@ <%= labelled_form_field( _('Supply period'), text_field_tag('contract[supply_start]', (@contract.supply_start ? @contract.supply_start.strftime("%Y-%m-%d") : nil), :id => 'from', :size => 9) + - _(' to ') + + c_(' to ') + text_field_tag('contract[supply_end]', (@contract.supply_end ? @contract.supply_end.strftime("%Y-%m-%d") : nil), :id => 'to', :size => 9) ) %> <%= f.text_area(:annotations, :rows => 5, :cols => 68) %> <% button_bar do%> - <%= submit_button(:save, _('Save'), :cancel => {:action => 'manage_contracts'})%> + <%= submit_button(:save, c_('Save'), :cancel => {:action => 'manage_contracts'})%> <% end %> <% end %> @@ -55,8 +55,8 @@ BSCContracts.tokenInputOptions = { minChars: 3, hintText: <%= _('Type in a search term for product').to_json %>, - noResultsText: <%= _("No results").to_json %>, - searchingText: <%= _("Searching...").to_json %>, + noResultsText: <%= c_("No results").to_json %>, + searchingText: <%= c_("Searching...").to_json %>, searchDelay: 1000, preventDuplicates: true, backspaceDeleteItem: false, diff --git a/plugins/bsc/views/bsc_plugin_myprofile/create_enterprise.html.erb b/plugins/bsc/views/bsc_plugin_myprofile/create_enterprise.html.erb index 31ba9b0..2ec7a2d 100644 --- a/plugins/bsc/views/bsc_plugin_myprofile/create_enterprise.html.erb +++ b/plugins/bsc/views/bsc_plugin_myprofile/create_enterprise.html.erb @@ -9,12 +9,12 @@ <%= required f.text_field 'name', :onchange => "updateUrlField(this, 'create_enterprise_identifier')", :size => 40 %> <%= render :partial => 'shared/organization_custom_fields', :locals => { :f => f, :object_name => :create_enterprise, :profile => @create_enterprise } %>

- <%= required labelled_form_field(_('Address'), content_tag('code', environment.top_url + "/" + text_field(:create_enterprise, 'identifier', :size => 26))) %> + <%= required labelled_form_field(c_('Address'), content_tag('code', environment.top_url + "/" + text_field(:create_enterprise, 'identifier', :size => 26))) %>

<%= render :partial => 'similar_enterprises', :locals => {:bsc => profile}%> <% button_bar do %> - <%= submit_button('save', _('Save'), :cancel => {:controller => 'profile_editor', :profile => profile.identifier}) %> + <%= submit_button('save', c_('Save'), :cancel => {:controller => 'profile_editor', :profile => profile.identifier}) %> <% end %> <% end %> diff --git a/plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb b/plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb index 9a445bc..b56cb50 100644 --- a/plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb +++ b/plugins/bsc/views/bsc_plugin_myprofile/manage_associated_enterprises.html.erb @@ -19,8 +19,8 @@ <%= button('add', _('Add new enterprise'), {:action => 'create_enterprise'}) %> <% button_bar do %> - <%= submit_button('save', _('Save'))%> - <%= button('cancel', _('Cancel'), {:controller => 'profile_editor'})%> + <%= submit_button('save', c_('Save'))%> + <%= button('cancel', c_('Cancel'), {:controller => 'profile_editor'})%> <% end %> <% end %> diff --git a/plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb b/plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb index cf74aad..c1b3429 100644 --- a/plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb +++ b/plugins/bsc/views/bsc_plugin_myprofile/manage_contracts.html.erb @@ -9,7 +9,7 @@
<% end %>
- <%= submit_button(:save, _('Filter')) %> + <%= submit_button(:save, c_('Filter')) %>
@@ -31,8 +31,8 @@ <%= content_tag('i', show_date(contract.created_at)) %>
<% end %> @@ -41,7 +41,7 @@ <% end %> <% button_bar do %> - <%= button(:back, _('Go back'), :controller => 'profile_editor') %> + <%= button(:back, c_('Go back'), :controller => 'profile_editor') %> <%= button(:new, _('Create new contract'), :action => 'new_contract')%> <% end %> diff --git a/plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb b/plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb index 87ed39f..6132bbb 100644 --- a/plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb +++ b/plugins/bsc/views/bsc_plugin_myprofile/transfer_ownership.html.erb @@ -26,7 +26,7 @@ <% end %> <% button_bar do %> - <%= submit_button('save', _('Save'))%> - <%= button('cancel', _('Cancel'), {:controller => 'profile_editor'})%> + <%= submit_button('save', c_('Save'))%> + <%= button('cancel', c_('Cancel'), {:controller => 'profile_editor'})%> <% end %> <% end %> diff --git a/plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb b/plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb index 4891376..d392cc5 100644 --- a/plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb +++ b/plugins/bsc/views/bsc_plugin_myprofile/view_contract.html.erb @@ -6,8 +6,8 @@ <%= display_text_field(_('Client type'), BscPlugin::Contract::ClientType.names[@contract.client_type]) %> <%= display_text_field(_('Business type'), BscPlugin::Contract::BusinessType.names[@contract.business_type]) %> - <%= display_text_field(_('State'), @contract.state) %> - <%= display_text_field(_('City'), @contract.city) %> + <%= display_text_field(c_('State'), @contract.state) %> + <%= display_text_field(c_('City'), @contract.city) %> <%= display_text_field(_('Status'), BscPlugin::Contract::Status.names[@contract.status]) %> <%= display_text_field(_('Number of producers'), @contract.number_of_producers) %> <%= display_text_field(_('Supply period'), show_period(@contract.supply_start, @contract.supply_end, true)) %> @@ -15,7 +15,7 @@
<%= _('Products') %><%= c_('Products') %> <%= _('Quantity') %> <%= _('Unit price') %>
- + <%= display_list_field(@contract.enterprises.map {|enterprise| link_to(enterprise.short_name(60), enterprise.url)}) %>
<%= _('Enterprises') %><%= c_('Enterprises') %>
@@ -23,7 +23,7 @@ <% if !@contract.sales.blank?%> - + @@ -51,5 +51,5 @@ <% end %> <% button_bar do %> - <%= button(:back, _('Go back'), :action => 'manage_contracts') %> + <%= button(:back, c_('Go back'), :action => 'manage_contracts') %> <% end %> diff --git a/plugins/bsc/views/profile/_profile_tab.html.erb b/plugins/bsc/views/profile/_profile_tab.html.erb index 3fba233..dd4a969 100644 --- a/plugins/bsc/views/profile/_profile_tab.html.erb +++ b/plugins/bsc/views/profile/_profile_tab.html.erb @@ -1,6 +1,6 @@ diff --git a/plugins/bsc/views/shared/_fields.html.erb b/plugins/bsc/views/shared/_fields.html.erb index 1175915..833ee07 100644 --- a/plugins/bsc/views/shared/_fields.html.erb +++ b/plugins/bsc/views/shared/_fields.html.erb @@ -35,11 +35,11 @@ text_field(:profile_data, :identifier, :onchange => "warn_value_change()", :size => 25) ) + content_tag('div', - content_tag('strong', _('WARNING!')) + ' ' + + content_tag('strong', c_('WARNING!')) + ' ' + _("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?") + content_tag('div', - button_to_function(:ok, _("Yes"), "confirm_change()") + ' ' + - button_to_function(:cancel, _('No'), 'no_change()') + button_to_function(:ok, c_("Yes"), "confirm_change()") + ' ' + + button_to_function(:cancel, c_('No'), 'no_change()') ), :id => 'identifier-change-confirmation', :class => 'change-confirmation', @@ -57,10 +57,10 @@
- <%= _('Location')%> + <%= c_('Location')%> <%= f.text_field(:address) %> <%= f.text_field(:zip_code) %> <%= f.text_field(:city) %> <%= f.text_field(:state) %> - <%= select_country(_('Country'), :profile_data, 'country', {:class => 'type-select'}) %> + <%= select_country(c_('Country'), :profile_data, 'country', {:class => 'type-select'}) %>
diff --git a/plugins/comment_classification/views/comment_classification_plugin_labels/_form.html.erb b/plugins/comment_classification/views/comment_classification_plugin_labels/_form.html.erb index 35f377e..9c0a303 100644 --- a/plugins/comment_classification/views/comment_classification_plugin_labels/_form.html.erb +++ b/plugins/comment_classification/views/comment_classification_plugin_labels/_form.html.erb @@ -8,6 +8,6 @@ <%= labelled_form_field(f.check_box(:enabled) + _('Enable this label?'),'') %> <% button_bar do %> - <%= submit_button('save', _('Save'), :cancel => {:action => 'index'} ) %> + <%= submit_button('save', c_('Save'), :cancel => {:action => 'index'} ) %> <% end %> <% end %> diff --git a/plugins/comment_classification/views/comment_classification_plugin_labels/index.html.erb b/plugins/comment_classification/views/comment_classification_plugin_labels/index.html.erb index 62a1fa6..2e9607c 100644 --- a/plugins/comment_classification/views/comment_classification_plugin_labels/index.html.erb +++ b/plugins/comment_classification/views/comment_classification_plugin_labels/index.html.erb @@ -17,8 +17,8 @@ <% end %> @@ -27,6 +27,6 @@ <% button_bar do %> <%= button(:add, _('Add a new label'), :action => 'create')%> - <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %> + <%= button :back, c_('Back to admin panel'), :controller => 'admin_panel' %> <% end %> diff --git a/plugins/comment_classification/views/comment_classification_plugin_myprofile/_status_form.html.erb b/plugins/comment_classification/views/comment_classification_plugin_myprofile/_status_form.html.erb index 7a7fb41..fddeeec 100644 --- a/plugins/comment_classification/views/comment_classification_plugin_myprofile/_status_form.html.erb +++ b/plugins/comment_classification/views/comment_classification_plugin_myprofile/_status_form.html.erb @@ -7,6 +7,6 @@ <%= labelled_form_field(_('Reason:'), f.text_area(:reason, :rows => 5)) %> <% button_bar do %> - <%= submit_button('save', _('Save') ) %> + <%= submit_button('save', c_('Save') ) %> <% end %> <% end %> diff --git a/plugins/comment_classification/views/comment_classification_plugin_myprofile/add_status.html.erb b/plugins/comment_classification/views/comment_classification_plugin_myprofile/add_status.html.erb index b047cf6..1439696 100644 --- a/plugins/comment_classification/views/comment_classification_plugin_myprofile/add_status.html.erb +++ b/plugins/comment_classification/views/comment_classification_plugin_myprofile/add_status.html.erb @@ -2,13 +2,13 @@
<% unless @comment.title.blank? %> -
<%= _("Title: %s") % @comment.title %>
+
<%= c_("Title: %s") % @comment.title %>
<% end %> - <%= _('Body:') %> + <%= c_('Body:') %>

<%= @comment.body %>

-

<%= _("History") %>

+

<%= c_("History") %>

<% end %> @@ -27,6 +27,6 @@ <% button_bar do %> <%= button(:add, _('Add a new status'), :action => 'create')%> - <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %> + <%= button :back, c_('Back to admin panel'), :controller => 'admin_panel' %> <% end %> diff --git a/plugins/comment_group/views/comment_group_plugin_profile/view_comments.rjs b/plugins/comment_group/views/comment_group_plugin_profile/view_comments.rjs index 58fc7eb..7e46837 100644 --- a/plugins/comment_group/views/comment_group_plugin_profile/view_comments.rjs +++ b/plugins/comment_group/views/comment_group_plugin_profile/view_comments.rjs @@ -8,5 +8,5 @@ page.replace_html "comment-count-#{@group_id}", @comments_count if @no_more_pages page.replace_html "comments_list_group_#{@group_id}_more", "" else - 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) + 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) end diff --git a/plugins/community_block/views/community_block.html.erb b/plugins/community_block/views/community_block.html.erb index 7a1f9c2..a5a4a1c 100644 --- a/plugins/community_block/views/community_block.html.erb +++ b/plugins/community_block/views/community_block.html.erb @@ -11,13 +11,13 @@ if logged_in? if profile.enable_contact? - links.push(_('Send an e-mail') => {:href => url_for({:controller => 'contact', :action => 'new', :profile => profile.identifier})}) + links.push(c_('Send an e-mail') => {:href => url_for({:controller => 'contact', :action => 'new', :profile => profile.identifier})}) end - links.push(_('Report abuse') => {:href => url_for({:controller => 'profile', :action => 'report_abuse', :profile => profile.identifier})}) + links.push(c_('Report abuse') => {:href => url_for({:controller => 'profile', :action => 'report_abuse', :profile => profile.identifier})}) if !user.nil? && user.has_permission?('edit_profile', profile) - links.push(_('Control panel') => {:href => url_for({:controller => 'profile_editor', :profile => profile.identifier})}) + links.push(c_('Control panel') => {:href => url_for({:controller => 'profile_editor', :profile => profile.identifier})}) end %> <%= link_to( diff --git a/plugins/community_track/views/blocks/_track_card.html.erb b/plugins/community_track/views/blocks/_track_card.html.erb index c50425a..ab00076 100644 --- a/plugins/community_track/views/blocks/_track_card.html.erb +++ b/plugins/community_track/views/blocks/_track_card.html.erb @@ -18,7 +18,7 @@
<%= "#{track_card.comments_count}" %> - <%= _('comments') %> + <%= c_('comments') %>
<%= "#{track_card.hits}" %> diff --git a/plugins/community_track/views/blocks/_track_list_more.html.erb b/plugins/community_track/views/blocks/_track_list_more.html.erb index 41755b6..d477880 100644 --- a/plugins/community_track/views/blocks/_track_list_more.html.erb +++ b/plugins/community_track/views/blocks/_track_list_more.html.erb @@ -6,7 +6,7 @@
<% else %>
- <%= 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}")) %> + <%= 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}")) %>
<% end %>
diff --git a/plugins/community_track/views/box_organizer/community_track_plugin/_track_list_block.html.erb b/plugins/community_track/views/box_organizer/community_track_plugin/_track_list_block.html.erb index 113b86a..03ebf8b 100644 --- a/plugins/community_track/views/box_organizer/community_track_plugin/_track_list_block.html.erb +++ b/plugins/community_track/views/box_organizer/community_track_plugin/_track_list_block.html.erb @@ -1,5 +1,5 @@
- <%= labelled_form_field _('Limit of items'), text_field(:block, :limit, :size => 3) %> + <%= labelled_form_field c_('Limit of items'), text_field(:block, :limit, :size => 3) %> <%= labelled_form_field check_box(:block, :more_another_page) + _('Show more at another page'), '' %> <%= select_categories(:block, _('Select Categories')) %>
diff --git a/plugins/community_track/views/cms/community_track_plugin/_track.html.erb b/plugins/community_track/views/cms/community_track_plugin/_track.html.erb index cfd2ff4..5d120e9 100644 --- a/plugins/community_track/views/cms/community_track_plugin/_track.html.erb +++ b/plugins/community_track/views/cms/community_track_plugin/_track.html.erb @@ -4,7 +4,7 @@ <%= render :file => 'shared/tiny_mce' %>
- <%= required labelled_form_field(_('Title'), text_field(:article, 'name', :size => '64', :maxlength => 150)) %> + <%= required labelled_form_field(c_('Title'), text_field(:article, 'name', :size => '64', :maxlength => 150)) %>
<%= render :partial => 'shared/lead_and_body', :locals => {:tiny_mce => true, :body_label => 'Description:'} %> diff --git a/plugins/community_track/views/community_track_plugin_public/select_community.html.erb b/plugins/community_track/views/community_track_plugin_public/select_community.html.erb index 6e38aea..6754c38 100644 --- a/plugins/community_track/views/community_track_plugin_public/select_community.html.erb +++ b/plugins/community_track/views/community_track_plugin_public/select_community.html.erb @@ -13,7 +13,7 @@ <% end %> <% button_bar do %> - <%= button(:add, _('Create a new community'), :controller => 'memberships', :action => 'new_community', :profile => user.identifier, :back_to => @back_to) %> + <%= button(:add, c_('Create a new community'), :controller => 'memberships', :action => 'new_community', :profile => user.identifier, :back_to => @back_to) %> <% end %> <%= form_tag({:controller => 'community_track_plugin_public', :action => 'select_community', :profile => user.identifier}) do %> diff --git a/plugins/community_track/views/content_viewer/_step_item.html.erb b/plugins/community_track/views/content_viewer/_step_item.html.erb index 386222a..bc014e4 100644 --- a/plugins/community_track/views/content_viewer/_step_item.html.erb +++ b/plugins/community_track/views/content_viewer/_step_item.html.erb @@ -35,7 +35,7 @@ <%= expirable_button step_item, :edit, content, url %> <% end %> <% if step_item.accept_uploads? && step_item.allow_create?(user) %> - <%= button('upload-file', _('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => step_item)) unless remove_content_button(:upload)%> + <%= button('upload-file', c_('Upload files'), profile.admin_url.merge(:controller => 'cms', :action => 'upload_files', :parent_id => step_item)) unless remove_content_button(:upload)%> <% end %>
diff --git a/plugins/community_track/views/content_viewer/step.html.erb b/plugins/community_track/views/content_viewer/step.html.erb index 53c3b3f..5930438 100644 --- a/plugins/community_track/views/content_viewer/step.html.erb +++ b/plugins/community_track/views/content_viewer/step.html.erb @@ -2,7 +2,7 @@
diff --git a/plugins/community_track/views/content_viewer/track.html.erb b/plugins/community_track/views/content_viewer/track.html.erb index 5b4e958..3982358 100644 --- a/plugins/community_track/views/content_viewer/track.html.erb +++ b/plugins/community_track/views/content_viewer/track.html.erb @@ -11,7 +11,7 @@ <% if track.allow_create?(user) %>
<%= content_tag('a', :href => url_for({:controller => 'cms', :action => 'new', :type => "CommunityTrackPlugin::Step", :parent_id => track.id}), :class => 'button with-text icon-add') do %> - <%= _("New %s") % CommunityTrackPlugin::Step.short_description %> + <%= c_("New %s") % CommunityTrackPlugin::Step.short_description %> <% end %> <%= _('Reorder Steps') %> <%= submit_button :save, _('Save Order'), :class => "save_button" %> diff --git a/plugins/container_block/lib/container_block_plugin/container_block.rb b/plugins/container_block/lib/container_block_plugin/container_block.rb index 0cb4609..5541e16 100644 --- a/plugins/container_block/lib/container_block_plugin/container_block.rb +++ b/plugins/container_block/lib/container_block_plugin/container_block.rb @@ -10,7 +10,7 @@ class ContainerBlockPlugin::ContainerBlock < Block validate :no_cyclical_reference, :if => 'container_box_id.present?' def no_cyclical_reference - errors.add(:box_id, _('cyclical reference is not allowed.')) if box_id == container_box_id + errors.add(:box_id, c_('cyclical reference is not allowed.')) if box_id == container_box_id end before_save do |b| diff --git a/plugins/container_block/views/blocks/container.html.erb b/plugins/container_block/views/blocks/container.html.erb index 6da5913..50df0d7 100644 --- a/plugins/container_block/views/blocks/container.html.erb +++ b/plugins/container_block/views/blocks/container.html.erb @@ -30,7 +30,7 @@
<%= link_to_remote '', :url => { :controller => controller.boxes_holder.kind_of?(Environment) ? 'container_block_plugin_admin' : 'container_block_plugin_myprofile', :action => 'saveWidths', :id => block.id }, :with => "containerChildrenWidth(#{block.id}, #{block.container_box.id})", - :html => {:class => "button icon-save container_block_save", :id => "container_block_save_#{block.id}", :title => _('Save') }, + :html => {:class => "button icon-save container_block_save", :id => "container_block_save_#{block.id}", :title => c_('Save') }, :loading => "open_loading(DEFAULT_LOADING_MESSAGE);", :loaded => "close_loading();", :complete => "display_notice(request.responseText);"%> diff --git a/plugins/context_content/views/box_organizer/context_content_plugin/_context_content_block.html.erb b/plugins/context_content/views/box_organizer/context_content_plugin/_context_content_block.html.erb index 29fa941..abe6799 100644 --- a/plugins/context_content/views/box_organizer/context_content_plugin/_context_content_block.html.erb +++ b/plugins/context_content/views/box_organizer/context_content_plugin/_context_content_block.html.erb @@ -1,5 +1,5 @@
- <%= labelled_form_field _('Limit of items'), text_field(:block, :limit, :size => 3) %> + <%= labelled_form_field c_('Limit of items'), text_field(:block, :limit, :size => 3) %> <%= labelled_form_field check_box(:block, :show_name) + _('Show content name'), '' %> <%= labelled_form_field check_box(:block, :show_image) + _('Show content image'), '' %> <%= labelled_form_field check_box(:block, :show_parent_content) + _('Show parent content when children is empty'), '' %> diff --git a/plugins/custom_forms/lib/custom_forms_plugin/helper.rb b/plugins/custom_forms/lib/custom_forms_plugin/helper.rb index 6bab99d..6c4027e 100644 --- a/plugins/custom_forms/lib/custom_forms_plugin/helper.rb +++ b/plugins/custom_forms/lib/custom_forms_plugin/helper.rb @@ -10,11 +10,11 @@ module CustomFormsPlugin::Helper end def access_text(form) - return _('Public') if form.access.nil? + return c_('Public') if form.access.nil? return _('Logged users') if form.access == 'logged' if form.access == 'associated' - return _('Members') if form.profile.organization? - return _('Friends') if form.profile.person? + return c_('Members') if form.profile.organization? + return c_('Friends') if form.profile.person? end return _('Custom') end @@ -41,9 +41,9 @@ module CustomFormsPlugin::Helper # TODO add the custom option that should offer the user the hability to # choose the profiles one by one, using something like tokeninput def access_options(profile) - associated = profile.organization? ? _('Members') : _('Friends') + associated = profile.organization? ? c_('Members') : c_('Friends') [ - [_('Public'), nil ], + [c_('Public'), nil ], [_('Logged users'), 'logged' ], [ associated, 'associated'], ] @@ -51,7 +51,7 @@ module CustomFormsPlugin::Helper def type_options [ - [_('Text'), 'text_field' ], + [c_('Text'), 'text_field' ], [_('Select'), 'select_field'] ] end diff --git a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_select.html.erb b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_select.html.erb index c45ea5c..9a89db4 100644 --- a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_select.html.erb +++ b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_edit_select.html.erb @@ -1,10 +1,10 @@
-

<%= _('Options') %>

+

<%= c_('Options') %>

<%= _('Product') %><%= c_('Product') %> <%= _('Quantity') %> <%= _('Unit price') %>
<%= label.color %> <%= label.enabled %> - <%= button_without_text :edit, _('Edit'), {:action => 'edit', :id => label} %> - <%= button_without_text :delete, _('Remove'), {:action => 'destroy', :id => label}, :confirm => _('Are you sure you want to remove this label?') %> + <%= button_without_text :edit, c_('Edit'), {:action => 'edit', :id => label} %> + <%= button_without_text :delete, c_('Remove'), {:action => 'destroy', :id => label}, :confirm => _('Are you sure you want to remove this label?') %>
<%= st.enabled %> <%= st.enable_reason %> - <%= button_without_text :edit, _('Edit'), {:action => 'edit', :id => st} %> - <%= button_without_text :delete, _('Remove'), {:action => 'destroy', :id => st}, :confirm => _('Are you sure you want to remove this status?') %> + <%= button_without_text :edit, c_('Edit'), {:action => 'edit', :id => st} %> + <%= button_without_text :delete, c_('Remove'), {:action => 'destroy', :id => st}, :confirm => _('Are you sure you want to remove this status?') %>
- + <% option_counter = 1 %> <% (field.choices || {}).each do |name, value| %> @@ -19,14 +19,14 @@
<%= _('Name') %> <%= _('Value') %><%= _('Delete') %><%= c_('Delete') %>
-

<%= _('Type') %>

+

<%= c_('Type') %>

<%= labelled_radio_button 'Radio', "fields[#{counter}][kind]", 'radio', !field.multiple && !field.list %>
<%= labelled_radio_button 'Checkbox', "fields[#{counter}][kind]", 'check_box', field.multiple && !field.list %>
<%= labelled_radio_button 'Select', "fields[#{counter}][kind]", 'select', !field.multiple && field.list %>
<%= labelled_radio_button 'Multiple Select', "fields[#{counter}][kind]", 'multiple_select', field.multiple && field.list %>
<% button_bar do %> - <%= button :ok, _('Ok'), '#', :class => 'colorbox-ok-button', :div_id => elem_id %> + <%= button :ok, c_('Ok'), '#', :class => 'colorbox-ok-button', :div_id => elem_id %> <% end %> diff --git a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_field.html.erb b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_field.html.erb index 2ebc66d..6de15e8 100644 --- a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_field.html.erb +++ b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_field.html.erb @@ -4,7 +4,7 @@ <%= check_box "fields[#{counter}]", :mandatory %> <%= hidden_field "fields[#{counter}]", :form_id, :value => @form.id %> - <%= button_without_text :edit, _('Edit'), '', :field_id => counter %> - <%= button_without_text :remove, _('Remove'), '#', :class => 'remove-field', :field_id => counter, :confirm => _('Are you sure you want to remove this field?') %> + <%= button_without_text :edit, c_('Edit'), '', :field_id => counter %> + <%= button_without_text :remove, c_('Remove'), '#', :class => 'remove-field', :field_id => counter, :confirm => _('Are you sure you want to remove this field?') %> diff --git a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_option.html.erb b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_option.html.erb index d1c9c76..7d33f4e 100644 --- a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_option.html.erb +++ b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_empty_option.html.erb @@ -2,7 +2,7 @@ <%= text_field_tag("fields[#{counter}][choices][#{option_counter}][name]") %> <%= text_field_tag("fields[#{counter}][choices][#{option_counter}][value]") %> - <%= 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?') %> + <%= 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?') %> diff --git a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_field.html.erb b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_field.html.erb index 56d2f89..e982a12 100644 --- a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_field.html.erb +++ b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_field.html.erb @@ -1,7 +1,7 @@
> <%= type_to_label(f.object.type) %>
- <%= required f.label :name, _('Name:') %> + <%= required f.label :name, c_('Name:') %> <%= f.text_field :name, :style => 'width: 14em' %> <%= f.hidden_field :type %> diff --git a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_form.html.erb b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_form.html.erb index edd1ddd..0e19263 100644 --- a/plugins/custom_forms/views/custom_forms_plugin_myprofile/_form.html.erb +++ b/plugins/custom_forms/views/custom_forms_plugin_myprofile/_form.html.erb @@ -18,9 +18,9 @@ <%= labelled_check_box _('Triggered after membership'), 'form[on_membership]', '1', @form.on_membership %>

<% end %> -<%= labelled_form_field _('Description'), f.text_area(:description, :style => 'width: 100%', :class => 'mceEditor') %> +<%= labelled_form_field c_('Description'), f.text_area(:description, :style => 'width: 100%', :class => 'mceEditor') %> -

<%= _('Fields') %>

+

<%= c_('Fields') %>

    <%= f.fields_for :fields do |builder| %> @@ -36,7 +36,7 @@
<% button_bar do %> - <%= submit_button :save, _('Save'), :cancel => {:action => 'index'}%> + <%= submit_button :save, c_('Save'), :cancel => {:action => 'index'}%> <% end %> <%= javascript_include_tag '../plugins/custom_forms/field' %> diff --git a/plugins/custom_forms/views/custom_forms_plugin_myprofile/custom_forms_plugin/_select_field.html.erb b/plugins/custom_forms/views/custom_forms_plugin_myprofile/custom_forms_plugin/_select_field.html.erb index 95e1d4e..ebb221b 100644 --- a/plugins/custom_forms/views/custom_forms_plugin_myprofile/custom_forms_plugin/_select_field.html.erb +++ b/plugins/custom_forms/views/custom_forms_plugin_myprofile/custom_forms_plugin/_select_field.html.erb @@ -16,7 +16,7 @@ > <%= _('Alternative') %> <%= _('Preselected') %> - <%= _('Remove') %> + <%= c_('Remove') %> diff --git a/plugins/custom_forms/views/custom_forms_plugin_myprofile/index.html.erb b/plugins/custom_forms/views/custom_forms_plugin_myprofile/index.html.erb index 603a77c..0516a5f 100644 --- a/plugins/custom_forms/views/custom_forms_plugin_myprofile/index.html.erb +++ b/plugins/custom_forms/views/custom_forms_plugin_myprofile/index.html.erb @@ -16,9 +16,9 @@ <%= form.submissions.count > 0 ? link_to(form.submissions.count, {:action => 'submissions', :id => form.id}) : 0 %> <%= access_text(form) %> - <%= button_without_text :edit, _('Edit'), :action => 'edit', :id => form.id %> + <%= button_without_text :edit, c_('Edit'), :action => 'edit', :id => form.id %> <%= button_without_text :search, _('Pending'), :action => 'pending', :id => form.id if form.for_admission %> - <%= button_without_text :remove, _('Remove'), {:action => 'remove', :id => form.id}, :confirm => _('Are you sure you want to remove this form?') %> + <%= button_without_text :remove, c_('Remove'), {:action => 'remove', :id => form.id}, :confirm => _('Are you sure you want to remove this form?') %> <% end %> diff --git a/plugins/custom_forms/views/custom_forms_plugin_myprofile/submissions.html.erb b/plugins/custom_forms/views/custom_forms_plugin_myprofile/submissions.html.erb index f34318d..8167544 100644 --- a/plugins/custom_forms/views/custom_forms_plugin_myprofile/submissions.html.erb +++ b/plugins/custom_forms/views/custom_forms_plugin_myprofile/submissions.html.erb @@ -10,11 +10,11 @@ <%= link_to '[CSV]', :format => 'csv' %>

- <%= labelled_select(_('Sort by')+': ', :sort_by, :first, :last, @sort_by, [['created_at', _('Time')], ['author_name', _('Author')]], :class => 'filter') %> + <%= labelled_select(_('Sort by')+': ', :sort_by, :first, :last, @sort_by, [['created_at', _('Time')], ['author_name', c_('Author')]], :class => 'filter') %>

- + <% @submissions.each do |submission| %> diff --git a/plugins/custom_forms/views/custom_forms_plugin_profile/show.html.erb b/plugins/custom_forms/views/custom_forms_plugin_profile/show.html.erb index d03a0dd..371ef31 100644 --- a/plugins/custom_forms/views/custom_forms_plugin_profile/show.html.erb +++ b/plugins/custom_forms/views/custom_forms_plugin_profile/show.html.erb @@ -22,9 +22,9 @@ <% button_bar do %> <% if @form.expired? %> - <%= submit_button :save, _('Save'), :disabled => '', :class => 'disabled', :cancel => {:controller => :profile, :profile => profile.identifier} %> + <%= submit_button :save, c_('Save'), :disabled => '', :class => 'disabled', :cancel => {:controller => :profile, :profile => profile.identifier} %> <% else %> - <%= submit_button :save, _('Save'), :cancel => {:controller => :profile, :profile => profile.identifier} %> + <%= submit_button :save, c_('Save'), :cancel => {:controller => :profile, :profile => profile.identifier} %> <% end %> <% end %> diff --git a/plugins/display_content/lib/display_content_block.rb b/plugins/display_content/lib/display_content_block.rb index 5857a91..5de69dd 100644 --- a/plugins/display_content/lib/display_content_block.rb +++ b/plugins/display_content/lib/display_content_block.rb @@ -1,18 +1,18 @@ class DisplayContentBlock < Block MONTHS = [ - N_('January'), - N_('February'), - N_('March'), - N_('April'), - N_('May'), - N_('June'), - N_('July'), - N_('August'), - N_('September'), - N_('October'), - N_('November'), - N_('December') + cN_('January'), + cN_('February'), + cN_('March'), + cN_('April'), + cN_('May'), + cN_('June'), + cN_('July'), + cN_('August'), + cN_('September'), + cN_('October'), + cN_('November'), + cN_('December') ] AVAILABLE_SECTIONS = ['publish_date', 'title', 'abstract', 'body', 'image' ,'tags'] @@ -39,11 +39,11 @@ class DisplayContentBlock < Block def section_name(section) { 'publish_date' => _('Publish date'), - 'title' => _('Title'), + 'title' => c_('Title'), 'abstract' => _('Abstract'), - 'body' => _('Body'), - 'image' => _('Image'), - 'tags' => _('Tags') + 'body' => c_('Body'), + 'image' => c_('Image'), + 'tags' => c_('Tags') }[section] || section end diff --git a/plugins/google_analytics/views/profile-editor-extras.rhtml b/plugins/google_analytics/views/profile-editor-extras.rhtml index 478fbd9..4073c6d 100644 --- a/plugins/google_analytics/views/profile-editor-extras.rhtml +++ b/plugins/google_analytics/views/profile-editor-extras.rhtml @@ -1,5 +1,5 @@ <% extend ApplicationHelper %> -

<%= _('Statistics') %>

+

<%= c_('Statistics') %>

<%= labelled_form_field(_('Google Analytics Profile ID'), text_field(:profile_data, :google_analytics_profile_id, :value => profile_id)) %> <%= link_to(_('See how to configure statistics for your profile'), '/doc/plugins/google_analytics', :target => '_blank') %> diff --git a/plugins/ldap/views/ldap_plugin_admin/index.html.erb b/plugins/ldap/views/ldap_plugin_admin/index.html.erb index c467384..0f5dafc 100644 --- a/plugins/ldap/views/ldap_plugin_admin/index.html.erb +++ b/plugins/ldap/views/ldap_plugin_admin/index.html.erb @@ -4,7 +4,7 @@
<%= _('Author') %><%= c_('Author') %> <%= _('Time') %>
- + @@ -46,7 +46,7 @@ - + @@ -61,7 +61,7 @@
<% button_bar do %> - <%= submit_button('save', _('Save changes')) %> + <%= submit_button('save', c_('Save changes')) %> <%= button :back, _('Back to plugins administration panel'), :controller => 'plugins' %> <% end %>
diff --git a/plugins/people_block/lib/friends_block.rb b/plugins/people_block/lib/friends_block.rb index 72e23fd..1456258 100644 --- a/plugins/people_block/lib/friends_block.rb +++ b/plugins/people_block/lib/friends_block.rb @@ -1,7 +1,7 @@ class FriendsBlock < PeopleBlockBase def self.description - _('Friends') + c_('Friends') end def help diff --git a/plugins/people_block/lib/members_block.rb b/plugins/people_block/lib/members_block.rb index a68a134..9abb3d3 100644 --- a/plugins/people_block/lib/members_block.rb +++ b/plugins/people_block/lib/members_block.rb @@ -4,7 +4,7 @@ class MembersBlock < PeopleBlockBase attr_accessible :show_join_leave_button, :visible_role def self.description - _('Members') + c_('Members') end def help diff --git a/plugins/people_block/lib/people_block.rb b/plugins/people_block/lib/people_block.rb index 6b3fe90..2836f35 100644 --- a/plugins/people_block/lib/people_block.rb +++ b/plugins/people_block/lib/people_block.rb @@ -1,7 +1,7 @@ class PeopleBlock < PeopleBlockBase def self.description - _('People') + c_('People') end def help diff --git a/plugins/people_block/lib/people_block_base.rb b/plugins/people_block/lib/people_block_base.rb index 6d6fa08..149b450 100644 --- a/plugins/people_block/lib/people_block_base.rb +++ b/plugins/people_block/lib/people_block_base.rb @@ -10,7 +10,7 @@ class PeopleBlockBase < Block end def help - _('Clicking on the people or groups will take you to their home page.') + c_('Clicking on the people or groups will take you to their home page.') end def default_title @@ -58,7 +58,7 @@ class PeopleBlockBase < Block send(:profile_image_link, item, :minor ) }.join("\n") if list.empty? - list = content_tag 'div', _('None'), :class => 'common-profile-list-block-none' + list = content_tag 'div', c_('None'), :class => 'common-profile-list-block-none' else if !name.blank? && !expanded_address.blank? list << content_tag( diff --git a/plugins/people_block/views/blocks/members.html.erb b/plugins/people_block/views/blocks/members.html.erb index f1c1202..5881147 100644 --- a/plugins/people_block/views/blocks/members.html.erb +++ b/plugins/people_block/views/blocks/members.html.erb @@ -1,4 +1,4 @@ -<%= link_to _('View all'), {:profile => profile.identifier, :controller => 'people_block_plugin_profile', :action => 'members', :role_key => role_key}, :class => 'view-all' %> +<%= link_to c_('View all'), {:profile => profile.identifier, :controller => 'people_block_plugin_profile', :action => 'members', :role_key => role_key}, :class => 'view-all' %> <% if show_join_leave_button %> <%= render :partial => 'blocks/profile_info_actions/join_leave_community' %> diff --git a/plugins/people_block/views/blocks/people.html.erb b/plugins/people_block/views/blocks/people.html.erb index 843a87f..0926c11 100644 --- a/plugins/people_block/views/blocks/people.html.erb +++ b/plugins/people_block/views/blocks/people.html.erb @@ -1 +1 @@ -<%= link_to _('View all'), {:controller => 'search', :action => 'people'}, :class => 'view-all' %> +<%= link_to c_('View all'), {:controller => 'search', :action => 'people'}, :class => 'view-all' %> diff --git a/plugins/people_block/views/box_organizer/_people_block_base.html.erb b/plugins/people_block/views/box_organizer/_people_block_base.html.erb index 0ec382e..cac6ae6 100644 --- a/plugins/people_block/views/box_organizer/_people_block_base.html.erb +++ b/plugins/people_block/views/box_organizer/_people_block_base.html.erb @@ -1,6 +1,6 @@ -<%= labelled_form_field _('Name:'), text_field(:block, :name) %> +<%= labelled_form_field c_('Name:'), text_field(:block, :name) %> -<%= labelled_form_field _('Address:'), text_field(:block, :address) %> +<%= labelled_form_field c_('Address:'), text_field(:block, :address) %> <% if @block.kind_of?(MembersBlock) %> <%= labelled_form_field _('Filter by role:'), '' %> diff --git a/plugins/piwik/views/piwik_plugin_admin/index.html.erb b/plugins/piwik/views/piwik_plugin_admin/index.html.erb index edd31f2..7d8c1bb 100644 --- a/plugins/piwik/views/piwik_plugin_admin/index.html.erb +++ b/plugins/piwik/views/piwik_plugin_admin/index.html.erb @@ -7,7 +7,7 @@ <%= labelled_form_field _('Piwik site id'), f.text_field(:piwik_site_id) %> <% button_bar do %> - <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %> + <%= submit_button(:save, c_('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %> <% end %> <% end %> diff --git a/plugins/recent_content/lib/recent_content_block.rb b/plugins/recent_content/lib/recent_content_block.rb index d7a1ce7..c978faa 100644 --- a/plugins/recent_content/lib/recent_content_block.rb +++ b/plugins/recent_content/lib/recent_content_block.rb @@ -10,7 +10,7 @@ class RecentContentBlock < Block VALID_CONTENT = ['RawHTMLArticle', 'TextArticle', 'TextileArticle', 'TinyMceArticle'] def self.description - _('Recent content') + c_('Recent content') end def help diff --git a/plugins/recent_content/views/blocks/recent_content_block.html.erb b/plugins/recent_content/views/blocks/recent_content_block.html.erb index 8668d64..6a72fe4 100644 --- a/plugins/recent_content/views/blocks/recent_content_block.html.erb +++ b/plugins/recent_content/views/blocks/recent_content_block.html.erb @@ -2,7 +2,7 @@
<% children = block.articles_of_folder(root, block.total_items)%>
- <%= block_title(block.title.blank? ? _("Recent content") : block.title ) %> + <%= block_title(block.title.blank? ? c_("Recent content") : block.title ) %> <% if block.show_blog_picture and !root.image.nil? %>
<%= image_tag(root.image.public_filename(:big)) %> diff --git a/plugins/send_email/lib/send_email_plugin/mail.rb b/plugins/send_email/lib/send_email_plugin/mail.rb index 6ba6690..981fccf 100644 --- a/plugins/send_email/lib/send_email_plugin/mail.rb +++ b/plugins/send_email/lib/send_email_plugin/mail.rb @@ -1,7 +1,7 @@ class SendEmailPlugin::Mail include ActiveModel::Validations - N_('Subject'); N_('Message'); N_('To'); N_('From') + cN_('Subject'); cN_('Message'); N_('To'); cN_('From') attr_accessor :environment, :from, :to, :subject, :message, :params diff --git a/plugins/send_email/views/send_email_plugin/fail.html.erb b/plugins/send_email/views/send_email_plugin/fail.html.erb index ae357eb..8aab04a 100644 --- a/plugins/send_email/views/send_email_plugin/fail.html.erb +++ b/plugins/send_email/views/send_email_plugin/fail.html.erb @@ -1,3 +1,3 @@ <%= error_messages_for 'mail', :header_message => _('The message could not be sent') %> -<%= button :back, _('Back'), :back %> +<%= button :back, c_('Back'), :back %> diff --git a/plugins/send_email/views/send_email_plugin/success.html.erb b/plugins/send_email/views/send_email_plugin/success.html.erb index 287e62f..2cf8458 100644 --- a/plugins/send_email/views/send_email_plugin/success.html.erb +++ b/plugins/send_email/views/send_email_plugin/success.html.erb @@ -1,8 +1,8 @@

<%= _('Message sent') %>

<%= _('Configuration') %><%= c_('Configuration') %> <%= _('Value') %>
<%= _('Attributes') %>
<%= _('Login') %><%= c_('Login') %> <%= text_field :environment, :ldap_plugin_attr_login %>
- - + +
<%= _('Subject') %>:<%=h @mail.subject %>
<%= _('Message') %>:
<%=h render :file => 'send_email_plugin/sender/message' %>
<%= c_('Subject') %>:<%=h @mail.subject %>
<%= c_('Message') %>:
<%=h render :file => 'send_email_plugin/sender/message' %>
-

<%= button :back, _('Back'), :back %>

+

<%= button :back, c_('Back'), :back %>

diff --git a/plugins/send_email/views/send_email_plugin_admin/index.html.erb b/plugins/send_email/views/send_email_plugin_admin/index.html.erb index 14c96f8..44b61b5 100644 --- a/plugins/send_email/views/send_email_plugin_admin/index.html.erb +++ b/plugins/send_email/views/send_email_plugin_admin/index.html.erb @@ -4,6 +4,6 @@ <%= labelled_form_field(_("E-Mail addresses you want to allow to send"), f.text_area(:send_email_plugin_allow_to, :rows => 8)) %> <%= _('(list of email addresses separated by comma)') %> <% button_bar do %> - <%= submit_button 'save', _('Save'), :cancel => {:controller => 'plugins'} %> + <%= submit_button 'save', c_('Save'), :cancel => {:controller => 'plugins'} %> <% end %> <% end %> diff --git a/plugins/shopping_cart/lib/shopping_cart_plugin/cart_helper.rb b/plugins/shopping_cart/lib/shopping_cart_plugin/cart_helper.rb index 73e94ac..8b4981f 100644 --- a/plugins/shopping_cart/lib/shopping_cart_plugin/cart_helper.rb +++ b/plugins/shopping_cart/lib/shopping_cart_plugin/cart_helper.rb @@ -52,7 +52,7 @@ module ShoppingCartPlugin::CartHelper content_tag('tr', content_tag('th', _('Item name')) + content_tag('th', by_mail ? ' # ' : '#') + - content_tag('th', _('Price')) + content_tag('th', c_('Price')) ) + items.map do |id, quantity| product = Product.find(id) diff --git a/plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb b/plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb index a4787e8..5eefaff 100644 --- a/plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb +++ b/plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb @@ -3,19 +3,19 @@ :html => {:onsubmit => "return Cart.send_request(this)", :id => 'cart-request-form'}) do |f| %>
<%= labelled_form_field('* ' + _("Name"), f.text_field(:name, :class => 'required') ) %> - <%= labelled_form_field('* ' + _("Email"), f.text_field(:email, :class => 'required email') ) %> - <%= labelled_form_field('* ' + _("Contact phone"), f.text_field(:contact_phone, :class => 'required') ) %> + <%= labelled_form_field('* ' + c_("Email"), f.text_field(:email, :class => 'required email') ) %> + <%= labelled_form_field('* ' + c_("Contact phone"), f.text_field(:contact_phone, :class => 'required') ) %> <%= 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) %> <%= labelled_form_field(_('Payment'), select_tag('customer[payment]', options_for_select([[_("Money"), :money],[_('shopping_cart|Check'), :check]]))) %> <%= labelled_form_field(s_('shopping_cart|Change'), text_field_tag('customer[change]')) %>
<% if @settings.delivery %>
<%=_('Delivery Address')%> - <%= labelled_form_field(_('Address (street and number)'), f.text_field(:address)) %> - <%= labelled_form_field(_('Address reference'), f.text_field(:address_reference)) %> - <%= labelled_form_field(_('District'), f.text_field(:district)) %> - <%= labelled_form_field( _("City"), f.text_field(:city)) %> - <%= labelled_form_field(_('ZIP code'), f.text_field(:zip_code)) %> + <%= labelled_form_field(c_('Address (street and number)'), f.text_field(:address)) %> + <%= labelled_form_field(c_('Address reference'), f.text_field(:address_reference)) %> + <%= labelled_form_field(c_('District'), f.text_field(:district)) %> + <%= labelled_form_field( c_("City"), f.text_field(:city)) %> + <%= labelled_form_field(c_('ZIP code'), f.text_field(:zip_code)) %>
<% end %>
diff --git a/plugins/shopping_cart/views/shopping_cart_plugin/mailer/customer_notification.html.erb b/plugins/shopping_cart/views/shopping_cart_plugin/mailer/customer_notification.html.erb index 9da1d25..6aea2f1 100644 --- a/plugins/shopping_cart/views/shopping_cart_plugin/mailer/customer_notification.html.erb +++ b/plugins/shopping_cart/views/shopping_cart_plugin/mailer/customer_notification.html.erb @@ -14,15 +14,15 @@

    -
  • <%= _('Full name') %>: <%= @customer[:name] %>
  • -
  • <%= _('Email') %>: <%= @customer[:email] %>
  • +
  • <%= c_('Full name') %>: <%= @customer[:name] %>
  • +
  • <%= c_('Email') %>: <%= @customer[:email] %>
  • <%= _('Phone number') %>: <%= @customer[:contact_phone] %>
  • <%= _('Payment') %>: <%= @customer[:payment] == 'money' ? _('Money') : _('shopping_cart|Check') %>
  • <% if @customer[:payment] == 'money' %>
  • <%= _('shopping_cart|Change') %>: <%= @customer[:change] %>
  • <% end %> <% if !@customer[:address].blank? || !@customer[:city].blank? || !@customer[:zip_code].blank? || !@customer[:district].blank? || !@customer[:address_reference].blank? %> -
  • <%= _('Address') %>: +
  • <%= c_('Address') %>: <% end %> <% if !@customer[:address].blank? %> <%= @customer[:address] %>
    diff --git a/plugins/shopping_cart/views/shopping_cart_plugin/mailer/supplier_notification.html.erb b/plugins/shopping_cart/views/shopping_cart_plugin/mailer/supplier_notification.html.erb index e400a35..7f6b52b 100644 --- a/plugins/shopping_cart/views/shopping_cart_plugin/mailer/supplier_notification.html.erb +++ b/plugins/shopping_cart/views/shopping_cart_plugin/mailer/supplier_notification.html.erb @@ -12,15 +12,15 @@

      -
    • <%= _('Full name') %>: <%= @customer[:name] %>
    • -
    • <%= _('Email') %>: <%= @customer[:email] %>
    • +
    • <%= c_('Full name') %>: <%= @customer[:name] %>
    • +
    • <%= c_('Email') %>: <%= @customer[:email] %>
    • <%= _('Phone number') %>: <%= @customer[:contact_phone] %>
    • <%= _('Payment') %>: <%= @customer[:payment] == 'money' ? _('Money') : _('shopping_cart|Check') %>
    • <% if @customer[:payment] == 'money' %>
    • <%= _('shopping_cart|Change') %>: <%= @customer[:change] %>
    • <% end %> <% if !@customer[:address].blank? || !@customer[:city].blank? || !@customer[:zip_code].blank? || !@customer[:district].blank? || !@customer[:address_reference].blank? %> -
    • <%= _('Address') %>: +
    • <%= c_('Address') %>: <% end %> <% if !@customer[:address].blank? %> <%= @customer[:address] %>
      diff --git a/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/_orders_list.html.erb b/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/_orders_list.html.erb index 4ce5c3b..2a92c43 100644 --- a/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/_orders_list.html.erb +++ b/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/_orders_list.html.erb @@ -26,13 +26,13 @@ %> <% end %> - +
        - <% [['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| %> + <% [['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| %> <% attribute = field.first %> <% name = field.last %> <%= content_tag('li', content_tag('strong', name+': ') + order.send('customer_'+attribute)) if !order.send('customer_'+attribute).blank? %> diff --git a/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/_products_list.html.erb b/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/_products_list.html.erb index bd7bcd2..39f5b45 100644 --- a/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/_products_list.html.erb +++ b/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/_products_list.html.erb @@ -3,7 +3,7 @@ <% else %> - + <% @products.each do |id, item|%> diff --git a/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/edit.html.erb b/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/edit.html.erb index 8c01d0d..72cd6b2 100644 --- a/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/edit.html.erb +++ b/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/edit.html.erb @@ -8,7 +8,7 @@
        <%= _('Product') %><%= c_('Product') %> <%= _('Quantity') %>
        - + <% @settings.delivery_options.each do |option, price| %> @@ -39,8 +39,8 @@

        - <%= submit_button(:save, _('Save')) %> - <%= button :back, _('Back to control panel'), :controller => 'profile_editor' %> + <%= submit_button(:save, c_('Save')) %> + <%= button :back, c_('Back to control panel'), :controller => 'profile_editor' %>
        <% end%> diff --git a/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/reports.html.erb b/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/reports.html.erb index dbaa5d0..0233e42 100644 --- a/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/reports.html.erb +++ b/plugins/shopping_cart/views/shopping_cart_plugin_myprofile/reports.html.erb @@ -4,15 +4,15 @@ <% extend ShoppingCartPlugin::CartHelper %> <% status = ShoppingCartPlugin::PurchaseOrder::Status.name; pos=-1 %> -<% status_collection = [[nil, _('All')]] %> +<% status_collection = [[nil, c_('All')]] %> <% status_collection += status.map{|s| [pos+=1, s] } %> <% form_tag({}, {:id => 'cart-order-filter'}) do %> - <%= labelled_text_field(_('From')+' ', :from, @from.strftime("%Y-%m-%d"), :id => 'from', :size => 9) %> + <%= labelled_text_field(c_('From')+' ', :from, @from.strftime("%Y-%m-%d"), :id => 'from', :size => 9) %> <%= labelled_text_field(_('to')+' ', :to, @to.strftime("%Y-%m-%d"), :id => 'to', :size => 9) %> <%= labelled_select(_('Status')+' ', :filter_status, :first, :last, @status, status_collection)%>   - <%= submit_button('save', _('Filter')) %> + <%= submit_button('save', c_('Filter')) %> <% end %> <% tabs = [] %> diff --git a/plugins/shopping_cart/views/shopping_cart_plugin_profile/buy.html.erb b/plugins/shopping_cart/views/shopping_cart_plugin_profile/buy.html.erb index 0000a84..ebfd7aa 100644 --- a/plugins/shopping_cart/views/shopping_cart_plugin_profile/buy.html.erb +++ b/plugins/shopping_cart/views/shopping_cart_plugin_profile/buy.html.erb @@ -4,13 +4,13 @@ :html => {:onsubmit => "return Cart.send_request(this)", :id => 'cart-request-form' }) do |f| %>
        <%= labelled_form_field('* ' + _("Name"), f.text_field(:name, :class => 'required') ) %> - <%= labelled_form_field('* ' + _("Email"), f.text_field(:email, :class => 'required email') ) %> - <%= labelled_form_field('* ' + _("Contact phone"), f.text_field(:contact_phone, :class => 'required') ) %> + <%= labelled_form_field('* ' + c_("Email"), f.text_field(:email, :class => 'required email') ) %> + <%= labelled_form_field('* ' + c_("Contact phone"), f.text_field(:contact_phone, :class => 'required') ) %>
        <%=_('Delivery Address')%> - <%= labelled_form_field(_('Address (street and number)'), f.text_field(:address)) %> - <%= labelled_form_field( _("City"), f.text_field(:city)) %> - <%= labelled_form_field(_('ZIP code'), f.text_field(:zip_code)) %> + <%= labelled_form_field(c_('Address (street and number)'), f.text_field(:address)) %> + <%= labelled_form_field( c_("City"), f.text_field(:city)) %> + <%= labelled_form_field(c_('ZIP code'), f.text_field(:zip_code)) %>
        <%= submit_button(:send, _('Send buy request')) %> diff --git a/plugins/solr/lib/acts_as_faceted.rb b/plugins/solr/lib/acts_as_faceted.rb index c7dccee..e0c0a51 100644 --- a/plugins/solr/lib/acts_as_faceted.rb +++ b/plugins/solr/lib/acts_as_faceted.rb @@ -7,11 +7,11 @@ module ActsAsFaceted # Example: # #acts_as_faceted :fields => { - # :f_type => {:label => _('Type'), :proc => proc{|klass| f_type_proc(klass)}}, + # :f_type => {:label => c_('Type'), :proc => proc{|klass| f_type_proc(klass)}}, # :f_published_at => {:type => :date, :label => _('Published date'), :queries => {'[* TO NOW-1YEARS/DAY]' => _("Older than one year"), # '[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")}}, - # :f_profile_type => {:label => _('Author'), :proc => proc{|klass| f_profile_type_proc(klass)}}, - # :f_category => {:label => _('Categories')}}, + # :f_profile_type => {:label => c_('Author'), :proc => proc{|klass| f_profile_type_proc(klass)}}, + # :f_category => {:label => c_('Categories')}}, # :order => [:f_type, :f_published_at, :f_profile_type, :f_category] # #acts_as_searchable :additional_fields => [ {:name => {:type => :string, :as => :name_sort, :boost => 5.0}} ] + facets_fields_for_solr, diff --git a/plugins/solr/lib/ext/article.rb b/plugins/solr/lib/ext/article.rb index 4f2ecec..649d742 100644 --- a/plugins/solr/lib/ext/article.rb +++ b/plugins/solr/lib/ext/article.rb @@ -5,16 +5,16 @@ class Article # use for internationalizable human type names in search facets # reimplement on subclasses def self.type_name - _('Content') + c_('Content') end acts_as_faceted :fields => { - :solr_plugin_f_type => {:label => _('Type'), :proc => proc{|klass| solr_plugin_f_type_proc(klass)}}, + :solr_plugin_f_type => {:label => c_('Type'), :proc => proc{|klass| solr_plugin_f_type_proc(klass)}}, :solr_plugin_f_published_at => {:type => :date, :label => _('Published date'), :queries => {'[* TO NOW-1YEARS/DAY]' => _("Older than one year"), '[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")}, :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]']}, - :solr_plugin_f_profile_type => {:label => _('Profile'), :proc => proc{|klass| solr_plugin_f_profile_type_proc(klass)}}, - :solr_plugin_f_category => {:label => _('Categories')}, + :solr_plugin_f_profile_type => {:label => c_('Profile'), :proc => proc{|klass| solr_plugin_f_profile_type_proc(klass)}}, + :solr_plugin_f_category => {:label => c_('Categories')}, }, :category_query => proc { |c| "solr_plugin_category_filter:\"#{c.id}\"" }, :order => [:solr_plugin_f_type, :solr_plugin_f_published_at, :solr_plugin_f_profile_type, :solr_plugin_f_category] diff --git a/plugins/solr/lib/ext/product.rb b/plugins/solr/lib/ext/product.rb index 1ea005f..b1cd209 100644 --- a/plugins/solr/lib/ext/product.rb +++ b/plugins/solr/lib/ext/product.rb @@ -5,8 +5,8 @@ class Product acts_as_faceted :fields => { :solr_plugin_f_category => {:label => _('Related products')}, - :solr_plugin_f_region => {:label => _('City'), :proc => proc { |id| solr_plugin_f_region_proc(id) }}, - :solr_plugin_f_qualifier => {:label => _('Qualifiers'), :proc => proc { |id| solr_plugin_f_qualifier_proc(id) }}, + :solr_plugin_f_region => {:label => c_('City'), :proc => proc { |id| solr_plugin_f_region_proc(id) }}, + :solr_plugin_f_qualifier => {:label => c_('Qualifiers'), :proc => proc { |id| solr_plugin_f_qualifier_proc(id) }}, }, :category_query => proc { |c| "solr_plugin_category_filter:#{c.id}" }, :order => [:solr_plugin_f_category, :solr_plugin_f_region, :solr_plugin_f_qualifier] diff --git a/plugins/solr/lib/ext/profile.rb b/plugins/solr/lib/ext/profile.rb index 5a9cd9f..fc57831 100644 --- a/plugins/solr/lib/ext/profile.rb +++ b/plugins/solr/lib/ext/profile.rb @@ -5,7 +5,7 @@ class Profile # use for internationalizable human type names in search facets # reimplement on subclasses def self.type_name - _('Profile') + c_('Profile') end after_save_reindex [:articles], :with => :delayed_job @@ -13,8 +13,8 @@ class Profile acts_as_faceted :fields => { :solr_plugin_f_enabled => {:label => _('Situation'), :type_if => proc { |klass| klass.kind_of?(Enterprise) }, :proc => proc { |id| solr_plugin_f_enabled_proc(id) }}, - :solr_plugin_f_region => {:label => _('City'), :proc => proc { |id| solr_plugin_f_region_proc(id) }}, - :solr_plugin_f_profile_type => {:label => _('Type'), :proc => proc{|klass| solr_plugin_f_profile_type_proc(klass)}}, + :solr_plugin_f_region => {:label => c_('City'), :proc => proc { |id| solr_plugin_f_region_proc(id) }}, + :solr_plugin_f_profile_type => {:label => c_('Type'), :proc => proc{|klass| solr_plugin_f_profile_type_proc(klass)}}, :solr_plugin_f_categories => {:multi => true, :proc => proc {|facet, id| solr_plugin_f_categories_proc(facet, id)}, :label => proc { |env| solr_plugin_f_categories_label_proc(env) }, :label_abbrev => proc{ |env| solr_plugin_f_categories_label_abbrev_proc(env) }}, }, :category_query => proc { |c| "solr_plugin_category_filter:#{c.id}" }, diff --git a/plugins/solr/lib/solr_plugin/search_helper.rb b/plugins/solr/lib/solr_plugin/search_helper.rb index 13b5270..f763c2f 100644 --- a/plugins/solr/lib/solr_plugin/search_helper.rb +++ b/plugins/solr/lib/solr_plugin/search_helper.rb @@ -10,7 +10,7 @@ module SolrPlugin::SearchHelper SortOptions = { :products => ActiveSupport::OrderedHash[ :none, {:label => _('Relevance')}, - :more_recent, {:label => _('More recent'), :solr_opts => {:sort => 'updated_at desc, score desc'}}, + :more_recent, {:label => c_('More recent'), :solr_opts => {:sort => 'updated_at desc, score desc'}}, :name, {:label => _('Name'), :solr_opts => {:sort => 'solr_plugin_name_sortable asc'}}, :closest, {:label => _('Closest to me'), :if => proc{ logged_in? && (profile=current_user.person).lat && profile.lng }, :solr_opts => {:sort => "geodist() asc", @@ -21,7 +21,7 @@ module SolrPlugin::SearchHelper ], :articles => ActiveSupport::OrderedHash[ :none, {:label => _('Relevance')}, :name, {:label => _('Name'), :solr_opts => {:sort => 'solr_plugin_name_sortable asc'}}, - :more_recent, {:label => _('More recent'), :solr_opts => {:sort => 'updated_at desc, score desc'}}, + :more_recent, {:label => c_('More recent'), :solr_opts => {:sort => 'updated_at desc, score desc'}}, ], :enterprises => ActiveSupport::OrderedHash[ :none, {:label => _('Relevance')}, :name, {:label => _('Name'), :solr_opts => {:sort => 'solr_plugin_name_sortable asc'}}, diff --git a/plugins/solr/views/search/_facets_menu.html.erb b/plugins/solr/views/search/_facets_menu.html.erb index 56cfb4a..e1341e0 100644 --- a/plugins/solr/views/search/_facets_menu.html.erb +++ b/plugins/solr/views/search/_facets_menu.html.erb @@ -22,7 +22,7 @@

        <% if facet_count > less_options_limit %> - <%= link_to_function _("Options"), + <%= link_to_function c_("Options"), "facet_options_toggle('#{facet[:id].to_s}', '#{url_for(params.merge(:action => 'facets_browse', :facet_id => facet[:id], :asset_key => @asset, :escape => false))}'); " + "jQuery(this).toggleClass('facet-less-options')", :class => "facet-options-toggle" %>
        diff --git a/plugins/solr/views/search/_results.html.erb b/plugins/solr/views/search/_results.html.erb index bed01c9..3249932 100644 --- a/plugins/solr/views/search/_results.html.erb +++ b/plugins/solr/views/search/_results.html.erb @@ -1,4 +1,4 @@ -<%= render :partial => 'search_form', :locals => { :hint => _("Type words about the %s you're looking for") % @asset.to_s.singularize } %> +<%= render :partial => 'search_form', :locals => { :hint => c_("Type words about the %s you're looking for") % @asset.to_s.singularize } %> <%= render :partial => 'results_header' %> <%= display_results(@searches, @asset) %> diff --git a/plugins/spaminator/views/spaminator_plugin_admin/index.html.erb b/plugins/spaminator/views/spaminator_plugin_admin/index.html.erb index 19013fc..bef6c7c 100644 --- a/plugins/spaminator/views/spaminator_plugin_admin/index.html.erb +++ b/plugins/spaminator/views/spaminator_plugin_admin/index.html.erb @@ -31,7 +31,7 @@ <% end %> <% button_bar do %> - <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %> + <%= submit_button(:save, c_('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %> <% end %> diff --git a/plugins/spaminator/views/spaminator_plugin_admin/reports.html.erb b/plugins/spaminator/views/spaminator_plugin_admin/reports.html.erb index 1d5de54..481770e 100644 --- a/plugins/spaminator/views/spaminator_plugin_admin/reports.html.erb +++ b/plugins/spaminator/views/spaminator_plugin_admin/reports.html.erb @@ -30,5 +30,5 @@
        <% button_bar do %> - <%= button(:back, _('Back'), :action => 'index') %> + <%= button(:back, c_('Back'), :action => 'index') %> <% end %> diff --git a/plugins/statistics/lib/statistics_block.rb b/plugins/statistics/lib/statistics_block.rb index 6b2306d..493c010 100644 --- a/plugins/statistics/lib/statistics_block.rb +++ b/plugins/statistics/lib/statistics_block.rb @@ -16,7 +16,7 @@ class StatisticsBlock < Block ENTERPRISE_COUNTERS = [:user_counter, :tag_counter, :comment_counter, :hit_counter] def self.description - _('Statistics') + c_('Statistics') end def default_title diff --git a/plugins/statistics/views/statistics_block.html.erb b/plugins/statistics/views/statistics_block.html.erb index f9f1374..5a323f5 100644 --- a/plugins/statistics/views/statistics_block.html.erb +++ b/plugins/statistics/views/statistics_block.html.erb @@ -16,10 +16,10 @@
      • <%= block.categories%> <%= _('categories')%>
      • <% end %> <% if block.is_visible?('tag_counter') %> -
      • <%= block.tags%> <%= _('tags')%>
      • +
      • <%= block.tags%> <%= c_('tags')%>
      • <% end %> <% if block.is_visible?('comment_counter') %> -
      • <%= block.comments%> <%= _('comments')%>
      • +
      • <%= block.comments%> <%= c_('comments')%>
      • <% end %> <% if block.is_visible?('hit_counter') %>
      • <%= block.hits%> <%= _('hits')%>
      • diff --git a/plugins/stoa/lib/stoa_plugin.rb b/plugins/stoa/lib/stoa_plugin.rb index 9ebd919..d4bb673 100644 --- a/plugins/stoa/lib/stoa_plugin.rb +++ b/plugins/stoa/lib/stoa_plugin.rb @@ -34,7 +34,7 @@ class StoaPlugin < Noosfero::Plugin lambda { 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?)) + content_tag(:small, _('The usp id grants you special powers in the network. Don\'t forget to fill it if you have one.')) + - 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') + + 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') + content_tag('div', required(labelled_form_field(_('Birth date (yyyy-mm-dd)'), text_field_tag('birth_date', ''))), :id => 'signup-birth-date', :style => 'display: none') + content_tag('div', required(labelled_form_field(_('CPF'), text_field_tag('cpf', ''))), :id => 'signup-cpf', :style => 'display:none') + javascript_include_tag('../plugins/stoa/javascripts/jquery.observe_field', '../plugins/stoa/javascripts/signup_complement') @@ -45,7 +45,7 @@ class StoaPlugin < Noosfero::Plugin def login_extra_contents proc { content_tag('div', labelled_form_field(_('USP number / Username'), text_field_tag('usp_id_login', '', :id => 'stoa_field_login')) + - labelled_form_field(_('Password'), password_field_tag('password', '', :id => 'stoa_field_password')), :id => 'stoa-login-fields') + labelled_form_field(c_('Password'), password_field_tag('password', '', :id => 'stoa_field_password')), :id => 'stoa-login-fields') } end @@ -107,7 +107,7 @@ class StoaPlugin < Noosfero::Plugin end def control_panel_buttons - { :title => _('Invite friends'), + { :title => c_('Invite friends'), :icon => 'invite-friends', :url => {:controller => 'invite', :action => 'select_address_book'} } if context.send(:user) && context.send(:user).usp_id.present? diff --git a/plugins/sub_organizations/lib/related_organizations_block.rb b/plugins/sub_organizations/lib/related_organizations_block.rb index 84f1711..16dff0d 100644 --- a/plugins/sub_organizations/lib/related_organizations_block.rb +++ b/plugins/sub_organizations/lib/related_organizations_block.rb @@ -45,7 +45,7 @@ class RelatedOrganizationsBlock < ProfileListBlock params = {:profile => profile.identifier, :controller => 'sub_organizations_plugin_profile', :action => display_type[:action]} params[:type] = type if type == 'enterprise' || type == 'community' proc do - link_to _('View all'), params.merge(params) + link_to c_('View all'), params.merge(params) end end diff --git a/plugins/sub_organizations/lib/sub_organizations_plugin/relation.rb b/plugins/sub_organizations/lib/sub_organizations_plugin/relation.rb index 3c3c063..bdb6421 100644 --- a/plugins/sub_organizations/lib/sub_organizations_plugin/relation.rb +++ b/plugins/sub_organizations/lib/sub_organizations_plugin/relation.rb @@ -10,12 +10,12 @@ class SubOrganizationsPlugin::Relation < Noosfero::Plugin::ActiveRecord attr_accessible :parent, :child def no_self_reference - errors.add(:child, _('self-reference is not allowed.')) if parent == child + errors.add(:child, c_('self-reference is not allowed.')) if parent == child end def no_cyclical_reference if Organization.children(child).include?(parent) - errors.add(:child, _('cyclical reference is not allowed.')) + errors.add(:child, c_('cyclical reference is not allowed.')) end end diff --git a/plugins/sub_organizations/lib/sub_organizations_plugin/search_helper.rb b/plugins/sub_organizations/lib/sub_organizations_plugin/search_helper.rb index a271ad6..cdb28b6 100644 --- a/plugins/sub_organizations/lib/sub_organizations_plugin/search_helper.rb +++ b/plugins/sub_organizations/lib/sub_organizations_plugin/search_helper.rb @@ -6,10 +6,10 @@ module SubOrganizationsPlugin::SearchHelper def display_selectors(display, float = 'right') display = 'compact' if display.blank? - compact_link = display == 'compact' ? _('Compact') : link_to(_('Compact'), params.merge(:display => 'compact')) - full_link = display == 'full' ? _('Full') : link_to(_('Full'), params.merge(:display => 'full')) + compact_link = display == 'compact' ? c_('Compact') : link_to(c_('Compact'), params.merge(:display => 'compact')) + full_link = display == 'full' ? c_('Full') : link_to(c_('Full'), params.merge(:display => 'full')) content_tag('div', - content_tag('strong', _('Display')) + ': ' + [compact_link,full_link].compact.join(' | ').html_safe, + content_tag('strong', c_('Display')) + ': ' + [compact_link,full_link].compact.join(' | ').html_safe, :class => 'search-customize-options' ) end diff --git a/plugins/sub_organizations/views/box_organizer/_related_organizations_block.html.erb b/plugins/sub_organizations/views/box_organizer/_related_organizations_block.html.erb index 2f68f5b..2b830a0 100644 --- a/plugins/sub_organizations/views/box_organizer/_related_organizations_block.html.erb +++ b/plugins/sub_organizations/views/box_organizer/_related_organizations_block.html.erb @@ -1,7 +1,7 @@ diff --git a/plugins/sub_organizations/views/sub_organizations_plugin_myprofile/index.html.erb b/plugins/sub_organizations/views/sub_organizations_plugin_myprofile/index.html.erb index 9d71554..ce47e61 100644 --- a/plugins/sub_organizations/views/sub_organizations_plugin_myprofile/index.html.erb +++ b/plugins/sub_organizations/views/sub_organizations_plugin_myprofile/index.html.erb @@ -22,8 +22,8 @@ :pre_populate => @tokenized_children}) %> <% button_bar do %> - <%= submit_button('save', _('Save'))%> - <%= button('cancel', _('Cancel'), {:controller => 'profile_editor'})%> + <%= submit_button('save', c_('Save'))%> + <%= button('cancel', c_('Cancel'), {:controller => 'profile_editor'})%> <% end %> <% end %> diff --git a/plugins/sub_organizations/views/sub_organizations_plugin_profile/_full_related_organizations.html.erb b/plugins/sub_organizations/views/sub_organizations_plugin_profile/_full_related_organizations.html.erb index 76d75a6..6bac536 100644 --- a/plugins/sub_organizations/views/sub_organizations_plugin_profile/_full_related_organizations.html.erb +++ b/plugins/sub_organizations/views/sub_organizations_plugin_profile/_full_related_organizations.html.erb @@ -20,7 +20,7 @@ <%= excerpt(body_stripped, body_stripped.first(3), 200) if body_stripped %> <% button_bar(:class => "related-organizations-button-bar") do %> - <%= button :back, _('Go back'), { :controller => 'profile' } %> + <%= button :back, c_('Go back'), { :controller => 'profile' } %> <%= 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}") %> <% if !@full %> - <%= button :more, _('View all'), { :controller => 'sub_organizations_plugin_profile', :action => params[:action], :type => organization_type } %> + <%= button :more, c_('View all'), { :controller => 'sub_organizations_plugin_profile', :action => params[:action], :type => organization_type } %> <% end %> <% end %> diff --git a/plugins/sub_organizations/views/sub_organizations_plugin_profile/_related_organizations.html.erb b/plugins/sub_organizations/views/sub_organizations_plugin_profile/_related_organizations.html.erb index 5ec3cc5..a27823a 100644 --- a/plugins/sub_organizations/views/sub_organizations_plugin_profile/_related_organizations.html.erb +++ b/plugins/sub_organizations/views/sub_organizations_plugin_profile/_related_organizations.html.erb @@ -10,11 +10,11 @@
      • <%= _("There are no sub-#{organization_type.pluralize} yet. " ) %>
      • <% end %> <% button_bar(:class => "related-organizations-button-bar") do %> - <%= button :back, _('Go back'), { :controller => 'profile' } %> + <%= button :back, c_('Go back'), { :controller => 'profile' } %> <%= 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}") %> <% if !@full %> - <%= button :more, _('View all'), { :controller => 'sub_organizations_plugin_profile', :action => params[:action], :type => organization_type } %> + <%= button :more, c_('View all'), { :controller => 'sub_organizations_plugin_profile', :action => params[:action], :type => organization_type } %> <% end %> <% end %> diff --git a/plugins/tolerance_time/views/tolerance_time_plugin_myprofile/index.html.erb b/plugins/tolerance_time/views/tolerance_time_plugin_myprofile/index.html.erb index 3c96be5..139d4a2 100644 --- a/plugins/tolerance_time/views/tolerance_time_plugin_myprofile/index.html.erb +++ b/plugins/tolerance_time/views/tolerance_time_plugin_myprofile/index.html.erb @@ -18,7 +18,7 @@ <%= content_tag( 'small', _('Empty means unlimited and zero means right away.') ) %> <% button_bar do %> - <%= submit_button('save', _('Save'))%> - <%= button('back', _('Back'), {:controller => 'profile_editor'})%> + <%= submit_button('save', c_('Save'))%> + <%= button('back', c_('Back'), {:controller => 'profile_editor'})%> <% end %> <% end %> diff --git a/plugins/vote/views/vote_plugin_admin/index.html.erb b/plugins/vote/views/vote_plugin_admin/index.html.erb index b479d6c..f18617f 100644 --- a/plugins/vote/views/vote_plugin_admin/index.html.erb +++ b/plugins/vote/views/vote_plugin_admin/index.html.erb @@ -14,7 +14,7 @@ <% button_bar do %> - <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %> + <%= submit_button(:save, c_('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %> <% end %> <% end %> diff --git a/plugins/work_assignment/lib/work_assignment_plugin/helper.rb b/plugins/work_assignment/lib/work_assignment_plugin/helper.rb index 0cc9322..cc1119b 100644 --- a/plugins/work_assignment/lib/work_assignment_plugin/helper.rb +++ b/plugins/work_assignment/lib/work_assignment_plugin/helper.rb @@ -3,7 +3,7 @@ module WorkAssignmentPlugin::Helper return if work_assignment.submissions.empty? content_tag('table', content_tag('tr', - content_tag('th', _('Author'), :style => 'width: 50%') + + content_tag('th', c_('Author'), :style => 'width: 50%') + content_tag('th', _('Submission date')) + content_tag('th', _('Versions'), :style => 'text-align: center') + content_tag('th', '') -- libgit2 0.21.2
        <%= _('Option') %><%= _('Price') %><%= c_('Price') %>