decidim-core 0.28.0 → 0.28.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/activity_cell.rb +2 -2
  3. data/app/cells/decidim/address/online.erb +27 -9
  4. data/app/cells/decidim/address/show.erb +27 -12
  5. data/app/cells/decidim/address_cell.rb +29 -0
  6. data/app/cells/decidim/authorization_modal/show.erb +8 -4
  7. data/app/cells/decidim/authorization_modal_cell.rb +1 -0
  8. data/app/cells/decidim/card_metadata_cell.rb +3 -3
  9. data/app/cells/decidim/coauthorships_cell.rb +1 -1
  10. data/app/cells/decidim/content_blocks/menu_breadcrumb_last_activity_cell.rb +6 -0
  11. data/app/cells/decidim/content_blocks/participatory_space_hero_cell.rb +20 -4
  12. data/app/cells/decidim/content_blocks/participatory_space_hero_settings_form/show.erb +8 -0
  13. data/app/cells/decidim/content_blocks/participatory_space_hero_settings_form_cell.rb +13 -0
  14. data/app/cells/decidim/content_blocks/participatory_space_metadata_cell.rb +1 -1
  15. data/app/cells/decidim/footer_pages_cell.rb +3 -3
  16. data/app/cells/decidim/profile/tabs.erb +3 -2
  17. data/app/cells/decidim/tags_cell.rb +3 -1
  18. data/app/cells/decidim/upload_modal/modal.erb +2 -2
  19. data/app/commands/decidim/create_omniauth_registration.rb +1 -3
  20. data/app/commands/decidim/messaging/reply_to_conversation.rb +3 -0
  21. data/app/commands/decidim/messaging/start_conversation.rb +3 -0
  22. data/app/controllers/concerns/decidim/devise_authentication_methods.rb +36 -0
  23. data/app/controllers/concerns/decidim/paginable.rb +1 -1
  24. data/app/controllers/decidim/devise/omniauth_registrations_controller.rb +1 -22
  25. data/app/controllers/decidim/devise/sessions_controller.rb +1 -24
  26. data/app/events/decidim/welcome_notification_event.rb +6 -9
  27. data/app/helpers/decidim/application_helper.rb +0 -18
  28. data/app/helpers/decidim/cells_paginate_helper.rb +1 -1
  29. data/app/helpers/decidim/check_boxes_tree_helper.rb +6 -6
  30. data/app/helpers/decidim/layout_helper.rb +1 -1
  31. data/app/helpers/decidim/map_helper.rb +1 -1
  32. data/app/helpers/decidim/menu_helper.rb +2 -0
  33. data/app/helpers/decidim/newsletters_helper.rb +83 -16
  34. data/app/helpers/decidim/paginate_helper.rb +1 -1
  35. data/app/helpers/decidim/sanitize_helper.rb +9 -0
  36. data/app/helpers/decidim/social_share_button_helper.rb +1 -1
  37. data/app/helpers/decidim/user_profile_helper.rb +7 -2
  38. data/app/mailers/decidim/messaging/conversation_mailer.rb +3 -72
  39. data/app/models/decidim/push_notification_message.rb +38 -0
  40. data/app/packs/entrypoints/decidim_overrides.scss +2 -0
  41. data/app/packs/images/decidim/.keep +0 -0
  42. data/app/packs/src/decidim/a11y.js +1 -1
  43. data/app/packs/src/decidim/account_form.js +1 -1
  44. data/app/packs/src/decidim/data_consent/consent_manager.test.js +1 -1
  45. data/app/packs/src/decidim/data_consent/index.js +1 -1
  46. data/app/packs/src/decidim/direct_uploads/upload_field.js +1 -1
  47. data/app/packs/src/decidim/direct_uploads/upload_modal.js +10 -6
  48. data/app/packs/src/decidim/editor/extensions/hashtag/index.js +1 -1
  49. data/app/packs/src/decidim/editor/extensions/mention/index.js +1 -1
  50. data/app/packs/src/decidim/editor/extensions/video_embed/index.js +3 -0
  51. data/app/packs/src/decidim/editor/test/editor/create.test.js +1 -1
  52. data/app/packs/src/decidim/editor/test/extensions/bold.test.js +2 -3
  53. data/app/packs/src/decidim/editor/test/extensions/character_count.test.js +2 -2
  54. data/app/packs/src/decidim/editor/test/extensions/decidim_kit.test.js +2 -3
  55. data/app/packs/src/decidim/editor/test/extensions/dialog.test.js +2 -2
  56. data/app/packs/src/decidim/editor/test/extensions/emoji.test.js +2 -2
  57. data/app/packs/src/decidim/editor/test/extensions/hashtag.test.js +2 -2
  58. data/app/packs/src/decidim/editor/test/extensions/heading.test.js +2 -2
  59. data/app/packs/src/decidim/editor/test/extensions/image.test.js +4 -4
  60. data/app/packs/src/decidim/editor/test/extensions/indent.test.js +2 -2
  61. data/app/packs/src/decidim/editor/test/extensions/link.test.js +3 -3
  62. data/app/packs/src/decidim/editor/test/extensions/mention.test.js +2 -2
  63. data/app/packs/src/decidim/editor/test/extensions/ordered_list.test.js +2 -2
  64. data/app/packs/src/decidim/editor/test/extensions/video_embed.test.js +3 -3
  65. data/app/packs/src/decidim/editor/test/helpers.js +5 -4
  66. data/app/packs/src/decidim/editor/test/toolbar/basic.test.js +2 -2
  67. data/app/packs/src/decidim/editor/test/toolbar/content.test.js +2 -2
  68. data/app/packs/src/decidim/editor/test/toolbar/full.test.js +3 -3
  69. data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic.js +6 -6
  70. data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_block.js +2 -2
  71. data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_formatting.js +1 -1
  72. data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_indent.js +2 -2
  73. data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_link.js +2 -2
  74. data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_list.js +2 -2
  75. data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_basic_styling.js +2 -2
  76. data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_content.js +7 -7
  77. data/app/packs/src/decidim/editor/test/toolbar/shared/behaves_like_content_styling.js +2 -2
  78. data/app/packs/src/decidim/editor/test/toolbar/shared/context.js +1 -1
  79. data/app/packs/src/decidim/editor/test/utilities/paste_transform.test.js +2 -2
  80. data/app/packs/src/decidim/external_domain_warning.js +13 -0
  81. data/app/packs/src/decidim/external_domain_warning.test.js +1 -1
  82. data/app/packs/src/decidim/external_link.js +48 -9
  83. data/app/packs/src/decidim/external_link.test.js +1 -1
  84. data/app/packs/src/decidim/focus_guard.js +8 -20
  85. data/app/packs/src/decidim/form_filter.component_for_testing.js +1 -1
  86. data/app/packs/src/decidim/form_filter.js +3 -3
  87. data/app/packs/src/decidim/geocoding/attach_input.js +1 -1
  88. data/app/packs/src/decidim/i18n.test.js +1 -1
  89. data/app/packs/src/decidim/index.js +4 -1
  90. data/app/packs/src/decidim/input_hashtags.js +1 -1
  91. data/app/packs/src/decidim/input_mentions.js +1 -1
  92. data/app/packs/src/decidim/input_multiple_mentions.js +1 -1
  93. data/app/packs/src/decidim/sw/index.js +3 -3
  94. data/app/packs/src/decidim/user_registrations.js +1 -1
  95. data/app/packs/src/decidim/vizzs/index.js +1 -1
  96. data/app/packs/stylesheets/decidim/_cards.scss +2 -2
  97. data/app/packs/stylesheets/decidim/_dropdown.scss +2 -2
  98. data/app/packs/stylesheets/decidim/_layout.scss +4 -4
  99. data/app/packs/stylesheets/decidim/application.scss +0 -3
  100. data/app/packs/stylesheets/decidim/decidim_application.scss +4 -0
  101. data/app/packs/stylesheets/decidim/legacy/leaflet.scss +88 -107
  102. data/app/presenters/decidim/admin_log/oauth_application_resource_presenter.rb +1 -1
  103. data/app/presenters/decidim/log/diff_presenter.rb +1 -1
  104. data/app/presenters/decidim/notification_to_mailer_presenter.rb +9 -0
  105. data/app/services/decidim/events_manager.rb +6 -0
  106. data/app/services/decidim/iframe_disabler.rb +4 -0
  107. data/app/services/decidim/push_notification_message_sender.rb +40 -0
  108. data/app/services/decidim/send_push_notification.rb +22 -8
  109. data/app/uploaders/decidim/background_image_uploader.rb +11 -0
  110. data/app/views/decidim/application/_collection.html.erb +2 -2
  111. data/app/views/decidim/application/_document.html.erb +1 -1
  112. data/app/views/decidim/devise/registrations/new.html.erb +2 -2
  113. data/app/views/decidim/notifications_digest_mailer/_email_content.html.erb +7 -0
  114. data/app/views/decidim/offline/show.html.erb +15 -9
  115. data/app/views/layouts/decidim/_head.html.erb +1 -0
  116. data/app/views/layouts/decidim/_js_configuration.html.erb +3 -1
  117. data/app/views/layouts/decidim/footer/_main_social_media_links.html.erb +5 -5
  118. data/app/views/layouts/decidim/footer/_mini.html.erb +2 -2
  119. data/app/views/layouts/decidim/header/_menu_breadcrumb_mobile_tablet.html.erb +1 -1
  120. data/config/assets.rb +1 -0
  121. data/config/locales/ar.yml +63 -7
  122. data/config/locales/bg.yml +32 -2
  123. data/config/locales/ca.yml +29 -24
  124. data/config/locales/cs.yml +6 -2
  125. data/config/locales/de.yml +34 -29
  126. data/config/locales/el.yml +3 -6
  127. data/config/locales/en.yml +7 -2
  128. data/config/locales/es-MX.yml +9 -4
  129. data/config/locales/es-PY.yml +9 -4
  130. data/config/locales/es.yml +27 -22
  131. data/config/locales/eu.yml +22 -8
  132. data/config/locales/fi-plain.yml +8 -3
  133. data/config/locales/fi.yml +10 -5
  134. data/config/locales/fr-CA.yml +12 -7
  135. data/config/locales/fr.yml +12 -7
  136. data/config/locales/ga-IE.yml +1 -0
  137. data/config/locales/gl.yml +4 -2
  138. data/config/locales/he-IL.yml +1 -0
  139. data/config/locales/hu.yml +264 -7
  140. data/config/locales/id-ID.yml +0 -2
  141. data/config/locales/it.yml +2 -5
  142. data/config/locales/ja.yml +11 -6
  143. data/config/locales/lb.yml +2 -5
  144. data/config/locales/lt.yml +0 -10
  145. data/config/locales/lv.yml +0 -2
  146. data/config/locales/nl.yml +1 -2
  147. data/config/locales/no.yml +2 -5
  148. data/config/locales/pl.yml +581 -2
  149. data/config/locales/pt-BR.yml +202 -18
  150. data/config/locales/pt.yml +2 -5
  151. data/config/locales/ro-RO.yml +2 -5
  152. data/config/locales/ru.yml +7 -2
  153. data/config/locales/sk.yml +0 -2
  154. data/config/locales/sv.yml +24 -5
  155. data/config/locales/tr-TR.yml +3 -5
  156. data/config/locales/uk.yml +12 -2
  157. data/config/locales/zh-CN.yml +0 -5
  158. data/config/locales/zh-TW.yml +2 -10
  159. data/decidim-core.gemspec +90 -0
  160. data/lib/decidim/asset_router/storage.rb +2 -0
  161. data/lib/decidim/attribute_encryptor.rb +6 -4
  162. data/lib/decidim/attributes/time_with_zone.rb +1 -1
  163. data/lib/decidim/core/engine.rb +7 -6
  164. data/lib/decidim/core/seeds.rb +36 -32
  165. data/lib/decidim/core/test/factories.rb +296 -89
  166. data/lib/decidim/core/test/shared_examples/amendable/amendment_created_event_examples.rb +6 -26
  167. data/lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb +8 -26
  168. data/lib/decidim/core/test/shared_examples/has_attachment_collections.rb +8 -6
  169. data/lib/decidim/core/test/shared_examples/has_attachments.rb +8 -8
  170. data/lib/decidim/core/test/shared_examples/has_category.rb +27 -0
  171. data/lib/decidim/core/test/shared_examples/has_reference.rb +1 -1
  172. data/lib/decidim/core/test/shared_examples/has_space_in_mcell_examples.rb +1 -1
  173. data/lib/decidim/core/test/shared_examples/map_examples.rb +3 -0
  174. data/lib/decidim/core/test/shared_examples/resource_endorsed_event_examples.rb +5 -2
  175. data/lib/decidim/core/test/shared_examples/resource_locator_presenter_examples.rb +134 -0
  176. data/lib/decidim/core/test/shared_examples/simple_event.rb +18 -2
  177. data/lib/decidim/core/test.rb +1 -0
  178. data/lib/decidim/core/version.rb +1 -1
  179. data/lib/decidim/core.rb +1 -0
  180. data/lib/decidim/engine_router.rb +17 -4
  181. data/lib/decidim/events/base_event.rb +3 -3
  182. data/lib/decidim/events/simple_event.rb +3 -17
  183. data/lib/decidim/form_builder.rb +8 -2
  184. data/lib/decidim/has_category.rb +1 -1
  185. data/lib/decidim/has_conversations.rb +91 -0
  186. data/lib/decidim/participable.rb +17 -0
  187. data/lib/decidim/upgrade/wysiwyg_migrator.rb +7 -0
  188. data/lib/decidim/view_model.rb +1 -0
  189. data/lib/decidim/webpacker/webpack/.modernizrrc +9 -0
  190. data/lib/premailer/adapter/decidim.rb +5 -4
  191. data/lib/tasks/decidim_reminders_tasks.rake +1 -0
  192. data/lib/tasks/upgrade/decidim_fix_categorization.rake +15 -0
  193. metadata +27 -30
  194. data/app/views/decidim/searches/index.js.erb +0 -7
  195. data/config/brakeman.ignore +0 -37
  196. data/config/environment.rb +0 -3
