decidim-core 0.27.0.rc1 → 0.27.0.rc2
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.
- checksums.yaml +4 -4
- data/app/cells/decidim/announcement_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/cta/show.erb +1 -1
- data/app/cells/decidim/content_blocks/cta_cell.rb +1 -1
- data/app/cells/decidim/content_blocks/hero/show.erb +2 -2
- data/app/cells/decidim/content_blocks/hero_cell.rb +1 -0
- data/app/cells/decidim/content_blocks/highlighted_content_banner/show.erb +2 -2
- data/app/cells/decidim/content_blocks/stats_cell.rb +1 -0
- data/app/cells/decidim/content_blocks/sub_hero_cell.rb +1 -1
- data/app/cells/decidim/data_consent/category.erb +19 -19
- data/app/cells/decidim/data_consent/dialog.erb +12 -12
- data/app/cells/decidim/data_consent/modal.erb +13 -13
- data/app/cells/decidim/data_consent_cell.rb +3 -3
- data/app/commands/decidim/update_account.rb +3 -1
- data/app/controllers/concerns/decidim/resource_versions_concern.rb +4 -0
- data/app/controllers/decidim/devise/registrations_controller.rb +5 -1
- data/app/controllers/decidim/last_activities_controller.rb +1 -0
- data/app/events/decidim/resource_endorsed_event.rb +2 -1
- data/app/forms/decidim/account_form.rb +1 -1
- data/app/forms/decidim/user_group_form.rb +1 -1
- data/app/helpers/decidim/filters_helper.rb +5 -1
- data/app/helpers/decidim/sanitize_helper.rb +12 -3
- data/app/models/decidim/action_log.rb +9 -9
- data/app/models/decidim/notification.rb +11 -2
- data/app/models/decidim/user_base_entity.rb +1 -0
- data/app/packs/entrypoints/decidim_core.js +1 -1
- data/app/packs/src/decidim/account_form.js +68 -18
- data/app/packs/src/decidim/{cookie_consent → data_consent}/consent_manager.js +27 -24
- data/app/packs/src/decidim/data_consent/consent_manager.test.js +280 -0
- data/app/packs/src/decidim/{cookie_consent/cookie_consent.js → data_consent/index.js} +12 -12
- data/app/packs/src/decidim/input_character_counter.js +57 -34
- data/app/packs/src/decidim/sw/a2hs.js +10 -1
- data/app/packs/stylesheets/decidim/modules/_cards.scss +2 -0
- data/app/packs/stylesheets/decidim/modules/_comments.scss +2 -0
- data/app/packs/stylesheets/decidim/modules/{_cookie-consent.scss → _data-consent.scss} +10 -10
- data/app/packs/stylesheets/decidim/modules/_forms.scss +5 -0
- data/app/packs/stylesheets/decidim/modules/_modules.scss +1 -1
- data/app/permissions/decidim/permissions.rb +4 -2
- data/app/presenters/decidim/push_notification_presenter.rb +2 -1
- data/app/presenters/decidim/user_presenter.rb +4 -1
- data/app/scrubbers/decidim/admin_input_scrubber.rb +25 -0
- data/app/scrubbers/decidim/user_input_scrubber.rb +3 -5
- data/app/services/decidim/iframe_disabler.rb +2 -3
- data/app/services/decidim/notifications_digest_sending_decider.rb +6 -2
- data/app/services/decidim/send_push_notification.rb +14 -12
- data/app/views/decidim/account/_password_fields.html.erb +2 -2
- data/app/views/decidim/download_your_data/show.html.erb +1 -1
- data/app/views/decidim/notifications_settings/show.html.erb +65 -67
- data/app/views/decidim/pages/_standalone.html.erb +1 -1
- data/app/views/decidim/pages/_tabbed.html.erb +1 -1
- data/app/views/decidim/user_interests/show.html.erb +11 -13
- data/app/views/layouts/decidim/_application.html.erb +1 -1
- data/app/views/layouts/decidim/_data_consent_warning.html.erb +8 -0
- data/app/views/layouts/decidim/_main_footer.html.erb +1 -1
- data/config/locales/am-ET.yml +0 -1
- data/config/locales/ar.yml +0 -9
- data/config/locales/bg.yml +0 -9
- data/config/locales/ca.yml +18 -23
- data/config/locales/cs.yml +19 -24
- data/config/locales/da.yml +0 -1
- data/config/locales/de.yml +204 -10
- data/config/locales/el.yml +0 -9
- data/config/locales/en.yml +17 -22
- data/config/locales/es-MX.yml +20 -25
- data/config/locales/es-PY.yml +19 -24
- data/config/locales/es.yml +20 -25
- data/config/locales/et.yml +0 -1
- data/config/locales/eu.yml +1 -10
- data/config/locales/fi-plain.yml +17 -22
- data/config/locales/fi.yml +17 -22
- data/config/locales/fr-CA.yml +29 -20
- data/config/locales/fr.yml +42 -33
- data/config/locales/ga-IE.yml +0 -2
- data/config/locales/gl.yml +0 -9
- data/config/locales/hr.yml +0 -1
- data/config/locales/hu.yml +250 -9
- data/config/locales/id-ID.yml +0 -9
- data/config/locales/it.yml +1 -10
- data/config/locales/ja.yml +30 -24
- data/config/locales/ko.yml +0 -1
- data/config/locales/lb.yml +0 -9
- data/config/locales/lt.yml +1949 -0
- data/config/locales/lv.yml +0 -9
- data/config/locales/mt.yml +0 -1
- data/config/locales/nl.yml +16 -10
- data/config/locales/no.yml +1 -10
- data/config/locales/om-ET.yml +0 -1
- data/config/locales/pl.yml +0 -9
- data/config/locales/pt-BR.yml +2 -11
- data/config/locales/pt.yml +0 -9
- data/config/locales/ro-RO.yml +0 -9
- data/config/locales/si-LK.yml +0 -1
- data/config/locales/sk.yml +0 -9
- data/config/locales/so-SO.yml +0 -1
- data/config/locales/sv.yml +9 -14
- data/config/locales/sw-KE.yml +0 -1
- data/config/locales/ti-ER.yml +0 -1
- data/config/locales/tr-TR.yml +0 -9
- data/config/locales/val-ES.yml +0 -1
- data/config/locales/vi.yml +0 -1
- data/config/locales/zh-CN.yml +2 -11
- data/config/locales/zh-TW.yml +0 -1
- data/config/routes.rb +20 -2
- data/lib/decidim/attributes/model.rb +9 -1
- data/lib/decidim/content_parsers/hashtag_parser.rb +1 -1
- data/lib/decidim/core/engine.rb +1 -1
- data/lib/decidim/core/test/shared_examples/resource_endorsed_event_examples.rb +60 -0
- data/lib/decidim/core/test/shared_examples/versions_controller_examples.rb +40 -0
- data/lib/decidim/core/test/shared_examples/with_endorsable_permissions_examples.rb +1 -1
- data/lib/decidim/core/test.rb +2 -0
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/core.rb +52 -13
- data/lib/decidim/dependency_resolver.rb +272 -0
- data/lib/decidim/events/simple_event.rb +1 -0
- data/lib/decidim/has_resource_permission.rb +0 -2
- data/lib/decidim/map/provider/dynamic_map/here.rb +46 -1
- data/lib/decidim/nicknamizable.rb +1 -1
- data/lib/decidim/translatable_attributes.rb +8 -1
- data/lib/decidim/url_option_resolver.rb +1 -1
- metadata +15 -11
- data/app/views/decidim/devise/registrations/edit.html.erb +0 -41
- data/app/views/layouts/decidim/_cookie_warning.html.erb +0 -8
data/config/locales/lv.yml
CHANGED
@@ -1278,15 +1278,6 @@ lv:
|
|
1278
1278
|
updated_not_active: Jūsu parole ir veiksmīgi nomainīta.
|
1279
1279
|
registrations:
|
1280
1280
|
destroyed: Jūsu konts ir veiksmīgi atcelts. Mēs ceram jūs drīz atkal redzēt.
|
1281
|
-
edit:
|
1282
|
-
are_you_sure: Vai esat pārliecināts?
|
1283
|
-
cancel_my_account: Atcelt manu kontu
|
1284
|
-
currently_waiting_confirmation_for_email: 'Pašlaik tiek gaidīts apstiprinājums e-pastam: %{email}'
|
1285
|
-
leave_blank_if_you_don_t_want_to_change_it: atstājiet tukšu, ja nevēlaties to mainīt
|
1286
|
-
title: Labot %{resource}
|
1287
|
-
unhappy: Neesat apmierināts?
|
1288
|
-
update: Atjaunināt
|
1289
|
-
we_need_your_current_password_to_confirm_your_changes: mums ir nepieciešama jūsu pašreizējā parole, lai apstiprinātu izmaiņas
|
1290
1281
|
new:
|
1291
1282
|
sign_up: Reģistrēties
|
1292
1283
|
signed_up: Laipni lūdzam! Jūsu reģistrācija bija veiksmīga.
|
data/config/locales/mt.yml
CHANGED
data/config/locales/nl.yml
CHANGED
@@ -1480,15 +1480,6 @@ nl:
|
|
1480
1480
|
updated_not_active: Je wachtwoord is met succes veranderd.
|
1481
1481
|
registrations:
|
1482
1482
|
destroyed: Uw account is succesvol geannuleerd. We hopen je snel weer te zien.
|
1483
|
-
edit:
|
1484
|
-
are_you_sure: Weet je het zeker?
|
1485
|
-
cancel_my_account: Annuleer mijn account
|
1486
|
-
currently_waiting_confirmation_for_email: 'Momenteel wachtende bevestiging voor: %{email}'
|
1487
|
-
leave_blank_if_you_don_t_want_to_change_it: laat leeg als je het niet wilt wijzigen
|
1488
|
-
title: Bewerk %{resource}
|
1489
|
-
unhappy: Ongelukkig?
|
1490
|
-
update: Bijwerken
|
1491
|
-
we_need_your_current_password_to_confirm_your_changes: we hebben je huidige wachtwoord nodig om je wijzigingen te bevestigen
|
1492
1483
|
new:
|
1493
1484
|
sign_up: Aanmelden
|
1494
1485
|
signed_up: Welkom! Je hebt je succesvol aangemeld.
|
@@ -1557,6 +1548,21 @@ nl:
|
|
1557
1548
|
timestamp_error_message: Sorry, dat was te snel! Gelieve opnieuw in te dienen.
|
1558
1549
|
layouts:
|
1559
1550
|
decidim:
|
1551
|
+
data_consent:
|
1552
|
+
details:
|
1553
|
+
columns:
|
1554
|
+
description: Beschrijving
|
1555
|
+
name: Naam
|
1556
|
+
type: Type
|
1557
|
+
items:
|
1558
|
+
pwaInstallPromptSeen:
|
1559
|
+
description: Bewaart de status als de progressieve webapplicatie (PWA) installatiemelding al gezien is door de gebruiker.
|
1560
|
+
types:
|
1561
|
+
local_storage: Lokale opslag
|
1562
|
+
modal:
|
1563
|
+
analytics:
|
1564
|
+
description: Deze cookies worden gebruikt om het gebruik van de website te meten en te analyseren en zo de website te verbeteren.
|
1565
|
+
description: We gebruiken cookies om de basisfunctionaliteiten van de website te garanderen en jouw online-ervaring te verbeteren. Je kunt op elk gewenst moment het gebruik van de cookies configureren en accepteren of je toestemmingsopties wijzigen.
|
1560
1566
|
edit_link:
|
1561
1567
|
edit: Bewerk
|
1562
1568
|
footer:
|
@@ -1610,7 +1616,7 @@ nl:
|
|
1610
1616
|
see_more: Zie meer
|
1611
1617
|
locale:
|
1612
1618
|
name: Nederlands
|
1613
|
-
name_with_error:
|
1619
|
+
name_with_error: Nederlands (fout!)
|
1614
1620
|
password_validator:
|
1615
1621
|
blacklisted: staat op de zwarte lijst
|
1616
1622
|
domain_included_in_password: lijkt te veel op deze domeinnaam
|
data/config/locales/no.yml
CHANGED
@@ -1526,15 +1526,6 @@
|
|
1526
1526
|
updated_not_active: Passordet ditt er blitt endret.
|
1527
1527
|
registrations:
|
1528
1528
|
destroyed: Din konto er lukket. Vi håper å se deg igjen snart.
|
1529
|
-
edit:
|
1530
|
-
are_you_sure: Er du sikker?
|
1531
|
-
cancel_my_account: Avbryt kontoen min
|
1532
|
-
currently_waiting_confirmation_for_email: 'Foreløpig venter for bekreftelse på: %{email}'
|
1533
|
-
leave_blank_if_you_don_t_want_to_change_it: la stå tom hvis du ikke vil endre det
|
1534
|
-
title: Endre %{resource}
|
1535
|
-
unhappy: Ikke fornøyd?
|
1536
|
-
update: Oppdater
|
1537
|
-
we_need_your_current_password_to_confirm_your_changes: vi trenger ditt nåværende passord for å bekrefte endringene dine
|
1538
1529
|
new:
|
1539
1530
|
sign_up: Registrer deg
|
1540
1531
|
signed_up: Velkommen! Din registrering er fullført. Husk å bekrefte epostadressen din via mailen vi har sendt deg.
|
@@ -1661,7 +1652,7 @@
|
|
1661
1652
|
see_more: Se mer
|
1662
1653
|
locale:
|
1663
1654
|
name: Engelsk
|
1664
|
-
name_with_error:
|
1655
|
+
name_with_error: Norsk (feil!)
|
1665
1656
|
password_validator:
|
1666
1657
|
blacklisted: er svartelistet
|
1667
1658
|
domain_included_in_password: er for lik dette domenenavnet
|
data/config/locales/om-ET.yml
CHANGED
data/config/locales/pl.yml
CHANGED
@@ -1583,15 +1583,6 @@ pl:
|
|
1583
1583
|
updated_not_active: Twoje hasło zostało zmienione.
|
1584
1584
|
registrations:
|
1585
1585
|
destroyed: Twoje konto zostało pomyślnie zawieszone. Mamy nadzieję zobaczyć Cię ponownie wkrótce.
|
1586
|
-
edit:
|
1587
|
-
are_you_sure: Jesteś pewny?
|
1588
|
-
cancel_my_account: Zawieś moje konto
|
1589
|
-
currently_waiting_confirmation_for_email: 'Obecnie oczekujące potwierdzenie dla: %{email}'
|
1590
|
-
leave_blank_if_you_don_t_want_to_change_it: pozostaw puste, jeśli nie chcesz tego zmieniać
|
1591
|
-
title: Edytuj %{resource}
|
1592
|
-
unhappy: Niezadowolony?
|
1593
|
-
update: Aktualizuj
|
1594
|
-
we_need_your_current_password_to_confirm_your_changes: potrzebujemy Twojego obecnego hasła, aby potwierdzić Twoje zmiany
|
1595
1586
|
new:
|
1596
1587
|
sign_up: Zarejestruj się
|
1597
1588
|
signed_up: Witamy! Zarejestrowałeś się pomyślnie.
|
data/config/locales/pt-BR.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
---
|
2
|
-
pt:
|
2
|
+
pt-BR:
|
3
3
|
activemodel:
|
4
4
|
attributes:
|
5
5
|
account:
|
@@ -1479,15 +1479,6 @@ pt:
|
|
1479
1479
|
updated_not_active: Sua senha foi alterada com sucesso.
|
1480
1480
|
registrations:
|
1481
1481
|
destroyed: Tchau! Sua conta foi cancelada com sucesso. Esperamos te ver novamente em breve.
|
1482
|
-
edit:
|
1483
|
-
are_you_sure: Você tem certeza?
|
1484
|
-
cancel_my_account: Cancelar minha conta
|
1485
|
-
currently_waiting_confirmation_for_email: 'Atualmente aguardando confirmação para: %{email}'
|
1486
|
-
leave_blank_if_you_don_t_want_to_change_it: deixe em branco se você não quiser mudá-lo
|
1487
|
-
title: Editar %{resource}
|
1488
|
-
unhappy: Infeliz?
|
1489
|
-
update: Atualizar
|
1490
|
-
we_need_your_current_password_to_confirm_your_changes: Precisamos da sua senha atual para confirmar suas alterações
|
1491
1482
|
new:
|
1492
1483
|
sign_up: inscrever-se
|
1493
1484
|
signed_up: Bem vinda! Você se inscreveu com sucesso.
|
@@ -1612,7 +1603,7 @@ pt:
|
|
1612
1603
|
see_more: Ver mais
|
1613
1604
|
locale:
|
1614
1605
|
name: Português
|
1615
|
-
name_with_error:
|
1606
|
+
name_with_error: Português (erro!)
|
1616
1607
|
password_validator:
|
1617
1608
|
domain_included_in_password: é muito semelhante a este nome de domínio
|
1618
1609
|
email_included_in_password: é muito parecido com o seu email
|
data/config/locales/pt.yml
CHANGED
@@ -1478,15 +1478,6 @@ pt:
|
|
1478
1478
|
updated_not_active: A sua palavra-passe foi modificada corretamente.
|
1479
1479
|
registrations:
|
1480
1480
|
destroyed: A sua conta foi cancelada corretamente. Esperamos vê-lo(a) novamente em breve.
|
1481
|
-
edit:
|
1482
|
-
are_you_sure: Tem a certeza?
|
1483
|
-
cancel_my_account: Cancelar a minha conta
|
1484
|
-
currently_waiting_confirmation_for_email: 'Atualmente à espera de confirmação para: %{email}'
|
1485
|
-
leave_blank_if_you_don_t_want_to_change_it: deixe em branco se não quiser modificá-lo
|
1486
|
-
title: Editar %{resource}
|
1487
|
-
unhappy: Infeliz?
|
1488
|
-
update: Atualizar
|
1489
|
-
we_need_your_current_password_to_confirm_your_changes: precisamos da sua palavra-passe atual para confirmar as suas alterações
|
1490
1481
|
new:
|
1491
1482
|
sign_up: Inscrever-se
|
1492
1483
|
signed_up: Bem-vindo(a)! Inscreveu-se corretamente.
|
data/config/locales/ro-RO.yml
CHANGED
@@ -1514,15 +1514,6 @@ ro:
|
|
1514
1514
|
updated_not_active: Parola dvs. a fost schimbată cu succes.
|
1515
1515
|
registrations:
|
1516
1516
|
destroyed: Contul tău a fost anulat cu succes. Sperăm să te revedem în curând.
|
1517
|
-
edit:
|
1518
|
-
are_you_sure: Sigur dorești asta?
|
1519
|
-
cancel_my_account: Anulează contul meu
|
1520
|
-
currently_waiting_confirmation_for_email: 'În prezent se așteaptă confirmarea pentru: %{email}'
|
1521
|
-
leave_blank_if_you_don_t_want_to_change_it: lasă necompletat dacă nu vrei să-l schimbi
|
1522
|
-
title: Editează %{resource}
|
1523
|
-
unhappy: Nefericit?
|
1524
|
-
update: Actualizare
|
1525
|
-
we_need_your_current_password_to_confirm_your_changes: avem nevoie de parola curentă pentru a confirma modificările
|
1526
1517
|
new:
|
1527
1518
|
sign_up: Înscrie-te
|
1528
1519
|
signed_up: Bine ați venit! V-ați înregistrat cu succes.
|
data/config/locales/si-LK.yml
CHANGED
data/config/locales/sk.yml
CHANGED
@@ -1208,15 +1208,6 @@ sk:
|
|
1208
1208
|
updated_not_active: Vaše heslo bolo úspešne zmenené.
|
1209
1209
|
registrations:
|
1210
1210
|
destroyed: Zbohom! Váš účet bol úspešne zrušený. Dúfame, že vás čoskoro uvidíme.
|
1211
|
-
edit:
|
1212
|
-
are_you_sure: Ste si istí?
|
1213
|
-
cancel_my_account: Zrušiť môj účet
|
1214
|
-
currently_waiting_confirmation_for_email: 'Aktuálne čaká potvrdenie o:%{email}'
|
1215
|
-
leave_blank_if_you_don_t_want_to_change_it: ponechajte prázdne, ak nechcete zmeniť
|
1216
|
-
title: Upraviť%{resource}
|
1217
|
-
unhappy: Nespokojný?
|
1218
|
-
update: Aktualizácia
|
1219
|
-
we_need_your_current_password_to_confirm_your_changes: pre potvrdenie zmien potrebujeme vaše aktuálne heslo
|
1220
1211
|
new:
|
1221
1212
|
sign_up: Prihlásiť sa
|
1222
1213
|
signed_up: Vitajte! Úspešne ste sa zaregistrovali.
|
data/config/locales/so-SO.yml
CHANGED
data/config/locales/sv.yml
CHANGED
@@ -42,6 +42,7 @@ sv:
|
|
42
42
|
decidim/promote_to_admin: Befordrad till gruppadministratör
|
43
43
|
decidim/removed_from_group: Borttagen från gruppen
|
44
44
|
decidim/resource_endorsed_event: Resurs instämd
|
45
|
+
decidim/welcome_notification_event: Välkomstmeddelande
|
45
46
|
activerecord:
|
46
47
|
attributes:
|
47
48
|
decidim/user:
|
@@ -69,6 +70,8 @@ sv:
|
|
69
70
|
'true': 'Ja'
|
70
71
|
carrierwave:
|
71
72
|
errors:
|
73
|
+
file_resolution_too_large: Filupplösningen är för stor
|
74
|
+
file_size_too_large: Filen är för stor
|
72
75
|
not_inside_organization: Den här filen är inte bifogad till någon organisation
|
73
76
|
date:
|
74
77
|
formats:
|
@@ -127,7 +130,10 @@ sv:
|
|
127
130
|
file_no_exists: Filen finns inte
|
128
131
|
notice: Dina uppgifter hämtas för närvarande. Du får ett e-postmeddelande när det är klart.
|
129
132
|
email_change:
|
133
|
+
body1: Vi har skickat ett e-postmeddelande till %{unconfirmed_email} för att bekräfta din nya e-postadress.
|
134
|
+
body2: Vill du att vi ska skicka verifieringsmailet igen? %{resend_link} eller %{cancel_link}.
|
130
135
|
cancel: avbryt
|
136
|
+
cancel_error: Kunde inte avbryta ändringen av e-postadressen.
|
131
137
|
show:
|
132
138
|
available_locales_helper: Välj det språk du vill använda på plattformen och få i notiserna
|
133
139
|
change_password: Ändra lösenord
|
@@ -1559,15 +1565,6 @@ sv:
|
|
1559
1565
|
updated_not_active: Ditt lösenord har ändrats.
|
1560
1566
|
registrations:
|
1561
1567
|
destroyed: Ditt konto har avregistrerats. Vi hoppas att vi ses snart igen.
|
1562
|
-
edit:
|
1563
|
-
are_you_sure: Är du säker?
|
1564
|
-
cancel_my_account: Avregistrera mitt konto
|
1565
|
-
currently_waiting_confirmation_for_email: 'Väntar för närvarande på bekräftelse från: %{email}'
|
1566
|
-
leave_blank_if_you_don_t_want_to_change_it: lämna tomt om du inte vill ändra det
|
1567
|
-
title: Redigera %{resource}
|
1568
|
-
unhappy: Olycklig?
|
1569
|
-
update: Uppdatera
|
1570
|
-
we_need_your_current_password_to_confirm_your_changes: Vi behöver ditt nuvarande lösenord för att bekräfta ändringarna
|
1571
1568
|
new:
|
1572
1569
|
sign_up: Registrera
|
1573
1570
|
signed_up: Välkommen! Din registrering är klar.
|
@@ -1636,16 +1633,14 @@ sv:
|
|
1636
1633
|
timestamp_error_message: Det gick för snabbt! Försök igen.
|
1637
1634
|
layouts:
|
1638
1635
|
decidim:
|
1639
|
-
|
1640
|
-
|
1636
|
+
data_consent:
|
1637
|
+
details:
|
1641
1638
|
columns:
|
1642
|
-
name: Namn
|
1643
1639
|
service: Tjänst
|
1644
|
-
type: Typ
|
1645
1640
|
types:
|
1646
1641
|
cookie: Cookie
|
1647
1642
|
dialog:
|
1648
|
-
|
1643
|
+
settings: Inställningar
|
1649
1644
|
modal:
|
1650
1645
|
save_settings: Spara inställningar
|
1651
1646
|
edit_link:
|
data/config/locales/sw-KE.yml
CHANGED
data/config/locales/ti-ER.yml
CHANGED
data/config/locales/tr-TR.yml
CHANGED
@@ -1436,15 +1436,6 @@ tr:
|
|
1436
1436
|
updated_not_active: Şifreniz başarıyla değiştirildi.
|
1437
1437
|
registrations:
|
1438
1438
|
destroyed: Hoşçakal! Hesabınız başarıyla iptal edildi. Kısa süre sonra tekrar görmeyi umuyoruz.
|
1439
|
-
edit:
|
1440
|
-
are_you_sure: Emin misiniz?
|
1441
|
-
cancel_my_account: Hesabımı iptal et
|
1442
|
-
currently_waiting_confirmation_for_email: 'Şu an için bekleme onayı: %{email}'
|
1443
|
-
leave_blank_if_you_don_t_want_to_change_it: değiştirmek istemiyorsanız boş bırakın
|
1444
|
-
title: '%{resource}düzenle'
|
1445
|
-
unhappy: Mutsuz?
|
1446
|
-
update: Güncelleştirme
|
1447
|
-
we_need_your_current_password_to_confirm_your_changes: değişikliklerinizi onaylamak için mevcut şifrenize ihtiyacımız var
|
1448
1439
|
new:
|
1449
1440
|
sign_up: kaydol
|
1450
1441
|
signed_up: Hoşgeldiniz! Başarıyla kaydoldunuz.
|
data/config/locales/val-ES.yml
CHANGED
data/config/locales/vi.yml
CHANGED
data/config/locales/zh-CN.yml
CHANGED
@@ -1341,15 +1341,6 @@ zh-CN:
|
|
1341
1341
|
updated_not_active: 您的密码已成功更改。
|
1342
1342
|
registrations:
|
1343
1343
|
destroyed: 您的帐户已成功取消。我们希望很快再见到您。
|
1344
|
-
edit:
|
1345
|
-
are_you_sure: 您确定吗?
|
1346
|
-
cancel_my_account: 取消我的帐户
|
1347
|
-
currently_waiting_confirmation_for_email: '正在等待确认: %{email}'
|
1348
|
-
leave_blank_if_you_don_t_want_to_change_it: 如果您不想更改它,请留空
|
1349
|
-
title: 编辑 %{resource}
|
1350
|
-
unhappy: 不愉快?
|
1351
|
-
update: 更新
|
1352
|
-
we_need_your_current_password_to_confirm_your_changes: 我们需要您当前的密码来确认您的更改
|
1353
1344
|
new:
|
1354
1345
|
sign_up: 注册
|
1355
1346
|
signed_up: 欢迎!您已成功注册。
|
@@ -1459,8 +1450,8 @@ zh-CN:
|
|
1459
1450
|
widget:
|
1460
1451
|
see_more: 查看更多
|
1461
1452
|
locale:
|
1462
|
-
name:
|
1463
|
-
name_with_error:
|
1453
|
+
name: 中文
|
1454
|
+
name_with_error: 中文(错误!)
|
1464
1455
|
password_validator:
|
1465
1456
|
domain_included_in_password: 与这个域名太近了
|
1466
1457
|
email_included_in_password: 与您的电子邮件太相似了
|
data/config/locales/zh-TW.yml
CHANGED
data/config/routes.rb
CHANGED
@@ -13,11 +13,29 @@ Decidim::Core::Engine.routes.draw do
|
|
13
13
|
invitations: "decidim/devise/invitations",
|
14
14
|
sessions: "decidim/devise/sessions",
|
15
15
|
confirmations: "decidim/devise/confirmations",
|
16
|
-
registrations: "decidim/devise/registrations",
|
17
16
|
passwords: "decidim/devise/passwords",
|
18
17
|
unlocks: "decidim/devise/unlocks",
|
19
18
|
omniauth_callbacks: "decidim/devise/omniauth_registrations"
|
20
|
-
}
|
19
|
+
},
|
20
|
+
skip: [:registrations]
|
21
|
+
|
22
|
+
# Manually define the registration routes because otherwise the default "edit"
|
23
|
+
# route would be exposed through Devise while we already have the edit and
|
24
|
+
# destroy routes available through the account pages.
|
25
|
+
resource(
|
26
|
+
:registration,
|
27
|
+
only: [:new, :create],
|
28
|
+
as: :user_registration,
|
29
|
+
path: "/users",
|
30
|
+
path_names: { new: "sign_up" },
|
31
|
+
controller: "devise/registrations"
|
32
|
+
) do
|
33
|
+
# The "cancel" route forces the session data which is usually expired after
|
34
|
+
# sign in to be expired now. This is useful if the user wants to cancel
|
35
|
+
# OAuth signing in/up in the middle of the process, removing all OAuth
|
36
|
+
# session data. @see [Devise::RegistrationsController#cancel]
|
37
|
+
get :cancel
|
38
|
+
end
|
21
39
|
|
22
40
|
devise_for :user_groups,
|
23
41
|
class_name: "Decidim::UserGroup",
|
@@ -15,7 +15,15 @@ module Decidim
|
|
15
15
|
return value if value.is_a?(Decidim::AttributeObject::Model)
|
16
16
|
return primitive.new(value) if value.is_a?(::Hash)
|
17
17
|
return primitive.new(value.to_h) if value.respond_to?(:to_h)
|
18
|
-
|
18
|
+
|
19
|
+
if value.respond_to?(:attributes)
|
20
|
+
# In case the primitive is a form object, we also need to call the
|
21
|
+
# `map_model` method in case the target form object defines it for
|
22
|
+
# nested forms to work properly.
|
23
|
+
converted = primitive.new(value.attributes)
|
24
|
+
converted.map_model(value) if converted.respond_to?(:map_model)
|
25
|
+
return converted
|
26
|
+
end
|
19
27
|
|
20
28
|
value
|
21
29
|
end
|
@@ -18,7 +18,7 @@ module Decidim
|
|
18
18
|
|
19
19
|
# Matches a hashtag if it starts with a letter or number
|
20
20
|
# and only contains letters, numbers or underscores.
|
21
|
-
HASHTAG_REGEX =
|
21
|
+
HASHTAG_REGEX = /(?:\A|\s\K)\B#([[:alnum:]](?:[[:alnum:]]|_)*)\b/i
|
22
22
|
|
23
23
|
# Replaces hashtags name with new or existing hashtags models global ids.
|
24
24
|
#
|
data/lib/decidim/core/engine.rb
CHANGED
@@ -265,7 +265,7 @@ module Decidim
|
|
265
265
|
Cell::ViewModel.view_paths << File.expand_path("#{Decidim::Core::Engine.root}/app/views") # for partials
|
266
266
|
end
|
267
267
|
|
268
|
-
initializer "doorkeeper" do
|
268
|
+
initializer "doorkeeper", before: "doorkeeper.params.filter" do
|
269
269
|
Doorkeeper.configure do
|
270
270
|
orm :active_record
|
271
271
|
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "spec_helper"
|
4
|
+
|
5
|
+
shared_examples_for "resource endorsed event" do
|
6
|
+
include_context "when a simple event"
|
7
|
+
|
8
|
+
let(:event_name) { "decidim.events.resource_endorsed" }
|
9
|
+
let(:author) { create :user, organization: resource.organization }
|
10
|
+
|
11
|
+
let(:extra) { { endorser_id: author.id } }
|
12
|
+
let(:endorsement) { create :endorsement, resource: resource, author: author }
|
13
|
+
let(:resource_path) { resource_locator(resource).path }
|
14
|
+
let(:follower) { create(:user, organization: resource.organization) }
|
15
|
+
let(:follow) { create(:follow, followable: author, user: follower) }
|
16
|
+
|
17
|
+
it_behaves_like "a simple event"
|
18
|
+
|
19
|
+
describe "types" do
|
20
|
+
subject { described_class }
|
21
|
+
|
22
|
+
it "supports notifications" do
|
23
|
+
expect(subject.types).to include :notification
|
24
|
+
end
|
25
|
+
|
26
|
+
it "supports emails" do
|
27
|
+
expect(subject.types).to include :email
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe "email_subject" do
|
32
|
+
it "is generated correctly" do
|
33
|
+
expect(subject.email_subject).to eq("#{author_presenter.nickname} has performed a new endorsement")
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe "email_intro" do
|
38
|
+
it "is generated correctly" do
|
39
|
+
expect(subject.email_intro)
|
40
|
+
.to eq("#{author.name} #{author_presenter.nickname}, who you are following," \
|
41
|
+
" has just endorsed \"#{translated resource.title}\" and we think it may be interesting to you. Check it out and contribute:")
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "notification_title" do
|
46
|
+
it "is generated correctly" do
|
47
|
+
expect(subject.notification_title)
|
48
|
+
.to include("The <a href=\"#{resource_path}\">#{translated resource.title}</a> #{resource_type} has been endorsed by ")
|
49
|
+
|
50
|
+
expect(subject.notification_title)
|
51
|
+
.to include("<a href=\"/profiles/#{author.nickname}\">#{author.name} #{author_presenter.nickname}</a>.")
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "resource_text" do
|
56
|
+
it "shows the resource text" do
|
57
|
+
expect(subject.resource_text).to eq resource_text
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "spec_helper"
|
4
|
+
|
5
|
+
shared_examples "versions controller" do
|
6
|
+
let(:base_params) do
|
7
|
+
if resource.is_a?(Decidim::Participable)
|
8
|
+
{ "#{resource.model_name.singular_route_key}_slug".to_sym => resource.slug }
|
9
|
+
else
|
10
|
+
{ "#{resource.model_name.singular_route_key}_id".to_sym => resource.id }
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
before do
|
15
|
+
request.env["decidim.current_organization"] = resource.organization
|
16
|
+
|
17
|
+
if resource.is_a?(Decidim::HasComponent)
|
18
|
+
request.env["decidim.current_participatory_space"] = resource.participatory_space
|
19
|
+
request.env["decidim.current_component"] = resource.component
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "GET show" do
|
24
|
+
context "with an existing version" do
|
25
|
+
it "returns a HTTP 200" do
|
26
|
+
get :show, params: base_params.merge(id: 1)
|
27
|
+
|
28
|
+
expect(response).to have_http_status(:ok)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
context "when the resource does not exist" do
|
33
|
+
it "raises a routing error" do
|
34
|
+
expect do
|
35
|
+
get :show, params: base_params.merge(id: 999_999_999)
|
36
|
+
end.to raise_error(ActionController::RoutingError)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -5,7 +5,7 @@ require "spec_helper"
|
|
5
5
|
# users of this test should delare the `subject` variable.
|
6
6
|
shared_examples "with endorsable permissions can perform actions related to endorsable" do
|
7
7
|
let(:action_subject) { :endorsement }
|
8
|
-
let(:resource) { create :dummy_resource }
|
8
|
+
let(:resource) { create :dummy_resource, component: component }
|
9
9
|
before do
|
10
10
|
context[:current_settings] = double(current_settings)
|
11
11
|
context[:resource] = resource
|
data/lib/decidim/core/test.rb
CHANGED
@@ -71,3 +71,5 @@ require "decidim/core/test/shared_examples/categories_container_examples"
|
|
71
71
|
require "decidim/core/test/shared_examples/assembly_announcements_examples"
|
72
72
|
require "decidim/core/test/shared_examples/translated_event_examples"
|
73
73
|
require "decidim/core/test/shared_examples/conversations_examples"
|
74
|
+
require "decidim/core/test/shared_examples/resource_endorsed_event_examples"
|
75
|
+
require "decidim/core/test/shared_examples/versions_controller_examples"
|
data/lib/decidim/core/version.rb
CHANGED
data/lib/decidim/core.rb
CHANGED
@@ -113,6 +113,7 @@ module Decidim
|
|
113
113
|
autoload :EventRecorder, "decidim/event_recorder"
|
114
114
|
autoload :ControllerHelpers, "decidim/controller_helpers"
|
115
115
|
autoload :ProcessesFileLocally, "decidim/processes_file_locally"
|
116
|
+
autoload :DependencyResolver, "decidim/dependency_resolver"
|
116
117
|
|
117
118
|
include ActiveSupport::Configurable
|
118
119
|
# Loads seeds from all engines.
|
@@ -396,23 +397,24 @@ module Decidim
|
|
396
397
|
1_000
|
397
398
|
end
|
398
399
|
|
399
|
-
# Defines the name of the cookie used to check if the user
|
400
|
-
#
|
400
|
+
# Defines the name of the cookie used to check if the user has given consent
|
401
|
+
# to store local data in their browser.
|
401
402
|
config_accessor :consent_cookie_name do
|
402
403
|
"decidim-consent"
|
403
404
|
end
|
404
405
|
|
405
|
-
# Defines
|
406
|
-
# add following i18n entries also (change 'foo' with the name of the
|
406
|
+
# Defines data consent categories. Note that when adding an item you need to
|
407
|
+
# add following i18n entries also (change 'foo' with the name of the data
|
408
|
+
# which can be a cookie for instance).
|
407
409
|
#
|
408
|
-
# layouts.decidim.
|
409
|
-
# layouts.decidim.
|
410
|
+
# layouts.decidim.data_consent.details.items.foo.service
|
411
|
+
# layouts.decidim.data_consent.details.items.foo.description
|
410
412
|
config_accessor :consent_categories do
|
411
413
|
[
|
412
414
|
{
|
413
415
|
slug: "essential",
|
414
416
|
mandatory: true,
|
415
|
-
|
417
|
+
items: [
|
416
418
|
{
|
417
419
|
type: "cookie",
|
418
420
|
name: "_session_id"
|
@@ -420,6 +422,10 @@ module Decidim
|
|
420
422
|
{
|
421
423
|
type: "cookie",
|
422
424
|
name: Decidim.consent_cookie_name
|
425
|
+
},
|
426
|
+
{
|
427
|
+
type: "local_storage",
|
428
|
+
name: "pwaInstallPromptSeen"
|
423
429
|
}
|
424
430
|
]
|
425
431
|
},
|
@@ -711,12 +717,45 @@ module Decidim
|
|
711
717
|
Rails.autoloaders.main.ignore(path) if Rails.configuration.autoloader == :zeitwerk
|
712
718
|
end
|
713
719
|
|
714
|
-
# Checks if a particular decidim gem is installed
|
715
|
-
#
|
716
|
-
# Gemfile
|
717
|
-
#
|
718
|
-
#
|
720
|
+
# Checks if a particular decidim gem is installed and needed by this
|
721
|
+
# particular instance. Preferrably this happens through bundler by inspecting
|
722
|
+
# the Gemfile of the instance but when Decidim is used without bundler, this
|
723
|
+
# will check:
|
724
|
+
# 1. If the gem is globally available or not in the loaded specs, i.e. the
|
725
|
+
# gems available in the gem install directory/directories.
|
726
|
+
# 2. If the gem has been required through `require "decidim/foo"`.
|
727
|
+
#
|
728
|
+
# Using bundler is suggested as it will provide more accurate results
|
729
|
+
# regarding what is actually needed. It will resolve all the gems listed in
|
730
|
+
# the Gemfile and also their dependencies which provides us accurate
|
731
|
+
# information whether a gem is needed by the instance or not.
|
732
|
+
#
|
733
|
+
# Note that using something like defined?(Decidim::Foo) will not work because
|
734
|
+
# the way the Decidim handles version definitions for each gem. After the gems
|
735
|
+
# are loaded, this would always return true because the version definition
|
736
|
+
# files of each module define that module which means it is available at
|
737
|
+
# runtime if the gem is installed in the gem load path. In some situations it
|
738
|
+
# can be installed there through other projects or through the command line
|
739
|
+
# even if the instance does not require that module or even through
|
740
|
+
# installing gems from git sources or from file paths.
|
741
|
+
#
|
742
|
+
# When a gem is reported as "needed" by the dependency resolver, this will
|
743
|
+
# also require that module ensuring its availability for the initialization
|
744
|
+
# code.
|
745
|
+
#
|
746
|
+
# @param mod [Symbol, String] The module name to check, e.g. `:proposals`.
|
747
|
+
# @return [Boolean] A boolean indicating whether the module is installed.
|
719
748
|
def self.module_installed?(mod)
|
720
|
-
|
749
|
+
return false unless Decidim::DependencyResolver.instance.needed?("decidim-#{mod}")
|
750
|
+
|
751
|
+
# The dependency may not be automatically loaded through the Gemfile if the
|
752
|
+
# user lists e.g. "decidim-core" and "decidim-budgets" in it. In this
|
753
|
+
# situation, "decidim-comments" is also needed because it is a dependency
|
754
|
+
# for "decidim-budgets".
|
755
|
+
require "decidim/#{mod}"
|
756
|
+
|
757
|
+
true
|
758
|
+
rescue LoadError
|
759
|
+
false
|
721
760
|
end
|
722
761
|
end
|