decidim-comments 0.23.2 → 0.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/decidim/comments/bundle.js.map +1 -1
  3. data/app/assets/javascripts/decidim/comments/comments.component.js.es6 +292 -0
  4. data/app/assets/javascripts/decidim/comments/comments.component.test.js +581 -0
  5. data/app/assets/javascripts/decidim/comments/comments.js.erb +1 -1
  6. data/app/cells/decidim/comments/comment/actions.erb +7 -0
  7. data/app/cells/decidim/comments/comment/alignment_badge.erb +4 -0
  8. data/app/cells/decidim/comments/comment/author.erb +1 -0
  9. data/app/cells/decidim/comments/comment/show.erb +40 -0
  10. data/app/cells/decidim/comments/comment/utilities.erb +13 -0
  11. data/app/cells/decidim/comments/comment/votes.erb +25 -0
  12. data/app/cells/decidim/comments/comment_card_cell.rb +22 -0
  13. data/app/cells/decidim/comments/comment_cell.rb +142 -8
  14. data/app/cells/decidim/comments/comment_form/comment_as.erb +10 -0
  15. data/app/cells/decidim/comments/comment_form/show.erb +24 -0
  16. data/app/cells/decidim/comments/comment_form_cell.rb +94 -0
  17. data/app/cells/decidim/comments/comment_m/top.erb +1 -1
  18. data/app/cells/decidim/comments/comment_thread/show.erb +6 -0
  19. data/app/cells/decidim/comments/comment_thread/title.erb +3 -0
  20. data/app/cells/decidim/comments/comment_thread_cell.rb +30 -0
  21. data/app/cells/decidim/comments/comments/add_comment.erb +30 -0
  22. data/app/cells/decidim/comments/comments/blocked_comments_warning.erb +3 -0
  23. data/app/cells/decidim/comments/comments/order_control.erb +37 -0
  24. data/app/cells/decidim/comments/comments/show.erb +32 -0
  25. data/app/cells/decidim/comments/comments/single_comment_warning.erb +9 -0
  26. data/app/cells/decidim/comments/comments/user_comments_blocked_warning.erb +3 -0
  27. data/app/cells/decidim/comments/comments_cell.rb +134 -0
  28. data/app/commands/decidim/comments/vote_comment.rb +34 -10
  29. data/app/controllers/decidim/comments/application_controller.rb +16 -0
  30. data/app/controllers/decidim/comments/comments_controller.rb +122 -0
  31. data/app/controllers/decidim/comments/votes_controller.rb +41 -0
  32. data/app/events/decidim/comments/comment_created_event.rb +1 -1
  33. data/app/events/decidim/comments/comment_downvoted_event.rb +8 -0
  34. data/app/events/decidim/comments/comment_upvoted_event.rb +8 -0
  35. data/app/events/decidim/comments/comment_voted_event.rb +26 -0
  36. data/app/forms/decidim/comments/comment_form.rb +6 -2
  37. data/app/models/decidim/comments/comment.rb +22 -6
  38. data/app/models/decidim/comments/seed.rb +1 -1
  39. data/app/permissions/decidim/comments/permissions.rb +59 -0
  40. data/app/queries/decidim/comments/metrics/comment_participants_metric_measure.rb +2 -2
  41. data/app/queries/decidim/comments/metrics/comments_metric_manage.rb +5 -6
  42. data/app/queries/decidim/comments/sorted_comments.rb +18 -14
  43. data/app/views/decidim/comments/comments/_comment.html.erb +5 -0
  44. data/app/views/decidim/comments/comments/_comments.html.erb +1 -0
  45. data/app/views/decidim/comments/comments/create.js.erb +16 -0
  46. data/app/views/decidim/comments/comments/error.js.erb +1 -0
  47. data/app/views/decidim/comments/comments/index.js.erb +24 -0
  48. data/app/views/decidim/comments/comments/reload.js.erb +21 -0
  49. data/app/views/decidim/comments/votes/create.js.erb +23 -0
  50. data/app/views/decidim/comments/votes/error.js.erb +1 -0
  51. data/config/locales/ar.yml +0 -2
  52. data/config/locales/ca.yml +17 -2
  53. data/config/locales/cs.yml +19 -2
  54. data/config/locales/de.yml +17 -2
  55. data/config/locales/el.yml +0 -2
  56. data/config/locales/en.yml +17 -2
  57. data/config/locales/es-MX.yml +17 -2
  58. data/config/locales/es-PY.yml +17 -2
  59. data/config/locales/es.yml +17 -2
  60. data/config/locales/eu.yml +0 -2
  61. data/config/locales/fi-plain.yml +17 -2
  62. data/config/locales/fi.yml +17 -2
  63. data/config/locales/fr-CA.yml +17 -2
  64. data/config/locales/fr.yml +17 -2
  65. data/config/locales/gl.yml +7 -2
  66. data/config/locales/hu.yml +0 -2
  67. data/config/locales/id-ID.yml +0 -2
  68. data/config/locales/is-IS.yml +0 -1
  69. data/config/locales/it.yml +4 -2
  70. data/config/locales/ja.yml +9 -5
  71. data/config/locales/lv.yml +0 -2
  72. data/config/locales/nl.yml +0 -2
  73. data/config/locales/no.yml +0 -2
  74. data/config/locales/pl.yml +21 -4
  75. data/config/locales/pt-BR.yml +0 -2
  76. data/config/locales/pt.yml +0 -2
  77. data/config/locales/ro-RO.yml +15 -2
  78. data/config/locales/ru.yml +0 -2
  79. data/config/locales/sk.yml +0 -2
  80. data/config/locales/sv.yml +7 -2
  81. data/config/locales/tr-TR.yml +7 -2
  82. data/config/locales/uk.yml +0 -1
  83. data/config/locales/zh-CN.yml +0 -2
  84. data/lib/decidim/api/add_comment_type.rb +13 -0
  85. data/lib/decidim/api/comment_mutation_type.rb +22 -0
  86. data/lib/decidim/api/comment_type.rb +89 -0
  87. data/lib/decidim/api/commentable_interface.rb +50 -0
  88. data/lib/decidim/api/commentable_mutation_type.rb +30 -0
  89. data/{app/types/decidim/comments → lib/decidim/api}/commentable_type.rb +2 -5
  90. data/lib/decidim/comments.rb +1 -3
  91. data/lib/decidim/comments/api.rb +12 -0
  92. data/lib/decidim/comments/comments_helper.rb +10 -52
  93. data/lib/decidim/comments/engine.rb +9 -7
  94. data/lib/decidim/comments/mutation_extensions.rb +22 -22
  95. data/lib/decidim/comments/query_extensions.rb +12 -14
  96. data/lib/decidim/comments/test.rb +1 -0
  97. data/lib/decidim/comments/test/shared_examples/comment_voted_event.rb +65 -0
  98. data/lib/decidim/comments/version.rb +1 -1
  99. metadata +65 -64
  100. data/app/assets/javascripts/decidim/comments/bundle.js +0 -268
  101. data/app/frontend/application/apollo_client.ts +0 -12
  102. data/app/frontend/application/application.component.test.tsx +0 -23
  103. data/app/frontend/application/application.component.tsx +0 -35
  104. data/app/frontend/application/icon.component.test.tsx +0 -38
  105. data/app/frontend/application/icon.component.tsx +0 -46
  106. data/app/frontend/comments/add_comment_form.component.test.tsx +0 -265
  107. data/app/frontend/comments/add_comment_form.component.tsx +0 -482
  108. data/app/frontend/comments/comment.component.test.tsx +0 -490
  109. data/app/frontend/comments/comment.component.tsx +0 -677
  110. data/app/frontend/comments/comment_order_selector.component.test.tsx +0 -29
  111. data/app/frontend/comments/comment_order_selector.component.tsx +0 -106
  112. data/app/frontend/comments/comment_thread.component.test.tsx +0 -82
  113. data/app/frontend/comments/comment_thread.component.tsx +0 -81
  114. data/app/frontend/comments/comments.component.test.tsx +0 -150
  115. data/app/frontend/comments/comments.component.tsx +0 -289
  116. data/app/frontend/comments/down_vote_button.component.test.tsx +0 -59
  117. data/app/frontend/comments/down_vote_button.component.tsx +0 -133
  118. data/app/frontend/comments/up_vote_button.component.test.tsx +0 -59
  119. data/app/frontend/comments/up_vote_button.component.tsx +0 -133
  120. data/app/frontend/comments/vote_button.component.tsx +0 -50
  121. data/app/frontend/comments/vote_button_component.test.tsx +0 -64
  122. data/app/frontend/entry.ts +0 -38
  123. data/app/frontend/entry_test.ts +0 -6
  124. data/app/frontend/fragments/add_comment_form_commentable.fragment.graphql +0 -4
  125. data/app/frontend/fragments/add_comment_form_session.fragment.graphql +0 -6
  126. data/app/frontend/fragments/comment.fragment.graphql +0 -14
  127. data/app/frontend/fragments/comment_data.fragment.graphql +0 -27
  128. data/app/frontend/fragments/comment_thread.fragment.graphql +0 -6
  129. data/app/frontend/fragments/down_vote_button.fragment.graphql +0 -6
  130. data/app/frontend/fragments/up_vote_button.fragment.graphql +0 -6
  131. data/app/frontend/mutations/add_comment.mutation.graphql +0 -9
  132. data/app/frontend/mutations/down_vote.mutation.graphql +0 -9
  133. data/app/frontend/mutations/up_vote.mutation.graphql +0 -9
  134. data/app/frontend/queries/comments.query.graphql +0 -26
  135. data/app/frontend/support/asset_url.ts +0 -11
  136. data/app/frontend/support/generate_comments_data.ts +0 -49
  137. data/app/frontend/support/generate_user_data.ts +0 -14
  138. data/app/frontend/support/generate_user_group_data.ts +0 -14
  139. data/app/frontend/support/graphql_transformer.js +0 -32
  140. data/app/frontend/support/load_translations.ts +0 -48
  141. data/app/frontend/support/require_all.ts +0 -10
  142. data/app/frontend/support/resolve_graphql_query.ts +0 -37
  143. data/app/frontend/support/schema.ts +0 -2026
  144. data/app/types/decidim/comments/commentable_interface.rb +0 -61
  145. data/app/types/decidim/comments/commentable_mutation_type.rb +0 -33
  146. data/lib/decidim/comments/api/add_comment_type.rb +0 -13
  147. data/lib/decidim/comments/api/comment_mutation_type.rb +0 -20
  148. data/lib/decidim/comments/api/comment_type.rb +0 -89
