decidim-core 0.26.7 → 0.26.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/app/cells/decidim/collapsible_list/show.erb +1 -1
  3. data/app/cells/decidim/version_cell.rb +1 -1
  4. data/app/cells/decidim/versions_list_cell.rb +1 -1
  5. data/app/commands/decidim/endorse_resource.rb +2 -0
  6. data/app/commands/decidim/unendorse_resource.rb +1 -1
  7. data/app/controllers/decidim/authorization_modals_controller.rb +1 -1
  8. data/app/controllers/decidim/devise/registrations_controller.rb +1 -1
  9. data/app/controllers/decidim/links_controller.rb +1 -1
  10. data/app/controllers/decidim/user_timeline_controller.rb +1 -1
  11. data/app/forms/decidim/account_form.rb +1 -1
  12. data/app/forms/decidim/notifications_settings_form.rb +0 -8
  13. data/app/forms/decidim/registration_form.rb +1 -1
  14. data/app/forms/url_validator.rb +1 -1
  15. data/app/helpers/decidim/layout_helper.rb +15 -4
  16. data/app/helpers/decidim/resource_helper.rb +2 -0
  17. data/app/jobs/decidim/data_portability_export_job.rb +3 -0
  18. data/app/jobs/decidim/open_data_job.rb +2 -0
  19. data/app/models/decidim/organization.rb +6 -0
  20. data/app/models/decidim/user.rb +9 -1
  21. data/app/packs/src/decidim/geocoding/attach_input.js +4 -1
  22. data/app/packs/src/decidim/geocoding/provider/here.js +17 -21
  23. data/app/packs/src/decidim/geocoding/provider/photon.js +1 -1
  24. data/app/packs/src/decidim/map/controller/drag_marker.js +0 -2
  25. data/app/packs/src/decidim/map/controller/markers.js +0 -1
  26. data/app/packs/src/decidim/map/controller/static.js +0 -1
  27. data/app/packs/src/decidim/map/controller.js +0 -2
  28. data/app/packs/src/decidim/map/factory.js +4 -1
  29. data/app/packs/src/decidim/map/icon.js +0 -1
  30. data/app/packs/src/decidim/map/legacy.js +0 -1
  31. data/app/packs/src/decidim/map/provider/default.js +2 -0
  32. data/app/packs/src/decidim/map/provider/here.js +2 -1
  33. data/app/queries/decidim/metrics/users_metric_manage.rb +6 -6
  34. data/app/views/decidim/notifications_settings/show.html.erb +1 -1
  35. data/config/environment.rb +3 -0
  36. data/config/locales/ar.yml +10 -15
  37. data/config/locales/bg.yml +0 -16
  38. data/config/locales/ca.yml +15 -11
  39. data/config/locales/cs.yml +28 -9
  40. data/config/locales/de.yml +84 -46
  41. data/config/locales/el.yml +106 -12
  42. data/config/locales/en.yml +4 -0
  43. data/config/locales/eo.yml +5 -3
  44. data/config/locales/es-MX.yml +13 -9
  45. data/config/locales/es-PY.yml +15 -11
  46. data/config/locales/es.yml +14 -10
  47. data/config/locales/eu.yml +383 -343
  48. data/config/locales/fi-plain.yml +27 -2
  49. data/config/locales/fi.yml +17 -13
  50. data/config/locales/fr-CA.yml +13 -9
  51. data/config/locales/fr.yml +14 -10
  52. data/config/locales/ga-IE.yml +0 -5
  53. data/config/locales/gl.yml +6 -18
  54. data/config/locales/hu.yml +31 -14
  55. data/config/locales/id-ID.yml +4 -19
  56. data/config/locales/is-IS.yml +4 -3
  57. data/config/locales/it.yml +4 -9
  58. data/config/locales/ja.yml +35 -18
  59. data/config/locales/kaa.yml +4 -0
  60. data/config/locales/lb.yml +6 -11
  61. data/config/locales/lt.yml +53 -8
  62. data/config/locales/lv.yml +0 -16
  63. data/config/locales/nl.yml +2 -7
  64. data/config/locales/no.yml +5 -10
  65. data/config/locales/pl.yml +14 -5
  66. data/config/locales/pt-BR.yml +50 -7
  67. data/config/locales/pt.yml +2 -7
  68. data/config/locales/ro-RO.yml +1 -6
  69. data/config/locales/ru.yml +2 -17
  70. data/config/locales/sk.yml +13 -19
  71. data/config/locales/sl.yml +0 -5
  72. data/config/locales/sq-AL.yml +1 -0
  73. data/config/locales/sr-CS.yml +8 -0
  74. data/config/locales/sv.yml +23 -13
  75. data/config/locales/th-TH.yml +1 -0
  76. data/config/locales/tr-TR.yml +9 -11
  77. data/config/locales/uk.yml +2 -14
  78. data/config/locales/zh-CN.yml +0 -6
  79. data/config/locales/zh-TW.yml +16 -7
  80. data/db/migrate/20181030090144_destroy_deleted_users_follows.rb +1 -1
  81. data/db/migrate/20181204110723_remove_following_users_count_from_users.rb +11 -2
  82. data/db/migrate/20181214101250_add_notification_types_to_users.rb +6 -1
  83. data/db/migrate/20190412131728_fix_user_names.rb +13 -6
  84. data/db/migrate/20200211173227_add_direct_message_types_to_users.rb +6 -1
  85. data/db/migrate/20210302150803_invalidate_all_sessions_for_deleted_users.rb +10 -3
  86. data/db/migrate/20210310120640_add_followable_counter_cache_to_users.rb +13 -3
  87. data/db/migrate/20231027142329_change_default_value_for_decidim_endorsements.rb +11 -0
  88. data/db/seeds.rb +1 -0
  89. data/lib/decidim/core/test/shared_examples/comments_examples.rb +24 -0
  90. data/lib/decidim/core/test/shared_examples/errors.rb +2 -0
  91. data/lib/decidim/core/test/shared_examples/map_examples.rb +4 -1
  92. data/lib/decidim/core/version.rb +1 -1
  93. data/lib/decidim/core.rb +44 -1
  94. data/lib/decidim/dependency_resolver.rb +278 -0
  95. data/lib/decidim/endorsable.rb +1 -1
  96. data/lib/decidim/exporters.rb +10 -1
  97. data/lib/decidim/form_builder.rb +6 -13
  98. data/lib/tasks/upgrade/decidim_deduplicate_endorsements.rake +53 -0
  99. data/lib/tasks/upgrade/decidim_user_moderation.rake +14 -0
  100. metadata +13 -6
