decidim-core 0.26.0 → 0.26.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of decidim-core might be problematic. Click here for more details.

Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/card_m_cell.rb +1 -1
  3. data/app/cells/decidim/diff/diff_mode_dropdown.erb +13 -8
  4. data/app/cells/decidim/diff/diff_mode_html.erb +13 -8
  5. data/app/cells/decidim/diff/show.erb +5 -3
  6. data/app/cells/decidim/endorsement_buttons_cell.rb.2 +211 -0
  7. data/app/cells/decidim/endorsers_list/show.erb +1 -1
  8. data/app/cells/decidim/fingerprint/show.erb +1 -1
  9. data/app/cells/decidim/followers/show.erb +1 -1
  10. data/app/cells/decidim/following/show.erb +2 -2
  11. data/app/cells/decidim/groups/show.erb +1 -1
  12. data/app/cells/decidim/members/show.erb +1 -1
  13. data/app/cells/decidim/profile_sidebar/show.erb +1 -1
  14. data/app/cells/decidim/user_conversation/messages.erb +1 -1
  15. data/app/cells/decidim/user_conversation_cell.rb +4 -0
  16. data/app/cells/decidim/user_conversations/add_conversation_users.erb +1 -1
  17. data/app/cells/decidim/version_cell.rb +1 -1
  18. data/app/cells/decidim/versions_list_cell.rb +1 -1
  19. data/app/cells/decidim/versions_list_item/show.erb +2 -2
  20. data/app/commands/decidim/messaging/reply_to_conversation.rb +4 -1
  21. data/app/commands/decidim/unendorse_resource.rb +5 -4
  22. data/app/controllers/decidim/application_controller.rb +1 -0
  23. data/app/controllers/decidim/components/base_controller.rb +0 -1
  24. data/app/events/decidim/amendable/amendment_base_event.rb +1 -1
  25. data/app/forms/decidim/messaging/message_form.rb +1 -1
  26. data/app/helpers/decidim/endorsable_helper.rb +7 -6
  27. data/app/helpers/decidim/social_share_button_helper.rb +26 -0
  28. data/app/helpers/decidim/twitter_search_helper.rb +14 -0
  29. data/app/packs/entrypoints/decidim_core.js +3 -0
  30. data/app/packs/src/decidim/back_to_list.js +26 -0
  31. data/app/packs/src/decidim/dialog_mode.js +11 -99
  32. data/app/packs/src/decidim/dialog_mode.test.js +17 -4
  33. data/app/packs/src/decidim/diff_mode_dropdown.js +3 -3
  34. data/app/packs/src/decidim/dropdowns_menus.js +1 -0
  35. data/app/packs/src/decidim/focus_guard.js +142 -0
  36. data/app/packs/src/decidim/form_filter.js +17 -1
  37. data/app/packs/src/decidim/form_remote.js +38 -0
  38. data/app/packs/src/decidim/index.js +15 -0
  39. data/app/packs/src/decidim/input_character_counter.js +4 -1
  40. data/app/packs/src/decidim/input_emoji.js +28 -5
  41. data/app/packs/src/decidim/input_multiple_mentions.js +19 -0
  42. data/app/packs/src/decidim/vendor/social-share-button.js +174 -0
  43. data/app/packs/stylesheets/decidim/modules/_buttons.scss +2 -1
  44. data/app/packs/stylesheets/decidim/modules/_forms.scss +6 -1
  45. data/app/packs/stylesheets/decidim/modules/_typography.scss +2 -0
  46. data/app/packs/stylesheets/decidim/utils/_settings.scss +1 -0
  47. data/app/packs/stylesheets/decidim/vendor/_social_share_button.scss +7 -1
  48. data/app/presenters/decidim/menu_item_presenter.rb +9 -1
  49. data/app/views/decidim/account/show.html.erb +1 -1
  50. data/app/views/decidim/application/_collection.html.erb +2 -2
  51. data/app/views/decidim/endorsements/identities.html.erb +1 -1
  52. data/app/views/decidim/groups/new.html.erb +2 -0
  53. data/app/views/decidim/messaging/conversations/_add_conversation_users.html.erb +1 -1
  54. data/app/views/decidim/messaging/conversations/_reply.html.erb +1 -1
  55. data/app/views/decidim/messaging/conversations/_start.html.erb +1 -1
  56. data/app/views/decidim/messaging/conversations/create.js.erb +1 -0
  57. data/app/views/layouts/decidim/_language_chooser.html.erb +9 -2
  58. data/app/views/layouts/decidim/_logo.html.erb +1 -1
  59. data/config/initializers/devise.rb +7 -19
  60. data/config/locales/ar.yml +55 -0
  61. data/config/locales/cs.yml +8 -0
  62. data/config/locales/de.yml +12 -1
  63. data/config/locales/en.yml +8 -0
  64. data/config/locales/fi-plain.yml +7 -0
  65. data/config/locales/fi.yml +8 -0
  66. data/config/locales/fr-CA.yml +8 -0
  67. data/config/locales/fr.yml +8 -0
  68. data/config/locales/gl.yml +10 -0
  69. data/config/locales/hu.yml +10 -0
  70. data/config/locales/it.yml +1 -0
  71. data/config/locales/ja.yml +13 -5
  72. data/db/seeds.rb +2 -2
  73. data/lib/decidim/content_renderers/link_renderer.rb +1 -1
  74. data/lib/decidim/core/engine.rb +43 -0
  75. data/lib/decidim/core/test/shared_examples/amendable/amendment_accepted_event_examples.rb +0 -1
  76. data/lib/decidim/core/test/shared_examples/amendable/amendment_created_event_examples.rb +0 -1
  77. data/lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb +0 -1
  78. data/lib/decidim/core/test/shared_examples/amendable/amendment_rejected_event_examples.rb +0 -1
  79. data/lib/decidim/core/test/shared_examples/comments_examples.rb +27 -0
  80. data/lib/decidim/core/test/shared_examples/conversations_examples.rb +19 -0
  81. data/lib/decidim/core/test/shared_examples/endorsable.rb +69 -0
  82. data/lib/decidim/core/test.rb +2 -0
  83. data/lib/decidim/core/version.rb +1 -1
  84. data/lib/decidim/endorsable.rb +5 -1
  85. data/lib/decidim/middleware/rails_cookies.rb +23 -0
  86. data/lib/decidim/social_share/service.rb +33 -0
  87. data/lib/decidim/social_share/service_registry.rb +63 -0
  88. data/lib/decidim/social_share.rb +45 -0
  89. data/lib/decidim/view_model.rb +0 -1
  90. metadata +19 -8
  91. data/app/helpers/decidim/filter_params_helper.rb +0 -30
  92. data/config/initializers/mail_previews.rb +0 -5