@@ -73,9 +73,7 @@ sv:
73
73
  'true': 'Ja'
74
74
  carrierwave:
75
75
  errors:
76
- file_resolution_too_large: Filupplösningen är för stor
77
76
  file_size_too_large: Filen är för stor
78
- not_inside_organization: Den här filen är inte bifogad till någon organisation
79
77
  date:
80
78
  formats:
81
79
  decidim_short: "%d/%m/%Y"
@@ -427,8 +425,6 @@ sv:
427
425
  name: Sidfot sub hero banner
428
426
  global_menu:
429
427
  name: Global meny
430
- hero:
431
- name: Hjältebild
432
428
  hero_settings_form:
433
429
  background_image: Bakgrundsbild
434
430
  welcome_text: Välkomsttext
@@ -1051,6 +1047,7 @@ sv:
1051
1047
  headline: Aktuellt läge för %{organization}
1052
1048
  sub_hero:
1053
1049
  register: Registrera
1050
+ register_title: Skapa ett konto
1054
1051
  index:
1055
1052
  standalone_pages: Sidor
1056
1053
  subheading: Navigera genom hjälpsidorna för %{name}
@@ -1432,7 +1429,6 @@ sv:
1432
1429
  activities: Aktiviteter
1433
1430
  custom: Anpassad