@@ -88,6 +88,21 @@ sv:
88
88
  one: ungefär 1 månad
89
89
  other: ungefär %{count} månader
90
90
  half_a_minute: en halv minut
91
+ x_days:
92
+ one: 1 dag
93
+ other: "%{count} dagar"
94
+ x_hours:
95
+ one: 1 timme
96
+ other: "%{count} minuter"
97
+ x_minutes:
98
+ one: 1 minut
99
+ other: "%{count} minuter"
100
+ x_months:
101
+ one: 1 månad
102
+ other: "%{count} månader"
103
+ x_seconds:
104
+ one: 1 sekund
105
+ other: "%{count} sekunder"
91
106
  decidim:
92
107
  accessibility:
93
108
  external_link: Extern länk
@@ -471,7 +486,6 @@ sv:
471
486
  newsletter_title: Kontakttillstånd
472
487
  nickname_help: Ditt alias i %{organization}. Kan bara innehålla bokstäver, siffror, '-' och '_'.
473
488
  password_help: "Minst %{minimun_characters} tecken, får inte vara för vanligt (som 123456) och måste vara skilt från ditt användarnamn och din e-postadress."
474
- sign_in: Logga in
475
489
  sign_up: Registrera dig
476
490
  sign_up_as:
477
491
  legend: Registrera dig som
@@ -1092,14 +1106,13 @@ sv:
1092
1106
  proposals: Förslag
1093
1107
  proposals_explanation: Lämna förslag, stötta befintliga förslag och stöd de förändringar som du vill se.
1094
1108
  footer_sub_hero:
1095
- footer_sub_hero_body: Låt oss bygga ett öppet, transparent och samarbetande samhälle.<br /> Gå med, delta och fatta beslut.
1096
1109
  footer_sub_hero_headline: Välkommen till %{organization} deltagarplattform.
1097
1110
  register: Registrera dig
1098
1111
  hero:
1099
1112
  participate: Delta
1100
1113
  welcome: Välkommen till %{organization}!
1101
1114
  metrics:
1102
- headline: Deltagande i siffror
1115
+ headline: Metrik
1103
1116
  statistics:
1104
1117
  headline: Aktuellt läge för %{organization}
1105
1118
  sub_hero:
@@ -1217,10 +1230,10 @@ sv:
1217
1230
  future: Framtida
1218
1231
  past: Tidigare
1219
1232
  filters_small_view:
1220
- close_modal: Stäng fönster
1233
+ close_modal: Stäng modal
1221
1234
  filter: Filtrera
1222
1235
  filter_by: Filtrera efter
1223
- unfold: Vik ut
1236
+ unfold: Veckla ut
1224
1237
  results:
1225
1238
  results:
1226
1239
  one: "%{count} resultat"
@@ -1237,7 +1250,7 @@ sv:
1237
1250
  ok: Ok
1238
1251
  title: Bekräfta
1239
1252
  embed_modal:
1240
- close_window: Stäng fönstret
1253
+ close_window: Stäng fönster
1241
1254
  embed: Klistra in den här koden på din sida
1242
1255
  embed_link: Bädda in
1243
1256
  extended_navigation_bar:
@@ -1319,14 +1332,14 @@ sv:
1319
1332
  existing_error: Meddelandet kunde inte skapas. Konversationen finns redan, försök igen nu.
