From 05a0d3904604cd17f149135a3eefdbe0bfd57d93 Mon Sep 17 00:00:00 2001 From: AntonioTerceiro Date: Sat, 16 Feb 2008 09:58:52 +0000 Subject: [PATCH] ActionItem154: translation files update + code enhancement for translation --- app/helpers/language_helper.rb | 4 +++- app/models/block.rb | 7 ++++++- app/models/tags_block.rb | 2 +- app/views/layouts/application.rhtml | 4 +--- app/views/profile/index.rhtml | 1 + app/views/shared/language_chooser.rhtml | 3 --- po/noosfero.pot | 250 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------------------------------- po/pt_BR/noosfero.po | 482 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 8 files changed, 379 insertions(+), 374 deletions(-) delete mode 100644 app/views/shared/language_chooser.rhtml diff --git a/app/helpers/language_helper.rb b/app/helpers/language_helper.rb index 8ae1f1a..1250882 100644 --- a/app/helpers/language_helper.rb +++ b/app/helpers/language_helper.rb @@ -9,13 +9,15 @@ module LanguageHelper def language_chooser current = language - Noosfero.locales.map do |code,name| + languages = Noosfero.locales.map do |code,name| if code == current content_tag('strong', name) else link_to(name, :lang => code) end end.join(' — ') + + content_tag('div', languages, :id => 'language-chooser', :help => _('The language you choose here is the language used for options, buttons, etc. It does not affect the language of the content created by other users.')) end end diff --git a/app/models/block.rb b/app/models/block.rb index 718ae1e..aa7bd83 100644 --- a/app/models/block.rb +++ b/app/models/block.rb @@ -12,8 +12,13 @@ class Block < ActiveRecord::Base acts_as_having_settings + # returns the description of the block, used when the user sees a list of + # blocks to choose one to include in the design. + # + # Must be redefined in subclasses to match the description of each block + # type. def self.description - _('A dummy block.') + '(dummy)' end # Returns the content to be used for this block. diff --git a/app/models/tags_block.rb b/app/models/tags_block.rb index 0081fe8..67f05d0 100644 --- a/app/models/tags_block.rb +++ b/app/models/tags_block.rb @@ -4,7 +4,7 @@ class TagsBlock < Block include BlockHelper def self.description - _('List count of contents by tag') + _('Block listing content count by tag') end def help diff --git a/app/views/layouts/application.rhtml b/app/views/layouts/application.rhtml index ab835b4..6d4eddc 100644 --- a/app/views/layouts/application.rhtml +++ b/app/views/layouts/application.rhtml @@ -127,9 +127,7 @@