noosfero | 13 new commits pushed to repository

Leandro Nunes gitlab at gitlab.com
Tue Mar 17 23:59:03 BRT 2015


Leandro Nunes pushed to refs/heads/next at <a href="https://gitlab.com/noosfero/noosfero">Noosfero / noosfero</a>

Commits:
<a href="https://gitlab.com/noosfero/noosfero/commit/72c6f55c05480581ea627e1c10714f7f61b77f50">72c6f55c</a> by Evandro Junior
Translated using Weblate (Portuguese)

Currently translated at 100.0% (2032 of 2032 strings)

- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/dbdf805091cb815353ad6a0c5ffa0effd25143cf">dbdf8050</a> by TWS
Translated using Weblate (Italian)

Currently translated at 3.2% (67 of 2032 strings)

- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/56bca8944a804d24fb8ad46324744f704bd560da">56bca894</a> by TWS
Translated using Weblate (Italian)

Currently translated at 0.1% (1 of 911 strings)

- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/0b9f2d0d4c364c71b56c0a74a44b4bb6dd20976e">0b9f2d0d</a> by Daniela Feitosa
Fix: display error msgs when form submission fails

- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/5955193e79b8f9f09a2942f8ff7acd24c17fdec5">5955193e</a> by Weblate
Merge remote-tracking branch 'origin/master'

- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/e4b31d74a5832de06e020a5ef220ae9a0252ded8">e4b31d74</a> by Braulio Bhavamitra
friendship: make it possible to be friend again

- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/0da263565bd1eb370f230426a55ca5acb1c1b4b6">0da26356</a> by Evandro Junior
guarantee main block is always visible to everybody

- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/54002230194b306ec1419556e6d2e96713ea5b18">54002230</a> by Leandro Nunes dos Santos
Merge branch 'master' into P398-main-block-should-not-be-invible

- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/e6dbb3e982d90eb7433f98d0ef7888e0aa18da04">e6dbb3e9</a> by Leandro Nunes
Merge branch 'P398-main-block-should-not-be-invible' into 'master'

Main block should not be invisible

There used to happen a situation that visitors see an empty profile since the main block was not visible for all users.

Now the main block user visibility can not be set for logged, not_logged or followers anymore, only to "All users".

See merge request !499

- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/6615319eef83594e166f11a49f1161ebf035d31a">6615319e</a> by Weblate
Merge remote-tracking branch 'origin/master'

- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/3a8f8c27f14c1d55024f6ee121bf80b4f5bed73c">3a8f8c27</a> by Evandro Junior
Fixed repeated strings for German translation

- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/1be731783f219b984ef93c9a95d345d92cd31a92">1be73178</a> by Leandro Nunes
Merge branch 'german-po-fixes' into 'master'

German po fixes

There duplicated strings were causing problems for rake updatepo

See merge request !510

- - - - -
<a href="https://gitlab.com/noosfero/noosfero/commit/1b1da66a6b17d5716b3e44f942124bb8da169358">1b1da66a</a> by Leandro Nunes dos Santos
Merge branch 'next' of gitlab.com:noosfero/noosfero into next

- - - - -


Changes:

=====================================
app/models/add_friend.rb
=====================================
--- a/app/models/add_friend.rb
+++ b/app/models/add_friend.rb
@@ -4,7 +4,7 @@ class AddFriend < Task
 
   validates_presence_of :requestor_id, :target_id
 
-  validates_uniqueness_of :target_id, :scope => [ :requestor_id ]
+  validates_uniqueness_of :target_id, scope: [ :requestor_id, :status ], if: proc{ |t| t.status == Task::Status::ACTIVE }
 
   validates_length_of :group_for_person, :group_for_friend, :maximum => 150, :allow_nil => true
 

=====================================
app/models/main_block.rb
=====================================
--- a/app/models/main_block.rb
+++ b/app/models/main_block.rb
@@ -24,4 +24,10 @@ class MainBlock < Block
     ['always', 'except_home_page']
   end
 
+  def display_user_options
+    @display_user_options = {
+      'all'            => _('All users')
+    }
+  end
+
 end

=====================================
app/models/person.rb
=====================================
--- a/app/models/person.rb
+++ b/app/models/person.rb
@@ -150,7 +150,7 @@ roles] }
   end
 
   def already_request_friendship?(person)