1320
1333
  success: Samtalet startades framgångsrikt!
1321
1334
  index:
1322
- add_max_users: 'Lägg till användare till konversation: max 9 användare'
1335
+ add_max_users: 'Lägg till användare i samtalet: högst 9'
1323
1336
  add_users_placeholder: Sök...
1324
1337
  close: Stäng
1325
1338
  conversations_info: Konversationer är privata. Ingen annan kan se dem. En konversation kan startas med någon deltagare eller grupp som är registrerad på plattformen.
1326
1339
  from: Från
1327
1340
  last_message: Senaste meddelande
1328
- modal_title: Ny konversation
1329
- new_conversation: Ny konversation
1341
+ modal_title: Nytt samtal
1342
+ new_conversation: Nytt samtal
1330
1343
  next: Nästa
1331
1344
  no_conversations_warning: Det finns inga konversationer än.
1332
1345
  no_results: Inga resultat
@@ -1342,7 +1355,7 @@ sv:
1342
1355
  back: Visa alla samtal
1343
1356
  deleted_accounts: Du kan inte meddela raderade konton.
1344
1357
  not_allowed: Den här användaren accepterar inte fler direkta meddelanden.
1345
- title: Konversation med %{usernames}
1358
+ title: Samtal med %{usernames}
1346
1359
  update:
1347
1360
  error: Meddelandet skickades inte. Försök igen senare
1348
1361
  user_interests:
@@ -1509,8 +1522,6 @@ sv:
1509
1522
  updated: Ditt konto har uppdaterats.
1510
1523
  sessions:
1511
1524
  already_signed_out: Du har loggats ut.
1512
- new:
1513
- sign_in: Logga in
1514
1525
  signed_in: Inloggningen är klar.
1515
1526
  signed_out: Du är utloggad.
1516
1527
  shared:
@@ -1519,7 +1530,6 @@ sv:
1519
1530
  didn_t_receive_confirmation_instructions: Fick du inte anvisningar om bekräftelse?
1520
1531
  didn_t_receive_unlock_instructions: Fick du inte anvisningar om att låsa upp?
1521
1532
  forgot_your_password: Glömt ditt lösenord?
1522
- sign_in: Logga in
1523
1533
  sign_in_with_provider: Logga in med %{provider}
1524
1534
  sign_up: Registrera dig
1525
1535
  minimum_password_length:
@@ -0,0 +1 @@
1
+ th:
@@ -322,7 +322,7 @@ tr:
322
322
  request_confirmation_instructions: Onaylama talimatlarını tekrar gönder
323
323
  title: E-posta adresinizi doğrulayın
324
324
  show:
325
- close_modal: Yakın kalıcı
325
+ close_modal: Pencereyi kapat
326
326
  block_user_mailer:
327
327
  notify:
328
328
  body_1: Hesabınız kilitlendi.
@@ -443,7 +443,7 @@ tr:
443
443
  newsletter_title: İletişim izni
444
444
  nickname_help: Takma adınız %{organization}. Yalnızca harf, rakam, "-" ve "_" içerebilir.
445
445
  password_help: "Asgari %{minimun_characters} karakter, çok yaygın olmamalı (örnek: 123456) ve takma adınızdan ve eposta adresinizden farklı olmalıdır."
446
- sign_in: Oturum
446
+ sign_in: "Giriş \nGiriş Yapın "
447
447
  sign_up: kaydol
448
448
  sign_up_as:
449
449
  legend: Olarak kaydol
@@ -462,7 +462,7 @@ tr:
462
462
  newsletter_modal:
463
463
  buttons:
464
464
  check: Kontrol et ve devam et
465
- close_modal: Yakın kalıcı
465
+ close_modal: Pencereyi kapat
466
466
  uncheck: İşaretlemeyin
467
467
  notice: |-
468
468
  <p>Hey, bir haber bülteni almak istemediğine emin misin?<br>
@@ -494,7 +494,6 @@ tr:
494
494
  update_profile: profilinizi güncelleyin
495
495
  wants_to_use_your_account_html: "<strong>%{application_name}</strong> hesabınızı kullanmak istiyor"
496
496
  endorsable:
497
- endorsements: Cirolar
498
497
  endorsements_count: Onay sayısı
499
498
  endorsement_buttons_cell:
500
499
  already_endorsed: Onaylanan
@@ -832,7 +831,7 @@ tr:
832
831
  resource_type: Türü
833
832
  links:
834
833
  warning:
835
- close_modal: Yakın kalıcı
834
+ close_modal: Pencereyi kapat
836
835
  log:
837
836
  base_presenter:
838
837
  create: "%{user_name}, %{resource_name} oluşturdu"
@@ -920,7 +919,7 @@ tr:
920
919
  ok: OK
921
920
  index:
922
921
  ago: önce
923
- close: Yakın kalıcı
922
+ close: Pencereyi kapat
924
923
  from: Gönderen