@@ -76,6 +76,9 @@ de:
76
76
  decidim_with_day_and_month_name: "%A, %d. %b %Y"
77
77
  decidim_with_month_name: "%d %B %Y"
78
78
  decidim_with_month_name_short: "%d. %b"
79
+ datetime:
80
+ distance_in_words:
81
+ half_a_minute: eine halbe Minute
79
82
  decidim:
80
83
  accessibility:
81
84
  external_link: Externer Link
@@ -98,6 +101,7 @@ de:
98
101
  error: Beim Löschen Ihres Kontos ist ein Fehler aufgetreten.
99
102
  success: Ihr Konto wurde erfolgreich gelöscht.
100
103
  show:
104
+ available_locales_helper: Wählen Sie die Sprache aus, die Sie verwenden möchten, um in Decidim zu surfen und Benachrichtigungen zu erhalten
101
105
  change_password: Passwort ändern
102
106
  update_account: Konto aktualisieren
103
107
  update:
@@ -661,6 +665,11 @@ de:
661
665
  email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie %{nickname} folgen. Falls Sie keine solchen Benachrichtigungen mehr erhalten möchten, besuchen Sie den obigen Link.
662
666
  email_subject: "%{nickname} hat ihr Profil aktualisiert"
663
667
  notification_title: Die <a href="%{resource_path}">Profilseite</a> von %{name} (%{nickname}), der Sie folgen, wurde aktualisiert.
668
+ user_officialized:
669
+ email_intro: Teilnehmer %{name} (%{nickname}) wurde offiziell bestätigt.
670
+ email_outro: Sie haben diese Benachrichtigung erhalten, weil Sie ein Administrator der Organisation sind.
671
+ email_subject: "%{name} wurde offiziell bestätigt"
672
+ notification_title: Teilnehmer %{name} (%{nickname}) wurde offiziell bestätigt.
664
673
  export_mailer:
665
674
  data_portability_export:
666
675
  click_button: 'Klicken Sie auf den Link, um Ihre Daten herunterzuladen.<br/>Die Datei steht bis zum %{date} zur Verfügung.<br/>Sie benötigen <a href="https://www.7-zip.org/">7-Zip</a> (für Windows), <a href="https://www.keka.io/en/">Keka</a> (für MacOS) oder <a href="https://peazip.github.io">PeaZip</a> (für Linux) um die Datei zu öffnen. Passwort: %{password}'
@@ -1097,7 +1106,7 @@ de:
1097
1106
  modal_body: Wenn Sie sich weigern, werden Sie nicht in der Lage sein , die Plattform zu nutzen, können Sie <a href="%{data_portability_path}">laden Sie Ihre Daten</a> und / oder <a href="%{delete_path}">Ihr Konto löschen</a>.
1098
1107
  modal_btn_continue: Bedingungen akzeptieren und fortfahren
1099
1108
  modal_btn_exit: Ich werde es später überprüfen
1100
- modal_button: Verweiße die Bedingungen
1109
+ modal_button: Bedingungen ablehnen
1101
1110
  modal_close: Modal schließen
1102
1111
  modal_title: Lehnen Sie die aktualisierten Geschäftsbedingungen wirklich ab?
1103
1112
  required_review:
@@ -1610,6 +1619,7 @@ de:
1610
1619
  name: Deutsch
1611
1620
  name_with_error: Englisch (Fehler!)
1612
1621
  password_validator:
1622
+ blacklisted: ist gesperrt
1613
1623
  domain_included_in_password: ist diesem Domainnamen zu ähnlich
1614
1624
  email_included_in_password: ist Ihrer E-Mail zu ähnlich
1615
1625
  fallback: ist ungültig
@@ -1666,6 +1676,7 @@ de:
1666
1676
  dropdown:
1667
1677
  choose_diff_view_html: 'HTML-Ansicht:'
1668
1678
  choose_diff_view_mode: 'Vergleichsansicht:'
1679
+ choose_diff_view_mode_menu: Vergleichsmodus wählen
1669
1680
  option_escaped: aus der Seite herausgekommen
1670
1681
  option_split: Nebeneinander
1671
1682
  option_unescaped: aus der Seite nicht herausgekommen
@@ -23,6 +23,7 @@ en:
23
23
  user:
24
24
  about: About
25
25
  email: Your email
26
+ locale: Locale
26
27
  name: Your name