-    person.tasks.find_by_requestor_id(self.id, :conditions => { :type => 'AddFriend' })
+    person.tasks.where(requestor_id: self.id, type: 'AddFriend', status: Task::Status::ACTIVE).first
   end
 
   def remove_friend(friend)

=====================================
plugins/custom_forms/lib/custom_forms_plugin/submission.rb
=====================================
--- a/plugins/custom_forms/lib/custom_forms_plugin/submission.rb
+++ b/plugins/custom_forms/lib/custom_forms_plugin/submission.rb
@@ -5,7 +5,7 @@ class CustomFormsPlugin::Submission < Noosfero::Plugin::ActiveRecord
   # validation is done manually, see below
   has_many :answers, :class_name => 'CustomFormsPlugin::Answer', :dependent => :destroy, :validate => false
 
-  attr_accessible :form, :profile
+  attr_accessible :form, :profile, :author_name, :author_email
 
   validates_presence_of :form
   validates_presence_of :author_name, :author_email, :if => lambda {|submission| submission.profile.nil?}
@@ -13,13 +13,16 @@ class CustomFormsPlugin::Submission < Noosfero::Plugin::ActiveRecord
   validates_format_of :author_email, :with => Noosfero::Constants::EMAIL_FORMAT, :if => (lambda {|submission| !submission.author_email.blank?})
   validate :check_answers
 
-  def self.human_attribute_name(attrib)
-    if /\d+/ =~ attrib and (f = CustomFormsPlugin::Field.find_by_id(attrib.to_i))
+  def self.human_attribute_name_with_customization(attrib, options={})
+    if /\d+/ =~ attrib and (f = CustomFormsPlugin::Field.find_by_id(attrib.to_s))
       f.name
     else
-      attrib
+      _(self.human_attribute_name_without_customization(attrib))
     end
   end
+  class << self
+    alias_method_chain :human_attribute_name, :customization
+  end
 
   before_create do |submission|
     if submission.profile

=====================================
plugins/custom_forms/test/functional/custom_forms_plugin_profile_controller_test.rb
=====================================
--- a/plugins/custom_forms/test/functional/custom_forms_plugin_profile_controller_test.rb
+++ b/plugins/custom_forms/test/functional/custom_forms_plugin_profile_controller_test.rb
@@ -40,6 +40,19 @@ class CustomFormsPluginProfileControllerTest < ActionController::TestCase
     assert_redirected_to :action => 'show'
   end
 
+  should 'display errors if user is not logged in and author_name is not uniq' do
+    logout
+    form = CustomFormsPlugin::Form.create(:profile => profile, :name => 'Free Software')
+    field = CustomFormsPlugin::TextField.create(:name => 'Name', :form => form)
+    submission = CustomFormsPlugin::Submission.create(:form => form, :author_name => "john", :author_email => 'john at example.com')
+
+    assert_no_difference 'CustomFormsPlugin::Submission.count' do
+      post :show, :profile => profile.identifier, :id => form.id, :author_name => "john", :author_email => 'john at example.com', :submission => {field.id.to_s => 'Noosfero'}
+    end
+    assert_equal "Submission could not be saved", session[:notice]
+    assert_tag :tag => 'div', :attributes => { :class => 'errorExplanation', :id => 'errorExplanation' }
+  end
+
   should 'disable fields if form expired' do
     form = CustomFormsPlugin::Form.create!(:profile => profile, :name => 'Free Software', :begining => Time.now + 1.day)
     form.fields << CustomFormsPlugin::TextField.create(:name => 'Field Name', :form => form, :default_value => "First Field")

=====================================
po/de/noosfero.po
=====================================
--- a/po/de/noosfero.po
+++ b/po/de/noosfero.po
@@ -2942,10 +2942,6 @@ msgstr "Karte"
 msgid "Full"
 msgstr "Vollständig"
 
-#: app/helpers/search_helper.rb:104
-msgid "Display"
-msgstr "Anzeige"
-
 #: app/helpers/search_helper.rb:118 app/helpers/users_helper.rb:16
 #: app/views/tasks/index.html.erb:26 app/views/tasks/index.html.erb:41
 #: app/views/memberships/index.html.erb:16