925
924
  groups: Gruplarım
926
925
  last_message: Son mesaj
@@ -1040,7 +1039,6 @@ tr:
1040
1039
  proposals: Teklifler
1041
1040
  proposals_explanation: Öneriler yapın, mevcut olanları destekleyin ve görmek istediğiniz değişiklikleri tanıtın.
1042
1041
  footer_sub_hero:
1043
- footer_sub_hero_body: Daha açık, şeffaf ve işbirliğine dayalı bir toplum oluşturalım. <br /> Katılın, katılımcı olun ve karar verin.
1044
1042
  footer_sub_hero_headline: '%{organization} katılımcı platformuna hoş geldiniz.'
1045
1043
  register: Kayıt Ol
1046
1044
  hero:
@@ -1071,7 +1069,7 @@ tr:
1071
1069
  refuse:
1072
1070
  modal_body: Eğer kabul ederseniz, platformu kullanmak mümkün olmayacaktır şunları yapabilirsiniz <a href="%{data_portability_path}">verileri indirme</a> ve / veya <a href="%{delete_path}">Hesabınızı silmek</a>.
1073
1071
  modal_btn_exit: Daha sonra inceleyeceğim
1074
- modal_close: Yakın kalıcı
1072
+ modal_close: Pencereyi kapat
1075
1073
  modal_title: Güncellenmiş Şartlar ve Koşulları gerçekten reddediyor musunuz?
1076
1074
  required_review:
1077
1075
  alert: Hizmet Şartlarımızı güncellendi, lütfen inceleyin.
@@ -1164,7 +1162,7 @@ tr:
1164
1162
  future: gelecek
1165
1163
  past: geçmiş
1166
1164
  filters_small_view:
1167
- close_modal: Yakın kalıcı
1165
+ close_modal: Pencereyi kapat
1168
1166
  filter: filtre
1169
1167
  filter_by: Tarafından filtre
1170
1168
  unfold: açılmak
@@ -1440,7 +1438,7 @@ tr:
1440
1438
  sessions:
1441
1439
  already_signed_out: Başarıyla imzalandı.
1442
1440
  new:
1443
- sign_in: Oturum
1441
+ sign_in: "Giriş \nGiriş Yapın "
1444
1442
  signed_in: Başarıyla imzalandı.
1445
1443
  signed_out: Başarıyla imzalandı.
1446
1444
  shared:
@@ -1449,7 +1447,7 @@ tr:
1449
1447
  didn_t_receive_confirmation_instructions: Onaylama talimatları almadı mı?
1450
1448
  didn_t_receive_unlock_instructions: Kilit açma talimatları almadı mı?
1451
1449
  forgot_your_password: Parolanızı mı unuttunuz?
1452
- sign_in: Oturum
1450
+ sign_in: "Giriş \nGiriş Yapın "
1453
1451
  sign_in_with_provider: '%{provider}ile giriş yap'
1454
1452
  sign_up: kaydol
1455
1453
  minimum_password_length:
@@ -173,8 +173,6 @@ uk:
173
173
  invalid_field: "Для поля %{field} значення %{value} неприпустиме."
174
174
  ok: Гаразд
175
175
  title: Недостатньо прав через відсутність підтвердження особи
176
- show:
177
- close_modal: Закрити віконце
178
176
  collapsible_list:
179
177
  see_less: "(читати менше)"
180
178
  see_more: "(читати далі)"
@@ -231,7 +229,6 @@ uk:
231
229
  already_have_an_account?: Вже маєте обліковий запис?
232
230
  newsletter: Отримувати іноді розсилання зі свіжими новинами
233
231
  newsletter_title: Дозвіл на зв'язок
234
- sign_in: Увійти
235
232
  sign_up: Зареєструватися
236
233
  sign_up_as:
237
234
  legend: Зареєструватися як
@@ -248,7 +245,6 @@ uk:
248
245
  newsletter_modal:
249
246
  buttons:
250
247
  check: Поставити галочку та продовжити
251
- close_modal: Закрити віконце
252
248
  notice: |-
253
249
  <p>Привіт, ви впевнені, що не хочете отримувати розсилання новин?<br> Будь ласка, ще раз розгляньте можливість поставити нижче галочку щодо розсилання.<br> Для нас дуже важливо, щоб ви могли іноді отримувати електронні листи з важливими оголошеннями. Ви завжди можете змінити це на сторінці налаштувань сповіщень.</p> <p>Якщо ви не поставите цю галочку, ви можете прогледіти доречні відомості щодо свіжих можливостей участі в роботі майданчика.<br> Якщо ви все ж бажаєте уникнути розсилань, ми прекрасно розуміємо таке ваше рішення.</p> <p>Дякуємо, що прочитали це!</p>
254
250
  title: Сповіщення про новини
@@ -269,8 +265,6 @@ uk:
269
265
  this_application_will_not_be_able_to: 'Цей додаток не зможе:'
270
266
  update_profile: Оновлювати ваш профіль
