Commit 57dba711463fa399a3efbf83af2f28bd3a9c5280

Authored by Evandro Jr
2 parents 416e5e6e fe6dd433

Merge branch 'staging' of softwarepublico.gov.br:noosferogov/noosfero into staging

Gemfile
... ... @@ -34,7 +34,7 @@ gem 'slim'
34 34  
35 35 # API dependencies
36 36 gem 'grape', '~> 0.12'
37   -gem 'grape-entity'
  37 +gem 'grape-entity', '= 0.4.8'
38 38 gem 'grape_logging'
39 39 gem 'grape-swagger'
40 40 gem 'swagger-ui_rails'
... ... @@ -48,7 +48,7 @@ gem 'api-pagination', '~> 4.1.1'
48 48 # asset pipeline
49 49 gem 'uglifier', '>= 1.0.3'
50 50 gem 'sass-rails'
51   -gem 'sprockets-rails', '~> 2.3'
  51 +gem 'sprockets-rails', '~> 2.1'
52 52  
53 53 # gems to enable rails3 behaviour
54 54 gem 'protected_attributes'
... ...
Gemfile.lock
... ... @@ -230,7 +230,7 @@ GEM
230 230 rack-accept
231 231 rack-mount
232 232 virtus (>= 1.0.0)
233   - grape-entity (0.5.0)
  233 + grape-entity (0.4.8)
234 234 activesupport
235 235 multi_json (>= 1.3.2)
236 236 grape-swagger (0.10.2)
... ... @@ -439,7 +439,7 @@ DEPENDENCIES
439 439 gdata (> 0.0.0)!
440 440 gettext (~> 3.1)
441 441 grape (~> 0.12)
442   - grape-entity
  442 + grape-entity (~> 0.4.8)
443 443 grape-swagger
444 444 grape_logging
445 445 honeypot (= 0.0.0)!
... ... @@ -477,7 +477,7 @@ DEPENDENCIES
477 477 selenium-webdriver
478 478 slim
479 479 spring
480   - sprockets-rails (~> 2.3)
  480 + sprockets-rails (~> 2.1)