@@ -3000,19 +2996,6 @@ msgstr "Aktivere Unternehmen aus dem Netzwerk"
 msgid "More popular enterprises from network"
 msgstr "Beliebtere Unternehmen aus dem Netzwerk"
 
-#: app/helpers/search_helper.rb:23 app/helpers/search_helper.rb:113
-#, fuzzy
-msgid "Compact"
-msgstr "Berechnung"
-
-#: app/helpers/search_helper.rb:55
-msgid ", "
-msgstr ", "
-
-#: app/helpers/search_helper.rb:56
-msgid "search in all categories"
-msgstr "In allen Kategorien suchen"
-
 #: app/helpers/boxes_helper.rb:106
 msgid "This block is invisible. Your visitors will not see it."
 msgstr "Dieser Bereich ist nicht sichtbar. Ihre Kunden werden ihn nicht sehen."
@@ -3389,11 +3372,6 @@ msgstr "Aktiviert um"
 msgid "Deativated users"
 msgstr "Nutzer verwalten"
 
-#: app/helpers/users_helper.rb:16 app/views/tasks/index.html.erb:26
-#: app/views/tasks/index.html.erb:41 app/views/memberships/index.html.erb:16
-msgid "Filter"
-msgstr "Filter"
-
 #: app/helpers/forms_helper.rb:62
 msgid "Select the State"
 msgstr "Wählen Sie das Bundesland"
@@ -9909,45 +9887,6 @@ msgstr ""
 "\">GNU Affero General Public License</a> Version 3 oder einer späteren "
 "Version lizenziert ist."
 
-#~ msgid "More recent contents from network"
-#~ msgstr "Neueste Inhalte aus dem Netzwerk"
-
-#~ msgid "More viewed contents from network"
-#~ msgstr "Meistgesehene Inhalte aus dem Netzwerk"
-
-#~ msgid "Most commented contents from network"
-#~ msgstr "Meistkommentierte Inhalte aus dem Netzwerk"
-
-#~ msgid "More recent people from network"
-#~ msgstr "Neuere Leute aus dem Netzwerk"
-
-#~ msgid "More active people from network"
-#~ msgstr "Aktivere Leute aus dem Netzwerk"
-
-#~ msgid "More popular people from network"
-#~ msgstr "Populärere Leute aus dem Netzwerk"
-
-#~ msgid "More recent communities from network"
-#~ msgstr "Neuere Gemeinschaften aus dem Netzwerk"
-
-#~ msgid "More active communities from network"
-#~ msgstr "Aktivere Gemeinschaften aus dem Netzwerk"
-
-#~ msgid "More popular communities from network"
-#~ msgstr "Populärere Gemeinschaften aus dem Netzwerk"
-
-#, fuzzy
-#~ msgid "More recent enterprises from network"
-#~ msgstr "Neueste Inhalte aus dem Netzwerk"
-
-#, fuzzy
-#~ msgid "More active enterprises from network"
-#~ msgstr "Aktivere Leute aus dem Netzwerk"
-
-#, fuzzy
-#~ msgid "More popular enterprises from network"
-#~ msgstr "Populärere Leute aus dem Netzwerk"
-
 #~ msgid "starting chat with %{name}"
 #~ msgstr "starte Chat mit  %{name}"
 

=====================================
po/it/noosfero-doc.po
=====================================
--- a/po/it/noosfero-doc.po
+++ b/po/it/noosfero-doc.po
@@ -3,18 +3,20 @@
 # This file is distributed under the same license as noosfero itself.
 # Daniela Feitosa <danielafeitos at colivre.coop.br>, 2012.
 #
-#, fuzzy
 msgid ""
 msgstr ""
 "Project-Id-Version: noosfero 0.36.6\n"
 "POT-Creation-Date: 2013-12-10 15:48-0300\n"
-"PO-Revision-Date: 2014-03-23 17:10-0300\n"
-"Last-Translator: Daniela Feitosa <danielafeitosa at colivre.coop.br>\n"
-"Language-Team: LANGUAGE TEAM <LL at li.org>\n"
-"Language: \n"
+"PO-Revision-Date: 2015-03-16 22:47+0200\n"
+"Last-Translator: TWS <tablettws at gmail.com>\n"
+"Language-Team: Italian "
+"<https://hosted.weblate.org/projects/noosfero/documentation/it/>\n"
+"Language: it\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 2.3-dev\n"
 
 #. type: Content of: <h1>
 #: doc/noosfero/plugins/send_email.en.xhtml:1