@@ -16,8 +16,11 @@ gl:
16
16
  other: Votos
17
17
  decidim:
18
18
  comments:
19
- comments: Comentarios
19
+ comments:
20
+ create:
21
+ error: Produciuse un problema ao crear o comentario.
20
22
  comments_count: Número de comentarios
23
+ comments_title: Comentarios
21
24
  last_activity:
22
25
  new_comment_at_html: "<span>Novo comentario en %{link}</span>"
23
26
  view: Ver
@@ -76,7 +79,9 @@ gl:
76
79
  loading: Cargando comentarios ...
77
80
  single_comment_warning: Podes revisar os comentarios restantes <a href="%{url}">aquí</a>.
78
81
  single_comment_warning_title: Estás a ver un único comentario
79
- title: "%{count} comentarios"
82
+ title:
83
+ one: "%{count} comentario"
84
+ other: "%{count} comentarios"
80
85
  down_vote_button:
81
86
  text: Non estou de acordo con este comentario
82
87
  up_vote_button:
@@ -16,7 +16,6 @@ hu:
16
16
  other: Szavazatok
17
17
  decidim:
18
18
  comments:
19
- comments: Hozzászólások
20
19
  last_activity:
21
20
  new_comment_at_html: "<span>Új megjegyzés: %{link}</span>"