1434
1431
  flags: Flaggor
1435
- food-drink: Mat & Dryck
1436
1432
  objects: Objekt
1437
1433
  people-body: Personer & kropp
1438
1434
  recents: Nyligen använd
@@ -1474,35 +1470,57 @@ sv:
1474
1470
  data_consent:
1475
1471
  details:
1476
1472
  columns:
1473
+ description: Beskrivning
1477
1474
  name: Namn
1478
1475
  service: Tjänst
1479
1476
  type: Typ
1480
1477
  items:
1481
1478
  _session_id:
1479
+ description: Tillåter webbplatser att komma ihåg användare på en webbplats när de flyttar mellan webbsidor.
1482
1480
  service: Denna webbplats
1483
1481
  decidim-consent:
1482
+ description: Lagrar information om de cookies som tillåts av användaren på denna webbplats.
1484
1483
  service: Denna webbplats
1485
1484
  pwaInstallPromptSeen:
1485
+ description: Lagrar status om den progressiva webbapplikationen (PWA) installationsmeddelandet har redan setts av användaren.
1486
1486
  service: Denna webbplats
1487
1487
  types:
1488
1488
  cookie: Cookie
1489
1489
  local_storage: Lokal lagring
1490
1490
  dialog:
1491
1491
  accept_all: Acceptera alla