27
28
  nickname: Nickname
28
29
  password: Password
@@ -108,6 +109,7 @@ en:
108
109
  decidim:
109
110
  accessibility:
110
111
  external_link: External link
112
+ front_page_link: Go to front page
111
113
  logo: "%{organization}'s official logo"
112
114
  skip_button: Skip to main content
113
115
  account:
@@ -704,6 +706,11 @@ en:
704
706
  email_outro: You have received this notification because you are following %{nickname}. You can stop receiving notifications following the previous link.
705
707
  email_subject: "%{nickname} updated their profile"
706
708
  notification_title: The <a href="%{resource_path}">profile page</a> of %{name} (%{nickname}), who you are following, has been updated.
709
+ user_officialized:
710
+ email_intro: Participant %{name} (%{nickname}) has been officialized.
711
+ email_outro: You have received this notification because you are an administrator of the organization.
712
+ email_subject: "%{name} has been officialized"
713
+ notification_title: Participant %{name} (%{nickname}) has been officialized.
707
714
  export_mailer:
708
715
  data_portability_export:
709
716
  click_button: 'Click the next link to download your data.<br/>The file will be available until %{date}.<br/>You will need <a href="https://www.7-zip.org/">7-Zip</a> (for Windows), <a href="https://www.keka.io/en/">Keka</a> (for MacOS) or <a href="https://peazip.github.io">PeaZip</a> (for Linux) to open it. Password: %{password}'
@@ -1738,6 +1745,7 @@ en:
1738
1745
  dropdown:
1739
1746
  choose_diff_view_html: 'HTML view mode:'
1740
1747
  choose_diff_view_mode: 'Compare view mode:'
1748
+ choose_diff_view_mode_menu: Choose compare mode
1741
1749
  option_escaped: Escaped
1742
1750
  option_split: Side-by-side
1743
1751
  option_unescaped: Unescaped
@@ -107,6 +107,7 @@ fi-pl:
107
107
  decidim:
108
108
  accessibility:
109
109
  external_link: Ulkoinen linkki
110
+ front_page_link: Siirry etusivulle
110
111
  logo: "Organisaation %{organization} virallinen logo"
111
112
  skip_button: Siirry sisältöön
112
113
  account:
@@ -698,6 +699,11 @@ fi-pl:
698
699
  email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat käyttäjää %{nickname}. Voit lopettaa ilmoitusten vastaanottamisen edellä esitetyn linkin kautta.
699
700
  email_subject: "%{nickname} päivitti profiiliaan"
700
701
  notification_title: Seuraamasi käyttäjän %{name} (%{nickname}) <a href="%{resource_path}">profiilisivua</a> on päivitetty.
702
+ user_officialized:
703
+ email_intro: Osallistuja %{name} (%{nickname}) on virallistettu.
704
+ email_outro: Tämä ilmoitus on lähetetty sinulle, koska olet tämän organisaation hallintakäyttäjä.
705
+ email_subject: "%{name} on virallistettu"
706
+ notification_title: Osallistuja %{name} (%{nickname}) on virallistettu.
701
707
  export_mailer:
702
708
  data_portability_export:
703
709
  click_button: 'Napsauta Seuraava-linkkiä ladataksesi tietosi.<br/>Tiedosto on saatavilla %{date} saakka.<br/>Tarvitset paketin avaamiseen <a href="https://www.7-zip.org/">7-Zip-ohjelmiston</a> (Windows-käyttöjärjestelmille), <a href="https://www.keka.io/en/">Keka-ohjelmiston</a> (MacOS-käyttöjärjestelmille) tai <a href="https://peazip.github.io">PeaZip-ohjelmiston</a> (Linux-käyttöjärjestelmille). Salasana: %{password}'
@@ -1732,6 +1738,7 @@ fi-pl:
1732
1738
  dropdown:
1733
1739
  choose_diff_view_html: 'HTML-tarkastelutapa:'
1734
1740
  choose_diff_view_mode: 'Vertailutila:'
1741
+ choose_diff_view_mode_menu: Valitse vertailutila
1735
1742
  option_escaped: Teknisten elementtien käsittely käytössä
1736
1743
  option_split: Vierekkäin
1737
1744
  option_unescaped: Teknisten elementtien käsittely pois käytöstä
@@ -22,6 +22,7 @@ fi:
22
22
  user:
23
23
  about: Profiilikuvaus
24
24
  email: Sähköpostiosoitteesi
25
+ locale: Kieli
25
26
  name: Nimesi
26
27
  nickname: Nimimerkki
27
28
  password: Salasana
@@ -107,6 +108,7 @@ fi:
107
108
  decidim:
108
109
  accessibility:
109
110
  external_link: Ulkoinen linkki
111
+ front_page_link: Siirry etusivulle
110
112
  logo: "Organisaation %{organization} virallinen logo"
111
113
  skip_button: Siirry sisältöön
112
114
  account:
@@ -698,6 +700,11 @@ fi:
698
700
  email_outro: Tämä ilmoitus on lähetetty sinulle, koska seuraat käyttäjää %{nickname}. Voit lopettaa ilmoitusten vastaanottamisen edellä esitetyn linkin kautta.
699
701
  email_subject: "%{nickname} päivitti profiiliaan"
700
702
  notification_title: Seuraamasi käyttäjän %{name} (%{nickname}) <a href="%{resource_path}">profiilisivua</a> on päivitetty.
