From 502ac9746ec402b5f546955a3d708cd03622833a Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Mon, 21 Jul 2008 23:38:12 +0000 Subject: [PATCH] ActionItem523: marking more terminology switches --- app/models/environment.rb | 2 +- app/models/environment_statistics_block.rb | 2 +- lib/noosfero/core_ext/object.rb | 4 ++++ lib/tasks/gettext.rake | 1 + lib/zen3_terminology.rb | 3 +++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/models/environment.rb b/app/models/environment.rb index 1729eba..5f3af7a 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -25,7 +25,7 @@ class Environment < ActiveRecord::Base 'disable_asset_articles' => _('Disable search for articles '), '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'), } diff --git a/app/models/environment_statistics_block.rb b/app/models/environment_statistics_block.rb index 033c1ab..a74093c 100644 --- a/app/models/environment_statistics_block.rb +++ b/app/models/environment_statistics_block.rb @@ -16,7 +16,7 @@ class EnvironmentStatisticsBlock < Block info = [ n_('One user', '%{num} users', users) % { :num => users }, n_('One enterprise', '%{num} enterprises', enterprises) % { :num => enterprises }, - n_('One community', '%{num} communities', communities) % { :num => communities }, + n__('One community', '%{num} communities', communities) % { :num => communities }, ] block_title(title) + content_tag('ul', info.map {|item| content_tag('li', item) }.join("\n")) diff --git a/lib/noosfero/core_ext/object.rb b/lib/noosfero/core_ext/object.rb index 2036bf9..1df47cd 100644 --- a/lib/noosfero/core_ext/object.rb +++ b/lib/noosfero/core_ext/object.rb @@ -3,4 +3,8 @@ class Object gettext(Noosfero.term(*args)) end alias :getterm :__ + + def n__(for_one, for_many, num) + ngettext(getterm(for_one), getterm(for_manu), num) + end end diff --git a/lib/tasks/gettext.rake b/lib/tasks/gettext.rake index 42d6bc5..69b573b 100644 --- a/lib/tasks/gettext.rake +++ b/lib/tasks/gettext.rake @@ -14,6 +14,7 @@ desc "Update pot/po files to match new version." task :updatepo do require 'gettext/utils' GetText::RubyParser::ID << '__' + GetText::RubyParser::PLURAL_ID << 'n__' GetText::ActiveRecordParser.init(:use_classname => false) GetText.update_pofiles(Noosfero::PROJECT, Dir.glob("{app,lib,public/designs}/**/*.{rb,rhtml}"), "#{Noosfero::PROJECT} #{Noosfero::VERSION}") diff --git a/lib/zen3_terminology.rb b/lib/zen3_terminology.rb index 24ce353..69ffb67 100644 --- a/lib/zen3_terminology.rb +++ b/lib/zen3_terminology.rb @@ -13,6 +13,9 @@ class Zen3Terminology < Noosfero::Terminology::Custom 'The communities in which the user is a member' => N_('The groups in which the user is a member'), 'All communities' => N_('All groups'), 'Community' => N_('Group'), + 'One community' => N_('One group'), + '%{num} communities' => N_('%{num} groups'), + 'Disable search for communities' => N_('Disable search for groups'), }) end -- libgit2 0.21.2