Commit 4c75b9bdf3503d23e04cec9dd6854dbf59774469

Authored by Daniela Feitosa
2 parents e22c4b28 a349f151

Merge branch 'stable' into noosfero_0.47.0

Conflicts:
	test/unit/block_test.rb
app/models/block.rb
@@ -141,7 +141,7 @@ class Block < ActiveRecord::Base @@ -141,7 +141,7 @@ class Block < ActiveRecord::Base
141 end 141 end
142 142
143 alias :active_record_cache_key :cache_key 143 alias :active_record_cache_key :cache_key
144 - def cache_key(language='en') 144 + def cache_key(language='en', user=nil)
145 active_record_cache_key+'-'+language 145 active_record_cache_key+'-'+language
146 end 146 end
147 147
app/models/members_block.rb
@@ -36,4 +36,15 @@ class MembersBlock < ProfileListBlock @@ -36,4 +36,15 @@ class MembersBlock < ProfileListBlock
36 } 36 }
37 end 37 end
38 38
  39 + def cache_key(language='en', user=nil)
  40 + logged = ''
  41 + if user
  42 + logged += '-logged-in'
  43 + if user.is_member_of? self.owner
  44 + logged += '-member'
  45 + end
  46 + end
  47 + super + logged
  48 + end
  49 +