22
21
  votes:
@@ -73,7 +72,6 @@ hu:
73
72
  loading: Hozzászólások betöltése ...
74
73
  single_comment_warning: A többi hozzászólást <a href="%{url}">itt</a> ellenőrizheti.
75
74
  single_comment_warning_title: Egyetlen megjegyzést látsz
76
- title: "%{count} megjegyzés"
77
75
  events:
78
76
  comments:
79
77
  comment_by_followed_user:
@@ -14,7 +14,6 @@ id:
14
14
  other: Voting
15
15
  decidim:
16
16
  comments:
17
- comments: Komentar
18
17
  last_activity:
19
18
  new_comment_at_html: "<span>Komentar baru di %{link}</span>"
20
19
  votes:
@@ -65,7 +64,6 @@ id:
65
64
  blocked_comments_for_user_warning: Anda tidak dapat berkomentar saat ini, tetapi Anda dapat membaca yang sebelumnya.
66
65
  blocked_comments_warning: Komentar dinonaktifkan saat ini, tetapi Anda dapat membaca yang sebelumnya.
67
66
  loading: Memuat komentar ...
68
- title: "%{count} komentar"
69
67
  events:
70
68
  comments:
71
69
  comment_by_followed_user:
@@ -43,7 +43,6 @@ is-IS:
43
43
  comments:
44
44
  blocked_comments_warning: Athugasemdir eru gerðar óvirkar á þessum tíma, en þú getur lesið þau fyrri.
45
45
  loading: Hleð inn athugasemdir ...
46
- title: "%{count} athugasemdir"
47
46
  events:
48
47
  comments:
49
48
  comment_by_followed_user:
@@ -16,8 +16,11 @@ it:
16
16
  other: voti
17
17
  decidim:
18
18
  comments:
19
- comments: Commenti
19
+ comments:
20
+ create:
21
+ error: Ci sono stati problemi durante la creazione del commento.
20
22
  comments_count: Conteggio dei Commenti
23
+ comments_title: Commenti
21
24
  last_activity:
22
25
  new_comment_at_html: "<span>Nuovo commento al %{link}</span>"
23
26
  view: Visualizza
@@ -76,7 +79,6 @@ it:
76
79
  loading: Sto caricando i commenti ...
77
80
  single_comment_warning: Puoi controllare il resto dei commenti <a href="%{url}">qui</a>.
78
81
  single_comment_warning_title: Stai vedendo un singolo commento
79
- title: "%{count} commenti"
80
82
  down_vote_button:
81
83
  text: Non sono d'accordo con questo commento
82
84
  up_vote_button:
@@ -14,8 +14,11 @@ ja:
14
14
  other: 投票
15
15
  decidim:
16
16
  comments:
17
- comments: コメント
17
+ comments:
18
+ create:
19
+ error: コメントの登録に問題がありました。
18
20
  comments_count: コメント数
21
+ comments_title: コメント
19
22
  last_activity:
20
23
  new_comment_at_html: "<span> %{link}に新しいコメント</span>"
21
24
  view: 表示
@@ -24,7 +27,7 @@ ja:
24
27
  error: コメントに投票中に問題がありました。
25
28
  components:
26
29
  add_comment_form:
27
- account_message: <a href="%{sign_in_url}">あなたのアカウントでログインする</a> か、 <a href="%{sign_up_url}">ユーザー登録</a> してコメントを追加します。
30
+ account_message: <a href="%{sign_in_url}">ログイン</a> または <a href="%{sign_up_url}">新規登録</a> することでコメントできます。
28
31
  form:
29
32
  body:
30
33
  label: コメント
@@ -72,9 +75,10 @@ ja:
72
75
  blocked_comments_warning: コメントは現時点で無効になっていますが、以前のコメントを読むことができます。
73
76
  comment_details_title: コメントの詳細
74
77
  loading: コメントを読み込んでいます...
75
- single_comment_warning: コメントの残りはこちら <a href="%{url}"></a>で確認できます。
76
- single_comment_warning_title: 単一のコメントが表示されています
77
- title: "%{count} 件のコメント"
78
+ single_comment_warning: コメントの残りは <a href="%{url}">こちら</a>で確認できます。
79
+ single_comment_warning_title: コメントを1件のみ表示しています
80
+ title:
81
+ other: "%{count} 件のコメント"
78
82
  down_vote_button:
79
83
  text: このコメントに同意しません
80
84
  up_vote_button:
@@ -18,7 +18,6 @@ lv:
18
18
  other: Balsis
19
19
  decidim:
20
20
  comments:
21
- comments: Komentāri
22
21
  last_activity:
23
22
  new_comment_at_html: "<span>Jauns komentārs %{link}</span>"
24
23
  votes:
@@ -75,7 +74,6 @@ lv:
75
74
  loading: Notiek komentāru ielāde ...
76
75
  single_comment_warning: Pārējos komentārus varat aplūkot <a href="%{url}">šeit</a>.
77
76
  single_comment_warning_title: Jūs redzat vienu komentāru
78
- title: "%{count} komentāri"
79
77
  events:
80
78
  comments:
81
79
  comment_by_followed_user:
@@ -16,7 +16,6 @@ nl:
16
16
  other: Stemmen
17
17
  decidim:
18
18
  comments:
19
- comments: Reacties
20
19
  comments_count: Aantal reacties
21
20
  last_activity:
22
21
  new_comment_at_html: "<span>Nieuwe opmerking op %{link}</span>"
@@ -76,7 +75,6 @@ nl:
76
75
  loading: Reacties laden...
77
76
  single_comment_warning: U kunt de rest van de reacties <a href="%{url}">hier</a> controleren.
78
77
  single_comment_warning_title: Je ziet een enkele reactie
79
- title: "%{count} reacties"
80
78
  down_vote_button:
81
79
  text: Ik ben het niet eens met deze reactie
82
80
  up_vote_button:
@@ -16,7 +16,6 @@
16
16
  other: Stemmer
17
17
  decidim:
18
18
  comments:
19
- comments: Kommentarer
20
19
  comments_count: Antall kommentarer
21
20
  last_activity:
22
21
  new_comment_at_html: "<span>Ny kommentar på %{link}</span>"
@@ -75,7 +74,6 @@
75
74
  loading: Laster inn kommenterer ...
76
75
  single_comment_warning: Du kan sjekke resten av kommentarene <a href="%{url}">her</a>.
77
76
  single_comment_warning_title: Du ser en enkelt kommentar
78
- title: "%{count} kommentarer"
79
77
  down_vote_button:
80
78
  text: Jeg er uenig med denne kommentaren
81
79
  up_vote_button:
@@ -20,8 +20,11 @@ pl:
20
20
  other: Głosy
21
21
  decidim:
22
22
  comments:
23
- comments: Komentarze
23
+ comments:
24
+ create:
25
+ error: Wystąpił błąd podczas tworzenia komentarza.
24
26
  comments_count: Liczba komentarzy
27
+ comments_title: Komentarze
25
28
  last_activity:
26
29
  new_comment_at_html: "<span>Nowy komentarz do %{link}</span>"
27
30
  view: Zobacz
@@ -58,8 +61,8 @@ pl:
58
61
  description: Czy ta treść jest nieodpowiednia?
59
62
  details: Dodatkowe komentarze
60
63
  reasons:
61
- does_not_belong: Zawiera nielegalną działalność, groźby samobójcze, informacje osobiste lub coś innego, co według Ciebie nie powinno pojawić się w %{organization_name}.
62
- offensive: Zawiera rasizm, seksizm, kłamstwa, ataki osobiste, groźby śmierci, prośby samobójcze lub jakąkolwiek formę mowy o nienawiści.
64
+ does_not_belong: Promuje nielegalną działalność, groźby samobójcze, informacje osobiste lub coś innego, co według Ciebie nie powinno pojawić się w %{organization_name}.
65
+ offensive: Promuje rasizm, seksizm, nienawiść, ataki osobiste, groźby śmierci, groźby samobójcze jakąkolwiek formę mowy nienawiści.
63
66
  spam: Zawiera clickbaity, reklamy, oszustwa lub skrypty botów.
64
67
  title: Zgłoś niewłaściwą treść
65
68
  show_replies: Pokaż %{replies_count} odpowiedzi
@@ -80,7 +83,11 @@ pl:
80
83
  loading: Ładowanie komentarzy ...
81
84
  single_comment_warning: Resztę komentarzy możesz sprawdzić <a href="%{url}">tutaj</a>.
82
85
  single_comment_warning_title: Wyświetlasz teraz pojedynczy komentarz
