diff --git a/app/controllers/admin/admin_panel_controller.rb b/app/controllers/admin/admin_panel_controller.rb index e31e33c..14106cc 100644 --- a/app/controllers/admin/admin_panel_controller.rb +++ b/app/controllers/admin/admin_panel_controller.rb @@ -42,7 +42,7 @@ class AdminPanelController < AdminController end redirect_to :action => 'set_portal_folders' else - session[:notice] = __('Community not found. You must insert the identifier of a community from this environment') + session[:notice] = _('Community not found. You must insert the identifier of a community from this environment') end end end diff --git a/app/controllers/admin/features_controller.rb b/app/controllers/admin/features_controller.rb index c2aadae..1cf6a00 100644 --- a/app/controllers/admin/features_controller.rb +++ b/app/controllers/admin/features_controller.rb @@ -34,9 +34,9 @@ class FeaturesController < AdminController def manage_enterprise_fields environment.custom_enterprise_fields = params[:enterprise_fields] if environment.save! - session[:notice] = __('Enterprise fields updated successfully.') + session[:notice] = _('Enterprise fields updated successfully.') else - flash[:error] = __('Enterprise fields not updated successfully.') + flash[:error] = _('Enterprise fields not updated successfully.') end redirect_to :action => 'manage_fields' end diff --git a/app/controllers/public/profile_controller.rb b/app/controllers/public/profile_controller.rb index 2a7bd73..c82f1b4 100644 --- a/app/controllers/public/profile_controller.rb +++ b/app/controllers/public/profile_controller.rb @@ -167,7 +167,7 @@ class ProfileController < PublicController session[:notice] = _("You have unblocked %s successfully. ") % profile.name redirect_to :controller => 'profile', :action => 'index' else - message = __('You are not allowed to unblock enterprises in this environment.') + message = _('You are not allowed to unblock enterprises in this environment.') render_access_denied(message) end end diff --git a/app/helpers/assets_helper.rb b/app/helpers/assets_helper.rb index fb8d45d..4d4b839 100644 --- a/app/helpers/assets_helper.rb +++ b/app/helpers/assets_helper.rb @@ -7,9 +7,9 @@ module AssetsHelper [ options.merge(:asset => 'articles'), "icon-menu-articles", _('Articles') ], [ options.merge(:asset => 'people'), "icon-menu-people", _('People') ], [ options.merge(:asset => 'products'), "icon-menu-product", _('Products') ], - [ options.merge(:asset => 'enterprises'), "icon-menu-enterprise", __('Enterprises') ], - [ options.merge(:asset => 'communities'), "icon-menu-community", __('Communities') ], - [ options.merge(:asset => 'events'), "icon-event", __('Events') ], + [ options.merge(:asset => 'enterprises'), "icon-menu-enterprise", _('Enterprises') ], + [ options.merge(:asset => 'communities'), "icon-menu-community", _('Communities') ], + [ options.merge(:asset => 'events'), "icon-event", _('Events') ], ].select do |target, css_class, name| !environment.enabled?('disable_asset_' + target[:asset]) diff --git a/app/helpers/profile_editor_helper.rb b/app/helpers/profile_editor_helper.rb index 08d0a5c..56d369b 100644 --- a/app/helpers/profile_editor_helper.rb +++ b/app/helpers/profile_editor_helper.rb @@ -129,7 +129,7 @@ module ProfileEditorHelper else domains = environment.domains end - labelled_form_field(__('Preferred domain name:'), select(object, :preferred_domain_id, domains.map {|item| [item.name, item.id]}, :prompt => '<' + _('Select domain') + '>')) + labelled_form_field(_('Preferred domain name:'), select(object, :preferred_domain_id, domains.map {|item| [item.name, item.id]}, :prompt => '<' + _('Select domain') + '>')) end def control_panel(&block) diff --git a/app/models/communities_block.rb b/app/models/communities_block.rb index 2534537..570738e 100644 --- a/app/models/communities_block.rb +++ b/app/models/communities_block.rb @@ -1,15 +1,15 @@ class CommunitiesBlock < ProfileListBlock def self.description - __('Communities') + _('Communities') end def default_title - n__('{#} community', '{#} communities', profile_count) + n_('{#} community', '{#} communities', profile_count) end def help - __('This block displays the communities in which the user is a member.') + _('This block displays the communities in which the user is a member.') end def footer diff --git a/app/models/community.rb b/app/models/community.rb index 53671ec..21c32f3 100644 --- a/app/models/community.rb +++ b/app/models/community.rb @@ -84,7 +84,7 @@ class Community < Organization end def control_panel_settings_button - {:title => __('Community Info and settings'), :icon => 'edit-profile-group'} + {:title => _('Community Info and settings'), :icon => 'edit-profile-group'} end def activities diff --git a/app/models/create_enterprise.rb b/app/models/create_enterprise.rb index df11e4b..4a5ff04 100644 --- a/app/models/create_enterprise.rb +++ b/app/models/create_enterprise.rb @@ -165,18 +165,18 @@ class CreateEnterprise < Task end def task_finished_message - __('Your request for registering the enterprise "%{enterprise}" was approved. You can access %{environment} now and provide start providing all relevant information your new enterprise.') % { :enterprise => self.name, :environment => self.environment } + _('Your request for registering the enterprise "%{enterprise}" was approved. You can access %{environment} now and provide start providing all relevant information your new enterprise.') % { :enterprise => self.name, :environment => self.environment } end def task_cancelled_message - __("Your request for registering the enterprise %{enterprise} at %{environment} was NOT approved by the validator organization. The following explanation was given: \n\n%{explanation}") % { :enterprise => self.name, :environment => self.environment, :explanation => self.reject_explanation } + _("Your request for registering the enterprise %{enterprise} at %{environment} was NOT approved by the validator organization. The following explanation was given: \n\n%{explanation}") % { :enterprise => self.name, :environment => self.environment, :explanation => self.reject_explanation } end def target_notification_message msg = "" - msg << __("Enterprise \"%{enterprise}\" just requested to enter %{environment}. You have to approve or reject it through the \"Pending Validations\" section in your control panel.\n") % { :enterprise => self.name, :environment => self.environment } + msg << _("Enterprise \"%{enterprise}\" just requested to enter %{environment}. You have to approve or reject it through the \"Pending Validations\" section in your control panel.\n") % { :enterprise => self.name, :environment => self.environment } msg << "\n" - msg << __("The data provided by the enterprise was the following:\n") << "\n" + msg << _("The data provided by the enterprise was the following:\n") << "\n" msg << (_("Name: %s") % self.name) << "\n" @@ -186,12 +186,12 @@ class CreateEnterprise < Task msg << (_("Foundation Year: %d") % self.foundation_year) << "\n" unless self.foundation_year.blank? msg << (_("Economic activity: %s") % self.economic_activity) << "\n" - msg << __("Information about enterprise's management:\n") << self.management_information.to_s << "\n" + msg << _("Information about enterprise's management:\n") << self.management_information.to_s << "\n" msg << (_("Contact phone: %s") % self.contact_phone) << "\n" msg << (_("Contact person: %s") % self.contact_person) << "\n" - msg << __('CreateEnterprise|Identifier') + msg << _('CreateEnterprise|Identifier') msg end diff --git a/app/models/disabled_enterprise_message_block.rb b/app/models/disabled_enterprise_message_block.rb index d9882f3..2ed1f99 100644 --- a/app/models/disabled_enterprise_message_block.rb +++ b/app/models/disabled_enterprise_message_block.rb @@ -1,11 +1,11 @@ class DisabledEnterpriseMessageBlock < Block def self.description - __('"Disabled enterprise" message') + _('"Disabled enterprise" message') end def help - __('Shows a message for disabled enterprises.') + _('Shows a message for disabled enterprises.') end def default_title diff --git a/app/models/enterprise.rb b/app/models/enterprise.rb index bbcf53c..8773e40 100644 --- a/app/models/enterprise.rb +++ b/app/models/enterprise.rb @@ -163,7 +163,7 @@ class Enterprise < Organization alias_method_chain :template, :inactive_enterprise def control_panel_settings_button - {:title => __('Enterprise Info and settings'), :icon => 'edit-profile-enterprise'} + {:title => _('Enterprise Info and settings'), :icon => 'edit-profile-enterprise'} end settings_items :enable_contact_us, :type => :boolean, :default => true @@ -173,7 +173,7 @@ class Enterprise < Organization end def control_panel_settings_button - {:title => __('Enterprise Info and settings'), :icon => 'edit-profile-enterprise'} + {:title => _('Enterprise Info and settings'), :icon => 'edit-profile-enterprise'} end def create_product? diff --git a/app/models/enterprise_homepage.rb b/app/models/enterprise_homepage.rb index 004922a..80b6af2 100644 --- a/app/models/enterprise_homepage.rb +++ b/app/models/enterprise_homepage.rb @@ -5,7 +5,7 @@ class EnterpriseHomepage < Article end def self.short_description - __('Enterprise homepage') + _('Enterprise homepage') end def self.description diff --git a/app/models/enterprises_block.rb b/app/models/enterprises_block.rb index 309a4d2..31ccb41 100644 --- a/app/models/enterprises_block.rb +++ b/app/models/enterprises_block.rb @@ -1,15 +1,15 @@ class EnterprisesBlock < ProfileListBlock def default_title - n__('{#} enterprise', '{#} enterprises', profile_count) + n_('{#} enterprise', '{#} enterprises', profile_count) end def help - __('This block displays the enterprises where this user works.') + _('This block displays the enterprises where this user works.') end def self.description - __('Enterprises') + _('Enterprises') end def footer diff --git a/app/models/environment.rb b/app/models/environment.rb index 12b3671..0c1b3fb 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -91,12 +91,12 @@ class Environment < ActiveRecord::Base def self.available_features { 'disable_asset_articles' => _('Disable search for articles '), - 'disable_asset_enterprises' => __('Disable search for enterprises'), + 'disable_asset_enterprises' => _('Disable search for enterprises'), 'disable_asset_people' => _('Disable search for people'), - 'disable_asset_communities' => __('Disable search for communities'), + 'disable_asset_communities' => _('Disable search for communities'), 'disable_asset_products' => _('Disable search for products'), 'disable_asset_events' => _('Disable search for events'), - 'disable_products_for_enterprises' => __('Disable products for enterprises'), + 'disable_products_for_enterprises' => _('Disable products for enterprises'), 'disable_categories' => _('Disable categories'), 'disable_header_and_footer' => _('Disable header/footer editing by users'), 'disable_gender_icon' => _('Disable gender icon'), @@ -104,9 +104,9 @@ class Environment < ActiveRecord::Base 'disable_select_city_for_contact' => _('Disable state/city select for contact form'), 'disable_contact_person' => _('Disable contact for people'), 'disable_contact_community' => _('Disable contact for groups/communities'), - 'enterprise_registration' => __('Enterprise registration'), + 'enterprise_registration' => _('Enterprise registration'), - 'enterprise_activation' => __('Enable activation of enterprises'), + 'enterprise_activation' => _('Enable activation of enterprises'), 'media_panel' => _('Media panel in WYSIWYG editor'), 'select_preferred_domain' => _('Select preferred domains per profile'), 'use_portal_community' => _('Use the portal as news source for front page'), @@ -119,8 +119,8 @@ class Environment < ActiveRecord::Base 'organizations_are_moderated_by_default' => _("Organizations have moderated publication by default"), 'enable_organization_url_change' => _("Allow organizations to change their URL"), 'admin_must_approve_new_communities' => _("Admin must approve creation of communities"), - 'enterprises_are_disabled_when_created' => __('Enterprises are disabled when created'), - 'enterprises_are_validated_when_created' => __('Enterprises are validated when created'), + 'enterprises_are_disabled_when_created' => _('Enterprises are disabled when created'), + 'enterprises_are_validated_when_created' => _('Enterprises are validated when created'), 'show_balloon_with_profile_links_when_clicked' => _('Show a balloon with profile links when a profile image is clicked'), 'xmpp_chat' => _('XMPP/Jabber based chat'), 'show_zoom_button_on_article_images' => _('Show a zoom link on all article images'), diff --git a/app/models/environment_statistics_block.rb b/app/models/environment_statistics_block.rb index 598edf7..69b4cb5 100644 --- a/app/models/environment_statistics_block.rb +++ b/app/models/environment_statistics_block.rb @@ -20,9 +20,9 @@ class EnvironmentStatisticsBlock < Block info = [] info << (n_('One user', '%{num} users', users) % { :num => users }) unless owner.enabled?('disable_asset_enterprises') - info << (n__('One enterprise', '%{num} enterprises', enterprises) % { :num => enterprises }) + info << (n_('One enterprise', '%{num} enterprises', enterprises) % { :num => enterprises }) end - info << (n__('One community', '%{num} communities', communities) % { :num => communities }) + info << (n_('One community', '%{num} communities', communities) % { :num => communities }) block_title(title) + content_tag('ul', info.map {|item| content_tag('li', item) }.join("\n")) end diff --git a/app/models/fans_block.rb b/app/models/fans_block.rb index ae97bc8..5785539 100644 --- a/app/models/fans_block.rb +++ b/app/models/fans_block.rb @@ -5,7 +5,7 @@ class FansBlock < ProfileListBlock end def default_title - n__('{#} fan', '{#} fans', profile_count) + n_('{#} fan', '{#} fans', profile_count) end def help diff --git a/app/models/favorite_enterprises_block.rb b/app/models/favorite_enterprises_block.rb index e4b407b..74474d8 100644 --- a/app/models/favorite_enterprises_block.rb +++ b/app/models/favorite_enterprises_block.rb @@ -1,22 +1,22 @@ class FavoriteEnterprisesBlock < ProfileListBlock def default_title - __('Favorite Enterprises') + _('Favorite Enterprises') end def help - __('This block lists your favorite enterprises.') + _('This block lists your favorite enterprises.') end def self.description - __('Favorite Enterprises') + _('Favorite Enterprises') end def footer owner = self.owner return '' unless owner.kind_of?(Person) lambda do - link_to __('View all'), :profile => owner.identifier, :controller => 'profile', :action => 'favorite_enterprises' + link_to _('View all'), :profile => owner.identifier, :controller => 'profile', :action => 'favorite_enterprises' end end diff --git a/app/models/friends_block.rb b/app/models/friends_block.rb index 4fbde10..b4d81f3 100644 --- a/app/models/friends_block.rb +++ b/app/models/friends_block.rb @@ -1,11 +1,11 @@ class FriendsBlock < ProfileListBlock def self.description - __('Friends') + _('Friends') end def default_title - n__('{#} friend', '{#} friends', profile_count) + n_('{#} friend', '{#} friends', profile_count) end def help diff --git a/app/models/sellers_search_block.rb b/app/models/sellers_search_block.rb index 617ca27..c0b3cc8 100644 --- a/app/models/sellers_search_block.rb +++ b/app/models/sellers_search_block.rb @@ -1,11 +1,11 @@ class SellersSearchBlock < Block def self.description - __('Search for enterprises and products') + _('Search for enterprises and products') end def self.short_description - __('Products/Enterprises search') + _('Products/Enterprises search') end def default_title diff --git a/app/views/account/accept_terms.html.erb b/app/views/account/accept_terms.html.erb index 7aa7b9b..7a03f64 100644 --- a/app/views/account/accept_terms.html.erb +++ b/app/views/account/accept_terms.html.erb @@ -11,7 +11,7 @@ }
-

<%= __('Enterprise activation') + ' - ' + (logged_in? ? _('part 2 of 2') : _(' part 2 of 3')) %>

+

<%= _('Enterprise activation') + ' - ' + (logged_in? ? _('part 2 of 2') : _(' part 2 of 3')) %>

<%= @terms_of_enterprise_use %>
diff --git a/app/views/account/activate_enterprise.html.erb b/app/views/account/activate_enterprise.html.erb index 5debce6..779af71 100644 --- a/app/views/account/activate_enterprise.html.erb +++ b/app/views/account/activate_enterprise.html.erb @@ -1,9 +1,9 @@
-

<%= __('Enterprise activation - part 3 of 3') %>

+

<%= _('Enterprise activation - part 3 of 3') %>

<%= error_messages_for :user %> -

<%= __('Now for you manage your enterprise you have to associate an individual account to the enterprise.') %>

+

<%= _('Now for you manage your enterprise you have to associate an individual account to the enterprise.') %>

<%= _('Do you have a personal user account in the system?') %>

@@ -14,7 +14,7 @@