39 end 50 end
app/views/shared/block.rhtml
1 <% if block.cacheable? && use_cache %> 1 <% if block.cacheable? && use_cache %>
2 - <% cache_timeout(block.cache_key(language), block.timeout) do %> 2 + <% cache_timeout(block.cache_key(language, user), block.timeout) do %>
3 <%= display_block_content(block, user, main_content) %> 3 <%= display_block_content(block, user, main_content) %>
4 <% end %> 4 <% end %>
5 <% else %> 5 <% else %>
po/eo/noosfero.po
@@ -7,7 +7,7 @@ msgid &quot;&quot; @@ -7,7 +7,7 @@ msgid &quot;&quot;
7 msgstr "" 7 msgstr ""
8 "Project-Id-Version: noosfero 0.45.2\n" 8 "Project-Id-Version: noosfero 0.45.2\n"
9 "POT-Creation-Date: 2014-01-17 18:26-0000\n" 9 "POT-Creation-Date: 2014-01-17 18:26-0000\n"
10 -"PO-Revision-Date: 2011-03-30 20:52-0300\n" 10 +"PO-Revision-Date: 2014-03-25 15:35+0000\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n" 12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: eo\n" 13 "Language: eo\n"
@@ -107,7 +107,7 @@ msgstr &quot;&quot; @@ -107,7 +107,7 @@ msgstr &quot;&quot;
107 #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:25 107 #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:25
108 #: app/views/profile/_private_profile.rhtml:10 108 #: app/views/profile/_private_profile.rhtml:10
109 msgid "Join" 109 msgid "Join"
110 -msgstr "" 110 +msgstr "Eniri"
111 111
112 #: app/helpers/application_helper.rb:554 112 #: app/helpers/application_helper.rb:554
113 #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:4 113 #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:4
@@ -291,7 +291,7 @@ msgstr &quot;&quot; @@ -291,7 +291,7 @@ msgstr &quot;&quot;
291 291
292 #: app/helpers/application_helper.rb:1118 292 #: app/helpers/application_helper.rb:1118
293 msgid "See all" 293 msgid "See all"
294 -msgstr "" 294 +msgstr "Vidi ĉiujn"
295 295
296 #: app/helpers/application_helper.rb:1121 296 #: app/helpers/application_helper.rb:1121
297 msgid "<span>Manage</span> %s" 297 msgid "<span>Manage</span> %s"
@@ -678,11 +678,11 @@ msgstr &quot;&quot; @@ -678,11 +678,11 @@ msgstr &quot;&quot;
678 678
679 #: app/helpers/forum_helper.rb:14 app/helpers/blog_helper.rb:23 679 #: app/helpers/forum_helper.rb:14 app/helpers/blog_helper.rb:23
680 msgid "&laquo; Newer posts" 680 msgid "&laquo; Newer posts"
681 -msgstr "" 681 +msgstr "&laquo; Pli freŝaj afiŝoj"
682 682
683 #: app/helpers/forum_helper.rb:15 app/helpers/blog_helper.rb:24 683 #: app/helpers/forum_helper.rb:15 app/helpers/blog_helper.rb:24
684 msgid "Older posts &raquo;" 684 msgid "Older posts &raquo;"
685 -msgstr "" 685 +msgstr "Malpli freŝaj afiŝoj &raquo"
686 686
687 #: app/helpers/forum_helper.rb:18 687 #: app/helpers/forum_helper.rb:18
688 msgid "Discussion topic" 688 msgid "Discussion topic"
@@ -763,63 +763,63 @@ msgstr &quot;&quot; @@ -763,63 +763,63 @@ msgstr &quot;&quot;
763 #: app/helpers/dates_helper.rb:7 app/helpers/forms_helper.rb:172 763 #: app/helpers/dates_helper.rb:7 app/helpers/forms_helper.rb:172
764 #: plugins/display_content/lib/display_content_block.rb:4 764 #: plugins/display_content/lib/display_content_block.rb:4
765 msgid "January" 765 msgid "January"
766 -msgstr "" 766 +msgstr "Januaro"
767 767
768 #: app/helpers/dates_helper.rb:8 app/helpers/forms_helper.rb:172 768 #: app/helpers/dates_helper.rb:8 app/helpers/forms_helper.rb:172
769 #: plugins/display_content/lib/display_content_block.rb:5 769 #: plugins/display_content/lib/display_content_block.rb:5
770 msgid "February" 770 msgid "February"
771 -msgstr "" 771 +msgstr "Februaro"
772 772
773 #: app/helpers/dates_helper.rb:9 app/helpers/forms_helper.rb:172 773 #: app/helpers/dates_helper.rb:9 app/helpers/forms_helper.rb:172
774 #: plugins/display_content/lib/display_content_block.rb:6 774 #: plugins/display_content/lib/display_content_block.rb:6
775 msgid "March" 775 msgid "March"
776 -msgstr "" 776 +msgstr "Marto"
777 777
778 #: app/helpers/dates_helper.rb:10 app/helpers/forms_helper.rb:172 778 #: app/helpers/dates_helper.rb:10 app/helpers/forms_helper.rb:172
779 #: plugins/display_content/lib/display_content_block.rb:7 779 #: plugins/display_content/lib/display_content_block.rb:7
780 msgid "April" 780 msgid "April"
781 -msgstr "" 781 +msgstr "Aprilo"
782 782
783 #: app/helpers/dates_helper.rb:11 app/helpers/forms_helper.rb:172 783 #: app/helpers/dates_helper.rb:11 app/helpers/forms_helper.rb:172
784 #: app/helpers/forms_helper.rb:173 784 #: app/helpers/forms_helper.rb:173
785 #: plugins/display_content/lib/display_content_block.rb:8 785 #: plugins/display_content/lib/display_content_block.rb:8
786 msgid "May" 786 msgid "May"
787 -msgstr "" 787 +msgstr "Majo"
788 788
789 #: app/helpers/dates_helper.rb:12 app/helpers/forms_helper.rb:172 789 #: app/helpers/dates_helper.rb:12 app/helpers/forms_helper.rb:172
790 #: plugins/display_content/lib/display_content_block.rb:9 790 #: plugins/display_content/lib/display_content_block.rb:9
791 msgid "June" 791 msgid "June"
792 -msgstr "" 792 +msgstr "Junio"
793 793
794 #: app/helpers/dates_helper.rb:13 app/helpers/forms_helper.rb:172 794 #: app/helpers/dates_helper.rb:13 app/helpers/forms_helper.rb:172
795 #: plugins/display_content/lib/display_content_block.rb:10 795 #: plugins/display_content/lib/display_content_block.rb:10
796 msgid "July" 796 msgid "July"
797 -msgstr "" 797 +msgstr "Julio"
798 798
799 #: app/helpers/dates_helper.rb:14 app/helpers/forms_helper.rb:172 799 #: app/helpers/dates_helper.rb:14 app/helpers/forms_helper.rb:172
800 #: plugins/display_content/lib/display_content_block.rb:11 800 #: plugins/display_content/lib/display_content_block.rb:11
801 msgid "August" 801 msgid "August"
802 -msgstr "" 802 +msgstr "Aŭgusto"
803 803
804 #: app/helpers/dates_helper.rb:15 app/helpers/forms_helper.rb:172 804 #: app/helpers/dates_helper.rb:15 app/helpers/forms_helper.rb:172
805 #: plugins/display_content/lib/display_content_block.rb:12 805 #: plugins/display_content/lib/display_content_block.rb:12
806 msgid "September" 806 msgid "September"
807 -msgstr "" 807 +msgstr "Septembro"
808 808
809 #: app/helpers/dates_helper.rb:16 app/helpers/forms_helper.rb:172 809 #: app/helpers/dates_helper.rb:16 app/helpers/forms_helper.rb:172
810 #: plugins/display_content/lib/display_content_block.rb:13 810 #: plugins/display_content/lib/display_content_block.rb:13
811 msgid "October" 811 msgid "October"
812 -msgstr "" 812 +msgstr "Oktobro"
813 813
814 #: app/helpers/dates_helper.rb:17 app/helpers/forms_helper.rb:172 814 #: app/helpers/dates_helper.rb:17 app/helpers/forms_helper.rb:172
815 #: plugins/display_content/lib/display_content_block.rb:14 815 #: plugins/display_content/lib/display_content_block.rb:14
816 msgid "November" 816 msgid "November"
817 -msgstr "" 817 +msgstr "Novembro"
818 818
819 #: app/helpers/dates_helper.rb:18 app/helpers/forms_helper.rb:172 819 #: app/helpers/dates_helper.rb:18 app/helpers/forms_helper.rb:172
820 #: plugins/display_content/lib/display_content_block.rb:15 820 #: plugins/display_content/lib/display_content_block.rb:15
821 msgid "December" 821 msgid "December"
822 -msgstr "" 822 +msgstr "Decembro"
823 823
824 #: app/helpers/dates_helper.rb:28 824 #: app/helpers/dates_helper.rb:28
825 #: plugins/display_content/lib/display_content_block.rb:153 825 #: plugins/display_content/lib/display_content_block.rb:153
@@ -834,7 +834,7 @@ msgstr &quot;&quot; @@ -834,7 +834,7 @@ msgstr &quot;&quot;
834 #: app/helpers/dates_helper.rb:31 834 #: app/helpers/dates_helper.rb:31
835 #: plugins/display_content/lib/display_content_block.rb:156 835 #: plugins/display_content/lib/display_content_block.rb:156
836 msgid "%{month_name} %{day}, %{year}" 836 msgid "%{month_name} %{day}, %{year}"
837 -msgstr "" 837 +msgstr "La %{day}-a de %{month_name} %{year}"
838 838
839 #: app/helpers/dates_helper.rb:31 839 #: app/helpers/dates_helper.rb:31
840 #: plugins/display_content/lib/display_content_block.rb:156 840 #: plugins/display_content/lib/display_content_block.rb:156
@@ -8043,7 +8043,7 @@ msgstr &quot;&quot; @@ -8043,7 +8043,7 @@ msgstr &quot;&quot;
8043 8043
8044 #: app/views/account/index_anonymous.rhtml:10 8044 #: app/views/account/index_anonymous.rhtml:10
8045 msgid "Sign up." 8045 msgid "Sign up."
8046 -msgstr "" 8046 +msgstr "Aliĝi"
8047 8047
8048 #: app/views/account/index_anonymous.rhtml:11 8048 #: app/views/account/index_anonymous.rhtml:11
8049 msgid "" 8049 msgid ""
po/es/noosfero.po
@@ -7,7 +7,7 @@ msgid &quot;&quot; @@ -7,7 +7,7 @@ msgid &quot;&quot;
7 msgstr "" 7 msgstr ""
8 "Project-Id-Version: noosfero 0.45.2\n" 8 "Project-Id-Version: noosfero 0.45.2\n"
9 "POT-Creation-Date: 2014-01-17 18:26-0000\n" 9 "POT-Creation-Date: 2014-01-17 18:26-0000\n"
10 -"PO-Revision-Date: 2013-01-03 18:39-0300\n" 10 +"PO-Revision-Date: 2014-03-25 14:55+0000\n"
11 "Last-Translator: Luis David Aguilar Carlos <ludwig9003@gmail.com>,Freddy " 11 "Last-Translator: Luis David Aguilar Carlos <ludwig9003@gmail.com>,Freddy "
12 "Martín Hernández Facio <fmhf14@gmail.com>, Pedro Alonzo Ramírez Tovar <pedro." 12 "Martín Hernández Facio <fmhf14@gmail.com>, Pedro Alonzo Ramírez Tovar <pedro."
13 "alonzo709@gmail.com>\n" 13 "alonzo709@gmail.com>\n"
@@ -292,7 +292,6 @@ msgid &quot;Next&quot; @@ -292,7 +292,6 @@ msgid &quot;Next&quot;
292 msgstr "Siguiente" 292 msgstr "Siguiente"
293 293
294 #: app/helpers/application_helper.rb:1118 294 #: app/helpers/application_helper.rb:1118
295 -#, fuzzy  
296 msgid "See all" 295 msgid "See all"
297 msgstr "Ver todos" 296 msgstr "Ver todos"
298 297
@@ -690,11 +689,11 @@ msgstr &quot;Configurar foro&quot; @@ -690,11 +689,11 @@ msgstr &quot;Configurar foro&quot;
690 689
691 #: app/helpers/forum_helper.rb:14 app/helpers/blog_helper.rb:23 690 #: app/helpers/forum_helper.rb:14 app/helpers/blog_helper.rb:23
692 msgid "&laquo; Newer posts" 691 msgid "&laquo; Newer posts"
693 -msgstr "&laquo; Entradas recientes" 692 +msgstr "&laquo; Noticias más nuevas"
694 693
695 #: app/helpers/forum_helper.rb:15 app/helpers/blog_helper.rb:24 694 #: app/helpers/forum_helper.rb:15 app/helpers/blog_helper.rb:24
696 msgid "Older posts &raquo;" 695 msgid "Older posts &raquo;"
697 -msgstr "Entradas antiguas &raquo;" 696 +msgstr "Noticias más viejas &raquo;"
698 697
699 #: app/helpers/forum_helper.rb:18 698 #: app/helpers/forum_helper.rb:18
700 msgid "Discussion topic" 699 msgid "Discussion topic"
@@ -841,15 +840,13 @@ msgstr &quot;%{day} de %{month} %{year}&quot; @@ -841,15 +840,13 @@ msgstr &quot;%{day} de %{month} %{year}&quot;
841 840
842 #: app/helpers/dates_helper.rb:28 app/helpers/dates_helper.rb:40 841 #: app/helpers/dates_helper.rb:28 app/helpers/dates_helper.rb:40
843 #: plugins/display_content/lib/display_content_block.rb:153 842 #: plugins/display_content/lib/display_content_block.rb:153
844 -#, fuzzy  
845 msgid "%{month}/%{day}" 843 msgid "%{month}/%{day}"
846 -msgstr "%{day} de %{month} %{year}" 844 +msgstr "%{day}/%{month}"
847 845
848 #: app/helpers/dates_helper.rb:31 846 #: app/helpers/dates_helper.rb:31
849 #: plugins/display_content/lib/display_content_block.rb:156 847 #: plugins/display_content/lib/display_content_block.rb:156
850 -#, fuzzy  
851 msgid "%{month_name} %{day}, %{year}" 848 msgid "%{month_name} %{day}, %{year}"
852 -msgstr "%{day} de %{month} %{year}" 849 +msgstr "%{day} de %{month} de %{year}"
853 850
854 # LAs cadenas de este tipo NO se traducen 851 # LAs cadenas de este tipo NO se traducen
855 #: app/helpers/dates_helper.rb:31 852 #: app/helpers/dates_helper.rb:31
@@ -877,21 +874,19 @@ msgstr &quot;%{month} %{year}&quot; @@ -877,21 +874,19 @@ msgstr &quot;%{month} %{year}&quot;
877 874
878 #: app/helpers/dates_helper.rb:53 875 #: app/helpers/dates_helper.rb:53
879 msgid "%{day} %{month} %{year}, %{hour}:%{minutes}" 876 msgid "%{day} %{month} %{year}, %{hour}:%{minutes}"
880 -msgstr "%{day} %{month} %{year}, %{hour}:%{minutes}" 877 +msgstr "%{day} de %{month} de %{year}, %{hour}:%{minutes}"
881 878
882 #: app/helpers/dates_helper.rb:65 879 #: app/helpers/dates_helper.rb:65
883 -#, fuzzy  
884 msgid "from %{month} %{day1} to %{day2}, %{year}" 880 msgid "from %{month} %{day1} to %{day2}, %{year}"
885 -msgstr "%{day} de %{month} %{year}" 881 +msgstr "de %{day1} para %{day2} de %{month} de %{year}"
886 882
887 #: app/helpers/dates_helper.rb:72 883 #: app/helpers/dates_helper.rb:72
888 -#, fuzzy  
889 msgid "from %{date1} to %{date2}, %{year}" 884 msgid "from %{date1} to %{date2}, %{year}"
890 -msgstr "Por %{author} el %{date}" 885 +msgstr "de %{date1} para %{date2} de %{year}"
891 886
892 #: app/helpers/dates_helper.rb:79 887 #: app/helpers/dates_helper.rb:79
893 msgid "from %{date1} to %{date2}" 888 msgid "from %{date1} to %{date2}"
894 -msgstr "Por %{author} el %{date}" 889 +msgstr "de %{date1} para %{date2}"
895 890
896 #: app/helpers/dates_helper.rb:89 app/helpers/forms_helper.rb:163 891 #: app/helpers/dates_helper.rb:89 app/helpers/forms_helper.rb:163
897 msgid "Sun" 892 msgid "Sun"
po/it/noosfero.po
@@ -8,7 +8,7 @@ msgid &quot;&quot; @@ -8,7 +8,7 @@ msgid &quot;&quot;
8 msgstr "" 8 msgstr ""
9 "Project-Id-Version: noosfero 0.45.2\n" 9 "Project-Id-Version: noosfero 0.45.2\n"
10 "POT-Creation-Date: 2014-01-17 18:26-0000\n" 10 "POT-Creation-Date: 2014-01-17 18:26-0000\n"
11 -"PO-Revision-Date: 2012-06-05 10:27-0300\n" 11 +"PO-Revision-Date: 2014-03-25 15:39+0000\n"
12 "Last-Translator: Daniela Feitosa <danielafeitosa@colivre.coop.br>\n" 12 "Last-Translator: Daniela Feitosa <danielafeitosa@colivre.coop.br>\n"
13 "Language-Team: LANGUAGE TEAM <LL@li.org>\n" 13 "Language-Team: LANGUAGE TEAM <LL@li.org>\n"
14 "Language: it\n" 14 "Language: it\n"
@@ -109,7 +109,7 @@ msgstr &quot;&quot; @@ -109,7 +109,7 @@ msgstr &quot;&quot;
109 #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:25 109 #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:25
110 #: app/views/profile/_private_profile.rhtml:10 110 #: app/views/profile/_private_profile.rhtml:10
111 msgid "Join" 111 msgid "Join"
112 -msgstr "" 112 +msgstr "Accedere"
113 113
114 #: app/helpers/application_helper.rb:554 114 #: app/helpers/application_helper.rb:554
115 #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:4 115 #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:4
@@ -752,63 +752,63 @@ msgstr &quot;&quot; @@ -752,63 +752,63 @@ msgstr &quot;&quot;
752 #: app/helpers/dates_helper.rb:7 app/helpers/forms_helper.rb:172 752 #: app/helpers/dates_helper.rb:7 app/helpers/forms_helper.rb:172
753 #: plugins/display_content/lib/display_content_block.rb:4 753 #: plugins/display_content/lib/display_content_block.rb:4
754 msgid "January" 754 msgid "January"
755 -msgstr "" 755 +msgstr "gennaio"
756 756
757 #: app/helpers/dates_helper.rb:8 app/helpers/forms_helper.rb:172 757 #: app/helpers/dates_helper.rb:8 app/helpers/forms_helper.rb:172
758 #: plugins/display_content/lib/display_content_block.rb:5 758 #: plugins/display_content/lib/display_content_block.rb:5
759 msgid "February" 759 msgid "February"
760 -msgstr "" 760 +msgstr "febbraio"
761 761
762 #: app/helpers/dates_helper.rb:9 app/helpers/forms_helper.rb:172 762 #: app/helpers/dates_helper.rb:9 app/helpers/forms_helper.rb:172
763 #: plugins/display_content/lib/display_content_block.rb:6 763 #: plugins/display_content/lib/display_content_block.rb:6
764 msgid "March" 764 msgid "March"
765 -msgstr "" 765 +msgstr "marzo"
766 766
767 #: app/helpers/dates_helper.rb:10 app/helpers/forms_helper.rb:172 767 #: app/helpers/dates_helper.rb:10 app/helpers/forms_helper.rb:172
768 #: plugins/display_content/lib/display_content_block.rb:7 768 #: plugins/display_content/lib/display_content_block.rb:7
769 msgid "April" 769 msgid "April"
770 -msgstr "" 770 +msgstr "aprile"
771 771
772 #: app/helpers/dates_helper.rb:11 app/helpers/forms_helper.rb:172 772 #: app/helpers/dates_helper.rb:11 app/helpers/forms_helper.rb:172
773 #: app/helpers/forms_helper.rb:173 773 #: app/helpers/forms_helper.rb:173
774 #: plugins/display_content/lib/display_content_block.rb:8 774 #: plugins/display_content/lib/display_content_block.rb:8
775 msgid "May" 775 msgid "May"
776 -msgstr "" 776 +msgstr "maggio"
777 777
778 #: app/helpers/dates_helper.rb:12 app/helpers/forms_helper.rb:172 778 #: app/helpers/dates_helper.rb:12 app/helpers/forms_helper.rb:172
779 #: plugins/display_content/lib/display_content_block.rb:9 779 #: plugins/display_content/lib/display_content_block.rb:9
780 msgid "June" 780 msgid "June"
781 -msgstr "" 781 +msgstr "giugno"
782 782
783 #: app/helpers/dates_helper.rb:13 app/helpers/forms_helper.rb:172 783 #: app/helpers/dates_helper.rb:13 app/helpers/forms_helper.rb:172
784 #: plugins/display_content/lib/display_content_block.rb:10 784 #: plugins/display_content/lib/display_content_block.rb:10
785 msgid "July" 785 msgid "July"
786 -msgstr "" 786 +msgstr "luglio"
787 787
788 #: app/helpers/dates_helper.rb:14 app/helpers/forms_helper.rb:172 788 #: app/helpers/dates_helper.rb:14 app/helpers/forms_helper.rb:172
789 #: plugins/display_content/lib/display_content_block.rb:11 789 #: plugins/display_content/lib/display_content_block.rb:11
790 msgid "August" 790 msgid "August"
791 -msgstr "" 791 +msgstr "agosto"
792 792
793 #: app/helpers/dates_helper.rb:15 app/helpers/forms_helper.rb:172 793 #: app/helpers/dates_helper.rb:15 app/helpers/forms_helper.rb:172
794 #: plugins/display_content/lib/display_content_block.rb:12 794 #: plugins/display_content/lib/display_content_block.rb:12
795 msgid "September" 795 msgid "September"
796 -msgstr "" 796 +msgstr "settembre"
797 797
798 #: app/helpers/dates_helper.rb:16 app/helpers/forms_helper.rb:172 798 #: app/helpers/dates_helper.rb:16 app/helpers/forms_helper.rb:172
799 #: plugins/display_content/lib/display_content_block.rb:13 799 #: plugins/display_content/lib/display_content_block.rb:13
800 msgid "October" 800 msgid "October"
801 -msgstr "" 801 +msgstr "ottobre"
802 802
803 #: app/helpers/dates_helper.rb:17 app/helpers/forms_helper.rb:172 803 #: app/helpers/dates_helper.rb:17 app/helpers/forms_helper.rb:172
804 #: plugins/display_content/lib/display_content_block.rb:14 804 #: plugins/display_content/lib/display_content_block.rb:14
805 msgid "November" 805 msgid "November"
806 -msgstr "" 806 +msgstr "novembre"
807 807
808 #: app/helpers/dates_helper.rb:18 app/helpers/forms_helper.rb:172 808 #: app/helpers/dates_helper.rb:18 app/helpers/forms_helper.rb:172
809 #: plugins/display_content/lib/display_content_block.rb:15 809 #: plugins/display_content/lib/display_content_block.rb:15
810 msgid "December" 810 msgid "December"
811 -msgstr "" 811 +msgstr "dicembre"
812 812
813 #: app/helpers/dates_helper.rb:28 813 #: app/helpers/dates_helper.rb:28
814 #: plugins/display_content/lib/display_content_block.rb:153 814 #: plugins/display_content/lib/display_content_block.rb:153
@@ -823,7 +823,7 @@ msgstr &quot;&quot; @@ -823,7 +823,7 @@ msgstr &quot;&quot;
823 #: app/helpers/dates_helper.rb:31 823 #: app/helpers/dates_helper.rb:31
824 #: plugins/display_content/lib/display_content_block.rb:156 824 #: plugins/display_content/lib/display_content_block.rb:156
825 msgid "%{month_name} %{day}, %{year}" 825 msgid "%{month_name} %{day}, %{year}"
826 -msgstr "" 826 +msgstr "%{day} %{month_name} %{year}"
827 827
828 #: app/helpers/dates_helper.rb:31 828 #: app/helpers/dates_helper.rb:31
829 #: plugins/display_content/lib/display_content_block.rb:156 829 #: plugins/display_content/lib/display_content_block.rb:156
@@ -8016,7 +8016,7 @@ msgstr &quot;&quot; @@ -8016,7 +8016,7 @@ msgstr &quot;&quot;
8016 8016
8017 #: app/views/account/index_anonymous.rhtml:10 8017 #: app/views/account/index_anonymous.rhtml:10
8018 msgid "Sign up." 8018 msgid "Sign up."
8019 -msgstr "" 8019 +msgstr "Registro"
8020 8020
8021 #: app/views/account/index_anonymous.rhtml:11 8021 #: app/views/account/index_anonymous.rhtml:11
8022 msgid "" 8022 msgid ""
test/unit/block_test.rb
@@ -222,4 +222,11 @@ class BlockTest &lt; ActiveSupport::TestCase @@ -222,4 +222,11 @@ class BlockTest &lt; ActiveSupport::TestCase
222 assert block.visible?(2) 222 assert block.visible?(2)
223 assert !block.visible?(3) 223 assert !block.visible?(3)
224 end 224 end
  225 +
  226 + should 'accept user as parameter on cache_key without change its value' do
  227 + person = fast_create(Person)
  228 + block = Block.new
  229 + assert_equal block.cache_key('en'), block.cache_key('en', person)
  230 + end
  231 +
225 end 232 end
test/unit/members_block_test.rb
@@ -35,4 +35,28 @@ class MembersBlockTest &lt; ActiveSupport::TestCase @@ -35,4 +35,28 @@ class MembersBlockTest &lt; ActiveSupport::TestCase
35 assert_same list, block.profiles 35 assert_same list, block.profiles
36 end 36 end
37 37
  38 + should 'use logged-in to compose cache key' do
  39 + person = fast_create(Person)
  40 + community = fast_create(Community)
  41 + block = MembersBlock.create
  42 + block.expects(:owner).returns(community)
  43 +
  44 + assert_match(/-logged-in/,block.cache_key('en', person))
  45 + end
  46 +
  47 + should 'use logged-in and member to compose cache key for members' do
  48 + person = fast_create(Person)
  49 + community = fast_create(Community)
  50 + community.add_member person
  51 + block = MembersBlock.create
  52 + block.expects(:owner).returns(community)
  53 +
  54 + assert_match(/-logged-in-member/,block.cache_key('en', person))
  55 + end
  56 +
  57 + should 'not change block cache key if user is nil' do
  58 + block = MembersBlock.new
  59 + assert_equal block.cache_key('en'), block.cache_key('en', nil)
  60 + end
  61 +
38 end 62 end