703
+ user_officialized:
704
+ email_intro: Osallistuja %{name} (%{nickname}) on virallistettu.
705
+ email_outro: Tämä ilmoitus on lähetetty sinulle, koska olet tämän organisaation hallintakäyttäjä.
706
+ email_subject: "%{name} on virallistettu"
707
+ notification_title: Osallistuja %{name} (%{nickname}) on virallistettu.
701
708
  export_mailer:
702
709
  data_portability_export:
703
710
  click_button: 'Napsauta Seuraava-linkkiä ladataksesi tietosi.<br/>Tiedosto on saatavilla %{date} saakka.<br/>Tarvitset paketin avaamiseen <a href="https://www.7-zip.org/">7-Zip-ohjelmiston</a> (Windows-käyttöjärjestelmille), <a href="https://www.keka.io/en/">Keka-ohjelmiston</a> (MacOS-käyttöjärjestelmille) tai <a href="https://peazip.github.io">PeaZip-ohjelmiston</a> (Linux-käyttöjärjestelmille). Salasana: %{password}'
@@ -1732,6 +1739,7 @@ fi:
1732
1739
  dropdown:
1733
1740
  choose_diff_view_html: 'HTML-tarkastelutapa:'
1734
1741
  choose_diff_view_mode: 'Vertailutila:'
1742
+ choose_diff_view_mode_menu: Valitse vertailutila
1735
1743
  option_escaped: Teknisten elementtien käsittely käytössä
1736
1744
  option_split: Vierekkäin
1737
1745
  option_unescaped: Teknisten elementtien käsittely pois käytöstä
@@ -22,6 +22,7 @@ fr-CA:
22
22
  user:
23
23
  about: A propos de moi
24
24
  email: Votre email
25
+ locale: Langue
25
26
  name: Votre nom
26
27
  nickname: Surnom
27
28
  password: Mot de passe
@@ -107,6 +108,7 @@ fr-CA:
107
108
  decidim:
108
109
  accessibility:
109
110
  external_link: Lien externe
111
+ front_page_link: Aller à la première page
110
112
  logo: "Logo officiel de %{organization}"
111
113
  skip_button: Passer au contenu principal
112
114
  account:
@@ -694,6 +696,11 @@ fr-CA:
694
696
  email_outro: Vous recevez cette notification car vous suivez « %{nickname} ». Vous pouvez cesser de le suivre à partir du lien précédent.
695
697
  email_subject: "%{nickname} a mis à jour son profil public"
696
698
  notification_title: Le <a href="%{resource_path}">profil public</a> de %{name} (%{nickname}), que vous suivez, a été mis à jour.
699
+ user_officialized:
700
+ email_intro: Le participant %{name} (%{nickname}) a été officialisé.
701
+ email_outro: Vous avez reçu cette notification parce que vous êtes un administrateur de l'organisation.
702
+ email_subject: "%{name} a été officialisé"
703
+ notification_title: Le participant %{name} (%{nickname}) a été officialisé.
697
704
  export_mailer:
698
705
  data_portability_export:
699
706
  click_button: 'Cliquez sur le bouton suivant pour télécharger vos données.<br/>Le fichier sera disponible jusqu''au %{date}.<br/>Vous aurez besoin de <a href="https://www.7-zip.org/">7-Zip</a> (Windows), <a href="https://www.keka.io/en/">Keka</a> (MacOS) ou <a href="https://peazip.github.io">PeaZip</a> (Linux) pour l''ouvrir. Mot de passe : %{password}'
@@ -1728,6 +1735,7 @@ fr-CA:
1728
1735
  dropdown:
1729
1736
  choose_diff_view_html: 'Mode d''affichage HTML :'
1730
1737
  choose_diff_view_mode: 'Sélectionner le mode de vue :'
1738
+ choose_diff_view_mode_menu: Choisissez le mode de comparaison
1731
1739
  option_escaped: Echappé
1732
1740
  option_split: Côte à côte
1733
1741
  option_unescaped: Non échappé
@@ -22,6 +22,7 @@ fr:
22
22
  user:
23
23
  about: A propos de moi
24
24
  email: Votre email
25
+ locale: Langue
25
26
  name: Votre nom
26
27
  nickname: Pseudonyme
27
28
  password: Mot de passe
@@ -107,6 +108,7 @@ fr:
107
108
  decidim:
108
109
  accessibility:
109
110
  external_link: Lien externe
111
+ front_page_link: Aller à la première page
110
112
  logo: "Logo officiel de %{organization}"
111
113
  skip_button: Passer au contenu principal
112
114
  account:
@@ -694,6 +696,11 @@ fr:
694
696
  email_outro: Vous recevez cette notification car vous suivez « %{nickname} ». Vous pouvez cesser de le suivre à partir du lien précédent.
695
697
  email_subject: "%{nickname} a mis à jour son profil public"
696
698
  notification_title: Le <a href="%{resource_path}">profil public</a> de %{name} (%{nickname}), que vous suivez, a été mis à jour.
699
+ user_officialized:
700
+ email_intro: Le participant %{name} (%{nickname}) a été officialisé.
701
+ email_outro: Vous avez reçu cette notification parce que vous êtes un administrateur de l'organisation.
702
+ email_subject: "%{name} a été officialisé"
703
+ notification_title: Le participant %{name} (%{nickname}) a été officialisé.
697
704
  export_mailer:
698
705
  data_portability_export:
699
706
  click_button: 'Cliquez sur le bouton suivant pour télécharger vos données.<br/>Le fichier sera disponible jusqu''au %{date}.<br/>Vous aurez besoin de <a href="https://www.7-zip.org/">7-Zip</a> (Windows), <a href="https://www.keka.io/en/">Keka</a> (MacOS) ou <a href="https://peazip.github.io">PeaZip</a> (Linux) pour l''ouvrir. Mot de passe : %{password}'