1492
+ accept_only_essential: Acceptera endast nödvändig
1493
+ description: Vi använder cookies på vår webbplats för att förbättra webbplatsens prestanda och innehåll. Med hjälp av cookies kan vi erbjuda en mer individuell användarupplevelse och sociala mediekanaler.
1492
1494
  settings: Inställningar
1495
+ title: Information om de cookies som används på webbplatsen
1493
1496
  modal:
1494
1497
  accept_all: Acceptera alla
1498
+ accept_only_essential: Acceptera endast nödvändig
1499
+ analytics:
1500
+ description: Dessa cookies används för att mäta och analysera webbplatsens publik för att förbättra webbplatsen.
1501
+ title: Analys och statistik
1502
+ description: Vi använder cookies för att säkerställa grundläggande funktioner på webbplatsen och för att förbättra din upplevelse online. Du kan när som helst konfigurera och acceptera användningen av cookies och ändra dina samtyckesalternativ.
1495
1503
  essential:
1504
+ description: Dessa cookies möjliggör viktiga funktioner på webbplatsen och hjälper till att hålla sina användare säkrade. De sparas automatiskt i webbläsaren och kan inte inaktiveras.
1496
1505
  title: Nödvändigt
1497
1506
  marketing:
1507
+ description: Dessa cookies samlar in information om hur du använder webbplatsen och de kan användas för att ge dig mer personlig marknadsföring på de olika webbplatser du använder.
1498
1508
  title: Marknadsföring
1509
+ preferences:
1510
+ description: Dessa cookies gör det möjligt för webbplatsen att komma ihåg de val du gjort tidigare på denna webbplats för att ge en mer personlig upplevelse för webbplatsens användare.
1511
+ title: Preferenser
1499
1512
  save_settings: Spara inställningar
1513
+ title: Cookie-inställningar
1514
+ toggle: Växla %{consent_category}
1500
1515
  warning:
1516
+ all_categories: alla cookies
1517
+ change_settings: Ändra cookie-inställningar
1501
1518
  consent_required: Du måste aktivera %{categories} för att kunna se innehållet.
1502
1519
  edit_link:
1503
1520
  edit: Redigera
1504
1521
  footer:
1505
1522
  cc_by_license: Creative Commons licens
1523
+ data_consent_settings: Cookie-inställningar
1506
1524
  decidim_logo: Decidim logotyp