@@ -1274,7 +1276,7 @@ msgstr ""
 #: doc/noosfero/user/sending-messages.en.xhtml:14
 #: doc/noosfero/user/sending-scraps.en.xhtml:13
 msgid "Description"
-msgstr ""
+msgstr "Descrizione"
 
 #. type: Content of: <ol><li>
 #: doc/noosfero/enterprise/editing-appearance.en.xhtml:18

=====================================
po/it/noosfero.po
=====================================
--- a/po/it/noosfero.po
+++ b/po/it/noosfero.po
@@ -7,28 +7,28 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 1.0-690-gcb6e853\n"
 "POT-Creation-Date: 2015-03-05 12:10-0300\n"
-"PO-Revision-Date: 2014-10-30 14:14+0200\n"
-"Last-Translator: Michal Čihař <michal at cihar.com>\n"
-"Language-Team: Italian <https://hosted.weblate.org/projects/noosfero/"
-"noosfero/it/>\n"
+"PO-Revision-Date: 2015-03-16 23:06+0200\n"
+"Last-Translator: TWS <tablettws at gmail.com>\n"
+"Language-Team: Italian "
+"<https://hosted.weblate.org/projects/noosfero/noosfero/it/>\n"
 "Language: it\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 2.0-dev\n"
+"X-Generator: Weblate 2.3-dev\n"
 
 #: app/models/approve_comment.rb:17
 msgid "Anonymous"
-msgstr ""
+msgstr "Anonimo"
 
 #: app/models/approve_comment.rb:25 app/models/approve_article.rb:17
 msgid "Article removed."
-msgstr ""
+msgstr "Articolo Rimosso."
 
 #: app/models/approve_comment.rb:33
 msgid "New comment to article"
-msgstr ""
+msgstr "Nuovo Commento nell'articolo"
 
 #: app/models/approve_comment.rb:49 app/models/approve_comment.rb:51
 msgid "%{requestor} commented on the article: %{linked_subject}."
@@ -36,7 +36,7 @@ msgstr ""
 
 #: app/models/approve_comment.rb:55 app/models/approve_article.rb:77
 msgid "The article was removed."
-msgstr ""
+msgstr "L'articolo è stato rimosso."
 
 #: app/models/approve_comment.rb:81
 msgid "%{requestor} wants to comment the article: %{article}."
@@ -50,6 +50,8 @@ msgstr ""
 msgid ""
 "You need to login on %{system} in order to approve or reject this comment."
 msgstr ""
+"Devi connetterti su %{system} per poter approvare oppure rigettare questo "
+"commento."
 
 #: app/models/approve_comment.rb:94
 msgid ""
@@ -58,14 +60,21 @@ msgid ""
 "\n"
 "%{comment} "
 msgstr ""
+"Il tuo commento su questo articolo \"%{article}\" è stato approvato. Ecco "
+"qui il commento lasciato dall'Amministratore che ha approvato il tuo "
+"commentot:↵\n"
+"↵\n"
+"%{comment} "
 
 #: app/models/approve_comment.rb:96
 msgid "Your request for comment the article \"%{article}\" was approved."
 msgstr ""
+"La richiesta per commentare questo articolo \"%{article}\" è stata approvata."
 
 #: app/models/approve_comment.rb:101
 msgid "Your request for commenting the article \"%{article}\" was rejected."
 msgstr ""
+"La richiesta per commentare questo articolo \"%{article}\" è stata rigettata."
 
 #: app/models/approve_comment.rb:103
 msgid ""
@@ -74,6 +83,10 @@ msgid ""
 "\n"
 "%{reject_explanation}"
 msgstr ""
+"Ecco la spiegazione del rigetto lasciata dall' Amministratore che ha "
+"rigettato il tuo commento: ↵\n"
+"↵\n"
+"%{reject_explanation}"
 
 #: app/models/comment.rb:4 app/models/article.rb:171
 #: app/views/content_viewer/_comment_form.html.erb:70