@@ -1728,6 +1735,7 @@ fr:
1728
1735
  dropdown:
1729
1736
  choose_diff_view_html: 'Mode d''affichage HTML :'
1730
1737
  choose_diff_view_mode: 'Sélectionner le mode de vue :'
1738
+ choose_diff_view_mode_menu: Choisissez le mode de comparaison
1731
1739
  option_escaped: Echappé
1732
1740
  option_split: Côte à côte
1733
1741
  option_unescaped: Non échappé
@@ -86,6 +86,8 @@ gl:
86
86
  other: "hai %{count} seg"
87
87
  zero: agora
88
88
  decidim:
89
+ accessibility:
90
+ front_page_link: Ir á páxina principal
89
91
  account:
90
92
  data_portability_export:
91
93
  file_no_exists: O ficheiro non existe
@@ -530,6 +532,11 @@ gl:
530
532
  email_outro: Recibiches esta notificación porque estás seguindo %{nickname}. Podes deixar de recibir notificacións seguindo a ligazón anterior.
531
533
  email_subject: "%{nickname} actualizou o seu perfil"
532
534
  notification_title: O <a href="%{resource_path}">profile páxina</a> de %{name} (%{nickname}), quen está a seguir, foi actualizado.
535
+ user_officialized:
536
+ email_intro: O participante %{name} (%{nickname}) foi oficializado.
537
+ email_outro: Recibiches esta notificación por que es administrador da organización.
538
+ email_subject: "%{name} foi oficializado"
539
+ notification_title: O participante %{name} (%{nickname}) foi oficializado.
533
540
  export_mailer:
534
541
  data_portability_export:
535
542
  download: Descarga
@@ -1307,6 +1314,9 @@ gl:
1307
1314
  invitation_instructions:
1308
1315
  accept_until_format: "%B %d, %Y %I:%M %p"
1309
1316
  time_of_day: "%H:%M"
1317
+ versions:
1318
+ dropdown:
1319
+ choose_diff_view_mode_menu: Escoller o modo de comparación
1310
1320
  views:
1311
1321
  pagination:
1312
1322
  first: "&laquo; Primeiro"
@@ -22,6 +22,7 @@ hu:
22
22
  user:
23
23
  about: Magamról
24
24
  email: Email címed
25
+ locale: Hely
25
26
  name: Neved
26
27
  nickname: Becenév
27
28
  password: Jelszó
@@ -86,6 +87,7 @@ hu:
86
87
  decidim:
87
88
  accessibility:
88
89
  external_link: Külső hivatkozás
90
+ front_page_link: Ugrás a címlapra
89
91
  logo: "%{organization} hivatalos logója"
90
92
  skip_button: Ugrás a fő tartalomra
91
93
  account:
@@ -105,6 +107,7 @@ hu:
105
107
  error: Hiba történt a fiók törlése során.
106
108
  success: Fiók törlése sikeres.
107
109
  show:
110
+ available_locales_helper: Válasszd ki a nyelvet, amelyet használni szeretnél a Decidim értesítéseinek böngészéshez és fogadásához
108
111
  change_password: Jelszó módosítása
109
112
  update_account: Fiók frissítése
110
113
  update:
@@ -629,6 +632,8 @@ hu:
629
632
  email_outro: 'Ezt az értesítést azért kaptad, mert őt követed: "%{nickname}". Az értesítéseket a következő linkre kattintva kapcsolhatod ki.'
630
633
  email_subject: "%{nickname} frissítette profilját"
631
634
  notification_title: '%{name} (%{nickname}) (akit egyébként követsz) <a href="%{resource_path}">profil oldala</a> frissült.'
635
+ user_officialized:
636
+ email_outro: Azért kapta ezt az értesítést, mert Ön a szervezet adminisztrátora.
632
637
  export_mailer:
633
638
  data_portability_export:
634
639
  download: Letöltés
@@ -672,6 +677,10 @@ hu:
672
677
  password: A jelszó túl rövid.
673
678
  password_confirmation: A jelszó megerősítés meg kell egyezzen a jelszóval.
674
679
  error: Hiba van ebben a mezőben.
680
+ file_help:
681
+ file:
682
+ message_1: Képnek vagy dokumentumnak kell lennie.
683
+ message_2: A képekhez lehetőleg fekvő képeket használjon, a szolgáltatás megvágja a képet. CSV-fájlok esetén az oszlopok közötti elválasztójelnek vesszőnek (",") kell lennie
675
684
  remove_this_file: Töröld ezt a fájlt
676
685
  gamification:
677
686
  all_badges_link: Az összes elérhető jelvény megtekintése.
@@ -1479,6 +1488,7 @@ hu:
1479
1488
  dropdown:
1480
1489
  choose_diff_view_html: 'HTML megtekintési mód:'
1481
1490
  choose_diff_view_mode: 'Összehasonlító nézet mód:'
1491
+ choose_diff_view_mode_menu: Válassz összehasonlítási módot
1482
1492
  option_escaped: Feloldott
1483
1493
  option_split: Egymás mellet
1484
1494
  option_unescaped: Feloldatlan
@@ -1697,6 +1697,7 @@ it:
1697
1697
  dropdown:
1698
1698
  choose_diff_view_html: 'Modalità visualizzazione HTML:'
1699
1699
  choose_diff_view_mode: 'Modalità di visualizzazione confronto:'
