decidim-core 0.24.0.rc2 → 0.24.0
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/assets/javascripts/decidim.js.es6 +1 -0
- data/app/assets/javascripts/decidim/gallery.js.es6 +5 -0
- data/app/assets/javascripts/decidim/map/controller/markers.js.es6 +13 -1
- data/app/cells/decidim/announcement_cell.rb +22 -7
- data/app/controllers/concerns/decidim/paginable.rb +8 -1
- data/app/mailers/concerns/decidim/localised_mailer.rb +4 -2
- data/app/mailers/decidim/notification_mailer.rb +0 -2
- data/app/models/decidim/follow.rb +1 -1
- data/app/models/decidim/user_group.rb +4 -0
- data/app/queries/decidim/user_groups/accepted_memberships.rb +1 -1
- data/app/queries/decidim/user_groups/admin_memberships.rb +1 -1
- data/app/queries/decidim/user_groups/member_memberships.rb +1 -1
- data/app/views/decidim/reported_mailer/report.html.erb +9 -1
- data/config/locales/cs.yml +9 -9
- data/config/locales/ro-RO.yml +63 -0
- data/db/migrate/20210310120640_add_followable_counter_cache_to_users.rb +16 -0
- data/lib/decidim/api/interfaces/categorizable_interface.rb +1 -1
- data/lib/decidim/core/test.rb +0 -1
- data/lib/decidim/core/test/shared_examples/categorizable_interface_examples.rb +14 -6
- data/lib/decidim/core/test/shared_examples/localised_email.rb +8 -0
- data/lib/decidim/core/version.rb +1 -1
- data/lib/decidim/followable.rb +6 -1
- metadata +10 -9
- data/lib/decidim/core/test/shared_examples/user_localised_email_examples.rb +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: faf98001013f7384f9e08459e5f91e43d80fd8eeb3b6b42bd7d93e484dcebd95
|
4
|
+
data.tar.gz: '0487584a5ed595a7998059708b61dc5c2150b2a0f292730d1474fe45cec9447a'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3897af38a28bd4a450b247c433e988c71afd3393d50ebf40d1bd540668ebdd41f559d4a7eea75f2464c8b34ea334c68db45f649695485583be967d399bc9a82d
|
7
|
+
data.tar.gz: fb1e732bef30d70722f8414ded7e8fa143025802844ed071f391d47cfff250b2510d313b709b92500291632e4a6aa198d025c1dfa2b6ea7bd6f67cccf211b5e5
|
@@ -69,7 +69,19 @@
|
|
69
69
|
this.markerClusters.addLayer(marker);
|
70
70
|
});
|
71
71
|
|
72
|
-
|
72
|
+
// Make sure there is enough space in the map for the padding to be
|
73
|
+
// applied. Otherwise the map will automatically zoom out (test it on
|
74
|
+
// mobile). Make sure there is at least the same amount of width and
|
75
|
+
// height available on both sides + the padding (i.e. 4x padding in
|
76
|
+
// total).
|
77
|
+
const size = this.map.getSize();
|
78
|
+
if (size.y >= 400 && size.x >= 400) {
|
79
|
+
this.map.fitBounds(bounds, { padding: [100, 100] });
|
80
|
+
} else if (size.y >= 120 && size.x >= 120) {
|
81
|
+
this.map.fitBounds(bounds, { padding: [30, 30] });
|
82
|
+
} else {
|
83
|
+
this.map.fitBounds(bounds);
|
84
|
+
}
|
73
85
|
}
|
74
86
|
|
75
87
|
clearMarkers() {
|
@@ -2,20 +2,27 @@
|
|
2
2
|
|
3
3
|
module Decidim
|
4
4
|
# This cell renders an announcement
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
5
|
+
#
|
6
|
+
# The `model` is expected to be a Hash with two keys:
|
7
|
+
# - `body` is mandatory, its the message to show
|
8
|
+
# - `title` is mandatory, a title to show
|
8
9
|
#
|
9
10
|
# {
|
10
|
-
#
|
11
|
-
#
|
11
|
+
# title: "...", # mandatory
|
12
|
+
# body: "..." # mandatory
|
12
13
|
# }
|
13
14
|
#
|
15
|
+
# It can also receive a single value to show as text. It can either be a String
|
16
|
+
# or a value accepted by the `translated_attribute` method.
|
17
|
+
#
|
18
|
+
# As options, the cell accepts a Hash with these keys:
|
19
|
+
# - `callout_class`: The Css class to apply. Default to `"secondary"`
|
20
|
+
#
|
14
21
|
class AnnouncementCell < Decidim::ViewModel
|
15
22
|
include Decidim::SanitizeHelper
|
16
23
|
|
17
24
|
def show
|
18
|
-
return
|
25
|
+
return if clean_body.blank? && clean_announcement.blank?
|
19
26
|
|
20
27
|
render :show
|
21
28
|
end
|
@@ -38,8 +45,16 @@ module Decidim
|
|
38
45
|
clean(announcement[:title])
|
39
46
|
end
|
40
47
|
|
48
|
+
def body
|
49
|
+
return announcement.presence unless announcement.is_a?(Hash)
|
50
|
+
|
51
|
+
announcement[:body].presence
|
52
|
+
end
|
53
|
+
|
41
54
|
def clean_body
|
42
|
-
|
55
|
+
return unless body
|
56
|
+
|
57
|
+
Array(body).map { |paragraph| tag.p(clean(paragraph)) }.join("")
|
43
58
|
end
|
44
59
|
|
45
60
|
def clean_announcement
|
@@ -18,7 +18,14 @@ module Decidim
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def per_page
|
21
|
-
params[:per_page]
|
21
|
+
if OPTIONS.include?(params[:per_page])
|
22
|
+
params[:per_page]
|
23
|
+
elsif params[:per_page]
|
24
|
+
sorted = OPTIONS.sort
|
25
|
+
params[:per_page].to_i.clamp(sorted.first, sorted.last)
|
26
|
+
else
|
27
|
+
OPTIONS.first
|
28
|
+
end
|
22
29
|
end
|
23
30
|
|
24
31
|
def page_offset
|
@@ -9,12 +9,14 @@ module Decidim
|
|
9
9
|
extend ActiveSupport::Concern
|
10
10
|
|
11
11
|
included do
|
12
|
-
# Yields with the I18n locale changed to the user's one.
|
12
|
+
# Yields with the I18n locale changed to the user's one. It will only
|
13
|
+
# yield if the user has an email, thus avoiding sending emails to deleted
|
14
|
+
# users.
|
13
15
|
#
|
14
16
|
# Returns nothing.
|
15
17
|
def with_user(user)
|
16
18
|
I18n.with_locale(user.locale || user.organization.default_locale) do
|
17
|
-
yield
|
19
|
+
yield if user.email.present?
|
18
20
|
end
|
19
21
|
end
|
20
22
|
|
@@ -7,8 +7,6 @@ module Decidim
|
|
7
7
|
helper Decidim::ResourceHelper
|
8
8
|
|
9
9
|
def event_received(event, event_class_name, resource, user, user_role, extra) # rubocop:disable Metrics/ParameterLists
|
10
|
-
return if user.email.blank?
|
11
|
-
|
12
10
|
with_user(user) do
|
13
11
|
@organization = user.organization
|
14
12
|
event_class = event_class_name.constantize
|
@@ -4,7 +4,7 @@ module Decidim
|
|
4
4
|
class Follow < ApplicationRecord
|
5
5
|
include Decidim::DataPortability
|
6
6
|
|
7
|
-
belongs_to :followable, foreign_key: "decidim_followable_id", foreign_type: "decidim_followable_type", polymorphic: true
|
7
|
+
belongs_to :followable, foreign_key: "decidim_followable_id", foreign_type: "decidim_followable_type", polymorphic: true, counter_cache: true
|
8
8
|
belongs_to :user, foreign_key: "decidim_user_id", class_name: "Decidim::User"
|
9
9
|
|
10
10
|
validates :user, uniqueness: { scope: [:followable] }
|
@@ -37,6 +37,10 @@ module Decidim
|
|
37
37
|
.where("extended_data->>'document_number' = ?", number)
|
38
38
|
end
|
39
39
|
|
40
|
+
def non_deleted_memberships
|
41
|
+
memberships.where(decidim_users: { deleted_at: nil })
|
42
|
+
end
|
43
|
+
|
40
44
|
# Returns the presenter for this author, to be used in the views.
|
41
45
|
# Required by ActsAsAuthor.
|
42
46
|
def presenter
|
@@ -35,7 +35,15 @@
|
|
35
35
|
<% if author_profile_url.present? %>
|
36
36
|
<p><%= link_to @author.name, author_profile_url, target: :blank %></p>
|
37
37
|
<% else %>
|
38
|
-
<p
|
38
|
+
<p>
|
39
|
+
<%=
|
40
|
+
if @author.respond_to?(:name)
|
41
|
+
@author.name
|
42
|
+
elsif @author.respond_to?(:title)
|
43
|
+
translated_attribute(@author.title)
|
44
|
+
end
|
45
|
+
%>
|
46
|
+
</p>
|
39
47
|
<% end %>
|
40
48
|
<% end %>
|
41
49
|
<br>
|
data/config/locales/cs.yml
CHANGED
@@ -379,7 +379,7 @@ cs:
|
|
379
379
|
name: Zástupná část
|
380
380
|
settings:
|
381
381
|
global:
|
382
|
-
amendments_enabled:
|
382
|
+
amendments_enabled: Pozměňovací návrhy povoleny
|
383
383
|
comments_enabled: Komentáře povoleny
|
384
384
|
comments_max_length: Maximální délka komentářů
|
385
385
|
dummy_global_attribute_1: Zástupný atribut 1
|
@@ -686,7 +686,7 @@ cs:
|
|
686
686
|
subject: Váš export "%{name}" je připraven
|
687
687
|
filters:
|
688
688
|
linked_classes:
|
689
|
-
all:
|
689
|
+
all: Vše
|
690
690
|
collaborative_draft: Návrh spolupráce
|
691
691
|
dummy_resource: Dummy prostředky
|
692
692
|
meeting: Setkání
|
@@ -694,10 +694,10 @@ cs:
|
|
694
694
|
proposal: Návrhy
|
695
695
|
result: Výsledky
|
696
696
|
fingerprint:
|
697
|
-
check:
|
697
|
+
check: Ověřit identifikaci
|
698
698
|
explanation: Níže uvedený text je zkráceným, zakódovaným znázorněním tohoto obsahu. Je užitečné zajistit, aby obsah nebyl pozměněn, protože jediná změna by vedla k úplně jiné hodnotě.
|
699
699
|
online_calculator_name: MD5 kalkulačka online
|
700
|
-
replicate_help:
|
700
|
+
replicate_help: Tato digitální identifikace se vypočítá algoritmem SHA256. Abyste ji mohli replikovat sami, můžete použít %{online_calculator_link} a zkopírovat a vložit zdrojová data.
|
701
701
|
source: Zdroj
|
702
702
|
title: Digitální otisk
|
703
703
|
value: Hodnota
|
@@ -1211,7 +1211,7 @@ cs:
|
|
1211
1211
|
currently_selected: Aktuálně vybraný rozsah
|
1212
1212
|
title: Vyberte %{field}
|
1213
1213
|
prompt: Vyberte oblast
|
1214
|
-
scopes:
|
1214
|
+
scopes: Oblasti působnosti
|
1215
1215
|
scopes_picker_input:
|
1216
1216
|
select_scope: 'Vyberte rozsah (v současné době: %{current})'
|
1217
1217
|
search:
|
@@ -1221,12 +1221,12 @@ cs:
|
|
1221
1221
|
searches:
|
1222
1222
|
filters:
|
1223
1223
|
back: Zpět na výsledky
|
1224
|
-
jump_to: '
|
1224
|
+
jump_to: 'Přejít na:'
|
1225
1225
|
state:
|
1226
1226
|
active: Aktivní
|
1227
|
-
all:
|
1228
|
-
future:
|
1229
|
-
past:
|
1227
|
+
all: Vše
|
1228
|
+
future: Budoucí
|
1229
|
+
past: Minulé
|
1230
1230
|
filters_small_view:
|
1231
1231
|
close_modal: Zavřít modální
|
1232
1232
|
filter: Filtr
|
data/config/locales/ro-RO.yml
CHANGED
@@ -35,6 +35,7 @@ ro:
|
|
35
35
|
decidim/profile_updated_event: Profil actualizat
|
36
36
|
decidim/promote_to_admin: Promovat la grupul de administratori
|
37
37
|
decidim/removed_from_group: Eliminat din grup
|
38
|
+
decidim/resource_endorsed_event: Resursă aprobată
|
38
39
|
activerecord:
|
39
40
|
attributes:
|
40
41
|
decidim/user:
|
@@ -68,6 +69,7 @@ ro:
|
|
68
69
|
errors:
|
69
70
|
general: Eroare la procesarea imaginii
|
70
71
|
image_too_big: Imaginea este prea mare
|
72
|
+
not_inside_organization: Fișierul nu este atașat niciunei organizații
|
71
73
|
date:
|
72
74
|
formats:
|
73
75
|
decidim_short: "%d/%m/%Y"
|
@@ -86,6 +88,7 @@ ro:
|
|
86
88
|
file_no_exists: Fișierul nu există
|
87
89
|
notice: Descărcarea datelor dvs. este în curs de desfășurare. Veți primi un e-mail atunci când este completă.
|
88
90
|
delete:
|
91
|
+
alert: Această acțiune nu poate fi anulată. Dacă vă ștergeți contul, nu veți mai putea să vă autentificați cu datele de autentificare. Ștergerea contului dvs. va duce la anonimizarea contribuțiilor dvs. Veți putea crea în continuare un cont nou, dar aceste contribuții nu vor fi asociate cu acesta.
|
89
92
|
confirm:
|
90
93
|
close: Închide fereastra
|
91
94
|
ok: Da, vreau să îmi șterg contul
|
@@ -115,6 +118,8 @@ ro:
|
|
115
118
|
delete: "%{user_name} a eliminat componenta %{resource_name} din spațiul %{space_name}"
|
116
119
|
publish: "%{user_name} a publicat componenta %{resource_name} în spațiul %{space_name}"
|
117
120
|
unpublish: "%{user_name} a anulat publicarea componentei %{resource_name} din spațiul %{space_name}"
|
121
|
+
impersonation_log:
|
122
|
+
manage: "%{user_name} a gestionat %{resource_name} deoarece %{reason}"
|
118
123
|
moderation:
|
119
124
|
hide: "%{user_name} a ascuns o resursă de tip %{resource_type} în spațiul %{space_name}"
|
120
125
|
unreport: "%{user_name} nu a raportat o resursă de tip %{resource_type} în spațiul %{space_name}"
|
@@ -131,6 +136,7 @@ ro:
|
|
131
136
|
update: "%{user_name} a actualizat setările organizației"
|
132
137
|
participatory_space_private_user:
|
133
138
|
create: "%{user_name} a invitat %{resource_name} să fie un participant privat"
|
139
|
+
create_via_csv: "%{user_name} a invitat %{resource_name} prin CSV să fie un participant privat"
|
134
140
|
delete: "%{user_name} a eliminat participantul %{resource_name} ca participant privat"
|
135
141
|
scope:
|
136
142
|
create: "%{user_name} a creat scopul %{resource_name}"
|
@@ -144,15 +150,21 @@ ro:
|
|
144
150
|
delete: "%{user_name} a șters pagina statică %{resource_name}"
|
145
151
|
update: "%{user_name} a actualizat pagina statică %{resource_name}"
|
146
152
|
user:
|
153
|
+
block: "%{user_name} utilizator blocat %{resource_name}"
|
147
154
|
invite: "%{user_name} a invitat participantul %{resource_name} cu rolul: %{role}"
|
148
155
|
officialize: "%{user_name} a oficializat participantul %{resource_name}"
|
156
|
+
promote: "%{user_name} a promovat %{resource_name}"
|
149
157
|
remove_from_admin: "%{user_name} a eliminat participantul %{resource_name} cu rolul: %{role}"
|
150
158
|
show_email: "%{user_name} a recuperat e-mailul participantului %{resource_name}"
|
159
|
+
transfer: "%{user_name} a transferat participantul %{resource_name}"
|
160
|
+
unblock: "%{user_name} utilizator deblocat %{resource_name}"
|
151
161
|
unofficialize: "%{user_name} a neoficializat participantul %{resource_name}"
|
152
162
|
user_group:
|
153
163
|
reject: "%{user_name} a respins verificarea grupului %{resource_name}"
|
154
164
|
verify: "%{user_name} a verificat grupul %{resource_name}"
|
155
165
|
verify_via_csv: "%{user_name} a verificat grupul %{resource_name} printr-un fișier CSV"
|
166
|
+
user_moderation:
|
167
|
+
unreport: "%{user_name} neraportat %{resource_type} - %{unreported_user_name}"
|
156
168
|
admin_terms_of_use:
|
157
169
|
default_body: "<h2>ADMIN TERMENI DE UTILIZARE</h2><p>Avem încredere că ați primit prelegerea obișnuită de la Administratorul de Sistem local. De obicei se reduce la aceste trei lucruri:</p><ol><li>Respectă confidențialitatea altora.</li><li>Gândiți-vă înainte de a da click.</li><li>Cu mare putere vine o mare responsabilitate.</li></ol>"
|
158
170
|
alert:
|
@@ -277,6 +289,8 @@ ro:
|
|
277
289
|
name: Exemplu de autorizare
|
278
290
|
dummy_authorization_workflow:
|
279
291
|
name: Flux de lucru autorizare fictiv
|
292
|
+
errors:
|
293
|
+
duplicate_authorization: Un participant este deja autorizat cu aceleași date. Un administrator vă va contacta pentru a verifica detaliile.
|
280
294
|
expired_at: A expirat la %{timestamp}
|
281
295
|
expires_at: Expiră la %{timestamp}
|
282
296
|
foo_authorization:
|
@@ -324,7 +338,11 @@ ro:
|
|
324
338
|
close_modal: Închide fereastra
|
325
339
|
block_user_mailer:
|
326
340
|
notify:
|
341
|
+
body_1: Contul tău a fost blocat.
|
342
|
+
body_2: 'Motiv: %{justification}'
|
343
|
+
greetings: Bună ziua, <br/>%{organization_name} <br/><a href="%{organization_url}">%{organization_url}</a>
|
327
344
|
hello: Salut,
|
345
|
+
subject: Contul tău a fost blocat de %{organization_name}
|
328
346
|
collapsible_list:
|
329
347
|
hidden_elements_count:
|
330
348
|
one: și încă %{count}
|
@@ -361,6 +379,8 @@ ro:
|
|
361
379
|
dummy_global_translatable_text: Text traductibil Dummy
|
362
380
|
enable_pads_creation: Activează crearea de pad-uri
|
363
381
|
resources_permissions_enabled: Permisiuni resurse activate
|
382
|
+
scope_id: Domeniu de interes
|
383
|
+
scopes_enabled: Domenii de interes activate
|
364
384
|
step:
|
365
385
|
amendment_creation_enabled: Crearea de amendamente activată
|
366
386
|
amendment_promotion_enabled: Modificare promoție activată
|
@@ -372,8 +392,12 @@ ro:
|
|
372
392
|
dummy_step_translatable_text: Text traductibil paşi fichar@@0ier
|
373
393
|
contact: Contact
|
374
394
|
content_blocks:
|
395
|
+
cta:
|
396
|
+
name: Butonul Imagine, Text și Apel la Acțiune
|
375
397
|
cta_settings_form:
|
376
398
|
background_image: Imagine de fundal
|
399
|
+
button_text: Textul butonului de Apel la acțiune
|
400
|
+
button_url: Adresă URL Acțiune
|
377
401
|
description: Descriere
|
378
402
|
footer_sub_hero:
|
379
403
|
name: Banner suberou suberou
|
@@ -413,6 +437,7 @@ ro:
|
|
413
437
|
ready: Gata
|
414
438
|
show:
|
415
439
|
download_data: Descarcă datele
|
440
|
+
download_data_description: Un fișier care conține toate informațiile asociate contului dvs. va fi trimis la <strong>%{user_email}</strong>. Acest e-mail va conține un fișier .zip și o parolă pentru a-l deschide.<br/><br/>Pentru a dezarhiva fişierul, aveţi nevoie de <a href="https://www.7-zip.org/">7-Zip</a> (pentru Windows) sau <a href="https://www.keka.io/">Keka</a> (pentru MacOS). Dacă utilizați Linux, de cele mai multe ori îl veți instala în mod implicit. Dacă nu, puteți utiliza <a href="https://gitlab.gnome.org/GNOME/file-roller">File Roller</a> sau <a href="https://peazip.github.io">PeaZip</a>).
|
416
441
|
request_data: Solicită date
|
417
442
|
datepicker:
|
418
443
|
help_text: 'Format preconizat: %{datepicker_format}'
|
@@ -422,6 +447,7 @@ ro:
|
|
422
447
|
email_already_exists: Un alt cont folosește aceeași adresă de e-mail
|
423
448
|
new:
|
424
449
|
complete_profile: Profil complet
|
450
|
+
nickname_help: Aliasul tău în %{organization}. Poate conține doar litere, numere, '-' și '_'.
|
425
451
|
sign_up: Vă rugăm să completați profilul
|
426
452
|
subtitle: Vă rugăm să completaţi următorul formular pentru a finaliza înregistrarea
|
427
453
|
username_help: Numele public care apare pe posturi. Cu scopul de a garanta anonimitatea, poate fi orice nume.
|
@@ -430,6 +456,7 @@ ro:
|
|
430
456
|
already_have_an_account?: Ai deja un cont?
|
431
457
|
newsletter: Primiți un buletin informativ ocazional cu informații relevante
|
432
458
|
newsletter_title: Permisiune contact
|
459
|
+
nickname_help: Aliasul tău în %{organization}. Poate conține doar litere, numere, '-' și '_'.
|
433
460
|
password_help: "minim %{minimun_characters} caractere, nu trebuie să fie prea comune (ex. 123456) și trebuie să fie diferite de porecla și adresa dvs. de e-mail."
|
434
461
|
sign_in: Autentificare
|
435
462
|
sign_up: Înscrie-te
|
@@ -446,6 +473,8 @@ ro:
|
|
446
473
|
register: Creează un cont
|
447
474
|
sign_in_disabled: Puteți accesa un cont extern
|
448
475
|
sign_up_disabled: Înregistrarea este dezactivată, puteți utiliza un cont existent pentru a accesa
|
476
|
+
user:
|
477
|
+
timed_out: Ați fost inactiv pentru prea mult timp și ați fost deconectat automat de la serviciu. Dacă doriți să continuați să utilizați serviciul, vă rugăm să vă conectați din nou.
|
449
478
|
shared:
|
450
479
|
newsletter_modal:
|
451
480
|
buttons:
|
@@ -621,6 +650,14 @@ ro:
|
|
621
650
|
notification_title: Grupul de utilizatori %{user_group_name} și-a actualizat profilul, lăsând neverificat. Acum îl puteți verifica în panoul <a href="%{groups_admin_path}">de administratori</a>.
|
622
651
|
notification_event:
|
623
652
|
notification_title: A apărut un eveniment pentru <a href="%{resource_path}">%{resource_title}</a>.
|
653
|
+
reports:
|
654
|
+
resource_hidden:
|
655
|
+
email_intro: Un administrator a eliminat %{resource_type} deoarece a fost raportat ca %{report_reasons}.
|
656
|
+
email_outro: Ați primit această notificare deoarece sunteți un autor al conținutului șters.
|
657
|
+
email_subject: '%{resource_type} tău a fost eliminat'
|
658
|
+
notification_title: |-
|
659
|
+
Un administrator a eliminat %{resource_type} deoarece a fost raportat ca %{report_reasons}.</br>
|
660
|
+
<i>%{resource_content}</i>
|
624
661
|
resource_endorsed:
|
625
662
|
email_intro: '%{endorser_name} %{endorser_nickname}, pe care îl urmărești, tocmai a aprobat „%{resource_title}” și noi credem că ar putea fi interesant pentru tine. Verificați și contribuția:'
|
626
663
|
email_outro: Ați primit această notificare deoarece urmăriți %{endorser_nickname}. Puteți înceta să primiți notificări urmând linkul anterior.
|
@@ -634,6 +671,7 @@ ro:
|
|
634
671
|
notification_title: Pagina de profil <a href="%{resource_path}"></a> din %{name} (%{nickname}), pe care o urmărești, a fost actualizată.
|
635
672
|
export_mailer:
|
636
673
|
data_portability_export:
|
674
|
+
click_button: 'Faceți clic pe următorul link pentru a descărca datele.<br/>Fișierul va fi disponibil până la %{date}.<br/>Veţi avea nevoie de <a href="https://www.7-zip.org/">7-Zip</a> (pentru Windows), <a href="https://www.keka.io/en/">Keka</a> (pentru MacOS) sau <a href="https://peazip.github.io">PeaZip</a> (pentru Linux) pentru a-l deschide. Parola: %{password}'
|
637
675
|
download: Descărcare
|
638
676
|
export:
|
639
677
|
ready: Găsiți atașat o versiune zip a exportului dvs.
|
@@ -667,6 +705,7 @@ ro:
|
|
667
705
|
create:
|
668
706
|
button: Urmărește
|
669
707
|
error: A apărut o problemă la urmărirea acestei resurse.
|
708
|
+
participatory_space: Urmăriți<span class="show-for-sr">%{resource_name}</span>
|
670
709
|
destroy:
|
671
710
|
button: Oprește urmărirea
|
672
711
|
error: A apărut o problemă la neurmărirea acestei resurse.
|
@@ -683,6 +722,7 @@ ro:
|
|
683
722
|
file:
|
684
723
|
explanation: 'Orientări pentru fișier:'
|
685
724
|
message_1: Are o imagine sau un document.
|
725
|
+
message_2: Pentru imagini, utilizați preferabil imagini de peisaj, serviciul decupează imaginea. Pentru fisierele CSV, separatorul dintre coloane trebuie sa fie o virgula (",")
|
686
726
|
image:
|
687
727
|
explanation: 'Orientări pentru imagine:'
|
688
728
|
message_1: Recomandat o imagine peisaj care nu are nici un text.
|
@@ -903,7 +943,10 @@ ro:
|
|
903
943
|
create:
|
904
944
|
error: Conversația nu a început. Încercați din nou mai târziu
|
905
945
|
error_modal:
|
946
|
+
close: Închidere
|
906
947
|
correct_errors: Te rugăm să remediezi erorile și să încerci din nou.
|
948
|
+
intro: 'Au existat următoarele erori cu mesajul tău:'
|
949
|
+
ok: Ok
|
907
950
|
index:
|
908
951
|
ago: acum
|
909
952
|
close: Închide fereastra
|
@@ -921,6 +964,7 @@ ro:
|
|
921
964
|
show:
|
922
965
|
back: Înapoi la toate conversațiile
|
923
966
|
chat_with: Conversație cu
|
967
|
+
not_allowed: Acest participant nu acceptă mesaje directe.
|
924
968
|
title: Conversație cu %{usernames}
|
925
969
|
start:
|
926
970
|
send: Trimite
|
@@ -928,6 +972,8 @@ ro:
|
|
928
972
|
update:
|
929
973
|
error: Mesajul nu a fost trimis din cauza unei erori
|
930
974
|
metrics:
|
975
|
+
download:
|
976
|
+
csv: Descărcare date (CSV)
|
931
977
|
followers:
|
932
978
|
description: Numărul de participanți care urmăresc acest spațiu de participare
|
933
979
|
object: urmăritori
|
@@ -992,6 +1038,7 @@ ro:
|
|
992
1038
|
administrators: Administratori
|
993
1039
|
allow_public_contact: Permiteți oricui să îmi trimită un mesaj direct, chiar dacă nu-l urmăresc.
|
994
1040
|
direct_messages: Primește mesaje directe de la oricine
|
1041
|
+
email_on_moderations: Vreau să primesc un e-mail de fiecare dată când se raportează ceva pentru moderare.
|
995
1042
|
email_on_notification: Vreau să primesc un e-mail de fiecare dată când primesc o notificare.
|
996
1043
|
everything_followed: Tot ce urmăresc
|
997
1044
|
newsletter_notifications: Vreau să primesc buletine informative
|
@@ -1087,6 +1134,7 @@ ro:
|
|
1087
1134
|
not_allowed: Nu aveţi permisiunea să vizualizaţi acest conţinut
|
1088
1135
|
profile:
|
1089
1136
|
deleted: Participant șters
|
1137
|
+
inaccessible_message: Acest profil este inaccesibil din cauza încălcării Termenilor și Condițiilor!
|
1090
1138
|
view: Vizualizare
|
1091
1139
|
profiles:
|
1092
1140
|
default_officialization_text_for_user_groups: Acest grup este verificat public, numele său a fost verificat pentru a corespunde cu numele său real
|
@@ -1100,6 +1148,7 @@ ro:
|
|
1100
1148
|
groups: Grupuri
|
1101
1149
|
members: Membri
|
1102
1150
|
officialized: Participant oficial
|
1151
|
+
send_private_message: Trimite mesaj privat
|
1103
1152
|
timeline: Cronologie
|
1104
1153
|
view_full_profile: Vezi profilul complet
|
1105
1154
|
sidebar:
|
@@ -1127,12 +1176,15 @@ ro:
|
|
1127
1176
|
report:
|
1128
1177
|
authors: Autori
|
1129
1178
|
content: Conținut raportat
|
1179
|
+
content_original_language: Limba originală a conținutului
|
1130
1180
|
date: Raportat la
|
1131
1181
|
details: Detalii
|
1132
1182
|
hello: Bună ziua %{name},
|
1183
|
+
id: ID
|
1133
1184
|
participatory_space: Spaţiu participativ
|
1134
1185
|
reason: Motiv
|
1135
1186
|
report_html: <p>A fost raportat următorul <a href="%{url}">conținut</a> .</p>
|
1187
|
+
see_report: Vezi raportul
|
1136
1188
|
subject: A fost raportată o resursă
|
1137
1189
|
reports:
|
1138
1190
|
create:
|
@@ -1177,6 +1229,10 @@ ro:
|
|
1177
1229
|
few: "%{count} rezultate"
|
1178
1230
|
other: "%{count} rezultate"
|
1179
1231
|
view_all: Vezi toate (%{count})
|
1232
|
+
security:
|
1233
|
+
selfxss_warning:
|
1234
|
+
description: Această caracteristică de browser este destinată dezvoltatorilor și nu ar trebui să inserați nimic aici dacă vi s-a cerut să faceți acest lucru. Lipirea conținutului în această fereastră poate compromite intimitatea ta și permite hackerilor să îți acceseze contul.
|
1235
|
+
title: Opriți!
|
1180
1236
|
shared:
|
1181
1237
|
confirm_modal:
|
1182
1238
|
cancel: Anulează
|
@@ -1202,6 +1258,13 @@ ro:
|
|
1202
1258
|
report: Raport
|
1203
1259
|
spam: Conține clickbait, publicitate, escrocherii sau roboți script.
|
1204
1260
|
title: Raportează o problemă
|
1261
|
+
flag_user_modal:
|
1262
|
+
already_reported: Acest conținut este deja raportat și va fi revizuit de către un administrator.
|
1263
|
+
close: Inchide
|
1264
|
+
description: Ce este nepotrivit pentru utilizator?
|
1265
|
+
does_not_belong: Conține activitate ilegală, amenințări de sinucidere, informații personale sau altceva care credeți că nu aparțin de %{organization_name}.
|
1266
|
+
offensive: Conține rasism, sexism, insulte, atacuri personale, amenințări cu moartea, cereri de sinucidere sau orice formă de discurs de incitare la ură.
|
1267
|
+
report: Raportează
|
1205
1268
|
floating_help:
|
1206
1269
|
close: Închide Ajutor
|
1207
1270
|
help: Ajutor
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class AddFollowableCounterCacheToUsers < ActiveRecord::Migration[5.2]
|
4
|
+
def change
|
5
|
+
add_column :decidim_users, :follows_count, :integer, null: false, default: 0, index: true
|
6
|
+
|
7
|
+
reversible do |dir|
|
8
|
+
dir.up do
|
9
|
+
Decidim::User.reset_column_information
|
10
|
+
Decidim::User.find_each do |record|
|
11
|
+
record.class.reset_counters(record.id, :follows)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -7,7 +7,7 @@ module Decidim
|
|
7
7
|
include Decidim::Api::Types::BaseInterface
|
8
8
|
description "An interface that can be used in categorizable objects."
|
9
9
|
|
10
|
-
field :category, Decidim::Core::CategoryType, "The object's category", null:
|
10
|
+
field :category, Decidim::Core::CategoryType, "The object's category", null: true
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
data/lib/decidim/core/test.rb
CHANGED
@@ -22,7 +22,6 @@ require "decidim/core/test/shared_examples/reports_examples"
|
|
22
22
|
require "decidim/core/test/shared_examples/paginated_resource_examples"
|
23
23
|
require "decidim/core/test/shared_examples/errors"
|
24
24
|
require "decidim/core/test/shared_examples/scope_helper_examples"
|
25
|
-
require "decidim/core/test/shared_examples/user_localised_email_examples"
|
26
25
|
require "decidim/core/test/shared_examples/follows_examples"
|
27
26
|
require "decidim/core/test/shared_examples/simple_event"
|
28
27
|
require "decidim/core/test/shared_examples/component_type"
|
@@ -5,15 +5,23 @@ require "spec_helper"
|
|
5
5
|
shared_examples_for "categorizable interface" do
|
6
6
|
let!(:category) { create(:category, participatory_space: model.participatory_space) }
|
7
7
|
|
8
|
-
before do
|
9
|
-
model.update(category: category)
|
10
|
-
end
|
11
|
-
|
12
8
|
describe "category" do
|
13
9
|
let(:query) { "{ category { id } }" }
|
14
10
|
|
15
|
-
|
16
|
-
|
11
|
+
context "when model has category" do
|
12
|
+
before do
|
13
|
+
model.update(category: category)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "has a category" do
|
17
|
+
expect(response).to include("category" => { "id" => category.id.to_s })
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
context "when model has no category" do
|
22
|
+
it "returns null" do
|
23
|
+
expect(response).to include("category" => nil)
|
24
|
+
end
|
17
25
|
end
|
18
26
|
end
|
19
27
|
end
|
@@ -22,4 +22,12 @@ shared_examples "localised email" do
|
|
22
22
|
expect(mail.body.encoded).to match(default_body)
|
23
23
|
end
|
24
24
|
end
|
25
|
+
|
26
|
+
context "when the user doesn't have an email" do
|
27
|
+
let(:user) { create(:user, :deleted) }
|
28
|
+
|
29
|
+
it "does nothing" do
|
30
|
+
expect(mail.deliver_now).to be_nil
|
31
|
+
end
|
32
|
+
end
|
25
33
|
end
|
data/lib/decidim/core/version.rb
CHANGED
data/lib/decidim/followable.rb
CHANGED
@@ -6,7 +6,12 @@ module Decidim
|
|
6
6
|
extend ActiveSupport::Concern
|
7
7
|
|
8
8
|
included do
|
9
|
-
has_many :follows,
|
9
|
+
has_many :follows,
|
10
|
+
as: :followable,
|
11
|
+
foreign_key: "decidim_followable_id",
|
12
|
+
foreign_type: "decidim_followable_type",
|
13
|
+
class_name: "Decidim::Follow",
|
14
|
+
counter_cache: :follows_count
|
10
15
|
has_many :followers, through: :follows, source: :user
|
11
16
|
end
|
12
17
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.24.0
|
4
|
+
version: 0.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josep Jaume Rey Peroy
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-03-
|
13
|
+
date: 2021-03-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: active_link_to
|
@@ -858,28 +858,28 @@ dependencies:
|
|
858
858
|
requirements:
|
859
859
|
- - '='
|
860
860
|
- !ruby/object:Gem::Version
|
861
|
-
version: 0.24.0
|
861
|
+
version: 0.24.0
|
862
862
|
type: :runtime
|
863
863
|
prerelease: false
|
864
864
|
version_requirements: !ruby/object:Gem::Requirement
|
865
865
|
requirements:
|
866
866
|
- - '='
|
867
867
|
- !ruby/object:Gem::Version
|
868
|
-
version: 0.24.0
|
868
|
+
version: 0.24.0
|
869
869
|
- !ruby/object:Gem::Dependency
|
870
870
|
name: decidim-dev
|
871
871
|
requirement: !ruby/object:Gem::Requirement
|
872
872
|
requirements:
|
873
873
|
- - '='
|
874
874
|
- !ruby/object:Gem::Version
|
875
|
-
version: 0.24.0
|
875
|
+
version: 0.24.0
|
876
876
|
type: :development
|
877
877
|
prerelease: false
|
878
878
|
version_requirements: !ruby/object:Gem::Requirement
|
879
879
|
requirements:
|
880
880
|
- - '='
|
881
881
|
- !ruby/object:Gem::Version
|
882
|
-
version: 0.24.0
|
882
|
+
version: 0.24.0
|
883
883
|
description: Adds core features so other engines can hook into the framework.
|
884
884
|
email:
|
885
885
|
- josepjaume@gmail.com
|
@@ -955,6 +955,7 @@ files:
|
|
955
955
|
- app/assets/javascripts/decidim/form_filter.component.test.js
|
956
956
|
- app/assets/javascripts/decidim/form_validator.es6
|
957
957
|
- app/assets/javascripts/decidim/foundation.js.es6
|
958
|
+
- app/assets/javascripts/decidim/gallery.js.es6
|
958
959
|
- app/assets/javascripts/decidim/geocoding.js.es6
|
959
960
|
- app/assets/javascripts/decidim/geocoding/attach_input.js.es6
|
960
961
|
- app/assets/javascripts/decidim/geocoding/format_address.js.es6
|
@@ -2191,6 +2192,7 @@ files:
|
|
2191
2192
|
- db/migrate/20201218145252_rename_decidim_user_fields_for_block_functionality.rb
|
2192
2193
|
- db/migrate/20210208134328_add_email_on_moderations_to_users.rb
|
2193
2194
|
- db/migrate/20210302150803_invalidate_all_sessions_for_deleted_users.rb
|
2195
|
+
- db/migrate/20210310120640_add_followable_counter_cache_to_users.rb
|
2194
2196
|
- db/seeds.rb
|
2195
2197
|
- db/seeds/homepage_image.jpg
|
2196
2198
|
- lib/decidim/action_authorization.rb
|
@@ -2374,7 +2376,6 @@ files:
|
|
2374
2376
|
- lib/decidim/core/test/shared_examples/timestamps_interface_examples.rb
|
2375
2377
|
- lib/decidim/core/test/shared_examples/traceable_interface_examples.rb
|
2376
2378
|
- lib/decidim/core/test/shared_examples/uncommentable_component_examples.rb
|
2377
|
-
- lib/decidim/core/test/shared_examples/user_localised_email_examples.rb
|
2378
2379
|
- lib/decidim/core/test/shared_examples/with_endorsable_permissions_examples.rb
|
2379
2380
|
- lib/decidim/core/version.rb
|
2380
2381
|
- lib/decidim/data_portability.rb
|
@@ -2591,9 +2592,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2591
2592
|
version: '2.7'
|
2592
2593
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2593
2594
|
requirements:
|
2594
|
-
- - "
|
2595
|
+
- - ">="
|
2595
2596
|
- !ruby/object:Gem::Version
|
2596
|
-
version:
|
2597
|
+
version: '0'
|
2597
2598
|
requirements: []
|
2598
2599
|
rubygems_version: 3.1.2
|
2599
2600
|
signing_key:
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "spec_helper"
|
4
|
-
|
5
|
-
shared_examples "user localised email" do
|
6
|
-
let(:user) { create(:user, locale: locale, organization: organization) }
|
7
|
-
|
8
|
-
context "when the user has a custom locale" do
|
9
|
-
let(:locale) { "ca" }
|
10
|
-
|
11
|
-
it "uses the user's locale" do
|
12
|
-
expect(mail.subject).to eq(subject)
|
13
|
-
expect(mail.body.encoded).to match(body)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
context "when the user does not have a custom locale" do
|
18
|
-
let(:locale) { nil }
|
19
|
-
|
20
|
-
it "uses the default locale" do
|
21
|
-
expect(mail.subject).to eq(default_subject)
|
22
|
-
expect(mail.body.encoded).to match(default_body)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|