@@ -91,7 +104,7 @@ msgstr ""
 #: app/views/cms/publish.html.erb:43 app/views/cms/publish.html.erb:59
 #: app/views/comment/_comment_form.html.erb:77
 msgid "Title"
-msgstr ""
+msgstr "Titolo"
 
 #: app/models/comment.rb:5 app/models/product.rb:4 app/models/category.rb:6
 #: app/models/article.rb:16 app/models/profile.rb:15
@@ -111,12 +124,12 @@ msgstr ""
 #: app/views/enterprise_validation/_details.html.erb:3
 #: app/views/contact/sender/notification.html.erb:11
 msgid "Name"
-msgstr ""
+msgstr "Nome"
 
 #: app/models/comment.rb:6 app/models/article.rb:18 app/models/article.rb:38
 #: app/models/scrap.rb:6
 msgid "Content"
-msgstr ""
+msgstr "Contenuto"
 
 #: app/models/comment.rb:32
 msgid "{fn} can only be informed for unauthenticated authors"
@@ -124,11 +137,11 @@ msgstr ""
 
 #: app/models/comment.rb:71
 msgid "(removed user)"
-msgstr ""
+msgstr "(utente rimosso)"
 
 #: app/models/comment.rb:71
 msgid "(unauthenticated user)"
-msgstr ""
+msgstr "(utente non autenticato)"
 
 #: app/models/product.rb:5 app/models/organization.rb:108
 #: app/models/certifier.rb:7 app/views/search/_article_description.html.erb:4
@@ -137,120 +150,129 @@ msgstr ""
 #: app/views/cms/_uploaded_file.html.erb:5
 #: app/views/manage_products/show.html.erb:32
 msgid "Description"
-msgstr ""
+msgstr "Descrizione"
 
 #: app/models/product.rb:104 app/helpers/display_helper.rb:42
 #: app/helpers/display_helper.rb:51
 msgid "Uncategorized product"
-msgstr ""
+msgstr "Prodotto senza categoria"
 
 #: app/models/product.rb:244
 msgid "0%"
-msgstr ""
+msgstr "0%"
 
 #: app/models/product.rb:245
 msgid "25%"
-msgstr ""
+msgstr "25%"
 
 #: app/models/product.rb:246
 msgid "50%"
-msgstr ""
+msgstr "50%"
 
 #: app/models/product.rb:247
 msgid "75%"
-msgstr ""
+msgstr "75%"
 
 #: app/models/product.rb:248
 msgid "100%"
-msgstr ""
+msgstr "100%"
 
 #: app/models/invite_member.rb:20
 msgid "Community invitation"
-msgstr ""
+msgstr "Invito della Comunità"
 
 #: app/models/invite_member.rb:28
 msgid "%{requestor} invited you to join %{linked_subject}."
-msgstr ""
+msgstr "%{requestor} sei stato invitato ad entrare %{linked_subject}."
 
 #: app/models/invite_member.rb:40
 msgid "%{requestor} invited you to join %{community}."
 msgstr ""
+"%{requestor} sei stato invitato ad entrare nella comunità %{community}.."
 
 #: app/models/invite_member.rb:45
 msgid "%{requestor} is inviting you to join \"%{community}\" on %{system}."
 msgstr ""
+"%{requestor} sei stato invitato a far parte della comunità \"%{community}\" "
+"nel sistema %{system}."
 
 #: app/models/invite_member.rb:57 app/models/invite_friend.rb:37
 msgid "Hello <friend>,"
-msgstr ""
+msgstr "Ciao <amico>,"
 
 #: app/models/invite_member.rb:58
 msgid "<user> is inviting you to join \"<community>\" on <environment>."
 msgstr ""
+"<user> è stato invitato a far parte della comunità \"<community>\" su "
+"<environment>."
 
 #: app/models/invite_member.rb:59 app/models/invite_friend.rb:39
 msgid "To accept the invitation, please follow this link:"
-msgstr ""
+msgstr "Per accettare questo invito, segui questo link per favore:"
 
 #: app/models/my_network_block.rb:6 app/models/my_network_block.rb:10
 msgid "My network"
-msgstr ""
+msgstr "La mia Rete"
 
 #: app/models/my_network_block.rb:14
 msgid "This block displays some info about your networking."