271
267
  wants_to_use_your_account_html: "<strong>%{application_name}</strong> бажає використовувати ваш обліковий запис"
272
- endorsable:
273
- endorsements: Проявів підтримки
274
268
  errors:
275
269
  internal_server_error:
276
270
  title: При з'єднанні з нашим сервером сталася помилка
@@ -345,9 +339,6 @@ uk:
345
339
  errors:
346
340
  error: У цьому полі є помилка.
347
341
  remove_this_file: Видалити цей файл
348
- links:
349
- warning:
350
- close_modal: Закрити віконце
351
342
  log:
352
343
  base_presenter:
353
344
  create: "%{user_name} створив %{resource_name}"
@@ -387,7 +378,6 @@ uk:
387
378
  create:
388
379
  error: Бесіда не розпочата. Спробуйте ще раз пізніше
389
380
  index:
390
- close: Закрити віконце
391
381
  no_conversations: У вас ще немає бесід
392
382
  reply:
393
383
  send: Надіслати
@@ -445,7 +435,6 @@ uk:
445
435
  proposals: Пропозиції
446
436
  proposals_explanation: Вносьте нові пропозиції, підтримуйте існуючі та сприяйте змінам, які ви хочете бачити.
447
437
  footer_sub_hero:
448
- footer_sub_hero_body: Створімо більш відкрите, прозоре та співпрацююче суспільство.<br /> Долучайтесь, беріть участь та приймайте рішення.
449
438
  footer_sub_hero_headline: Ласкаво просимо до майданчику співучасті %{organization}!
450
439
  register: Зареєструватися
451
440
  hero:
@@ -464,7 +453,6 @@ uk:
464
453
  refuse:
465
454
  modal_body: Якщо ви відмовитеся, ви не зможете використовувати майданчик, ви можете <a href="%{data_portability_path}">завантажити свої дані</a> і / або <a href="%{delete_path}">видалити свій обліковий запис</a>.
466
455
  modal_btn_exit: Я перегляну це пізніше
467
- modal_close: Закрити віконце
468
456
  modal_title: Ви дійсно відмовляєтеся від оновлених "Умов участі"?
469
457
  required_review:
470
458
  alert: Ми оновили наші "Умови участі", будь ласка, перегляньте їх.
@@ -508,10 +496,8 @@ uk:
508
496
  term_input_placeholder: Шукати
509
497
  searches:
510
498
  filters_small_view:
511
- close_modal: Закрити віконце
512
499
  filter: Відібрати
513
500
  filter_by: 'Відібрати за ознакою:'
514
- unfold: Розгорнути
515
501
  shared:
516
502
  embed_modal:
517
503
  close_window: Закрити вікно
@@ -542,6 +528,8 @@ uk:
542
528
  statistics:
543
529
  comments_count: Коментарів
544
530
  user_conversations:
531
+ index:
532
+ close: Закрити
545
533
  update:
546
534
  error: Повідомлення не надіслано. Спробуйте ще раз пізніше
547
535
  version_author:
@@ -393,7 +393,6 @@ zh-CN:
393
393
  newsletter: 接收附带相关信息的时事通讯
394
394
  newsletter_title: 联系人权限
395
395
  password_help: "%{minimun_characters} 个字符,必须不要太常见(例如,123456),并且必须不同于您的昵称和电子邮件。"
396
- sign_in: 登录
397
396
  sign_up: 注册
398
397
  sign_up_as:
399
398
  legend: 注册为
@@ -433,7 +432,6 @@ zh-CN:
433
432
  update_profile: 更新您的个人资料
434
433
  wants_to_use_your_account_html: "<strong>%{application_name}</strong> 想要使用您的帐户"
435
434
  endorsable:
436
- endorsements: 授权
437
435
  endorsements_count: 批准次数
438
436
  endorsement_buttons_cell:
439
437
  already_endorsed: 已批准
@@ -965,7 +963,6 @@ zh-CN:
965
963
  proposals: 建议
966
964
  proposals_explanation: 提出建议、支持现有建议并促进你想要看到的更改。
967
965
  footer_sub_hero:
968
- footer_sub_hero_body: 让我们建设一个更加开放、透明和协作的社会。<br /> 加入、参与和决定。
969
966
  footer_sub_hero_headline: 欢迎使用 %{organization} 参与式平台。
970
967
  register: 注册
971
968
  hero:
@@ -1343,8 +1340,6 @@ zh-CN:
1343
1340
  updated: 您的帐户已成功更新。
1344
1341
  sessions:
1345
1342
  already_signed_out: 已成功注销。
1346
- new:
1347
- sign_in: 登录
1348
1343
  signed_in: 登录成功。
1349
1344
  signed_out: 已成功注销。
1350
1345
  shared:
@@ -1353,7 +1348,6 @@ zh-CN:
1353
1348
  didn_t_receive_confirmation_instructions: 没有收到确认说明?
1354
1349
  didn_t_receive_unlock_instructions: 没有收到解锁指令?