1507
1525
  decidim_title: Decidim
1508
1526
  download_open_data: Hämta öppna datafiler
@@ -1620,6 +1638,7 @@ sv:
1620
1638
  option_split: Sida vid sida
1621
1639
  option_unescaped: Orymt
1622
1640
  option_unified: Sammanslagen
1641
+ toggle: Växla vy
1623
1642
  views:
1624
1643
  pagination:
1625
1644
  next: Nästa
@@ -60,9 +60,6 @@ tr:
60
60
  booleans:
61
61
  'false': 'Hayır'
62
62
  'true': 'Evet'
63
- carrierwave:
64
- errors:
65
- not_inside_organization: Dosya herhangi bir kuruluşa eklenmemiş
66
63
  date:
67
64
  formats:
68
65
  decidim_short: "%d/%m/%Y"
@@ -349,8 +346,6 @@ tr:
349
346
  description: Açıklama
350
347
  footer_sub_hero:
351
348
  name: Dipnot alt afişi
352
- hero:
353
- name: Ana resim
354
349
  hero_settings_form:
355
350
  background_image: Arka plan resmi
356
351
  welcome_text: Hoşgeldin Mesajı
@@ -630,6 +625,7 @@ tr:
630
625
  file:
631
626
  explanation: 'Dosya kılavuzu:'
632
627
  message_1: Bir resim veya bir belge olmalı.
628
+ message_2: Resimler için tercihen yatay resimleri kullanın, bu servis resmi kırpar.
633
629
  image:
634
630
  explanation: 'Dosya kılavuzu:'
635
631
  message_1: Tercihen herhangi bir metin içermeyen yatay bir resim.
@@ -988,6 +984,8 @@ tr:
988
984
  close_modal: Pencereyi kapat
989
985
  ok: TAMAM
990
986
  title: Onayla
987
+ embed:
988
+ title: Gömülü video içeriği
991
989
  extended_navigation_bar:
992
990
  more: Daha
993
991
  unfold: açılmak
@@ -157,6 +157,11 @@ uk:
157
157
  ok: Гаразд
158
158
  title: Недостатньо прав через відсутність підтвердження особи
159
159
  collapsible_list:
160
+ hidden_elements_count:
161
+ one: і ще %{count}
162
+ few: і ще %{count}
163
+ many: і ще %{count}
164
+ other: і ще %{count}
160
165
  see_less: "(читати менше)"
161
166
  components:
162
167
  dummy:
@@ -178,8 +183,6 @@ uk:
178
183
  content_blocks:
179
184
  footer_sub_hero:
180
185
  name: Нижній колонтитул під-багатирського банера
181
- hero:
182
- name: Багатирський банер
183
186
  highlighted_content_banner:
184
187
  name: Банер висвітленого вмісту
185
188
  how_to_participate:
@@ -332,6 +335,10 @@ uk:
332
335
  intro: "%{sender} написав нові повідомлення у вашій бесіді. Клацніть тут, щоб переглянути їх:"
333
336
  subject: Ви отримали нові повідомлення від %{sender}
334
337
  conversations:
338
+ index:
339
+ title: Бесіди
340
+ show:
341
+ title: Бесіда з %{usernames}
335
342
  start:
336
343
  send: Надіслати
337
344
  newsletter_mailer:
@@ -387,6 +394,7 @@ uk:
387
394
  deleted: Видалений учасник
388
395
  profiles:
389
396
  show:
397
+ conversations: Бесіди
390
398
  followers: Ті, хто стежить
391
399
  following: 'Стежить за:'
392
400
  user:
@@ -417,6 +425,8 @@ uk:
417
425
  results_found_for_term: '%{count} Висліди пошуку: "%{term}"'
418
426
  term_input_placeholder: Шукати
419
427
  searches:
428
+ filters:
429
+ search: Шукати
420
430
  filters_small_view:
421
431
  filter: Відібрати
422
432
  filter_by: 'Відібрати за ознакою:'
@@ -56,9 +56,6 @@ zh-CN:
56
56
  booleans:
57
57
  'false': '否'
58
58
  'true': '否'
59
- carrierwave:
60
- errors:
61
- not_inside_organization: 该文件没有附加到任何组织
62
59
  date:
63
60
  formats:
64
61
  decidim_short: "%d/%m/%Y"
@@ -308,8 +305,6 @@ zh-CN:
308
305
  content_blocks:
309
306
  footer_sub_hero:
310
307
  name: 页脚子英雄横幅:
311
- hero:
312
- name: 英雄图像
313
308
  hero_settings_form:
314
309
  background_image: 背景图像
315
310
  welcome_text: 欢迎文本
@@ -74,10 +74,7 @@ zh-TW:
74
74
  'true': '是'
75
75
  carrierwave:
76
76
  errors:
77
- file_cannot_be_processed: 無法處理檔案
78
- file_resolution_too_large: 檔案解析度過大
79
77
  file_size_too_large: 檔案太大。
80
- not_inside_organization: 該文件未附加到任何組織
81
78
  date:
82
79
  formats:
83
80
  decidim_short: "%d/%m/%Y"
@@ -464,8 +461,6 @@ zh-TW:
464
461
  description: 說明
465
462
  footer_sub_hero:
466
463
  name: 頁尾子英雄橫幅
467
- hero:
468
- name: 英雄圖像
469
464
  hero_settings_form:
470
465
  background_image: 背景圖片
471
466
  welcome_text: 歡迎文字
@@ -1106,7 +1101,6 @@ zh-TW:
1106
1101
  token_error: 該連結已過期。
1107
1102
  unsubscribe: 取消訂閱
1108
1103
  newsletters_opt_in:
1109
- unathorized: 抱歉,此連結已不再可用。
1110
1104
  update:
1111
1105
  error: 儲存通訊設定時出現問題。
1112
1106
  success: 成功更新電子報設定.
@@ -1168,7 +1162,6 @@ zh-TW:
1168
1162
  success: 您的通知設定已成功更新。
1169
1163
  offline:
1170
1164
  show:
1171
- message: 看起來您目前處於離線狀態,請稍後再試。
1172
1165
  retry: 重試
1173
1166
  open_data:
1174
1167
  not_available_yet: 開放數據檔案尚未可用,請稍後再試。
@@ -1192,11 +1185,13 @@ zh-TW:
1192
1185
  register: 註冊
1193
1186
  hero:
1194
1187
  participate: 參與
1188
+ participate_title: 參與平台的流程
1195
1189
  welcome: 歡迎來到 %{organization}!
1196
1190
  statistics:
1197
1191
  headline: '%{organization} 的目前狀態'
1198
1192
  sub_hero:
1199
1193
  register: 註冊
1194
+ register_title: 註冊以創建帳戶
1200
1195
  index:
1201
1196
  standalone_pages: 頁
1202
1197
  subheading: 瀏覽 %{name} 的幫助頁面
@@ -1591,16 +1586,13 @@ zh-TW:
1591
1586
  button: 新增Emoji
1592
1587
  categories:
1593
1588
  activities: 活躍狀態
1594
- animals-nature: 動物與自然
1595
1589
  custom: 自訂
1596
1590
  flags: 旗幟
1597
- food-drink: 食物 & 飲料
1598
1591
  objects: 目標
1599
1592
  people-body: 人與身體
1600
1593
  recents: 最近使用的
1601
1594
  smileys-emotion: 表情符號和情感
1602
1595
  symbols: 符號
1603
- travel-places: 旅遊與地點
1604
1596
  error:
1605
1597
  load: 無法載入表情符號
