Commit de194b8c3de18e2cdef007ac79ea2d6aa99c7cb3
Exists in
master
and in
27 other branches
Merge branch 'master' of gitlab.com:noosfero/noosfero
Showing
5 changed files
with
39 additions
and
43 deletions
Show diff stats
plugins/custom_forms/controllers/custom_forms_plugin_profile_controller.rb
| ... | ... | @@ -9,7 +9,7 @@ class CustomFormsPluginProfileController < ProfileController |
| 9 | 9 | @submission = CustomFormsPlugin::Submission.find_by_form_id_and_profile_id(@form.id,user.id) |
| 10 | 10 | @submission ||= CustomFormsPlugin::Submission.new(:form => @form, :profile => user) |
| 11 | 11 | else |
| 12 | - @submission = CustomFormsPlugin::Submission.new(:form => @for) | |
| 12 | + @submission = CustomFormsPlugin::Submission.new(:form => @form) | |
| 13 | 13 | end |
| 14 | 14 | |
| 15 | 15 | # build the answers | ... | ... |
plugins/custom_forms/test/functional/custom_forms_plugin_profile_controller_test.rb
| ... | ... | @@ -29,6 +29,17 @@ class CustomFormsPluginProfileControllerTest < ActionController::TestCase |
| 29 | 29 | assert_redirected_to :action => 'show' |
| 30 | 30 | end |
| 31 | 31 | |
| 32 | + should 'save submission if fields are ok and user is not logged in' do | |
| 33 | + logout | |
| 34 | + form = CustomFormsPlugin::Form.create!(:profile => profile, :name => 'Free Software') | |
| 35 | + field = CustomFormsPlugin::TextField.create(:name => 'Name', :form => form) | |
| 36 | + | |
| 37 | + assert_difference 'CustomFormsPlugin::Submission.count', 1 do | |
| 38 | + post :show, :profile => profile.identifier, :id => form.id, :author_name => "john", :author_email => 'john@example.com', :submission => {field.id.to_s => 'Noosfero'} | |
| 39 | + end | |
| 40 | + assert_redirected_to :action => 'show' | |
| 41 | + end | |
| 42 | + | |
| 32 | 43 | should 'disable fields if form expired' do |
| 33 | 44 | form = CustomFormsPlugin::Form.create!(:profile => profile, :name => 'Free Software', :begining => Time.now + 1.day) |
| 34 | 45 | form.fields << CustomFormsPlugin::TextField.create(:name => 'Field Name', :form => form, :default_value => "First Field") | ... | ... |
plugins/metadata/lib/ext/profile.rb
| ... | ... | @@ -5,7 +5,7 @@ class Profile |
| 5 | 5 | metadata_spec namespace: :og, tags: { |
| 6 | 6 | type: MetadataPlugin.og_types[:profile] || :profile, |
| 7 | 7 | image: proc{ |p, plugin| "#{p.environment.top_url}#{p.image.public_filename}" if p.image }, |
| 8 | - title: proc{ |p, plugin| p.nickname || p.name }, | |
| 8 | + title: proc{ |p, plugin| if p.nickname.present? then p.nickname else p.name end }, | |
| 9 | 9 | url: proc do |p, plugin| |
| 10 | 10 | #force profile identifier for custom domains and fixed host. see og_url_for |
| 11 | 11 | plugin.og_url_for p.url.merge(profile: p.identifier) | ... | ... |
po/fr/noosfero.po
| ... | ... | @@ -7,8 +7,8 @@ msgstr "" |
| 7 | 7 | "Project-Id-Version: 1.0-690-gcb6e853\n" |
| 8 | 8 | "Report-Msgid-Bugs-To: \n" |
| 9 | 9 | "POT-Creation-Date: 2015-03-05 12:10-0300\n" |
| 10 | -"PO-Revision-Date: 2015-03-08 20:40+0200\n" | |
| 11 | -"Last-Translator: M for Momo <mo@rtnp.org>\n" | |
| 10 | +"PO-Revision-Date: 2015-03-12 16:11+0200\n" | |
| 11 | +"Last-Translator: Tuux <tuxa@galaxie.eu.org>\n" | |
| 12 | 12 | "Language-Team: French " |
| 13 | 13 | "<https://hosted.weblate.org/projects/noosfero/noosfero/fr/>\n" |
| 14 | 14 | "Language: fr\n" |
| ... | ... | @@ -61,16 +61,12 @@ msgid "" |
| 61 | 61 | msgstr "" |
| 62 | 62 | |
| 63 | 63 | #: app/models/approve_comment.rb:96 |
| 64 | -#, fuzzy | |
| 65 | 64 | msgid "Your request for comment the article \"%{article}\" was approved." |
| 66 | -msgstr "" | |
| 67 | -"%{author} veut publier l'article «%{article}» sur le groupe %{community}" | |
| 65 | +msgstr "Votre demande pour commenter l'article \"% {article}\" a été approuvée." | |
| 68 | 66 | |
| 69 | 67 | #: app/models/approve_comment.rb:101 |
| 70 | -#, fuzzy | |
| 71 | 68 | msgid "Your request for commenting the article \"%{article}\" was rejected." |
| 72 | -msgstr "" | |
| 73 | -"%{author} veut publier l'article «%{article}» sur le groupe %{community}" | |
| 69 | +msgstr "Votre demande de commenter l'article \"% {article}\" a été rejetée." | |
| 74 | 70 | |
| 75 | 71 | #: app/models/approve_comment.rb:103 |
| 76 | 72 | msgid "" |
| ... | ... | @@ -120,19 +116,17 @@ msgstr "Nom" |
| 120 | 116 | |
| 121 | 117 | #: app/models/comment.rb:6 app/models/article.rb:18 app/models/article.rb:38 |
| 122 | 118 | #: app/models/scrap.rb:6 |
| 123 | -#, fuzzy | |
| 124 | 119 | msgid "Content" |
| 125 | -msgstr "Type de contenu" | |
| 120 | +msgstr "Contenu" | |
| 126 | 121 | |
| 127 | 122 | #: app/models/comment.rb:32 |
| 128 | -#, fuzzy | |
| 129 | 123 | msgid "{fn} can only be informed for unauthenticated authors" |
| 130 | -msgstr "%{fn} peut seulement être renseigné pour les auteurs non authentifiés" | |
| 124 | +msgstr "{fn} est informé uniquement pour les auteurs non authentifiés" | |
| 131 | 125 | |
| 132 | 126 | #: app/models/comment.rb:71 |
| 133 | 127 | #, fuzzy |
| 134 | 128 | msgid "(removed user)" |
| 135 | -msgstr "Pour ôter %s" | |
| 129 | +msgstr "(supprimé par l'utilisateur)" | |
| 136 | 130 | |
| 137 | 131 | #: app/models/comment.rb:71 |
| 138 | 132 | msgid "(unauthenticated user)" |
| ... | ... | @@ -173,33 +167,30 @@ msgid "100%" |
| 173 | 167 | msgstr "" |
| 174 | 168 | |
| 175 | 169 | #: app/models/invite_member.rb:20 |
| 176 | -#, fuzzy | |
| 177 | 170 | msgid "Community invitation" |
| 178 | -msgstr "Calculs informatisés" | |
| 171 | +msgstr "Invitation de la communauté" | |
| 179 | 172 | |
| 180 | 173 | #: app/models/invite_member.rb:28 |
| 181 | -#, fuzzy | |
| 182 | 174 | msgid "%{requestor} invited you to join %{linked_subject}." |
| 183 | -msgstr "%s veut être membre de %s." | |
| 175 | +msgstr "%{requestor} vous invite à rejoindre ce sujet % {linked_subject}." | |
| 184 | 176 | |
| 185 | 177 | #: app/models/invite_member.rb:40 |
| 186 | -#, fuzzy | |
| 187 | 178 | msgid "%{requestor} invited you to join %{community}." |
| 188 | -msgstr "%s veut être membre de %s." | |
| 179 | +msgstr "%{requestor} vous invite à rejoindre la comunautée %{community}." | |
| 189 | 180 | |
| 190 | 181 | #: app/models/invite_member.rb:45 |
| 191 | -#, fuzzy | |
| 192 | 182 | msgid "%{requestor} is inviting you to join \"%{community}\" on %{system}." |
| 193 | -msgstr "%s veut être membre de %s." | |
| 183 | +msgstr "" | |
| 184 | +"%{requestor} vous invite à rejoindre la communautée \"%{community}\" sur le " | |
| 185 | +"système %{system}." | |
| 194 | 186 | |
| 195 | 187 | #: app/models/invite_member.rb:57 app/models/invite_friend.rb:37 |
| 196 | 188 | msgid "Hello <friend>," |
| 197 | 189 | msgstr "Bonjour <contact>," |
| 198 | 190 | |
| 199 | 191 | #: app/models/invite_member.rb:58 |
| 200 | -#, fuzzy | |
| 201 | 192 | msgid "<user> is inviting you to join \"<community>\" on <environment>." |
| 202 | -msgstr "<utilisateur> vous invite à participer à %{environment}." | |
| 193 | +msgstr "<user> vous invite à rejoindre la « <community>» sur <environment>." | |
| 203 | 194 | |
| 204 | 195 | #: app/models/invite_member.rb:59 app/models/invite_friend.rb:39 |
| 205 | 196 | msgid "To accept the invitation, please follow this link:" |
| ... | ... | @@ -214,14 +205,12 @@ msgid "This block displays some info about your networking." |
| 214 | 205 | msgstr "Ce bloc affiche de l'information sur votre réseau." |
| 215 | 206 | |
| 216 | 207 | #: app/models/sellers_search_block.rb:6 |
| 217 | -#, fuzzy | |
| 218 | 208 | msgid "Search for enterprises and products" |
| 219 | -msgstr "Une recherche d'entreprises par produits" | |
| 209 | +msgstr "Recherche de produits et d'entreprises" | |
| 220 | 210 | |
| 221 | 211 | #: app/models/sellers_search_block.rb:10 |
| 222 | -#, fuzzy | |
| 223 | 212 | msgid "Products/Enterprises search" |
| 224 | -msgstr "Produit|Entrprise" | |
| 213 | +msgstr "Recherche de produits ou d'entreprises" | |
| 225 | 214 | |
| 226 | 215 | #: app/models/sellers_search_block.rb:14 |
| 227 | 216 | msgid "Search for sellers" |
| ... | ... | @@ -232,9 +221,8 @@ msgid "This block presents a search engine for products." |
| 232 | 221 | msgstr "Ce bloc présente un moteur de recherche pour les produits." |
| 233 | 222 | |
| 234 | 223 | #: app/models/categories_block.rb:4 |
| 235 | -#, fuzzy | |
| 236 | 224 | msgid "Generic category" |
| 237 | -msgstr "Catégorie générale" | |
| 225 | +msgstr "Catégorie générique" | |
| 238 | 226 | |
| 239 | 227 | #: app/models/categories_block.rb:5 app/helpers/categories_helper.rb:6 |
| 240 | 228 | #: app/views/enterprise_registration/basic_information.html.erb:25 |
| ... | ... | @@ -246,23 +234,20 @@ msgid "Product" |
| 246 | 234 | msgstr "Produit" |
| 247 | 235 | |
| 248 | 236 | #: app/models/categories_block.rb:14 app/models/categories_block.rb:18 |
| 249 | -#, fuzzy | |
| 250 | 237 | msgid "Categories Menu" |
| 251 | -msgstr "Catégories" | |
| 238 | +msgstr "Menu catégories" | |
| 252 | 239 | |
| 253 | 240 | #: app/models/categories_block.rb:22 |
| 254 | -#, fuzzy | |
| 255 | 241 | msgid "This block presents the categories like a web site menu." |
| 256 | -msgstr "Ce bloc présente l'image du profil." | |
| 242 | +msgstr "Ce bloc présente les catégories comme un menu de site web." | |
| 257 | 243 | |
| 258 | 244 | #: app/models/contact_list.rb:18 |
| 259 | -#, fuzzy | |
| 260 | 245 | msgid "" |
| 261 | 246 | "There was an error while authenticating. Did you enter correct login and " |
| 262 | 247 | "password?" |
| 263 | 248 | msgstr "" |
| 264 | -"Une erreur s'est produite lors de la recherche de votre liste de contacts. " | |
| 265 | -"Avez-vous entré un identifiant et un mot de passe corrects ?" | |
| 249 | +"Il y a eu une erreur lors de l'authentification. Utilisez vous un mot de " | |
| 250 | +"passe et un login correcte ?" | |
| 266 | 251 | |
| 267 | 252 | #: app/models/contact_list.rb:25 |
| 268 | 253 | #, fuzzy | ... | ... |
po/pt/noosfero.po
| ... | ... | @@ -13,8 +13,8 @@ msgid "" |
| 13 | 13 | msgstr "" |
| 14 | 14 | "Project-Id-Version: 1.0-690-gcb6e853\n" |
| 15 | 15 | "POT-Creation-Date: 2015-03-05 12:10-0300\n" |
| 16 | -"PO-Revision-Date: 2015-03-12 15:51+0200\n" | |
| 17 | -"Last-Translator: daniel <dtygel@eita.org.br>\n" | |
| 16 | +"PO-Revision-Date: 2015-03-13 14:56+0200\n" | |
| 17 | +"Last-Translator: TWS <tablettws@gmail.com>\n" | |
| 18 | 18 | "Language-Team: Portuguese " |
| 19 | 19 | "<https://hosted.weblate.org/projects/noosfero/noosfero/pt/>\n" |
| 20 | 20 | "Language: pt\n" |
| ... | ... | @@ -26,15 +26,15 @@ msgstr "" |
| 26 | 26 | |
| 27 | 27 | #: app/models/approve_comment.rb:17 |
| 28 | 28 | msgid "Anonymous" |
| 29 | -msgstr "Anônimo" | |
| 29 | +msgstr "Anonimo" | |
| 30 | 30 | |
| 31 | 31 | #: app/models/approve_comment.rb:25 app/models/approve_article.rb:17 |
| 32 | 32 | msgid "Article removed." |
| 33 | -msgstr "Artigo removido." | |
| 33 | +msgstr "Articolo Rimosso." | |
| 34 | 34 | |
| 35 | 35 | #: app/models/approve_comment.rb:33 |
| 36 | 36 | msgid "New comment to article" |
| 37 | -msgstr "Novo comentário para o artigo" | |
| 37 | +msgstr "Nuovo commento in questo articolo" | |
| 38 | 38 | |
| 39 | 39 | #: app/models/approve_comment.rb:49 app/models/approve_comment.rb:51 |
| 40 | 40 | msgid "%{requestor} commented on the article: %{linked_subject}." | ... | ... |