1355
1350
  forgot_your_password: 忘记密码?
1356
- sign_in: 登录
1357
1351
  sign_in_with_provider: 使用 %{provider} 登录
1358
1352
  sign_up: 注册
1359
1353
  minimum_password_length:
@@ -86,6 +86,20 @@ zh-TW:
86
86
  about_x_months:
87
87
  other: "one\n大約 1 月\n\nOther\n大約 %{count} 月"
88
88
  half_a_minute: 半分鐘
89
+ less_than_x_minutes:
90
+ other: 少於 %{count} 分鐘
91
+ less_than_x_seconds:
92
+ other: "< 1秒\n< %{count} 秒"
93
+ x_days:
94
+ other: "1天\n%{count} 天"
95
+ x_hours:
96
+ other: "{count} 小時"
97
+ x_minutes:
98
+ other: "%{count} 分鐘"
99
+ x_months:
100
+ other: "%{count} 個月"
101
+ x_seconds:
102
+ other: "%{count} 秒"
89
103
  decidim:
90
104
  accessibility:
91
105
  external_link: 外部鏈接
@@ -465,7 +479,6 @@ zh-TW:
465
479
  newsletter_title: 聯絡人權限
466
480
  nickname_help: 在 %{organization} 中的別名。只能包含字母、數字、'-' 和 '_'。
467
481
  password_help: "最少 %{minimun_characters} 個字符,不能太常見(例如 123456),且必須與您的暱稱和電子郵件不同。"
468
- sign_in: 登入
469
482
  sign_up: 註冊登記
470
483
  sign_up_as:
471
484
  legend: 註冊登記為
@@ -1094,7 +1107,6 @@ zh-TW:
1094
1107
  proposals: 提案
1095
1108
  proposals_explanation: 提出建議、支持現有建議並推動您希望看到的變化。
1096
1109
  footer_sub_hero:
1097
- footer_sub_hero_body: 一起建立更加開放、透明和協作的社會。<br /> 加入、參與和做出決策。
1098
1110
  footer_sub_hero_headline: 歡迎來到 %{organization} 的參與平台。
1099
1111
  register: 註冊
1100
1112
  hero:
@@ -1333,8 +1345,8 @@ zh-TW:
1333
1345
  conversations_info: 對話是私密的,沒有其他人可以看到。可以與平台上註冊的任何參與者或群組開始對話。
1334
1346
  from: 來自
1335
1347
  last_message: 最後訊息
1336
- modal_title: 新對話
1337
- new_conversation: 新對話
1348
+ modal_title: 新的對話
1349
+ new_conversation: 新的對話
1338
1350
  next: 下一個
1339
1351
  no_conversations_warning: 目前還沒有任何對話。
1340
1352
  no_results: 無結果
@@ -1516,8 +1528,6 @@ zh-TW:
1516
1528
  updated: 您的帳號已成功升級。
1517
1529
  sessions:
1518
1530
  already_signed_out: 已成功登出。
1519
- new:
1520
- sign_in: 登入
1521
1531
  signed_in: 已成功登入。
1522
1532
  signed_out: 已成功登出。
1523
1533
  shared:
@@ -1526,7 +1536,6 @@ zh-TW:
1526
1536
  didn_t_receive_confirmation_instructions: 沒有收到確認的說明嗎?
1527
1537
  didn_t_receive_unlock_instructions: 沒有收到解鎖說明?
1528
1538
  forgot_your_password: 忘記密碼了嗎?
1529
- sign_in: 登入
1530
1539
  sign_in_with_provider: 用%{provider} 登錄
1531
1540
  sign_up: 註冊登記
1532
1541
  minimum_password_length:
@@ -9,7 +9,7 @@ class DestroyDeletedUsersFollows < ActiveRecord::Migration[5.2]
9
9
  end
10
10
 
11
11
  def change
12
- deleted_users = Decidim::User.where.not(deleted_at: nil).pluck(:id)
12
+ deleted_users = User.where.not(deleted_at: nil).pluck(:id)
13
13
  Follow.where(decidim_followable_type: "Decidim::UserBaseEntity", decidim_followable_id: deleted_users).destroy_all
14
14
  Follow.where(decidim_user_id: deleted_users).destroy_all
15
15
  end
@@ -1,6 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class RemoveFollowingUsersCountFromUsers < ActiveRecord::Migration[5.2]
4
+ class UserBaseEntity < ApplicationRecord
5
+ self.table_name = :decidim_users
6
+ self.inheritance_column = nil # disable the default inheritance
7
+ end
8
+
9
+ class Follow < ApplicationRecord
10
+ self.table_name = :decidim_follows
11
+ end
12
+
4
13
  def up
5
14
  remove_column :decidim_users, :following_users_count
6
15
  end
@@ -8,8 +17,8 @@ class RemoveFollowingUsersCountFromUsers < ActiveRecord::Migration[5.2]
8
17
  def down