1606
1598
  recents:
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path("lib", __dir__)
4
+
5
+ # Maintain your gem's version:
6
+ require "decidim/core/version"
7
+
8
+ # Describe your gem and declare its dependencies:
9
+ Gem::Specification.new do |s|
10
+ s.name = "decidim-core"
11
+ s.version = Decidim::Core.version
12
+ s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
13
+ s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
14
+ s.homepage = "https://decidim.org"
15
+ s.metadata = {
16
+ "bug_tracker_uri" => "https://github.com/decidim/decidim/issues",
17
+ "documentation_uri" => "https://docs.decidim.org/",
18
+ "funding_uri" => "https://opencollective.com/decidim",
19
+ "homepage_uri" => "https://decidim.org",
20
+ "source_code_uri" => "https://github.com/decidim/decidim"
21
+ }
22
+ s.summary = "The core of the Decidim framework."
23
+ s.description = "Adds core features so other engines can hook into the framework."
24
+ s.license = "AGPL-3.0"
25
+ s.required_ruby_version = "~> 3.1.0"
26
+
27
+ s.files = Dir.chdir(__dir__) do
28
+ `git ls-files -z`.split("\x0").select do |f|
29
+ (File.expand_path(f) == __FILE__) ||
30
+ f.start_with?(*%w(app/ config/ db/ lib/ Rakefile README.md))
31
+ end
32
+ end
33
+
34
+ s.add_dependency "active_link_to", "~> 1.0"
35
+ s.add_dependency "acts_as_list", "~> 1.0"
36
+ s.add_dependency "batch-loader", "~> 1.2"
37
+ s.add_dependency "browser", "~> 2.7"
38
+ s.add_dependency "carrierwave", "~> 2.2.5", ">= 2.2.5"
39
+ s.add_dependency "cells-erb", "~> 0.1.0"
40
+ s.add_dependency "cells-rails", "~> 0.1.3"
41
+ s.add_dependency "charlock_holmes", "~> 0.7"
42
+ s.add_dependency "date_validator", "~> 0.12.0"
43
+ s.add_dependency "devise", "~> 4.7"
44
+ s.add_dependency "devise-i18n", "~> 1.2", "< 1.11.1"
45
+ s.add_dependency "diffy", "~> 3.3"
46
+ s.add_dependency "doorkeeper", "~> 5.6", ">= 5.6.6"
47
+ s.add_dependency "doorkeeper-i18n", "~> 4.0"
48
+ s.add_dependency "file_validators", "~> 3.0"
49
+ s.add_dependency "fog-local", "~> 0.6"
50
+ s.add_dependency "foundation_rails_helper", "~> 4.0"
51
+ s.add_dependency "geocoder", "~> 1.8"
52
+ s.add_dependency "hashdiff", ">= 0.4.0", "< 2.0.0"
53
+ s.add_dependency "invisible_captcha", "~> 0.12"
54
+ s.add_dependency "kaminari", "~> 1.2", ">= 1.2.1"
55
+ s.add_dependency "loofah", "~> 2.19", ">= 2.19.1"
56
+ s.add_dependency "mime-types", ">= 1.16", "< 4.0"
57
+ s.add_dependency "mini_magick", "~> 4.9"
58
+ s.add_dependency "net-smtp", "~> 0.3.1"
59
+ s.add_dependency "omniauth", "~> 2.0"
60
+ s.add_dependency "omniauth-facebook", "~> 5.0"
61
+ s.add_dependency "omniauth-google-oauth2", "~> 1.0"
62
+ s.add_dependency "omniauth-rails_csrf_protection", "~> 1.0"
63
+ s.add_dependency "omniauth-twitter", "~> 1.4"
64
+ s.add_dependency "paper_trail", "~> 12.0"
65
+ s.add_dependency "pg", "~> 1.4.0", "< 2"
66
+ s.add_dependency "pg_search", "~> 2.2"
67
+ s.add_dependency "premailer-rails", "~> 1.10"
68
+ # We need psych 4+ in order to use the `aliases: true` option,
69
+ # see https://stackoverflow.com/questions/71191685/visit-psych-nodes-alias-unknown-alias-default-psychbadalias
70
+ # Also note that we need Rails 6.1.5+,
71
+ # see https://gist.github.com/yahonda/2776d8d7b6ea7045359f38c10449937b
72
+ s.add_dependency "psych", "~> 4.0"
73
+ s.add_dependency "rack", "~> 2.2", ">= 2.2.6.4"
74
+ s.add_dependency "rack-attack", "~> 6.0"
75
+ s.add_dependency "rails", "~> 6.1.7", ">=6.1.7.4"
76
+ s.add_dependency "rails-i18n", "~> 6.0"
77
+ s.add_dependency "ransack", "~> 3.2.1"
78
+ s.add_dependency "redis", "~> 4.1"
79
+ s.add_dependency "request_store", "~> 1.5.0"
80
+ s.add_dependency "rubyXL", "~> 3.4"
81
+ s.add_dependency "rubyzip", "~> 2.0"
82
+ s.add_dependency "seven_zip_ruby", "~> 1.3"
83
+ s.add_dependency "shakapacker", "~> 7.1.0"
84
+ s.add_dependency "valid_email2", "~> 4.0"
85
+ s.add_dependency "web-push", "~> 3.0"
86
+ s.add_dependency "wisper", "~> 2.0"
87
+
88
+ s.add_development_dependency "decidim-api", Decidim::Core.version
89
+ s.add_development_dependency "decidim-dev", Decidim::Core.version
90
+ end
@@ -22,6 +22,8 @@ module Decidim
22
22
  def url(**options)
23
23
  if asset.is_a? ActiveStorage::Attached
24
24
  routes.rails_blob_url(asset.blob, **default_options.merge(options))
25
+ elsif asset.is_a? ActiveStorage::Blob
26
+ routes.rails_blob_url(asset, **default_options.merge(options))
25
27
  else
26
28
  representation_url(**options)
27
29
  end
@@ -19,10 +19,12 @@ module Decidim
19
19
  end
20
20
 
21
21
  def self.cryptor
22
- key = ActiveSupport::KeyGenerator.new("attribute").generate_key(
23
- Rails.application.secrets.secret_key_base, ActiveSupport::MessageEncryptor.key_len
24
- )
25
- ActiveSupport::MessageEncryptor.new(key)
22
+ @cryptor ||= begin
23
+ key = ActiveSupport::KeyGenerator.new("attribute").generate_key(
24
+ Rails.application.secrets.secret_key_base, ActiveSupport::MessageEncryptor.key_len
25
+ )
26
+ ActiveSupport::MessageEncryptor.new(key)
27
+ end
26
28
  end
27
29
  end
28
30
  end
@@ -19,7 +19,7 @@ module Decidim
19
19
  fallback = super
20
20
  return fallback unless fallback.is_a?(Time)
21
21
 