1700
+ choose_diff_view_mode_menu: Scegli la modalità di ricerca
1700
1701
  option_escaped: Escaped
1701
1702
  option_split: Affiancati
1702
1703
  option_unescaped: Unescaped
@@ -22,6 +22,7 @@ ja:
22
22
  user:
23
23
  about: About
24
24
  email: あなたのメールアドレス
25
+ locale: 地域
25
26
  name: 表示名
26
27
  nickname: アカウントID
27
28
  password: パスワード
@@ -96,6 +97,7 @@ ja:
96
97
  decidim:
97
98
  accessibility:
98
99
  external_link: 外部リンク
100
+ front_page_link: フロントページに移動
99
101
  logo: "%{organization}の公式ロゴ"
100
102
  skip_button: メインコンテンツにスキップ
101
103
  account:
@@ -152,9 +154,9 @@ ja:
152
154
  organization:
153
155
  update: "%{user_name} が組織設定を更新しました"
154
156
  participatory_space_private_user:
155
- create: "%{user_name} が %{resource_name} を非公開参加者に招待しました"
156
- create_via_csv: "%{user_name} が %{resource_name} をCSV経由で非公開参加者に招待しました"
157
- delete: "%{user_name} が参加者 %{resource_name} を非公開参加者として削除しました"
157
+ create: "%{user_name} が %{resource_name} をプライベート参加者に招待しました"
158
+ create_via_csv: "%{user_name} が %{resource_name} をCSV経由でプライベート参加者に招待しました"
159
+ delete: "%{user_name} がプライベート参加者の %{resource_name} を削除しました"
158
160
  scope:
159
161
  create: "%{user_name} が %{resource_name} スコープを作成しました"
160
162
  create_with_parent: "%{user_name} は %{resource_name} スコープ内で %{parent_scope} スコープを作成しました"
@@ -684,6 +686,11 @@ ja:
684
686
  email_outro: '%{nickname}をフォローしているため、この通知を受け取りました。前のリンクに続く通知の受信を停止することができます。'
685
687
  email_subject: "%{nickname} がプロフィールを更新しました"
686
688
  notification_title: あなたがフォロー中の %{name} (%{nickname}) さんの <a href="%{resource_path}">プロフィールページ</a> が更新されました。
689
+ user_officialized:
690
+ email_intro: 参加者 %{name} (%{nickname}) が公式化されました。
691
+ email_outro: あなたは組織の管理者であるため、この通知を受け取りました。
692
+ email_subject: "%{name} が公式化されました"
693
+ notification_title: 参加者 %{name} (%{nickname}) が公式化されました。
687
694
  export_mailer:
688
695
  data_portability_export:
689
696
  click_button: '次のリンクをクリックするとあなたのデータがダウンロードできます。<br/>このファイルは %{date} まで利用できます。<br/>ファイルを開くには <a href="https://www.7-zip.org/">7-Zip</a> (Windowsユーザー向け), <a href="https://www.keka.io/en/">Keka</a> (MacOSユーザー向け) または <a href="https://peazip.github.io">PeaZip</a> (Linuxユーザー向け)等が必要です。パスワード:%{password}'
@@ -905,7 +912,7 @@ ja:
905
912
  scope_type_presenter:
906
913
  not_found: 'スコープ種別がデータベース上に見つかりませんでした (ID: %{id})'
907
914
  managed_users:
908
- expired_session: 出席者の現在の管理セッションの有効期限が切れています。
915
+ expired_session: 参加者の現在の管理セッションの有効期限が切れています。
909
916
  map:
910
917
  dynamic:
911
918
  screen_reader_explanation: 以下の要素は、このページ上のアイテムを地図上のポイントとして表示するマップです。 この要素はスクリーンリーダーで使用することができますが、理解しにくいかもしれません。
@@ -1340,7 +1347,7 @@ ja:
1340
1347
  add_max_users: '会話にユーザーを追加: 最大 9 人のユーザー'
1341
1348
  add_users_placeholder: 検索...
1342
1349
  close: 閉じる
1343
- conversations_info: 会話は非公開です。他の誰も見ることはできません。会話はプラットフォームに登録されている参加者またはグループで開始できます。
1350
+ conversations_info: 会話はプライベートです。他の誰も見ることはできません。会話はプラットフォームに登録されている参加者またはグループで開始できます。
1344
1351
  from: '差出人:'
1345
1352
  last_message: 最後のメッセージ
1346
1353
  modal_title: 新しい会話
@@ -1713,6 +1720,7 @@ ja:
1713
1720
  dropdown:
1714
1721
  choose_diff_view_html: 'HTML ビューモード:'
1715
1722
  choose_diff_view_mode: 'ビューモードを比較:'
1723
+ choose_diff_view_mode_menu: 比較モードを選択
1716
1724
  option_escaped: エスケープあり
1717
1725
  option_split: 並べて表示
1718
1726
  option_unescaped: エスケープなし
data/db/seeds.rb CHANGED
@@ -66,10 +66,10 @@ if !Rails.env.production? || ENV["SEED"]
66
66
  organization: organization
67
67
  )
68
68
 
69
- 3.times do
69
+ 3.times do |time|
70
70
  parent = Decidim::Scope.create!(
71
71
  name: Decidim::Faker::Localized.literal(Faker::Address.unique.state),
72
- code: Faker::Address.unique.country_code,
72
+ code: "#{Faker::Address.country_code}_#{time}",
73
73
  scope_type: province,
74
74
  organization: organization
75
75
  )
@@ -20,7 +20,7 @@ module Decidim
20
20
  def render(options = {})