481 481 swagger-ui_rails
482 482 test-unit
483 483 uglifier (>= 1.0.3)
... ...
app/helpers/application_helper.rb
... ... @@ -505,32 +505,6 @@ module ApplicationHelper
505 505 sex
506 506 end
507 507  
508   - def profile_cat_icons( profile )
509   - if profile.class == Enterprise
510   - icons = profile.product_categories.unique_by_level(2).limit(3).map do |c|
511   - filtered_category = c.filtered_category.blank? ? c.path.split('/').last : c.filtered_category
512   - category_title = filtered_category.split(/[-_\s,.;'"]+/).map(&:capitalize).join(' ')
513   - category_name = category_title.gsub(' ', '_' )
514   - category_icon = "/images/icons-cat/#{category_name}.png"
515   - if ! File.exists?(Rails.root.join('public', category_icon))
516   - category_icon = '/images/icons-cat/undefined.png'
517   - end
518   - content_tag('span',
519   - content_tag( 'span', category_title ),
520   - :title => category_title,
521   - :class => 'product-cat-icon cat_icon_' + category_name,
522   - :style => "background-image:url(#{category_icon})"
523   - )
524   - end.join("\n").html_safe
525   - content_tag('div',
526   - content_tag( 'span', _('Principal Product Categories'), :class => 'header' ) +"\n"+ icons,
527   - :class => 'product-category-icons'
528   - )
529   - else
530   - ''
531   - end
532   - end
533   -
534 508 def links_for_balloon(profile)
535 509 if environment.enabled?(:show_balloon_with_profile_links_when_clicked)
536 510 if profile.kind_of?(Person)
... ... @@ -589,7 +563,7 @@ module ApplicationHelper
589 563 link_to(
590 564 content_tag( 'span', profile_image( profile, size ), :class => 'profile-image' ) +
591 565 content_tag( 'span', h(name), :class => ( profile.class == Person ? 'fn' : 'org' ) ) +
592   - extra_info + profile_sex_icon( profile ) + profile_cat_icons( profile ),
  566 + extra_info + profile_sex_icon( profile ),
593 567 profile.url,
594 568 :class => 'profile_link url',
595 569 :help => _('Click on this icon to go to the <b>%s</b>\'s home page') % profile.name,
... ...
app/models/product_category.rb
... ... @@ -13,9 +13,6 @@ class ProductCategory &lt; Category
13 13 scope :by_environment, -> environment {
14 14 where 'environment_id = ?', environment.id
15 15 }
16   - scope :unique_by_level, -> level {
17   - select "DISTINCT ON (filtered_category) split_part(path, '/', #{level}) AS filtered_category, categories.*"
18   - }
19 16  
20 17 def all_products
21 18 Product.where(product_category_id: (all_children << self).map(&:id))
... ...
app/models/user.rb
... ... @@ -172,11 +172,6 @@ class User &lt; ActiveRecord::Base
172 172 end
173 173 end
174 174  
175   - TOKEN_VALIDITY = 2.weeks
176   - def private_token_expired?
177   - self.private_token.nil? || (self.private_token_generated_at + TOKEN_VALIDITY < DateTime.now)
178   - end
179   -
180 175 # Activates the user in the database.
181 176 def activate
182 177 return false unless self.person
... ...
app/views/blocks/profile_info.html.erb
... ... @@ -7,8 +7,7 @@
7 7 <span class="profile-info-picture-inner2">
8 8 <%=
9 9 profile_image(block.owner, :thumb) +"\n"+
10   - profile_sex_icon( profile ) +
11   - profile_cat_icons( profile )
  10 + profile_sex_icon( profile )
12 11 %>
13 12 </span>
14 13 </div>
... ...
lib/noosfero/api/helpers.rb
... ... @@ -34,7 +34,6 @@ require_relative &#39;../../find_by_contents&#39;
34 34 def current_user
35 35 private_token = (params[PRIVATE_TOKEN_PARAM] || headers['Private-Token']).to_s
36 36 @current_user ||= User.find_by_private_token(private_token)
37   - @current_user = nil if !@current_user.nil? && @current_user.private_token_expired?
38 37 @current_user
39 38 end
40 39  
... ...
lib/tasks/plugins_tests.rake
... ... @@ -111,7 +111,8 @@ def run_test(name, files)
111 111 end
112 112  
113 113 def run_minitest files
114   - sh 'ruby', '-Itest', *files
  114 + files = files.map{|f| File.join(Rails.root, f)}
  115 + sh 'ruby', '-Itest', '-e ARGV.each{|f| require f}', *files
115 116 end
116 117  
117 118 def run_cucumber(profile, files)
... ...
plugins/custom_forms/po/es/custom_forms.po
... ... @@ -7,8 +7,8 @@ msgid &quot;&quot;
7 7 msgstr ""
8 8 "Project-Id-Version: 1.3~rc2-1-ga15645d\n"
9 9 "POT-Creation-Date: 2015-10-30 16:35-0300\n"
10   -"PO-Revision-Date: 2015-03-09 09:51+0200\n"
11   -"Last-Translator: Michal Čihař <michal@cihar.com>\n"
  10 +"PO-Revision-Date: 2016-01-04 15:22+0000\n"
  11 +"Last-Translator: María Vecino <mariavecino@ecoalternative.net>\n"
12 12 "Language-Team: Spanish <https://hosted.weblate.org/projects/noosfero/plugin-"
13 13 "custom-forms/es/>\n"
14 14 "Language: es\n"
... ... @@ -16,7 +16,7 @@ msgstr &quot;&quot;
16 16 "Content-Type: text/plain; charset=UTF-8\n"
17 17 "Content-Transfer-Encoding: 8bit\n"
18 18 "Plural-Forms: nplurals=2; plural=n != 1;\n"
19   -"X-Generator: Weblate 2.3-dev\n"
  19 +"X-Generator: Weblate 2.5-dev\n"
20 20  
21 21 #: plugins/custom_forms/lib/custom_forms_plugin/form.rb:67
22 22 #, fuzzy
... ... @@ -66,9 +66,8 @@ msgstr &quot;%{fn} es obligatorio&quot;
66 66  
67 67 #: plugins/custom_forms/lib/custom_forms_plugin/helper.rb:14
68 68 #: plugins/custom_forms/lib/custom_forms_plugin/helper.rb:47
69   -#, fuzzy
70 69 msgid "Logged users"
71   -msgstr "Autenticado como %s"
  70 +msgstr "Usuarios registrados"
72 71  
73 72 #: plugins/custom_forms/lib/custom_forms_plugin/helper.rb:19
74 73 #, fuzzy
... ... @@ -193,7 +192,7 @@ msgstr &quot;Nombre&quot;
193 192 #: plugins/custom_forms/views/custom_forms_plugin_profile/show.html.erb:20
194 193 #: plugins/custom_forms/views/custom_forms_plugin_myprofile/_form.html.erb:41
195 194 msgid "Email"
196   -msgstr ""
  195 +msgstr "Correo electrónico"
197 196  
198 197 #: plugins/custom_forms/views/custom_forms_plugin_profile/show.html.erb:31
199 198 msgid "Your e-mail will be visible to this form's owners."
... ...
plugins/organization_ratings/po/pt/organization_ratings.po
... ... @@ -99,9 +99,9 @@ msgid &quot;&quot;
99 99 " about your request."
100 100 msgstr ""
101 101 "Seu pedido para comentar em %{target} foi\n"
102   -" enviado. O administrador irá recebê-lo e aprovarou\n"
  102 +" enviado. O administrador irá recebê-lo e aprovar ou\n"
103 103 " rejeitar seu pedido de acordo com seus métodos e critérios.\n"
104   -" Você será notificado assim que o administrador tenha umaposição\n"
  104 +" Você será notificado assim que o administrador tenha uma posição\n"
105 105 " sobre seu pedido."
106 106  
107 107 #: plugins/organization_ratings/lib/create_organization_rating_comment.rb:112
... ... @@ -220,7 +220,7 @@ msgstr &quot;Veja mais&quot;
220 220  
221 221 #: plugins/organization_ratings/views/blocks/display_organization_average_rating.html.erb:4
222 222 msgid "Rating: "
223   -msgstr "Avaliação:"
  223 +msgstr "Avaliação: "
224 224  
225 225 #: plugins/organization_ratings/views/blocks/display_organization_average_rating.html.erb:18
226 226 msgid "Be the first to rate!"
... ...
plugins/remote_user/lib/remote_user_plugin.rb
... ... @@ -28,9 +28,9 @@ class RemoteUserPlugin &lt; Noosfero::Plugin
28 28 end
29 29  
30 30 if !logged_in?
31   - self.current_user = User.find_by_login(remote_user)
  31 + self.current_user = User.where(environment_id: environment, login: remote_user).first
32 32 unless self.current_user
33   - self.current_user = User.create!(:login => remote_user, :email => remote_user_email, :name => remote_user_name, :password => ('pw4'+remote_user), :password_confirmation => ('pw4'+remote_user))
  33 + self.current_user = User.create!(:environment => environment, :login => remote_user, :email => remote_user_email, :name => remote_user_name, :password => ('pw4'+remote_user), :password_confirmation => ('pw4'+remote_user))
34 34 self.current_user.activate
35 35 end
36 36 self.current_user.save!
... ... @@ -39,9 +39,9 @@ class RemoteUserPlugin &lt; Noosfero::Plugin
39 39 self.current_user.forget_me
40 40 reset_session
41 41  
42   - self.current_user = User.find_by_login(remote_user)
  42 + self.current_user = User.where(environment_id: environment, login: remote_user).first
43 43 unless self.current_user
44   - self.current_user = User.create!(:login => remote_user, :email => remote_user_email, :name => remote_user_name, :password => ('pw4'+remote_user), :password_confirmation => ('pw4'+remote_user))
  44 + self.current_user = User.create!(:environment => environment, :login => remote_user, :email => remote_user_email, :name => remote_user_name, :password => ('pw4'+remote_user), :password_confirmation => ('pw4'+remote_user))
45 45 self.current_user.activate
46 46 end
47 47 self.current_user.save!
... ...
plugins/remote_user/test/functional/remote_user_plugin_test.rb
... ... @@ -6,6 +6,10 @@ class AccountControllerTest &lt; ActionController::TestCase
6 6 @environment.enabled_plugins = ['RemoteUserPlugin']
7 7 @environment.save
8 8  
  9 + @another_environment = Environment.new(name: "AnotherEnvironment")
  10 + @another_environment.enabled_plugins = ['RemoteUserPlugin']
  11 + @another_environment.save
  12 +
9 13 @controller = AccountController.new
10 14 @request = ActionController::TestRequest.new
11 15 @response = ActionController::TestResponse.new
... ... @@ -136,4 +140,26 @@ class AccountControllerTest &lt; ActionController::TestCase
136 140 assert session[:user].blank?
137 141 assert_response 404
138 142 end
  143 +
  144 + should "create an user in the correct environment" do
  145 + @controller.stubs(:environment).returns(@another_environment)
  146 + @request.env["HTTP_REMOTE_USER"] = "testuser"
  147 +
  148 + get :index
  149 + user = User.last
  150 + assert_equal user.environment, @another_environment
  151 + end
  152 +
  153 + should "create an user in both environments" do
  154 + user = create_user('testuser', :email => 'testuser@example.com', :password => 'test', :password_confirmation => 'test')
  155 + @controller.stubs(:environment).returns(@another_environment)
  156 + @request.env["HTTP_REMOTE_USER"] = "testuser"
  157 +
  158 + users = User.where(:login => 'testuser')
  159 + assert_equal users.count, 1
  160 +
  161 + get :index
  162 + users = User.where(:login => 'testuser')
  163 + assert_equal users.count, 2
  164 + end
139 165 end
... ...
plugins/require_auth_to_comment/po/es/require_auth_to_comment.po
... ... @@ -7,16 +7,16 @@ msgid &quot;&quot;
7 7 msgstr ""
8 8 "Project-Id-Version: 1.3~rc2-1-ga15645d\n"
9 9 "POT-Creation-Date: 2015-10-30 16:35-0300\n"
10   -"PO-Revision-Date: 2014-11-03 15:52+0200\n"
11   -"Last-Translator: Michal Čihař <michal@cihar.com>\n"
12   -"Language-Team: Spanish <https://hosted.weblate.org/projects/noosfero/"
13   -"noosfero/es/>\n"
  10 +"PO-Revision-Date: 2016-01-04 15:23+0000\n"
  11 +"Last-Translator: María Vecino <mariavecino@ecoalternative.net>\n"
  12 +"Language-Team: Spanish <https://hosted.weblate.org/projects/noosfero/plugin-"
  13 +"require-auth-to-comment/es/>\n"
14 14 "Language: es\n"
15 15 "MIME-Version: 1.0\n"
16 16 "Content-Type: text/plain; charset=UTF-8\n"
17 17 "Content-Transfer-Encoding: 8bit\n"
18 18 "Plural-Forms: nplurals=2; plural=n != 1;\n"
19   -"X-Generator: Weblate 2.0-dev\n"
  19 +"X-Generator: Weblate 2.5-dev\n"
20 20  
21 21 #: plugins/require_auth_to_comment/lib/require_auth_to_comment_plugin.rb:12
22 22 msgid "Requires users to authenticate in order to post comments."
... ... @@ -37,7 +37,7 @@ msgstr &quot;&quot;
37 37  
38 38 #: plugins/require_auth_to_comment/views/require_auth_to_comment_plugin_admin/index.html.erb:17
39 39 msgid "Save"
40   -msgstr ""
  40 +msgstr "Guardar"
41 41  
42 42 #: plugins/require_auth_to_comment/views/profile-editor-extras.html.erb:1
43 43 msgid "Comments"
... ...
plugins/shopping_cart/po/es/shopping_cart.po
... ... @@ -7,8 +7,8 @@ msgid &quot;&quot;
7 7 msgstr ""
8 8 "Project-Id-Version: 1.3~rc2-1-ga15645d\n"
9 9 "POT-Creation-Date: 2015-10-30 16:34-0300\n"
10   -"PO-Revision-Date: 2015-02-23 11:35+0200\n"
11   -"Last-Translator: Michal Čihař <michal@cihar.com>\n"
  10 +"PO-Revision-Date: 2016-01-04 15:24+0000\n"
  11 +"Last-Translator: María Vecino <mariavecino@ecoalternative.net>\n"
12 12 "Language-Team: Spanish <https://hosted.weblate.org/projects/noosfero/plugin-"
13 13 "shopping-cart/es/>\n"
14 14 "Language: es\n"
... ... @@ -16,7 +16,7 @@ msgstr &quot;&quot;
16 16 "Content-Type: text/plain; charset=UTF-8\n"
17 17 "Content-Transfer-Encoding: 8bit\n"
18 18 "Plural-Forms: nplurals=2; plural=n != 1;\n"
19   -"X-Generator: Weblate 2.3-dev\n"
  19 +"X-Generator: Weblate 2.5-dev\n"
20 20  
21 21 #: plugins/shopping_cart/lib/shopping_cart_plugin.rb:10
22 22 msgid "A shopping basket feature for enterprises"
... ... @@ -275,13 +275,12 @@ msgid &quot;Name&quot;
275 275 msgstr "Nombre"
276 276  
277 277 #: plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb:16
278   -#, fuzzy
279 278 msgid "Email"
280 279 msgstr "Correo electrónico"
281 280  
282 281 #: plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb:17
283 282 msgid "Contact phone"
284   -msgstr ""
  283 +msgstr "Teléfono de contacto"
285 284  
286 285 #: plugins/shopping_cart/views/shopping_cart_plugin/buy.html.erb:32
287 286 #, fuzzy
... ...
po/es/noosfero-doc.po
... ... @@ -7,9 +7,8 @@ msgid &quot;&quot;
7 7 msgstr ""
8 8 "Project-Id-Version: PACKAGE VERSION\n"
9 9 "POT-Creation-Date: 2013-12-10 15:48-0300\n"
10   -"PO-Revision-Date: 2015-02-07 03:08+0200\n"
11   -"Last-Translator: FAMMA TV NOTICIAS MEDIOS DE CO "
12   -"<revistafammatvmusic.oficial@gmail.com>\n"
  10 +"PO-Revision-Date: 2016-01-04 15:52+0000\n"
  11 +"Last-Translator: María Vecino <mariavecino@ecoalternative.net>\n"
13 12 "Language-Team: Spanish "
14 13 "<https://hosted.weblate.org/projects/noosfero/documentation/es/>\n"
15 14 "Language: es\n"
... ... @@ -17,7 +16,7 @@ msgstr &quot;&quot;
17 16 "Content-Type: text/plain; charset=UTF-8\n"
18 17 "Content-Transfer-Encoding: 8bit\n"
19 18 "Plural-Forms: nplurals=2; plural=n != 1;\n"
20   -"X-Generator: Weblate 2.2-dev\n"
  19 +"X-Generator: Weblate 2.5-dev\n"
21 20  
22 21 # type: Content of: <h1>
23 22 #. type: Content of: <h1>
... ... @@ -2561,7 +2560,7 @@ msgstr &quot;&quot;
2561 2560 #: doc/noosfero/community/editing-sideboxes.en.xhtml:1
2562 2561 #: doc/noosfero/user/editing-sideboxes.en.xhtml:1
2563 2562 msgid "Editing sideboxes"
2564   -msgstr "Editando las bandejas laterales"
  2563 +msgstr "Editando cajas laterales"
2565 2564  
2566 2565 # type: Content of: <p>
2567 2566 #. type: Content of: <p>
... ... @@ -2635,7 +2634,7 @@ msgstr &quot;Vers los bloques que puedes aadir a tu pgina:&quot;
2635 2634 #: doc/noosfero/community/editing-sideboxes.en.xhtml:19
2636 2635 #: doc/noosfero/user/editing-sideboxes.en.xhtml:17
2637 2636 msgid "Add a block"
2638   -msgstr "Aadir un bloque"
  2637 +msgstr "Añadir un bloque"
2639 2638  
2640 2639 # type: Content of: <ol><li><ol><li>
2641 2640 #. type: Content of: <ol><li><ol><li>
... ...
po/es/noosfero.po
... ... @@ -7,7 +7,7 @@ msgid &quot;&quot;
7 7 msgstr ""
8 8 "Project-Id-Version: 1.3~rc2-8-g01ea9f7\n"
9 9 "POT-Creation-Date: 2015-11-04 12:36-0300\n"
10   -"PO-Revision-Date: 2015-11-29 18:45+0000\n"
  10 +"PO-Revision-Date: 2016-01-04 15:55+0000\n"
11 11 "Last-Translator: María Vecino <mariavecino@ecoalternative.net>\n"
12 12 "Language-Team: Spanish "
13 13 "<https://hosted.weblate.org/projects/noosfero/noosfero/es/>\n"
... ... @@ -41,7 +41,7 @@ msgstr &quot;El artículo fue eliminado.&quot;
41 41  
42 42 #: app/models/approve_comment.rb:81
43 43 msgid "%{requestor} wants to comment the article: %{article}."
44   -msgstr "% {requestor} quiere comentar el artículo:% {articule}"
  44 +msgstr "%{requestor} quiere comentar el artículo: %{articule}"
45 45  
46 46 #: app/models/approve_comment.rb:83
47 47 msgid "%{requestor} wanted to comment the article but it was removed."
... ... @@ -130,7 +130,7 @@ msgstr &quot;Contenido&quot;
130 130 #: app/models/comment.rb:34
131 131 #, fuzzy
132 132 msgid "{fn} can only be informed for unauthenticated authors"
133   -msgstr "%{fn} solamente puede ser informado por autores no autenticados"
  133 +msgstr "%{fn} solamente puede ser informado por autores no autentificados"
134 134  
135 135 #: app/models/comment.rb:82
136 136 msgid "(removed user)"
... ... @@ -330,7 +330,7 @@ msgstr &quot;Abreviatura&quot;
330 330  
331 331 #: app/models/category.rb:9 app/models/article.rb:20
332 332 msgid "Slug"
333   -msgstr ""
  333 +msgstr "Ficha"
334 334  
335 335 #: app/models/category.rb:12
336 336 msgid "{fn} cannot be like that."
... ... @@ -551,7 +551,7 @@ msgstr &quot;Chat basado en XMPP/Jabber&quot;
551 551  
552 552 #: app/models/environment.rb:154
553 553 msgid "Show a zoom link on all article images"
554   -msgstr "Muestra un enlace de acercamiento en todas las imágenes del artículo."
  554 +msgstr "Muestra un enlace de acercamiento en todas las imágenes en artículos."
555 555  
556 556 #: app/models/environment.rb:155
557 557 msgid "Ask captcha when a logged user comments too"
... ... @@ -594,37 +594,39 @@ msgid &quot;Stays on the same page the user was before login.&quot;
594 594 msgstr "Permanecer en la misma página en la que el usuario se identificó."
595 595  
596 596 #: app/models/environment.rb:170 app/models/environment.rb:182
  597 +#, fuzzy
597 598 msgid "Redirects the user to the environment homepage."
598   -msgstr ""
  599 +msgstr "Redirige al usuario a la home"
599 600  
600 601 #: app/models/environment.rb:171 app/models/environment.rb:183
601 602 msgid "Redirects the user to his profile page."
602   -msgstr ""
  603 +msgstr "Redirige al usuario a su página de perfil."
603 604  
604 605 #: app/models/environment.rb:172 app/models/environment.rb:184
605 606 msgid "Redirects the user to his homepage."
606   -msgstr ""
  607 +msgstr "Redirige al usuario a la home."
607 608  
608 609 #: app/models/environment.rb:173 app/models/environment.rb:185
609 610 msgid "Redirects the user to his control panel."
610   -msgstr ""
  611 +msgstr "Redirige al usuario a su panel de control."
611 612  
612 613 #: app/models/environment.rb:174
613 614 msgid "Specify the URL to redirect to:"
614   -msgstr ""
  615 +msgstr "Especifique la URL para redirigir a:"
615 616  
616 617 #: app/models/environment.rb:181
617 618 msgid "Stays on the same page the user was before signup."
618 619 msgstr ""
  620 +"Mantenerse en la misma página que el usuario estaba antes de registrarse."
619 621  
620 622 #: app/models/environment.rb:186
  623 +#, fuzzy
621 624 msgid "Redirects the user to the environment welcome page."
622   -msgstr ""
  625 +msgstr "Redirige al usuario a la página de bienvenida."
623 626  
624 627 #: app/models/environment.rb:291
625   -#, fuzzy
626 628 msgid "This enterprise needs to be enabled."
627   -msgstr "Tu empresa ha sido bloqueada"
  629 +msgstr "Esta empresa tiene que estar habilitada."
628 630  
629 631 #: app/models/environment.rb:672
630 632 msgid "Only one Virtual Community can be the default one"
... ... @@ -636,8 +638,9 @@ msgid &quot;is not available.&quot;
636 638 msgstr "No disponible"
637 639  
638 640 #: app/models/environment.rb:1018
  641 +#, fuzzy
639 642 msgid "have unsupported languages."
640   -msgstr ""
  643 +msgstr "no permite ciertos idiomas."
641 644  
642 645 #: app/models/communities_block.rb:6 app/helpers/application_helper.rb:564
643 646 #: app/helpers/application_helper.rb:1128 app/helpers/assets_helper.rb:11
... ... @@ -677,12 +680,11 @@ msgstr &quot;Evento&quot;
677 680 #: app/models/event.rb:33
678 681 #, fuzzy
679 682 msgid "{fn} cannot come before end date."
680   -msgstr "%{fn} no puede venir antes de la fecha."
  683 +msgstr "%{fn} no puede aparecer antes de la fecha."
681 684  
682 685 #: app/models/event.rb:63
683   -#, fuzzy
684 686 msgid "A calendar event."
685   -msgstr "Un evento de calendario"
  687 +msgstr "Un evento de calendario."
686 688  
687 689 #: app/models/forum.rb:25 app/models/forum.rb:29
688 690 #: app/models/link_list_block.rb:31 app/helpers/application_helper.rb:939
... ... @@ -697,14 +699,13 @@ msgstr &quot;&quot;
697 699 "las discusiones."
698 700  
699 701 #: app/models/forum.rb:38
700   -#, fuzzy
701 702 msgid "Logged users"
702   -msgstr "Autenticado como %s"
  703 +msgstr "Usuarios registrados"
703 704  
704 705 #: app/models/forum.rb:41
705 706 #, fuzzy
706 707 msgid "Me"
707   -msgstr "Masculino"
  708 +msgstr "Mí"
708 709  
709 710 #: app/models/forum.rb:42 app/models/block.rb:250
710 711 #: app/helpers/application_helper.rb:563
... ... @@ -712,9 +713,8 @@ msgid &quot;Friends&quot;
712 713 msgstr "Amigos"
713 714  
714 715 #: app/models/forum.rb:45
715   -#, fuzzy
716 716 msgid "Administrators"
717   -msgstr "Administación"
  717 +msgstr "Administadores"
718 718  
719 719 #: app/models/forum.rb:46 app/models/block.rb:250
720 720 #: app/helpers/profile_helper.rb:43 app/helpers/application_helper.rb:571
... ... @@ -794,23 +794,20 @@ msgstr &quot;&quot;
794 794 "si este perfil debe ser dishabilitado o no."
795 795  
796 796 #: app/models/image.rb:20
797   -#, fuzzy
798 797 msgid "{fn} of uploaded file was larger than the maximum size of 5.0 MB"
799 798 msgstr "%{fn} del archivo subido fue más grande que el tamaño máximo de 5.0 MB"
800 799  
801 800 #: app/models/profile_suggestion.rb:35 app/models/profile_suggestion.rb:38
802   -#, fuzzy
803 801 msgid "Friends in common"
804   -msgstr "Invitación de amigo"
  802 +msgstr "Amigos en común"
805 803  
806 804 #: app/models/profile_suggestion.rb:36
807   -#, fuzzy
808 805 msgid "Communities in common"
809   -msgstr "Menú comunidades"
  806 +msgstr "Comunidades en común"
810 807  
811 808 #: app/models/profile_suggestion.rb:37 app/models/profile_suggestion.rb:39
812 809 msgid "Tags in common"
813   -msgstr ""
  810 +msgstr "Palabras claves en común"
814 811  
815 812 #: app/models/person.rb:13 app/models/link_list_block.rb:29
816 813 #: app/views/templates/index.html.erb:5
... ... @@ -923,19 +920,17 @@ msgstr &quot;Código postal&quot;
923 920 #: app/models/person.rb:261 app/models/organization.rb:138
924 921 #: app/views/profile_editor/_person_form.html.erb:27
925 922 #: app/views/shared/_organization_custom_fields.html.erb:14
926   -#, fuzzy
927 923 msgid "District"
928   -msgstr "Restricciones"
  924 +msgstr "Distrito"
929 925  
930 926 #: app/models/person.rb:261 app/models/organization.rb:138
931 927 #: app/views/profile_editor/_person_form.html.erb:26
932 928 #: app/views/shared/_organization_custom_fields.html.erb:13
933 929 #, fuzzy
934 930 msgid "Address reference"
935   -msgstr "Dirección: "
  931 +msgstr "Dirección:"
936 932  
937 933 #: app/models/person.rb:292
938   -#, fuzzy
939 934 msgid "{fn} is already used by other user"
940 935 msgstr "%{fn} ya lo tiene otro usuario"
941 936  
... ... @@ -1001,16 +996,14 @@ msgid &quot;%{requestor} wants to activate enterprise %{linked_subject}.&quot;
1001 996 msgstr "%{requestor} quiere activar la empresa %{linked_subject}."
1002 997  
1003 998 #: app/models/enterprise_activation.rb:29
1004   -#, fuzzy
1005 999 msgid "Pending activation of enterprise %{linked_subject}."
1006   -msgstr "%{requestor} quiere activar la empresa %{linked_subject}."
  1000 +msgstr "%{requestor} Pendiente de activar la empresa %{linked_subject}."
1007 1001  
1008 1002 #: app/models/enterprise_activation.rb:43
1009 1003 msgid "%{requestor} wants to activate enterprise %{enterprise}."
1010 1004 msgstr "%{rquestor} quiere activar la empresa %{enterprise}."
1011 1005  
1012 1006 #: app/models/enterprise_activation.rb:45
1013   -#, fuzzy
1014 1007 msgid "Pending activation of enterprise %{enterprise}."
1015 1008 msgstr "%{rquestor} quiere activar la empresa %{enterprise}."
1016 1009  
... ... @@ -1025,7 +1018,7 @@ msgstr &quot;Invitación&quot;
1025 1018  
1026 1019 #: app/models/invitation.rb:41
1027 1020 msgid "You can't invite youself"
1028   -msgstr "No puedes invitarte a ti."
  1021 +msgstr "No puedes invitarte a ti mismo."
1029 1022  
1030 1023 #: app/models/invitation.rb:53
1031 1024 msgid "Firstname Lastname <friend@email.com>"
... ... @@ -1040,9 +1033,8 @@ msgid &quot;Raw HTML&quot;
1040 1033 msgstr "HTML plano"
1041 1034  
1042 1035 #: app/models/person_notifier.rb:103
1043   -#, fuzzy
1044 1036 msgid "[%s] Notifications"
1045   -msgstr "Opciones de moderación"
  1037 +msgstr "Notificaciones"
1046 1038  
1047 1039 #: app/models/moderate_user_registration.rb:31
1048 1040 #: app/views/account/login.html.erb:36
... ... @@ -1051,13 +1043,12 @@ msgid &quot;New user&quot;
1051 1043 msgstr "Nuevo usuario"
1052 1044  
1053 1045 #: app/models/moderate_user_registration.rb:39
1054   -#, fuzzy
1055 1046 msgid "%{sender} wants to register."
1056   -msgstr "%{requestor} quiere ser tu amigo."
  1047 +msgstr "%{requestor} quiere registrarse."
1057 1048  
1058 1049 #: app/models/moderate_user_registration.rb:48
1059 1050 msgid "%{sender} tried to register."
1060   -msgstr ""
  1051 +msgstr "%{sender} intentó registrarse."
1061 1052  
1062 1053 #: app/models/moderate_user_registration.rb:54
1063 1054 #, fuzzy
... ... @@ -1879,7 +1870,7 @@ msgstr &quot;Artículo de texto con editor visual&quot;
1879 1870  
1880 1871 #: app/models/tiny_mce_article.rb:10
1881 1872 msgid "Not accessible for visually impaired users."
1882   -msgstr "No accesible para usuarios con deficiencias visuales"
  1873 +msgstr "No accesible para usuarios con déficit visual."
1883 1874  
1884 1875 #: app/models/suggest_article.rb:52
1885 1876 msgid "Article suggestion"
... ... @@ -2424,7 +2415,7 @@ msgstr &quot;Mensaje de \&quot;deshabilitar empresa\&quot;&quot;
2424 2415  
2425 2416 #: app/models/disabled_enterprise_message_block.rb:8
2426 2417 msgid "Shows a message for disabled enterprises."
2427   -msgstr "Muestra un mensaje para empresas deshabilitadas"
  2418 +msgstr "Muestra un mensaje para empresas deshabilitadas."
2428 2419  
2429 2420 #: app/models/disabled_enterprise_message_block.rb:12
2430 2421 #: app/mailers/contact.rb:23
... ... @@ -2624,7 +2615,7 @@ msgstr &quot;Buscar...&quot;
2624 2615 #: app/helpers/application_helper.rb:669
2625 2616 msgid "This is a search box. Click, write your query, and press enter to find"
2626 2617 msgstr ""
2627   -"Esta es una caja de búsqueda. Seleccione aquí, escribe tu consulta y "
  2618 +"Esta es una caja de búsqueda. Seleccione aquí, escribe la consulta y "
2628 2619 "presione enter para buscar."
2629 2620  
2630 2621 #: app/helpers/application_helper.rb:670
... ... @@ -2822,7 +2813,7 @@ msgstr &quot;Reportar abuso&quot;
2822 2813  
2823 2814 #: app/helpers/application_helper.rb:1266
2824 2815 msgid "You already reported this profile."
2825   -msgstr "Tú ya has reportado este perfil"
  2816 +msgstr "Ya has reportado este perfil."
2826 2817  
2827 2818 #: app/helpers/application_helper.rb:1267
2828 2819 msgid "Report this profile for abusive behaviour"
... ... @@ -3121,7 +3112,7 @@ msgstr &quot;Teléfono (s):&quot;
3121 3112  
3122 3113 #: app/helpers/enterprise_homepage_helper.rb:9
3123 3114 msgid "Location:"
3124   -msgstr "Ubicación"
  3115 +msgstr "Ubicación:"
3125 3116  
3126 3117 #: app/helpers/enterprise_homepage_helper.rb:10
3127 3118 #: app/views/cms/_event.html.erb:16
... ... @@ -3746,7 +3737,7 @@ msgstr &quot;Última publicación&quot;
3746 3737 # Usamos etiquetas o entendemos qeu tag es de uso común?
3747 3738 #: app/helpers/tags_helper.rb:34
3748 3739 msgid "No tags yet."
3749   -msgstr "Sin etiquetas"
  3740 +msgstr "Sin etiquetas todavía."
3750 3741  
3751 3742 #: app/helpers/tags_helper.rb:35
3752 3743 msgid "What are tags?"
... ... @@ -3852,7 +3843,7 @@ msgstr &quot;Biofísica&quot;
3852 3843  
3853 3844 #: app/helpers/profile_editor_helper.rb:15
3854 3845 msgid "Biology"
3855   -msgstr "Biología "
  3846 +msgstr "Biología"
3856 3847  
3857 3848 #: app/helpers/profile_editor_helper.rb:16
3858 3849 msgid "Biotechnology"
... ... @@ -4160,7 +4151,7 @@ msgstr &quot;[Seleccione ...]&quot;
4160 4151  
4161 4152 #: app/helpers/profile_editor_helper.rb:132
4162 4153 msgid "Preferred domain name:"
4163   -msgstr "Nombre de dominio preferido"
  4154 +msgstr "Nombre de dominio elegido:"
4164 4155  
4165 4156 #: app/helpers/profile_editor_helper.rb:132
4166 4157 msgid "Select domain"
... ... @@ -4220,12 +4211,12 @@ msgstr &quot;Características actualizadas correctamente.&quot;
4220 4211  
4221 4212 #: app/controllers/admin/features_controller.rb:27
4222 4213 msgid "Person fields updated successfully."
4223   -msgstr "Campo persona actualizado correctamente"
  4214 +msgstr "Campos de persona actualizados correctamente"
4224 4215  
4225 4216 # No se si campo es la mejor traducción de fields
4226 4217 #: app/controllers/admin/features_controller.rb:29
4227 4218 msgid "Person fields not updated successfully."
4228   -msgstr "El campo persona no se actualizo correctamente"
  4219 +msgstr "Los campos de la persona no se actualizaron correctamente."
4229 4220  
4230 4221 #: app/controllers/admin/features_controller.rb:37
4231 4222 msgid "Enterprise fields updated successfully."
... ... @@ -4370,7 +4361,7 @@ msgstr &quot;Características actualizadas correctamente.&quot;
4370 4361 # No se si campo es la mejor traducción de fields
4371 4362 #: app/controllers/admin/plugins_controller.rb:14
4372 4363 msgid "Plugins were not updated successfully."
4373   -msgstr "Las caracteristicas no se actualizaron correctamente"
  4364 +msgstr "Los pluggings no se actualizaron correctamente"
4374 4365  
4375 4366 #: app/controllers/admin/licenses_controller.rb:14
4376 4367 #, fuzzy
... ... @@ -4647,7 +4638,7 @@ msgstr &quot;Ya eres amigo de %s.&quot;
4647 4638  
4648 4639 #: app/controllers/public/profile_controller.rb:160
4649 4640 msgid "You have unblocked %s successfully. "
4650   -msgstr "Has desbloqueado %s correctamente."
  4641 +msgstr "Has desbloqueado %s correctamente. "
4651 4642  
4652 4643 #: app/controllers/public/profile_controller.rb:163
4653 4644 msgid "You are not allowed to unblock enterprises in this environment."
... ... @@ -4882,8 +4873,8 @@ msgstr &quot;Administradores actuales&quot;
4882 4873 #: app/controllers/my_profile/profile_members_controller.rb:147
4883 4874 msgid "The members list couldn't be updated. Please contact the administrator."
4884 4875 msgstr ""
4885   -"La lista de miembros no puede ser actualizada. Por favor contacta al "
4886   -"administrador"
  4876 +"La lista de miembros no puede ser actualizada. Por favor contacta con el "
  4877 +"administrador."
4887 4878  
4888 4879 #: app/controllers/my_profile/profile_members_controller.rb:153
4889 4880 msgid "The members list was updated."
... ... @@ -5201,7 +5192,7 @@ msgstr &quot;Sin imagen&quot;
5201 5192  
5202 5193 #: app/views/catalog/index.html.erb:46
5203 5194 msgid "from "
5204   -msgstr "desde"
  5195 +msgstr "desde "
5205 5196  
5206 5197 #: app/views/catalog/index.html.erb:47
5207 5198 msgid "by "
... ... @@ -5834,7 +5825,7 @@ msgstr &quot;Ver tareas procesadas&quot;
5834 5825  
5835 5826 #: app/views/tasks/index.html.erb:60 app/views/tasks/index.html.erb:70
5836 5827 msgid "Set all to: "
5837   -msgstr "Ajustar todo a:"
  5828 +msgstr "Ajustar todo a: "
5838 5829  
5839 5830 #: app/views/box_organizer/_products_block.html.erb:5
5840 5831 msgid "Select the products that must be shown."
... ... @@ -5879,7 +5870,7 @@ msgstr &quot;Tamaño de la presentación&quot;
5879 5870 #: app/views/box_organizer/_slideshow_block.html.erb:7
5880 5871 #: app/views/box_organizer/_highlights_block.html.erb:20
5881 5872 msgid "Image transition:"
5882   -msgstr "Transición de imagen"
  5873 +msgstr "Transición de imagen:"
5883 5874  
5884 5875 #: app/views/box_organizer/_slideshow_block.html.erb:7
5885 5876 #: app/views/box_organizer/_highlights_block.html.erb:20
... ... @@ -5950,7 +5941,7 @@ msgstr &quot;Calle&quot;
5950 5941  
5951 5942 #: app/views/box_organizer/_location_block.html.erb:5
5952 5943 msgid "Map Type:"
5953   -msgstr "Tipo de mapa"
  5944 +msgstr "Tipo de mapa:"
5954 5945  
5955 5946 #: app/views/box_organizer/_location_block.html.erb:5
5956 5947 msgid "Road Map"
... ... @@ -5974,11 +5965,11 @@ msgstr &quot;Híbrido&quot;
5974 5965  
5975 5966 #: app/views/box_organizer/edit.html.erb:6
5976 5967 msgid "Custom title for this block: "
5977   -msgstr "Título personalizado para este bloque"
  5968 +msgstr "Título personalizado para este bloque: "
5978 5969  
5979 5970 #: app/views/box_organizer/edit.html.erb:11
5980 5971 msgid "Display this block:"
5981   -msgstr "Mostrar este bloque"
  5972 +msgstr "Mostrar este bloque:"
5982 5973  
5983 5974 #: app/views/box_organizer/edit.html.erb:16
5984 5975 #, fuzzy
... ... @@ -6205,7 +6196,7 @@ msgstr &quot;Fecha de fin&quot;
6205 6196  
6206 6197 #: app/views/search/_sellers_form.html.erb:5
6207 6198 msgid "Search in:"
6208   -msgstr "Buscar en: "
  6199 +msgstr "Buscar en:"
6209 6200  
6210 6201 # ¿Que es esto?
6211 6202 #: app/views/search/tags.html.erb:1
... ... @@ -6299,7 +6290,7 @@ msgstr &quot;;&quot;
6299 6290 #: app/views/search/_full_product.html.erb:71
6300 6291 #: app/views/shared/product/_qualifiers.html.erb:6
6301 6292 msgid "cert. "
6302   -msgstr "cert."
  6293 +msgstr "cert. "
6303 6294  
6304 6295 #: app/views/search/_article_last_change.html.erb:5
6305 6296 #, fuzzy
... ...
test/functional/content_viewer_controller_test.rb
... ... @@ -1173,9 +1173,9 @@ class ContentViewerControllerTest &lt; ActionController::TestCase
1173 1173  
1174 1174 should 'add an zero width space every 4 caracters of comment urls' do
1175 1175 url = 'www.an.url.to.be.splited.com'
1176   - a = fast_create(TextileArticle, :profile_id => @profile.id, :path => 'textile', :language => 'en')
  1176 + a = fast_create(TextileArticle, :profile_id => @profile.id, :language => 'en')
1177 1177 c = a.comments.create!(:author => @profile, :title => 'An url', :body => url)
1178   - get :view_page, :profile => @profile.identifier, :page => [ 'textile' ]
  1178 + get :view_page, :profile => @profile.identifier, :page => a.path
1179 1179 assert_tag :a, :attributes => { :href => "http://" + url}, :content => url.scan(/.{4}/).join('&#x200B;')
1180 1180 end
1181 1181  
... ...
test/unit/product_category_test.rb
... ... @@ -85,14 +85,4 @@ class ProductCategoryTest &lt; ActiveSupport::TestCase
85 85 assert_equivalent [c1,c3], ProductCategory.by_environment(Environment.default)
86 86 end
87 87  
88   - should 'fetch unique categories by level' do
89   - c1 = ProductCategory.create!(:name => 'test cat 1', :environment => Environment.default)
90   - c11 = ProductCategory.create!(:name => 'test cat 11', :environment => Environment.default, :parent => c1)
91   - c12 = ProductCategory.create!(:name => 'test cat 12', :environment => Environment.default, :parent => c1)
92   - c111 = ProductCategory.create!(:name => 'test cat 111', :environment => Environment.default, :parent => c11)
93   - c112 = ProductCategory.create!(:name => 'test cat 112', :environment => Environment.default, :parent => c11)
94   -
95   - assert_equivalent ['', 'test-cat-11', 'test-cat-12'], ProductCategory.unique_by_level(2).map(&:filtered_category)
96   - end
97   -
98 88 end
... ...
test/unit/user_test.rb
... ... @@ -536,7 +536,6 @@ class UserTest &lt; ActiveSupport::TestCase
536 536 should 'deliver e-mail with activation code after creation' do
537 537 assert_difference 'ActionMailer::Base.deliveries.size', 1 do
538 538 new_user :email => 'pending@activation.com'
539   - process_delayed_job_queue
540 539 end
541 540 assert_equal 'pending@activation.com', ActionMailer::Base.deliveries.last['to'].to_s
542 541 end
... ... @@ -667,7 +666,6 @@ class UserTest &lt; ActiveSupport::TestCase
667 666 env.save
668 667  
669 668 user = new_user :email => 'pending@activation.com'
670   - process_delayed_job_queue
671 669 assert_difference 'ActionMailer::Base.deliveries.size', 1 do
672 670 user.activate
673 671 process_delayed_job_queue
... ... @@ -688,7 +686,6 @@ class UserTest &lt; ActiveSupport::TestCase
688 686 env.save
689 687  
690 688 user = new_user :email => 'pending@activation.com'
691   - process_delayed_job_queue
692 689 assert_difference 'ActionMailer::Base.deliveries.size', 1 do
693 690 user.activate
694 691 process_delayed_job_queue
... ... @@ -708,7 +705,6 @@ class UserTest &lt; ActiveSupport::TestCase
708 705 env.save
709 706  
710 707 user = new_user :name => 'John Doe', :email => 'pending@activation.com'
711   - process_delayed_job_queue
712 708 assert_difference 'ActionMailer::Base.deliveries.size', 1 do
713 709 user.activate
714 710 process_delayed_job_queue
... ... @@ -756,6 +752,14 @@ class UserTest &lt; ActiveSupport::TestCase
756 752 assert_equal 'quire', user.person.name
757 753 end
758 754  
  755 + should 'generate private token' do
  756 + user = User.new
  757 + SecureRandom.stubs(:hex).returns('token')
  758 + user.generate_private_token!
  759 +
  760 + assert user.private_token, 'token'
  761 + end
  762 +
759 763 should 'deliver e-mail with activation code when resend was requested and user was not activated' do
760 764 user = new_user :email => 'pending@activation.com'
761 765 activation_code = user.activation_code
... ...