9
18
  add_column :decidim_users, :following_users_count, :integer, null: false, default: 0
10
19
 
11
- Decidim::UserBaseEntity.find_each do |entity|
12
- following_users_count = Decidim::Follow.where(decidim_user_id: entity.id, decidim_followable_type: ["Decidim::UserBaseEntity", "Decidim::User", "Decidim::UserGroup"]).count
20
+ UserBaseEntity.find_each do |entity|
21
+ following_users_count = Follow.where(decidim_user_id: entity.id, decidim_followable_type: ["Decidim::UserBaseEntity", "Decidim::User", "Decidim::UserGroup"]).count
13
22
  entity.following_users_count = following_users_count
14
23
  entity.save
15
24
  end
@@ -1,10 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class AddNotificationTypesToUsers < ActiveRecord::Migration[5.2]
4
+ class UserBaseEntity < ApplicationRecord
5
+ self.table_name = :decidim_users
6
+ self.inheritance_column = nil # disable the default inheritance
7
+ end
8
+
4
9
  def change
5
10
  add_column :decidim_users, :notification_types, :string, default: "all"
6
11
  # rubocop:disable Rails/SkipsModelValidations
7
- Decidim::UserBaseEntity.update_all(notification_types: "all")
12
+ UserBaseEntity.update_all(notification_types: "all")
8
13
  # rubocop:enable Rails/SkipsModelValidations
9
14
 
10
15
  change_column_null :decidim_users, :notification_types, false
@@ -1,6 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class FixUserNames < ActiveRecord::Migration[5.2]
4
+ class UserBaseEntity < ApplicationRecord
5
+ include Decidim::Nicknamizable
6
+
7
+ self.table_name = :decidim_users
8
+ self.inheritance_column = nil # disable the default inheritance
9
+ end
10
+
4
11
  def change
5
12
  # Comes from Decidim::User specs
6
13
  weird_characters =
@@ -8,15 +15,15 @@ class FixUserNames < ActiveRecord::Migration[5.2]
8
15
  characters_to_remove = "<>?%&^*\#@()[]=+:;\"{}\\|/"
9
16
 
10
17
  weird_characters.each do |character|
11
- Decidim::UserBaseEntity.where(deleted_at: nil).where("name like '%#{character}%' escape '\' OR nickname like '%#{character}%' escape '\'").find_each do |entity|
12
- Rails.logger.debug "detected character: #{character}"
13
- Rails.logger.debug "UserBaseEntity ID: #{entity.id}"
14
- Rails.logger.debug "#{entity.name} => #{entity.name.delete(characters_to_remove).strip}"
15
- Rails.logger.debug "#{entity.nickname} => #{entity.nickname.delete(characters_to_remove).strip}"
18
+ UserBaseEntity.where(deleted_at: nil).where("name like '%#{character}%' escape '\' OR nickname like '%#{character}%' escape '\'").find_each do |entity|
19
+ Rails.logger.debug { "detected character: #{character}" }
20
+ Rails.logger.debug { "UserBaseEntity ID: #{entity.id}" }
21
+ Rails.logger.debug { "#{entity.name} => #{entity.name.delete(characters_to_remove).strip}" }
22
+ Rails.logger.debug { "#{entity.nickname} => #{entity.nickname.delete(characters_to_remove).strip}" }
16
23
 
17
24
  entity.name = entity.name.delete(characters_to_remove).strip
18
25
  sanitized_nickname = entity.nickname.delete(characters_to_remove).strip
19
- entity.nickname = Decidim::UserBaseEntity.nicknamize(sanitized_nickname, organization: entity.organization)
26
+ entity.nickname = UserBaseEntity.nicknamize(sanitized_nickname, organization: entity.organization)
20
27
  entity.save(validate: false)
21
28
  end
22
29
  end
@@ -1,10 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class AddDirectMessageTypesToUsers < ActiveRecord::Migration[5.2]
4
+ class UserBaseEntity < ApplicationRecord
5
+ self.table_name = :decidim_users
6
+ self.inheritance_column = nil # disable the default inheritance
7
+ end
8
+
4
9
  def change
5
10
  add_column :decidim_users, :direct_message_types, :string, default: "all"
6
11
  # rubocop:disable Rails/SkipsModelValidations
7
- Decidim::UserBaseEntity.update_all(direct_message_types: "all")
12
+ UserBaseEntity.update_all(direct_message_types: "all")
8
13
  # rubocop:enable Rails/SkipsModelValidations
9
14
 
10
15
  change_column_null :decidim_users, :direct_message_types, false
@@ -1,10 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class InvalidateAllSessionsForDeletedUsers < ActiveRecord::Migration[5.2]
4
- def up
5
- Decidim::User.reset_column_information
4
+ class User < ApplicationRecord
5
+ self.table_name = "decidim_users"
6
+ self.inheritance_column = nil # disable the default inheritance
7
+
8
+ default_scope { where(type: "Decidim::User") }
9
+ end
6
10
 