21
21
  return content unless content.is_a?(String)
22
22
 
23
- options = { target: "_blank", rel: "nofollow noopener" }.merge(options)
23
+ options = { target: "_blank", rel: "nofollow noopener noreferrer ugc" }.merge(options)
24
24
  auto_link(content, options)
25
25
  end
26
26
 
@@ -22,6 +22,7 @@ require "omniauth"
22
22
  require "omniauth-facebook"
23
23
  require "omniauth-twitter"
24
24
  require "omniauth-google-oauth2"
25
+ require "omniauth/rails_csrf_protection"
25
26
  require "invisible_captcha"
26
27
  require "premailer/rails"
27
28
  require "premailer/adapter/decidim"
@@ -48,6 +49,9 @@ require "decidim/api"
48
49
  require "decidim/middleware/strip_x_forwarded_host"
49
50
  require "decidim/middleware/current_organization"
50
51
 
52
+ # Backport cookie handling extensions for Rails 6.0
53
+ require "decidim/middleware/rails_cookies"
54
+
51
55
  module Decidim
52
56
  module Core
53
57
  # Decidim's core Rails Engine.
@@ -311,6 +315,7 @@ module Decidim
311
315
 
312
316
  initializer "Expire sessions" do
313
317
  Rails.application.config.session_store :cookie_store, secure: Decidim.config.force_ssl, expire_after: Decidim.config.expire_session_after
318
+ Rails.application.config.action_dispatch.cookies_same_site_protection = :lax
314
319
  end
315
320
 
316
321
  initializer "decidim.core.register_resources" do
@@ -545,6 +550,44 @@ module Decidim
545
550
  Decidim.register_assets_path File.expand_path("app/packs", root)
546
551
  end
547
552
 
553
+ initializer "decidim_core.preview_mailer" do
554
+ # Load in mailer previews for apps to use in development.
555
+ # We need to make sure we call `Preview.all` before requiring our
556
+ # previews, otherwise any previews the app attempts to add need to be
557
+ # manually required.
558
+ if Rails.env.development? || Rails.env.test?
559
+ ActionMailer::Preview.all
560
+
561
+ Dir[root.join("spec/mailers/previews/**/*_preview.rb")].each do |file|
562
+ require_dependency file
563
+ end
564
+ end
565
+ end
566
+
567
+ # These are moved from initializers/devise.rb because we need to run initializers folder before
568
+ # setting these or Decidim.config variables have default values.
569
+ initializer "decidim_core.after_initializers_folder", after: "load_config_initializers" do
570
+ Devise.setup do |config|
571
+ # ==> Mailer Configuration
572
+ # Configure the e-mail address which will be shown in Devise::Mailer,
573
+ # note that it will be overwritten if you use your own mailer class
574
+ # with default "from" parameter.
575
+ config.mailer_sender = Decidim.config.mailer_sender
576
+
577
+ # A period that the user is allowed to access the website even without
578
+ # confirming their account. For instance, if set to 2.days, the user will be
579
+ # able to access the website for two days without confirming their account,
580
+ # access will be blocked just in the third day. Default is 0.days, meaning
581
+ # the user cannot access the website without confirming their account.
582
+ config.allow_unconfirmed_access_for = Decidim.unconfirmed_access_for
583
+
584
+ # ==> Configuration for :timeoutable
585
+ # The time you want to timeout the user session without activity. After this
586
+ # time the user will be asked for credentials again. Default is 30 minutes.
587
+ config.timeout_in = Decidim.config.expire_session_after
588
+ end
589
+ end
590
+
548
591
  config.to_prepare do
549
592
  FoundationRailsHelper::FlashHelper.include Decidim::FlashHelperExtensions
550
593
  end
@@ -8,7 +8,6 @@ shared_examples "amendment accepted event" do
8
8
 
9
9
  it_behaves_like "a simple event"
10
10
 
11
- let(:amendable_title) { amendable.title }
12
11
  let(:emendation_author_nickname) { "@#{emendation.creator_author.nickname}" }
13
12
  let(:emendation_path) { Decidim::ResourceLocatorPresenter.new(emendation).path }
14
13
  let(:emendation_author_path) { Decidim::UserPresenter.new(emendation.creator_author).profile_path }
@@ -13,7 +13,6 @@ shared_examples "amendment created event" do
13
13
 
14
14
  it_behaves_like "a simple event"
15
15
 
16
- let(:amendable_title) { amendable.title }
17
16
  let(:emendation_author_nickname) { "@#{emendation.creator_author.nickname}" }
18
17
  let(:emendation_path) { Decidim::ResourceLocatorPresenter.new(emendation).path }
19
18
  let(:emendation_author_path) { Decidim::UserPresenter.new(emendation.creator_author).profile_path }
@@ -8,7 +8,6 @@ shared_examples "amendment promoted event" do
8
8
 
9
9
  it_behaves_like "a simple event"
10
10
 
11
- let(:amendable_title) { amendable.title }
12
11
  let(:emendation_author_nickname) { "@#{emendation.creator_author.nickname}" }
13
12
  let(:emendation_path) { Decidim::ResourceLocatorPresenter.new(emendation).path }
14
13
  let(:emendation_author_path) { Decidim::UserPresenter.new(emendation.creator_author).profile_path }
@@ -8,7 +8,6 @@ shared_examples "amendment rejected event" do
8
8
 
9
9
  it_behaves_like "a simple event"
10
10
 
11
- let(:amendable_title) { amendable.title }
12
11
  let(:emendation_author_nickname) { "@#{emendation.creator_author.nickname}" }