22
- ActiveSupport::TimeWithZone.new(fallback, Time.zone)
22
+ Time.zone.parse(fallback.strftime("%F %T"))
23
23
  end
24
24
  end
25
25
  end
@@ -379,16 +379,17 @@ module Decidim
379
379
 
380
380
  initializer "decidim_core.menu" do
381
381
  Decidim::Core::Menu.register_menu!
382
- end
383
-
384
- initializer "decidim_core.user_menu" do
385
382
  Decidim::Core::Menu.register_user_menu!
386
383
  end
387
384
 
388
385
  initializer "decidim_core.notifications" do
389
- config.to_prepare do
390
- Decidim::EventsManager.subscribe(/^decidim\.events\./) do |event_name, data|
391
- EventPublisherJob.perform_later(event_name, data)
386
+ if Rails.autoloaders.zeitwerk_enabled?
387
+ config.after_initialize do
388
+ Decidim::EventsManager.subscribe_events!
389
+ end
390
+ else
391
+ config.to_prepare do
392
+ Decidim::EventsManager.subscribe_events!
392
393
  end
393
394
  end
394
395
  end
@@ -25,11 +25,11 @@ module Decidim
25
25
  smtp_email = ENV.fetch("SMTP_FROM_EMAIL", ::Faker::Internet.email)
26
26
 
27
27
  primary_color, secondary_color, tertiary_color = [
28
- ["#e02d2d", "#155abf", "#ebc34b"],
29
- ["#4caf50", "#a0309e", "#a8753e"],
30
- ["#e91e63", "#1ee9a5", "#e9b61e"],
31
- ["#009688", "#d12c26", "#b4a110"],
32
- ["#ff9800", "#00bcd4", "#ea0094"]
28
+ ["#bf4044", "#09780e", "#3584e4"],
29
+ ["#09780e", "#4448bb", "#da565b"],
30
+ ["#bf4086", "#487511", "#5384ac"],
31
+ ["#086263", "#811380", "#abac53"],
32
+ ["#5340bf", "#a82c2c", "#40bf53"]
33
33
  ].sample
34
34
 
35
35
  colors = {
@@ -77,34 +77,12 @@ module Decidim
77
77
  )
78
78
 
79
79
  if organization.top_scopes.none?
80
- province = Decidim::ScopeType.create!(
81
- name: Decidim::Faker::Localized.literal("province"),
82
- plural: Decidim::Faker::Localized.literal("provinces"),
83
- organization:
84
- )
85
-
86
- municipality = Decidim::ScopeType.create!(
87
- name: Decidim::Faker::Localized.literal("municipality"),
88
- plural: Decidim::Faker::Localized.literal("municipalities"),
89
- organization:
90
- )
91
-
92
- 3.times do |time|
93
- parent = Decidim::Scope.create!(
94
- name: Decidim::Faker::Localized.literal(::Faker::Address.unique.state),
95
- code: "#{::Faker::Address.country_code}_#{time}",
96
- scope_type: province,
97
- organization:
98
- )
99
-
80
+ province = create_scope_type!(name: "province", plural: "provinces")
81
+ municipality = create_scope_type!(name: "municipality", plural: "municipalities")
82
+ 3.times do
83
+ parent = create_scope!(scope_type: province, parent: nil)
100
84
  5.times do
101
- Decidim::Scope.create!(
102
- name: Decidim::Faker::Localized.literal(::Faker::Address.unique.city),
103
- code: "#{parent.code}-#{::Faker::Address.unique.state_abbr}",
104
- scope_type: municipality,
105
- organization:,
106
- parent:
107
- )
85
+ create_scope!(scope_type: municipality, parent:)
108
86
  end
109
87
  end
110
88
  end
@@ -242,6 +220,32 @@ module Decidim
242
220
  hero_content_block.save!
243
221
  end
244
222
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity, Rails/Output
223
+
224
+ private
225
+
226
+ def create_scope_type!(name:, plural:)
227
+ Decidim::ScopeType.create!(
228
+ name: Decidim::Faker::Localized.literal(name),
229
+ plural: Decidim::Faker::Localized.literal(plural),
230
+ organization:
231
+ )
232
+ end
233
+
234
+ def create_scope!(scope_type:, parent:)
235
+ n = rand(99_999)
236
+ code = parent.nil? ? "#{::Faker::Address.country_code}_#{n}" : "#{parent.code}-#{::Faker::Address.postcode}_#{n}"
237
+ name = [::Faker::Address.state, ::Faker::Address.city].sample
238
+
239
+ Decidim::Scope.create!(
240
+ name: Decidim::Faker::Localized.literal(name),
241
+ code:,
242
+ scope_type:,
243
+ organization:,
244
+ parent:
245
+ )
246
+ rescue ActiveRecord::RecordInvalid
247
+ retry
248
+ end
245
249
  end
246
250
  end
247
251
  end