-msgstr ""
+msgstr "Questo blocco mostra alcune informazioni riguardo la tua Rete."
 
 #: app/models/sellers_search_block.rb:6
 msgid "Search for enterprises and products"
-msgstr ""
+msgstr "Ricerca per  Prodotti e Aziende"
 
 #: app/models/sellers_search_block.rb:10
 msgid "Products/Enterprises search"
-msgstr ""
+msgstr "Ricerca Prodotti o di Aziende"
 
 #: app/models/sellers_search_block.rb:14
 msgid "Search for sellers"
-msgstr ""
+msgstr "Ricerca per Venditori"
 
 #: app/models/sellers_search_block.rb:18
 msgid "This block presents a search engine for products."
-msgstr ""
+msgstr "Questo blocco presenta un motore di ricerca per prodotti."
 
 #: app/models/categories_block.rb:4
 msgid "Generic category"
-msgstr ""
+msgstr "Categoria Generica"
 
 #: app/models/categories_block.rb:5 app/helpers/categories_helper.rb:6
 #: app/views/enterprise_registration/basic_information.html.erb:25
 msgid "Region"
-msgstr ""
+msgstr "Regione"
 
 #: app/models/categories_block.rb:6 app/views/manage_products/index.html.erb:5
 msgid "Product"
-msgstr ""
+msgstr "Prodotto"
 
 #: app/models/categories_block.rb:14 app/models/categories_block.rb:18
 msgid "Categories Menu"
-msgstr ""
+msgstr "Menu Categorie"
 
 #: app/models/categories_block.rb:22
 msgid "This block presents the categories like a web site menu."
-msgstr ""
+msgstr "Questo blocco presenta le categorie come un menu di un sito Internet."
 
 #: app/models/contact_list.rb:18
 msgid ""
 "There was an error while authenticating. Did you enter correct login and "
 "password?"
 msgstr ""
+"C'è stato un errore durante l'autenticazione. Hai utilizzato la giusta Login "
+"e Password?"
 
 #: app/models/contact_list.rb:25
 msgid ""
 "There was an error while looking for your contact list. Please, try again"
 msgstr ""
+"C'è stato un errore mentre cercavi la tua lista di contatti. Per favore, "
+"prova ancora"
 
 #: app/models/uploaded_file.rb:12
 msgid "File"
-msgstr ""
+msgstr "File (Documento)"
 
 #: app/models/uploaded_file.rb:72
 msgid "{fn} of uploaded file was larger than the maximum size of %{size}"
@@ -258,47 +280,47 @@ msgstr ""
 
 #: app/models/uploaded_file.rb:99
 msgid "Uploaded file"
-msgstr ""
+msgstr "File Caricato"
 
 #: app/models/uploaded_file.rb:103
 msgid "Upload any kind of file you want."
-msgstr ""
+msgstr "Carica qualunque tipo di File (Documento) che vuoi."
 
 #: app/models/invite_friend.rb:12
 msgid "Friend invitation"
-msgstr ""
+msgstr "Invito di un Amico"
 
 #: app/models/invite_friend.rb:16 app/models/invite_friend.rb:28
 #: app/models/add_friend.rb:32 app/models/add_friend.rb:45
 msgid "%{requestor} wants to be your friend."
-msgstr ""
+msgstr "%{requestor} vuole essere tuo amico."
 
 #: app/models/invite_friend.rb:38
 msgid "<user> is inviting you to participate on <environment>."
-msgstr ""
+msgstr "<user> ti sta invitanto a partecipare a  <environment>."
 
 #: app/models/fans_block.rb:4
 msgid "Displays the people who like the enterprise"
-msgstr ""
+msgstr "Mostra le persone a cui piace la Società"
 
 #: app/models/fans_block.rb:8
 msgid "{#} fan"
 msgid_plural "{#} fans"
-msgstr[0] ""
-msgstr[1] ""
+msgstr[0] "{#} Ammiratore"
+msgstr[1] "{#} Ammiratori"
 
 #: app/models/fans_block.rb:12
 msgid "This block presents the fans of an enterprise."
-msgstr ""
+msgstr "Questo blocco presenta gli ammiratori di una Società."
 
 #: app/models/fans_block.rb:18 app/models/favorite_enterprises_block.rb:19
 #: app/views/cms/_published_media_items.html.erb:7
 msgid "View all"