7
- Decidim::User.where.not(deleted_at: nil).find_each(&:invalidate_all_sessions!)
11
+ def up
12
+ User.where.not(deleted_at: nil).find_each do |user|
13
+ user.update!(session_token: SecureRandom.hex)
14
+ end
8
15
  end
9
16
 
10
17
  def down; end
@@ -1,14 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class AddFollowableCounterCacheToUsers < ActiveRecord::Migration[5.2]
4
+ class Follow < ApplicationRecord
5
+ self.table_name = "decidim_follows"
6
+ end
7
+
8
+ class User < ApplicationRecord
9
+ self.table_name = "decidim_users"
10
+ self.inheritance_column = nil # disable the default inheritance
11
+
12
+ default_scope { where(type: "Decidim::User") }
13
+ end
14
+
4
15
  def change
5
16
  add_column :decidim_users, :follows_count, :integer, null: false, default: 0, index: true
6
17
 
7
18
  reversible do |dir|
8
19
  dir.up do
9
- Decidim::User.reset_column_information
10
- Decidim::User.find_each do |record|
11
- record.class.reset_counters(record.id, :follows)
20
+ User.find_each do |record|
21
+ record.update!(follows_count: Follow.where(decidim_user_id: record.id).count)
12
22
  end
13
23
  end
14
24
  end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ class ChangeDefaultValueForDecidimEndorsements < ActiveRecord::Migration[6.0]
4
+ def up
5
+ change_column_default :decidim_endorsements, :decidim_user_group_id, 0
6
+ end
7
+
8
+ def down
9
+ change_column_default :decidim_endorsements, :decidim_user_group_id, nil
10
+ end
11
+ end
data/db/seeds.rb CHANGED
@@ -37,6 +37,7 @@ if !Rails.env.production? || ENV["SEED"]
37
37
  port: ENV["SMTP_PORT"] || ENV["DECIDIM_SMTP_PORT"] || "25"
38
38
  },
39
39
  host: ENV["DECIDIM_HOST"] || "localhost",
40
+ secondary_hosts: ENV.fetch("DECIDIM_HOST", "localhost") == "localhost" ? ["0.0.0.0", "127.0.0.1"] : nil,
40
41
  external_domain_whitelist: ["decidim.org", "github.com"],
41
42
  description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
42
43
  Decidim::Faker::Localized.sentence(word_count: 15)
@@ -635,5 +635,29 @@ shared_examples "comments" do
635
635
  expect(page).to have_link "#decidim", href: "/search?term=%23decidim"
636
636
  end
637
637
  end
638
+
639
+ describe "export_serializer" do
640
+ let(:comment) { comments.first }
641
+
642
+ it "returns the serializer for the comment" do
643
+ expect(comment.class.export_serializer).to eq(Decidim::Comments::CommentSerializer)
644
+ end
645
+
646
+ context "with instance" do
647
+ subject { comment.class.export_serializer.new(comment).serialize }
648
+
649
+ it { is_expected.to have_key(:id) }
650
+ it { is_expected.to have_key(:created_at) }
651
+ it { is_expected.to have_key(:body) }
652
+ it { is_expected.to have_key(:locale) }
653
+ it { is_expected.to have_key(:author) }
654
+ it { is_expected.to have_key(:alignment) }
655
+ it { is_expected.to have_key(:depth) }
656
+ it { is_expected.to have_key(:user_group) }
657
+ it { is_expected.to have_key(:commentable_id) }
658
+ it { is_expected.to have_key(:commentable_type) }
659
+ it { is_expected.to have_key(:root_commentable_url) }
660
+ end
661
+ end
638
662
  end
639
663
  end
@@ -18,6 +18,8 @@ shared_examples_for "a 404 page" do
18
18
  expect(page).to have_content("The page you're looking for can't be found")
19
19
 
20
20
  expect(page).to have_http_status(:not_found)
21
+
22
+ expect(page).to have_current_path(target_path)
21
23
  end
22
24
  end
23
25
  end
@@ -10,7 +10,9 @@ shared_context "with map utility" do
10
10
  end
11
11
 
12
12
  shared_context "with frontend map builder" do
13
- subject { described_class.new(template, options) }
13
+ subject { builder_class.new(template, options) }
14
+
15
+ let(:builder_class) { described_class }
14
16
 
15
17
  let(:template_class) do
16
18
  Class.new(ActionView::Base) do
@@ -102,6 +104,7 @@ shared_context "with frontend map elements" do
102
104
  # context.
103
105
  final_html = html_document
104
106
  Rails.application.routes.draw do
107
+ get "maptiles/:z/:x/:y.png", to: ->(_) { [200, {}, [final_html]] }
105
108
  get "test_dynamic_map", to: ->(_) { [200, {}, [final_html]] }
106
109
  end
107
110
 
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-core version.
5
5
  module Core
6
6
  def self.version
7
- "0.26.7"
7
+ "0.26.9"
8
8
  end
9
9
  end
10
10
  end