83
- title: "%{count} komentarzy"
86
+ title:
87
+ one: "%{count} komentarz"
88
+ few: "%{count} komentarze"
89
+ many: "%{count} komentarzy"
90
+ other: "%{count} komentarze"
84
91
  down_vote_button:
85
92
  text: Nie zgadzam się z tym komentarzem
86
93
  up_vote_button:
@@ -102,6 +109,16 @@ pl:
102
109
  email_outro: Otrzymujesz to powiadomienie, ponieważ obserwujesz "%{resource_title}" lub jego autora. Możesz przestać go obserwować po kliknięciu w poprzedni link.
103
110
  email_subject: Jest nowy komentarz od %{author_name} do %{resource_title}
104
111
  notification_title: Pojawił się nowy komentarz <a href="%{author_path}">%{author_name} %{author_nickname}</a> do <a href="%{resource_path}">%{resource_title}</a>
112
+ comment_downvoted:
113
+ email_intro: Twój komentarz do "%{resource_title}" dostał głos przeciw. Teraz ma %{upvotes} głosów za i %{downvotes} głosów przeciw.
114
+ email_outro: Otrzymałeś to powiadomienie, ponieważ jesteś autorem komentarza.
115
+ email_subject: Twój komentarz w "%{resource_title}" dostał głos przeciw.
116
+ notification_title: Twój <a href="%{resource_path}">comment</a> do "%{resource_title}" dostał głos przeciw. Teraz ma %{upvotes} głosów za i %{downvotes} głosów przeciw.
117
+ comment_upvoted:
118
+ email_intro: Twój komentarz do "%{resource_title}" dostał głos za. Teraz ma %{upvotes} głosów za i %{downvotes} głosów przeciw.
119
+ email_outro: Otrzymałeś to powiadomienie, ponieważ jesteś autorem komentarza.
120
+ email_subject: Twój komentarz w "%{resource_title}" dostał głos za.
121
+ notification_title: Twój <a href="%{resource_path}">comment</a> do "%{resource_title}" dostał głos za. Teraz ma %{upvotes} głosów za i %{downvotes} głosów przeciw.
105
122
  reply_created:
106
123
  email_intro: "%{author_name} odpowiedział na Twój komentarz do %{resource_title}. Możesz przeczytać go na tej stronie:"
107
124
  email_outro: Otrzymałeś to powiadomienie, ponieważ odpowiedziano na Twój komentarz.
@@ -16,7 +16,6 @@ pt:
16
16
  other: Votos
17
17
  decidim:
18
18
  comments:
19
- comments: Comentários
20
19
  last_activity:
21
20
  new_comment_at_html: "<span>Novo comentário em %{link}</span>"
22
21
  votes:
@@ -67,7 +66,6 @@ pt:
67
66
  blocked_comments_for_user_warning: Você não pode comentar neste momento, mas pode ler os anteriores.
68
67
  blocked_comments_warning: Os comentários estão desativados neste momento, mas você pode ler os anteriores.
69
68
  loading: Carregando comentários ...
70
- title: "%{count} comentários"
71
69
  events:
72
70
  comments:
73
71
  comment_by_followed_user:
@@ -16,7 +16,6 @@ pt:
16
16
  other: Votos
17
17
  decidim:
18
18
  comments:
19
- comments: Comentários
20
19
  comments_count: Contagem de comentários
21
20
  last_activity:
22
21
  new_comment_at_html: "<span>Novo comentário em %{link}</span>"
@@ -75,7 +74,6 @@ pt:
75
74
  loading: A carregar comentários ...
76
75
  single_comment_warning: Pode consultar os restantes comentários <a href="%{url}">aqui</a>.
77
76
  single_comment_warning_title: Está a ver um único comentário
78
- title: "%{count} comentários"
79
77
  down_vote_button:
80
78
  text: Eu discordo deste comentário
81
79
  up_vote_button:
@@ -18,10 +18,14 @@ ro:
18
18
  other: Voturi
19
19
  decidim:
20
20
  comments:
21
- comments: Comentarii
21
+ comments:
22
+ create:
23
+ error: A apărut o problemă la crearea comentariului.
22
24
  comments_count: Numărul de comentarii
25
+ comments_title: Comentarii
23
26
  last_activity:
24
27
  new_comment_at_html: "<span>Comentariu nou la %{link}</span>"
28
+ view: Vizualizare
25
29
  votes:
26
30
  create:
27
31
  error: A apărut o problemă la votarea comentariului.
@@ -77,7 +81,6 @@ ro:
77
81
  loading: Se încarcă comentariile...
78
82
  single_comment_warning: Puteţi verifica restul comentariilor <a href="%{url}">aici</a>.
79
83
  single_comment_warning_title: Vedeți un singur comentariu
80
- title: "%{count} comentarii"
81
84
  down_vote_button:
82
85
  text: Nu sunt de acord cu acest comentariu
83
86
  up_vote_button:
@@ -99,6 +102,16 @@ ro:
99
102
  email_outro: Ați primit această notificare deoarece urmați ""%{resource_title}" sau autorul său. O puteți anula de la link-ul anterior.
100
103
  email_subject: Există un nou comentariu de la %{author_name} în %{resource_title}
101
104
  notification_title: Există un nou comentariu de la <a href="%{author_path}">%{author_name} %{author_nickname}</a> în <a href="%{resource_path}">%{resource_title}</a>
105
+ comment_downvoted:
106
+ email_intro: Comentariul tău în "%{resource_title}" a fost refuzat. Acesta are acum un total de %{upvotes} aprecieri şi %{downvotes} refuzuri.
107
+ email_outro: Ați primit această notificare deoarece sunteți autorul acestui comentariu.
108
+ email_subject: Comentariul tău în "%{resource_title}" a fost refuzat.
109
+ notification_title: Comentariul tău <a href="%{resource_path}"></a> în "%{resource_title}" a fost refuzat. Acum are un total de %{upvotes} aprecieri și %{downvotes} refuzuri.
110
+ comment_upvoted:
111
+ email_intro: Comentariul tău în "%{resource_title}" a fost apreciat. Acesta are acum un total de %{upvotes} aprecieri şi %{downvotes} refuzuri.
112
+ email_outro: Ați primit această notificare deoarece sunteți autorul acestui comentariu.
113
+ email_subject: Comentariul tău în "%{resource_title}" a fost apreciat.
114
+ notification_title: Comentariul tău <a href="%{resource_path}"></a> în "%{resource_title}" a fost apreciat. Acum are un total de %{upvotes} aprecieri și %{downvotes} refuzuri.
102
115
  reply_created:
103
116
  email_intro: "%{author_name} a răspuns comentariului tău în %{resource_title}. Îl poți citi în această pagină:"
104
117
  email_outro: Ați primit această notificare deoarece comentariul dvs. a fost răspuns.
@@ -20,7 +20,6 @@ ru:
20
20
  other: Голосов
21
21
  decidim:
22
22
  comments:
23
- comments: Комментарии
24
23
  last_activity:
25
24
  new_comment_at_html: "<span>Новый комментарий в %{link}</span>"
26
25
  votes:
@@ -71,7 +70,6 @@ ru:
71
70
  blocked_comments_for_user_warning: Сейчас вам недоступно комментирование, но вы можете прочесть предыдущие комментарии.
72
71
  blocked_comments_warning: Комментарии сейчас отключены, но вы можете прочитать предыдущие.
73
72
  loading: Загрузка комментариев ...
74
- title: "%{count} комментариев"
75
73
  events:
76
74
  comments:
77
75
  comment_by_followed_user:
@@ -20,7 +20,6 @@ sk:
20
20
  other: Hlasy
21
21
  decidim:
22
22
  comments:
23
- comments: Komentáre
24
23
  last_activity:
25
24
  new_comment_at_html: "<span>Nový komentár na %{link}</span>"
26
25
  votes:
@@ -77,7 +76,6 @@ sk:
77
76
  loading: Nahrávanie komentárov...
78
77
  single_comment_warning: Zvyšné komentáre zobrazíte <a href="%{url}">tu</a>.
79
78
  single_comment_warning_title: Zobrazujete jeden komentár
80
- title: "%{count} komentárov"
81
79
  events:
82
80
  comments:
83
81
  comment_by_followed_user:
@@ -16,8 +16,11 @@ sv:
16
16
  other: Röster
17
17
  decidim:
18
18
  comments:
19
- comments: Kommentarer
19
+ comments:
20
+ create:
21
+ error: Det gick inte att skapa kommentaren.
20
22
  comments_count: Antal kommentarer
23
+ comments_title: Kommentarer
21
24
  last_activity:
22
25
  new_comment_at_html: "<span>Ny kommentar på %{link}</span>"
23
26
  view: Visa
@@ -76,7 +79,9 @@ sv:
76
79
  loading: Laddar kommentarer...
77
80
  single_comment_warning: Läs återstående <a href="%{url}">kommentarer</a>.
78
81
  single_comment_warning_title: Du visar en enda kommentar
79
- title: "%{count} kommentarer"
82
+ title:
83
+ one: "%{count} kommentarer"
84
+ other: "%{count} kommentarer"
80
85
  down_vote_button:
81
86
  text: Jag håller inte med om denna kommentar
82
87
  up_vote_button:
@@ -16,8 +16,11 @@ tr:
16
16
  other: oy
17
17
  decidim:
18
18
  comments:
19
- comments: Yorumlar
19
+ comments:
20
+ create:
21
+ error: Yorum oluşturulurken bir sorunla karşılaşıldı.
20
22
  comments_count: Yorum sayısı
23
+ comments_title: Yorumlar
21
24
  last_activity:
22
25
  new_comment_at_html: "<span> %{link}</span> yeni yorum"
23
26
  view: Görünüm
@@ -76,7 +79,9 @@ tr:
76
79
  loading: Yorumlar yükleniyor ...
77
80
  single_comment_warning: Yorumların geri kalanını <a href="%{url}"> buradan </a> kontrol edebilirsiniz.
78
81
  single_comment_warning_title: Tek bir yorum görüyorsunuz
79
- title: "%{count} yorum"
82
+ title:
83
+ one: "%{count} yorum"
84
+ other: "%{count} yorum"
80
85
  down_vote_button:
81
86
  text: Bu yoruma katılmıyorum
82
87
  up_vote_button:
@@ -67,7 +67,6 @@ uk:
67
67
  comments:
68
68
  blocked_comments_warning: Коментарі зараз вимкнені, але ви можете прочитати попередні.
69
69
  loading: Завантаження коментарів...
70
- title: "%{count} коментарів"
71
70
  events:
72
71
  comments:
73
72
  comment_by_followed_user:
@@ -14,7 +14,6 @@ zh-CN:
14
14
  other: 所得票数
15
15
  decidim:
16
16
  comments:
17
- comments: 评论
18
17
  comments_count: 评论计数
19
18
  last_activity:
20
19
  new_comment_at_html: "<span>在 %{link}的新评论</span>"
@@ -74,7 +73,6 @@ zh-CN:
74
73
  loading: 正在加载评论...
75
74
  single_comment_warning: 您可以在这里查看 <a href="%{url}">的其余评论</a>。
76
75
  single_comment_warning_title: 您正在看到一个评论
77
- title: "%{count} 条评论"
78
76
  down_vote_button:
79
77
  text: 我不同意这个评论
80
78
  up_vote_button:
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Comments
5
+ # This type represents a mutation to create new comments.
6
+ class AddCommentType < Decidim::Api::Types::BaseObject
7
+ graphql_name "Add comment"
8
+ description "Add a new comment"
9
+
10
+ field :comment, Decidim::Comments::CommentType, null: true, description: "The new created comment"
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ module Comments
5
+ class CommentMutationType < Decidim::Api::Types::BaseObject
6
+ graphql_name "CommentMutation"
7
+ description "A comment which includes its available mutations"
8
+
9
+ field :id, GraphQL::Types::ID, "The Comment's unique ID", null: false
10
+
11
+ field :up_vote, Decidim::Comments::CommentType, null: true
12
+ def up_vote(args: {})
13
+ VoteCommentResolver.new(weight: 1).call(object, args, context)
14
+ end
15
+
16
+ field :down_vote, Decidim::Comments::CommentType, null: true
17
+ def down_vote(args: {})
18
+ VoteCommentResolver.new(weight: -1).call(object, args, context)
19
+ end
20
+ end
21
+ end
22
+ end