13
12
  let(:emendation_path) { Decidim::ResourceLocatorPresenter.new(emendation).path }
14
13
  let(:emendation_author_path) { Decidim::UserPresenter.new(emendation.creator_author).profile_path }
@@ -132,6 +132,33 @@ shared_examples "comments" do
132
132
  end
133
133
  end
134
134
  end
135
+
136
+ it "let the emoji button works properly when there are not too much characters" do
137
+ if component.present?
138
+ component.update!(settings: { comments_max_length: 100 })
139
+ visit current_path
140
+
141
+ within ".add-comment form" do
142
+ find(:css, "textarea:enabled").set("toto")
143
+ expect(page).not_to have_selector(".emoji-picker__wrapper")
144
+ find("svg").click
145
+ end
146
+ expect(page).to have_selector(".emoji-picker__wrapper")
147
+ end
148
+ end
149
+
150
+ it "deactivate the emoji button when there are less than 4 characters left" do
151
+ if component.present?
152
+ component.update!(settings: { comments_max_length: 30 })
153
+ visit current_path
154
+
155
+ within ".add-comment form" do
156
+ find(:css, "textarea:enabled").set("0123456789012345678901234567")
157
+ find("svg").click
158
+ expect(page).not_to have_selector(".emoji-picker__wrapper")
159
+ end
160
+ end
161
+ end
135
162
  end
136
163
  end
137
164
 
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ shared_examples_for "conversation field with maximum length" do |field|
4
+ describe "character counter" do
5
+ let(:message) { "#{::Faker::Lorem.paragraph}\n#{::Faker::Lorem.paragraph}" }
6
+ let(:max_length) { Decidim.config.maximum_conversation_message_length }
7
+
8
+ before do
9
+ allow(Decidim.config).to receive(
10
+ :maximum_conversation_message_length
11
+ ).and_return(max_length)
12
+ end
13
+
14
+ it "shows character counter" do
15
+ fill_in field, with: message
16
+ expect(page).to have_content("#{max_length - message.length} characters left")
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "spec_helper"
4
+
5
+ shared_examples_for "endorsable" do
6
+ context "when endorsable" do
7
+ let(:user) { create(:user, organization: subject.organization) }
8
+
9
+ describe "#endorsed_by?" do
10
+ context "with User endorsement" do
11
+ it "returns false if the resource is not endorsed by the given user" do
12
+ expect(subject).not_to be_endorsed_by(user)
13
+ end
14
+
15
+ it "returns true if the resource is endorsed by the given user" do
16
+ create(:endorsement, resource: subject, author: user)
17
+ expect(subject).to be_endorsed_by(user)
18
+ end
19
+ end
20
+
21
+ context "with Organization endorsement" do
22
+ let!(:user_group) { create(:user_group, verified_at: Time.current, organization: user.organization) }
23
+ let!(:membership) { create(:user_group_membership, user: user, user_group: user_group) }
24
+
25
+ before { user_group.reload }
26
+
27
+ it "returns false if the resource is not endorsed by the given organization" do
28
+ expect(subject).not_to be_endorsed_by(user, user_group)
29
+ end
30
+
31
+ context "when there's an endorsement" do
32
+ let!(:endorsement) { create(:endorsement, resource: subject, author: user, user_group: user_group) }
33
+
34
+ before { user_group.reload }
35
+
36
+ it "returns false if the resource is not endorsed by the given user" do
37
+ expect(subject).not_to be_endorsed_by(user)
38
+ end
39
+
40
+ it "returns true if the resource is endorsed by the given organization" do
41
+ expect(subject).to be_endorsed_by(user, user_group)
42
+ end
43
+
44
+ context "with another user" do
45
+ let!(:another_user) { create(:user, :confirmed, organization: user.organization) }
46
+ let!(:another_membership) { create(:user_group_membership, user: another_user, user_group: user_group, role: "admin") }
47
+
48
+ before { user_group.reload }
49
+
50
+ it "returns true if the resource is endorsed by other user of the same organization" do
51
+ expect(subject).to be_endorsed_by(another_user, user_group)
52
+ end
53
+ end
54
+
55
+ context "with another organization" do
56
+ let!(:another_user_group) { create(:user_group, verified_at: Time.current, organization: user.organization) }
57
+ let!(:another_membership) { create(:user_group_membership, user: user, user_group: another_user_group) }
58
+
59
+ before { another_user_group.reload }
60
+
61
+ it "returns false if the resource is not endorsed by another organization of the same user" do
62
+ expect(subject).not_to be_endorsed_by(user)
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -4,6 +4,7 @@ require "decidim/core/test/shared_examples/acts_as_author_examples"
4
4
  require "decidim/core/test/shared_examples/admin_log_presenter_examples"
5
5
  require "decidim/core/test/shared_examples/authorable"
6
6
  require "decidim/core/test/shared_examples/coauthorable"
7
+ require "decidim/core/test/shared_examples/endorsable"
7
8
  require "decidim/core/test/shared_examples/publicable"
8
9
  require "decidim/core/test/shared_examples/localised_email"
9
10
  require "decidim/core/test/shared_examples/logo_email"
@@ -69,3 +70,4 @@ require "decidim/core/test/shared_examples/share_link_examples"
69
70
  require "decidim/core/test/shared_examples/categories_container_examples"
70
71
  require "decidim/core/test/shared_examples/assembly_announcements_examples"
71
72
  require "decidim/core/test/shared_examples/translated_event_examples"
73
+ require "decidim/core/test/shared_examples/conversations_examples"