-msgstr ""
+msgstr "Mostra Tutto"
 
 #: app/models/slideshow_block.rb:12
 msgid "Slideshow"
-msgstr ""
+msgstr "Presentazione"
 
 #: app/models/featured_products_block.rb:20
 #: app/views/box_organizer/_featured_products_block.html.erb:1

=====================================
po/pt/noosfero.po
=====================================
--- a/po/pt/noosfero.po
+++ b/po/pt/noosfero.po
@@ -13,8 +13,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 1.0-690-gcb6e853\n"
 "POT-Creation-Date: 2015-03-05 12:10-0300\n"
-"PO-Revision-Date: 2015-03-14 22:06+0200\n"
-"Last-Translator: daniel <dtygel at eita.org.br>\n"
+"PO-Revision-Date: 2015-03-17 21:44+0200\n"
+"Last-Translator: Evandro Junior <evandrojr at gmail.com>\n"
 "Language-Team: Portuguese "
 "<https://hosted.weblate.org/projects/noosfero/noosfero/pt/>\n"
 "Language: pt\n"
@@ -1635,7 +1635,7 @@ msgstr ""
 "não foi aprovada pelo administrador do ambiente. A seguinte explicação foi "
 "dada: \n"
 "\n"
-"%{explication}"
+"%{explanation}"
 
 #: app/models/create_community.rb:92
 msgid ""
@@ -1946,7 +1946,7 @@ msgstr ""
 "%{environment} NÃO foi aprovada pelo validador de organização. A seguinte "
 "explicação foi dada: \n"
 "\n"
-"%{explication}"
+"%{explanation}"
 
 #: app/models/create_enterprise.rb:187
 msgid ""

=====================================
test/functional/profile_design_controller_test.rb
=====================================
--- a/test/functional/profile_design_controller_test.rb
+++ b/test/functional/profile_design_controller_test.rb
@@ -755,4 +755,12 @@ class ProfileDesignControllerTest < ActionController::TestCase
     assert_response :forbidden
   end
 
+  should 'guarantee main block is always visible to everybody' do
+    get :edit, :profile => 'designtestuser', :id => @b4.id
+    %w[logged not_logged followers].each do |option|
+    assert_no_tag :select, :attributes => {:name => 'block[display_user]'},
+     :descendant => {:tag => 'option', :attributes => {:value => option}}
+    end
+  end
+
 end

=====================================
test/unit/add_friend_test.rb
=====================================
--- a/test/unit/add_friend_test.rb
+++ b/test/unit/add_friend_test.rb
@@ -77,9 +77,9 @@ class AddFriendTest < ActiveSupport::TestCase
   end
 
   should 'not add friend twice' do
-    fast_create(AddFriend, :requestor_id => person1.id, :target_id => person2.id)
+    create AddFriend, person: person1, friend: person2, status: 1
     assert_raise ActiveRecord::RecordInvalid do
-      AddFriend.create!(:person => person1, :friend => person2)
+      create AddFriend, person: person1, friend: person2, status: 1
     end
   end
 

=====================================
test/unit/main_block_test.rb
=====================================
--- a/test/unit/main_block_test.rb
+++ b/test/unit/main_block_test.rb
@@ -29,4 +29,8 @@ class MainBlockTest < ActiveSupport::TestCase
     assert !block.visible?
   end
 
+  should 'guarantee main block is always visible to everybody' do
+    assert_equal MainBlock.new.display_user_options, {"all"=>_('All users')}
+  end
+
 end

=====================================
test/unit/person_test.rb
=====================================
--- a/test/unit/person_test.rb
+++ b/test/unit/person_test.rb
@@ -324,7 +324,9 @@ class PersonTest < ActiveSupport::TestCase
   should 'already request friendship' do
     p1 = create_user('testuser1').person
     p2 = create_user('testuser2').person
-    create(AddFriend, :person => p1, :friend => p2)
+    create(AddFriend, person: p1, friend: p2).finish
+    assert !p1.already_request_friendship?(p2)
+    create(AddFriend, person: p1, friend: p2)
     assert p1.already_request_friendship?(p2)
   end
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150318/f546b027/attachment-0001.html>


More information about the Noosfero-dev mailing list