decidim-comments 0.24.0 → 0.25.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -20
  3. data/app/cells/decidim/comments/comment/actions.erb +1 -1
  4. data/app/cells/decidim/comments/comment/deletion_data.erb +1 -0
  5. data/app/cells/decidim/comments/comment/show.erb +30 -21
  6. data/app/cells/decidim/comments/comment/utilities.erb +40 -12
  7. data/app/cells/decidim/comments/comment/votes.erb +6 -6
  8. data/app/cells/decidim/comments/comment_cell.rb +29 -0
  9. data/app/cells/decidim/comments/comment_form/show.erb +1 -1
  10. data/app/cells/decidim/comments/comments/add_comment.erb +10 -6
  11. data/app/cells/decidim/comments/comments/order_control.erb +4 -5
  12. data/app/cells/decidim/comments/comments/show.erb +2 -4
  13. data/app/cells/decidim/comments/comments/user_comments_blocked_warning.erb +5 -1
  14. data/app/cells/decidim/comments/comments_cell.rb +24 -2
  15. data/app/cells/decidim/comments/edit_comment_modal_form/show.erb +29 -0
  16. data/app/cells/decidim/comments/edit_comment_modal_form_cell.rb +53 -0
  17. data/app/commands/decidim/comments/delete_comment.rb +46 -0
  18. data/app/commands/decidim/comments/update_comment.rb +62 -0
  19. data/app/controllers/decidim/comments/comments_controller.rb +63 -6
  20. data/app/events/decidim/comments/comment_voted_event.rb +9 -0
  21. data/app/forms/decidim/comments/comment_form.rb +1 -1
  22. data/app/models/decidim/comments/comment.rb +23 -1
  23. data/app/packs/src/decidim/comments/comments.component.js +299 -0
  24. data/app/{assets/javascripts → packs/src}/decidim/comments/comments.component.test.js +49 -24
  25. data/app/packs/src/decidim/comments/comments.component_for_testing.js +8 -0
  26. data/app/packs/src/decidim/comments/comments.js +1 -0
  27. data/app/permissions/decidim/comments/permissions.rb +10 -1
  28. data/app/queries/decidim/comments/metrics/comment_participants_metric_measure.rb +1 -1
  29. data/app/queries/decidim/comments/metrics/comments_metric_manage.rb +1 -1
  30. data/app/views/decidim/comments/comments/_delete.html.erb +5 -0
  31. data/app/views/decidim/comments/comments/_edited_comment.html.erb +1 -0
  32. data/app/views/decidim/comments/comments/create.js.erb +2 -0
  33. data/app/views/decidim/comments/comments/delete.js.erb +17 -0
  34. data/app/views/decidim/comments/comments/deletion_error.js.erb +1 -0
  35. data/app/views/decidim/comments/comments/reload.js.erb +2 -0
  36. data/app/views/decidim/comments/comments/update.js.erb +8 -0
  37. data/app/views/decidim/comments/comments/update_error.js.erb +1 -0
  38. data/config/assets.rb +5 -0
  39. data/config/locales/ar.yml +0 -1
  40. data/config/locales/ca.yml +7 -1
  41. data/config/locales/cs.yml +30 -6
  42. data/config/locales/de.yml +7 -1
  43. data/config/locales/el.yml +0 -1
  44. data/config/locales/en.yml +25 -1
  45. data/config/locales/es-MX.yml +7 -1
  46. data/config/locales/es-PY.yml +7 -1
  47. data/config/locales/es.yml +7 -1
  48. data/config/locales/fi-plain.yml +25 -1
  49. data/config/locales/fi.yml +25 -1
  50. data/config/locales/fr-CA.yml +25 -1
  51. data/config/locales/fr-LU.yml +162 -0
  52. data/config/locales/fr.yml +25 -1
  53. data/config/locales/gl.yml +25 -1
  54. data/config/locales/hu.yml +0 -1
  55. data/config/locales/it.yml +38 -1
  56. data/config/locales/ja.yml +35 -1
  57. data/config/locales/lb-LU.yml +1 -0
  58. data/config/locales/lv.yml +0 -1
  59. data/config/locales/nl.yml +27 -2
  60. data/config/locales/no.yml +0 -1
  61. data/config/locales/pl.yml +7 -1
  62. data/config/locales/pt-BR.yml +61 -0
  63. data/config/locales/pt.yml +0 -1
  64. data/config/locales/ro-RO.yml +29 -1
  65. data/config/locales/sk.yml +0 -1
  66. data/config/locales/sr-CS.yml +0 -1
  67. data/config/locales/sv.yml +35 -1
  68. data/config/locales/tr-TR.yml +0 -1
  69. data/config/locales/zh-CN.yml +0 -1
  70. data/db/migrate/20200706123136_make_comments_handle_i18n.rb +1 -1
  71. data/db/migrate/20210529095942_add_deleted_at_column_to_comments.rb +7 -0
  72. data/lib/decidim/comments.rb +1 -0
  73. data/lib/decidim/comments/commentable.rb +6 -1
  74. data/lib/decidim/comments/commentable_with_component.rb +33 -0
  75. data/lib/decidim/comments/engine.rb +1 -9
  76. data/lib/decidim/comments/version.rb +1 -1
  77. metadata +31 -31
  78. data/app/assets/config/decidim_comments_manifest.js +0 -1
  79. data/app/assets/javascripts/decidim/comments/bundle.js.map +0 -1
  80. data/app/assets/javascripts/decidim/comments/comments.component.js.es6 +0 -292
  81. data/app/assets/javascripts/decidim/comments/comments.js.erb +0 -10
  82. data/config/locales/ja-JP.yml +0 -120
@@ -1,5 +1,6 @@
1
1
  /* eslint-disable id-length, max-lines */
2
2
  /* global spyOn, jest */
3
+
3
4
  const $ = require("jquery");
4
5
 
5
6
  // Ability to spy on the jQuery methods inside the component in order to test
@@ -9,19 +10,26 @@ window.$ = jest.fn().mockImplementation((...args) => $(...args));
9
10
  window.$.ajax = jest.fn().mockImplementation((...args) => $.ajax(...args));
10
11
 
11
12
  // Quill is expected by the input character counter
12
- window.Quill = require("../../../../../../decidim-core/vendor/assets/javascripts/quill.min.js");
13
+ import Quill from "quill"
14
+ window.Quill = Quill
13
15
 
14
16
  // Fake timers for testing polling
15
17
  jest.useFakeTimers();
16
18
 
17
- require("../../../../../../decidim-core/app/assets/javascripts/decidim/input_character_counter.js.es6");
18
- require("./comments.component.js.es6");
19
+ import { createCharacterCounter } from "../../../../../../decidim-core/app/packs/src/decidim/input_character_counter";
20
+ import Configuration from "../../../../../../decidim-core/app/packs/src/decidim/configuration";
21
+ // Component is loaded with require because using import loads it before $ has been mocked
22
+ // so tests aren't able to check the spied behaviours
23
+ const CommentsComponent = require("./comments.component_for_testing.js");
19
24
 
20
- const { Decidim: { CommentsComponent, createCharacterCounter } } = window;
21
25
 
22
26
  // Create a dummy foundation jQuery method for the comments component to call
23
27
  $.fn.foundation = () => {};
24
28
 
29
+ // Create the configuration object to make the configurations available for the tests
30
+ window.Decidim = {}
31
+ window.Decidim.config = new Configuration()
32
+
25
33
  describe("CommentsComponent", () => {
26
34
  const selector = "#comments-for-Dummy-123";
27
35
  let subject = null;
@@ -163,18 +171,18 @@ describe("CommentsComponent", () => {
163
171
  </div>
164
172
  <div class="author-data__extra">
165
173
  <button type="button" class="link-alt" data-open="flagModalComment${commentId}" title="Report inappropriate content" aria-controls="flagModalComment${commentId}" aria-haspopup="true" tabindex="0">
166
- <svg role="none presentation" aria-hidden="true" class="icon--flag icon icon--small">
174
+ <svg role="img" aria-hidden="true" class="icon--flag icon icon--small">
167
175
  <title></title>
168
- <use role="none presentation" href="/assets/decidim/icons-123.svg#icon-flag"></use>
176
+ <use href="/assets/decidim/icons-123.svg#icon-flag"></use>
169
177
  </svg>
170
178
  <span class="show-for-sr">Report inappropriate content</span>
171
179
  </button>
172
180
 
173
181
  <a title="Get link to single comment" href="/path/to/dummy/123?commentId=${commentId}#comment_${commentId}">
174
182
  <span class="show-for-sr">Get link to single comment</span>
175
- <svg role="none presentation" class="icon--link-intact icon icon--small">
183
+ <svg role="img" aria-hidden="true" class="icon--link-intact icon icon--small">
176
184
  <title></title>
177
- <use role="none presentation" href="/assets/decidim/icons-123.svg#icon-link-intact"></use>
185
+ <use href="/assets/decidim/icons-123.svg#icon-link-intact"></use>
178
186
  </svg>
179
187
  </a>
180
188
  </div>
@@ -186,9 +194,9 @@ describe("CommentsComponent", () => {
186
194
  <div class="comment__footer">
187
195
  <div class="comment__actions">
188
196
  <button class="comment__reply muted-link" aria-controls="comment${commentId}-reply" data-toggle="comment${commentId}-reply" aria-expanded="true">
189
- <svg role="none presentation" class="icon--pencil icon icon--small">
197
+ <svg role="img" aria-hidden="true" class="icon--pencil icon icon--small">
190
198
  <title></title>
191
- <use role="none presentation" href="/assets/decidim/icons-123.svg#icon-pencil"></use>
199
+ <use href="/assets/decidim/icons-123.svg#icon-pencil"></use>
192
200
  </svg>
193
201
  &nbsp;Reply
194
202
  </button>
@@ -198,9 +206,9 @@ describe("CommentsComponent", () => {
198
206
  <form class="button_to" method="post" action="/comments/${commentId}/votes?weight=1" data-remote="true">
199
207
  <button class="comment__votes--up" title="I agree with this comment" type="submit">
200
208
  <span class="show-for-sr">I agree with this comment</span>
201
- <svg role="none presentation" class="icon--chevron-top icon icon--small">
209
+ <svg role="img" aria-hidden="true" class="icon--chevron-top icon icon--small">
202
210
  <title></title>
203
- <use role="none presentation" href="/assets/decidim/icons-123.svg#icon-chevron-top"></use>
211
+ <use href="/assets/decidim/icons-123.svg#icon-chevron-top"></use>
204
212
  </svg>
205
213
  <span class="comment__votes--count">0</span>
206
214
  </button>
@@ -210,9 +218,9 @@ describe("CommentsComponent", () => {
210
218
  <form class="button_to" method="post" action="/comments/${commentId}/votes?weight=-1" data-remote="true">
211
219
  <button class="comment__votes--down" title="I disagree with this comment" type="submit">
212
220
  <span class="show-for-sr">I disagree with this comment</span>
213
- <svg role="none presentation" class="icon--chevron-bottom icon icon--small">
221
+ <svg role="img" aria-hidden="true" class="icon--chevron-bottom icon icon--small">
214
222
  <title></title>
215
- <use role="none presentation" href="/assets/decidim/icons-123.svg#icon-chevron-bottom"></use>
223
+ <use href="/assets/decidim/icons-123.svg#icon-chevron-bottom"></use>
216
224
  </svg>
217
225
  <span class="comment__votes--count">0</span>
218
226
  </button>
@@ -224,9 +232,9 @@ describe("CommentsComponent", () => {
224
232
 
225
233
  <div class="comment__additionalreply hide">
226
234
  <button class="comment__reply muted-link" aria-controls="comment${commentId}-reply" data-toggle="comment${commentId}-reply" aria-expanded="true">
227
- <svg role="none presentation" class="icon--pencil icon icon--small">
235
+ <svg role="img" aria-hidden="true" class="icon--pencil icon icon--small">
228
236
  <title></title>
229
- <use role="none presentation" href="/assets/decidim/icons-123.svg#icon-pencil"></use>
237
+ <use href="/assets/decidim/icons-123.svg#icon-pencil"></use>
230
238
  </svg>
231
239
  &nbsp;Reply
232
240
  </button>
@@ -251,7 +259,7 @@ describe("CommentsComponent", () => {
251
259
 
252
260
  beforeEach(() => {
253
261
  let orderSelector = `
254
- <ul class="dropdown menu" data-dropdown-menu="data-dropdown-menu" data-autoclose="false" data-disable-hover="true" data-click-open="true" data-close-on-click="true" tabindex="-1" role="menubar">
262
+ <ul id="comments-order-menu" class="dropdown menu" data-dropdown-menu="data-dropdown-menu" data-autoclose="false" data-disable-hover="true" data-click-open="true" data-close-on-click="true" tabindex="-1" role="menubar">
255
263
  <li class="is-dropdown-submenu-parent opens-right" tabindex="-1" role="none">
256
264
  <a href="#" id="comments-order-menu-control" aria-label="Order by:" aria-controls="comments-order-menu" aria-haspopup="true" role="menuitem">Older</a>
257
265
  <ul class="menu is-dropdown-submenu submenu first-sub vertical" id="comments-order-chooser-menu" role="menu" aria-labelledby="comments-order-menu-control" tabindex="-1" data-submenu="">
@@ -304,21 +312,24 @@ describe("CommentsComponent", () => {
304
312
  <h4 class="section-heading">Add your comment</h4>
305
313
 
306
314
  <div class="opinion-toggle button-group">
307
- <button class="button tiny button--muted opinion-toggle--ok">
308
- <svg role="none presentation" class="icon--thumb-up icon">
315
+ <button aria-pressed="false" class="button tiny button--muted opinion-toggle--ok" data-selected-label="Your opinion about this topic is positive">
316
+ <svg role="img" aria-hidden="true" class="icon--thumb-up icon">
309
317
  <title></title>
310
- <use role="none presentation" href="/assets/decidim/icons-2ba788b32e181c1a7197f7a54a0f03101c146dd434b9e56191690c7c2d7bdae3.svg#icon-thumb-up"></use>
318
+ <use href="/assets/decidim/icons-2ba788b32e181c1a7197f7a54a0f03101c146dd434b9e56191690c7c2d7bdae3.svg#icon-thumb-up"></use>
311
319
  </svg>
320
+ <span class="show-for-sr">Positive</span>
312
321
  </button>
313
- <button class="button tiny button--muted opinion-toggle--meh is-active">
322
+ <button aria-pressed="true" class="button tiny button--muted opinion-toggle--meh is-active" data-selected-label="Your opinion about this topic is neutral">
314
323
  Neutral
315
324
  </button>
316
- <button class="button tiny button--muted opinion-toggle--ko">
317
- <svg role="none presentation" class="icon--thumb-down icon">
325
+ <button aria-pressed="false" class="button tiny button--muted opinion-toggle--ko" data-selected-label="Your opinion about this topic is negative">
326
+ <svg role="img" aria-hidden="true" class="icon--thumb-down icon">
318
327
  <title></title>
319
- <use role="none presentation" href="/assets/decidim/icons-2ba788b32e181c1a7197f7a54a0f03101c146dd434b9e56191690c7c2d7bdae3.svg#icon-thumb-down"></use>
328
+ <use href="/assets/decidim/icons-2ba788b32e181c1a7197f7a54a0f03101c146dd434b9e56191690c7c2d7bdae3.svg#icon-thumb-down"></use>
320
329
  </svg>
330
+ <span class="show-for-sr">Negative</span>
321
331
  </button>
332
+ <div role="alert" aria-live="assertive" aria-atomic="true" class="selected-state shot-for-sr"></div>
322
333
  </div>
323
334
 
324
335
  ${generateCommentForm("Dummy", 123)}
@@ -488,29 +499,43 @@ describe("CommentsComponent", () => {
488
499
  describe("opinion toggles", () => {
489
500
  let commentSection = null;
490
501
  let toggles = null;
502
+ let toggleContainer = null;
491
503
 
492
504
  beforeEach(() => {
493
505
  commentSection = addComment[addComment.length - 1];
494
506
  toggles = commentSection.opinionToggles;
507
+ toggleContainer = $(toggles[0]).parent();
495
508
  });
496
509
 
497
510
  it("adds the correct alignment on positive toggle", () => {
498
511
  $(toggles[0]).trigger("click");
499
512
 
513
+ expect($(toggles[0]).attr("aria-pressed")).toEqual("true");
514
+ expect($(toggles[1]).attr("aria-pressed")).toEqual("false");
515
+ expect($(toggles[2]).attr("aria-pressed")).toEqual("false");
500
516
  expect($(".alignment-input", commentSection).val()).toEqual("1");
517
+ expect($(".selected-state", toggleContainer).text()).toEqual("Your opinion about this topic is positive");
501
518
  });
502
519
 
503
520
  it("adds the correct alignment on neutral toggle", () => {
504
521
  $(toggles[0]).trigger("click");
505
522
  $(toggles[1]).trigger("click");
506
523
 
524
+ expect($(toggles[0]).attr("aria-pressed")).toEqual("false");
525
+ expect($(toggles[1]).attr("aria-pressed")).toEqual("true");
526
+ expect($(toggles[2]).attr("aria-pressed")).toEqual("false");
507
527
  expect($(".alignment-input", commentSection).val()).toEqual("0");
528
+ expect($(".selected-state", toggleContainer).text()).toEqual("Your opinion about this topic is neutral");
508
529
  });
509
530
 
510
531
  it("adds the correct alignment on negative toggle", () => {
511
532
  $(toggles[2]).trigger("click");
512
533
 
534
+ expect($(toggles[0]).attr("aria-pressed")).toEqual("false");
535
+ expect($(toggles[1]).attr("aria-pressed")).toEqual("false");
536
+ expect($(toggles[2]).attr("aria-pressed")).toEqual("true");
513
537
  expect($(".alignment-input", commentSection).val()).toEqual("-1");
538
+ expect($(".selected-state", toggleContainer).text()).toEqual("Your opinion about this topic is negative");
514
539
  });
515
540
  });
516
541
  });
@@ -0,0 +1,8 @@
1
+ /* eslint no-undef: 0 */
2
+
3
+ import CommentsComponent from "./comments.component"
4
+
5
+ // This module.exports is necessary for the tests to load
6
+ // doesn't conflict with import/export
7
+ module.exports = CommentsComponent;
8
+
@@ -0,0 +1 @@
1
+ import "src/decidim/comments/comments.component"
@@ -11,6 +11,8 @@ module Decidim
11
11
  can_read_comments?
12
12
  when :create
13
13
  can_create_comment?
14
+ when :update, :destroy
15
+ can_update_comment?
14
16
  when :vote
15
17
  can_vote_comment?
16
18
  end
@@ -34,9 +36,16 @@ module Decidim
34
36
  allow!
35
37
  end
36
38
 
39
+ def can_update_comment?
40
+ return disallow! unless user
41
+ return disallow! unless comment.authored_by?(user)
42
+
43
+ allow!
44
+ end
45
+
37
46
  def can_vote_comment?
38
47
  return disallow! unless user
39
- return disallow! unless commentable&.user_allowed_to_comment?(user)
48
+ return disallow! unless commentable&.user_allowed_to_vote_comment?(user)
40
49
 
41
50
  allow!
42
51
  end
@@ -39,7 +39,7 @@ module Decidim
39
39
 
40
40
  def retrieve_comments_for_organization
41
41
  user_ids = Decidim::User.where(organization: @resource.organization).pluck(:id)
42
- Decidim::Comments::Comment.includes(:root_commentable).not_hidden
42
+ Decidim::Comments::Comment.includes(:root_commentable).not_hidden.not_deleted
43
43
  .where("decidim_comments_comments.created_at <= ?", end_time)
44
44
  .where(decidim_comments_comments: { decidim_author_id: user_ids })
45
45
  .where(decidim_comments_comments: { decidim_author_type: "Decidim::UserBaseEntity" })
@@ -59,7 +59,7 @@ module Decidim
59
59
  def retrieve_comments
60
60
  user_ids = Decidim::User.select(:id).where(organization: @organization).collect(&:id)
61
61
  user_group_ids = Decidim::UserGroup.select(:id).where(organization: @organization).collect(&:id)
62
- Decidim::Comments::Comment.includes(:root_commentable).not_hidden
62
+ Decidim::Comments::Comment.includes(:root_commentable).not_hidden.not_deleted
63
63
  .where("decidim_comments_comments.created_at <= ?", end_time)
64
64
  .where("decidim_comments_comments.decidim_author_id IN (?) OR
65
65
  decidim_comments_comments.decidim_user_group_id IN (?)", user_ids, user_group_ids)
@@ -0,0 +1,5 @@
1
+ <div class="comment__header">
2
+ <div class="comment__deleted">
3
+ <%= t("decidim.components.comment.deleted_at", date: l(comment.deleted_at, format: :decidim_short)) %>
4
+ </div>
5
+ </div>
@@ -0,0 +1 @@
1
+ <%= cell("decidim/comments/comment", comment, reloaded: true) %>
@@ -13,4 +13,6 @@
13
13
 
14
14
  // Update the comments count
15
15
  $(".comments-count", $comments).text(<%== t("decidim.components.comments.title", count: @comments_count).to_json %>);
16
+
17
+ Decidim.addInputEmoji();
16
18
  }());
@@ -0,0 +1,17 @@
1
+ $(() => {
2
+ const deleteDataHtml = '<%== j(render partial: "delete", locals: { comment: @comment }).strip %>';
3
+ const rootCommentableId = <%== "comments-for-#{@comment.root_commentable.commentable_type.demodulize}-#{@comment.root_commentable.id}".to_json %>;
4
+ const commentId = <%= @comment.id.to_json %>;
5
+ const $comment = $(`#comment_${commentId}`);
6
+ const $commentReply = $(`#comment${commentId}-reply`);
7
+ const $content = $("> .comment__content", $comment);
8
+ const sectionsToDelete = ["header", "footer", "additionalreply"];
9
+
10
+ sectionsToDelete.forEach((section) => {
11
+ $(`> .comment__${section}`, $comment).remove();
12
+ });
13
+ $commentReply.remove();
14
+ $content.replaceWith(deleteDataHtml);
15
+
16
+ $(".comments-count", $(`#${rootCommentableId}`)).text(<%== t("decidim.components.comments.title", count: @comment.root_commentable.comments_count).to_json %>);
17
+ });
@@ -0,0 +1 @@
1
+ alert("<%== t("decidim.comments.comments.delete.error") %>");
@@ -18,4 +18,6 @@
18
18
 
19
19
  // Update the comments count
20
20
  $(".comments-count", $comments).text(<%== t("decidim.components.comments.title", count: @comments_count).to_json %>);
21
+
22
+ Decidim.addInputEmoji();
21
23
  }());
@@ -0,0 +1,8 @@
1
+ $(() => {
2
+ const commentHtml = '<%== j(render partial: "edited_comment", locals: { comment: @comment }).strip %>';
3
+ const commentId = <%= @comment.id.to_json %>;
4
+ const $comment = $("#comment_<%= @comment.id %>");
5
+ const $editCommentModal = $("#editCommentModal<%= @comment.id %>");
6
+
7
+ $comment.replaceWith(commentHtml);
8
+ });
@@ -0,0 +1 @@
1
+ alert("<%== t("decidim.comments.comments.update.error") %>");
data/config/assets.rb ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ base_path = File.expand_path("..", __dir__)
4
+
5
+ Decidim::Webpacker.register_path("#{base_path}/app/packs")
@@ -63,7 +63,6 @@ ar:
63
63
  offensive: يحتوي على العنصرية والتمييز الجنسي والتشهير والهجمات الشخصية والتهديدات بالقتل أو طلبات الانتحار أو أي شكل من أشكال خطاب الكراهية.
64
64
  spam: يحتوي على clickbait أو الإعلان أو الخدع أو روبوت البرامج النصية.
65
65
  show_replies: اظهر الردود الـ %{replies_count}
66
- single_comment_link_title: الحصول على رابط نحو تعليق واحد
67
66
  comment_order_selector:
68
67
  order:
69
68
  best_rated: أفضل تصنيف
@@ -39,7 +39,13 @@ ca:
39
39
  user_group_id:
40
40
  label: Comentar com a
41
41
  opinion:
42
+ label: La teva opinió sobre aquest tema
43
+ negative: Negativa
44
+ negative_selected: La teva opinió sobre aquest tema és negativa
42
45
  neutral: Neutral
46
+ neutral_selected: La teva opinió sobre aquest tema és neutral
47
+ positive: Positiva
48
+ positive_selected: La teva opinió sobre aquest tema és positiva
43
49
  remaining_characters: "Queden %{count} caràcters"
44
50
  remaining_characters_1: "Queda %{count} caràcter"
45
51
  title: Deixa el teu comentari
@@ -62,7 +68,6 @@ ca:
62
68
  spam: Conté "clickbait", publicitat o estafes.
63
69
  title: Notificar contingut inapropiat
64
70
  show_replies: Mostra %{replies_count} respostes
65
- single_comment_link_title: Aconsegueix l'enllaç al comentari
66
71
  comment_order_selector:
67
72
  order:
68
73
  best_rated: Més ben valorats
@@ -73,6 +78,7 @@ ca:
73
78
  comment_thread:
74
79
  title: Conversa amb %{authorName}
75
80
  comments:
81
+ blocked_comments_for_unauthorized_user_warning: Has d'estar verificat abans de poder fer comentaris, però pots llegir els comentaris anteriors.
76
82
  blocked_comments_for_user_warning: No pots fer comentaris en aquest moment, però pots llegir els anteriors.
77
83
  blocked_comments_warning: Els comentaris estan desactivats en aquest moment, però pots llegir els anteriors.
78
84
  comment_details_title: Detalls del comentari
@@ -23,6 +23,10 @@ cs:
23
23
  comments:
24
24
  create:
25
25
  error: Při vytváření komentáře došlo k chybě.
26
+ delete:
27
+ error: Komentář nemohl být odstraněn.
28
+ update:
29
+ error: Při aktualizaci komentáře došlo k chybě.
26
30
  comments_count: Počet komentářů
27
31
  comments_title: Komentáře
28
32
  last_activity:
@@ -43,7 +47,13 @@ cs:
43
47
  user_group_id:
44
48
  label: Komentovat jako
45
49
  opinion:
50
+ label: Váš názor na toto téma
51
+ negative: Negativní
52
+ negative_selected: Váš názor na toto téma je negativní
46
53
  neutral: Neutrální
54
+ neutral_selected: Váš názor na toto téma je neutrální
55
+ positive: Pozitivní
56
+ positive_selected: Váš názor na toto téma je pozitivní
47
57
  remaining_characters: "Zbývá %{count} znaků"
48
58
  remaining_characters_1: "Zbývá %{count} znak"
49
59
  title: Přidejte svůj komentář
@@ -51,7 +61,12 @@ cs:
51
61
  alignment:
52
62
  against: Proti
53
63
  in_favor: Ve prospěch
64
+ confirm_destroy: Opravdu chcete odstranit tento komentář?
65
+ delete: Smazat
66
+ deleted_at: Komentář byl smazán dne %{date}
54
67
  deleted_user: Vymazaný účastník
68
+ edit: Upravit
69
+ edited: Upraveno
55
70
  hide_replies: Skrýt odpovědi
56
71
  reply: Odpověď
57
72
  report:
@@ -66,7 +81,7 @@ cs:
66
81
  spam: Obsahuje clickbait, reklamu, podvody nebo škodlivé skripty.
67
82
  title: Nahlásit nevhodný obsah
68
83
  show_replies: Zobrazit %{replies_count} odpovědí
69
- single_comment_link_title: Získat odkaz na jeden komentář
84
+ single_comment_link_title: Získat odkaz
70
85
  comment_order_selector:
71
86
  order:
72
87
  best_rated: Nejlépe hodnocené
@@ -77,6 +92,7 @@ cs:
77
92
  comment_thread:
78
93
  title: Konverzace s číslem %{authorName}
79
94
  comments:
95
+ blocked_comments_for_unauthorized_user_warning: Musíte být ověřen, abyste mohli komentovat tuto chvíli, ale můžete si přečíst ty předchozí.
80
96
  blocked_comments_for_user_warning: Momentálně nemůžete komentovat, ale můžete si přečíst ty předchozí.
81
97
  blocked_comments_warning: Komentáře jsou momentálně zakázány, ale můžete si přečíst ty předchozí.
82
98
  comment_details_title: Podrobnosti komentáře
@@ -90,6 +106,14 @@ cs:
90
106
  other: "%{count} komentářů"
91
107
  down_vote_button:
92
108
  text: Nesouhlasím s tímto komentářem
109
+ edit_comment_modal_form:
110
+ close: Zavřít
111
+ form:
112
+ body:
113
+ label: Komentář
114
+ placeholder: Co si o tom myslíte?
115
+ submit: Odeslat
116
+ title: Upravit komentář
93
117
  up_vote_button:
94
118
  text: Souhlasím s tímto komentářem
95
119
  events:
@@ -98,17 +122,17 @@ cs:
98
122
  email_intro: "%{author_name} zanechal komentář v %{resource_title}. Můžete si je přečíst na této stránce:"
99
123
  email_outro: Toto oznámení jste obdrželi, protože jste sledovali %{author_name}. Tento uživatel můžete zrušit ze své profilové stránky.
100
124
  email_subject: K dispozici je nový komentář %{author_name} v %{resource_title}
101
- notification_title: K dispozici je nový komentář <a href="%{author_path}">%{author_name} %{author_nickname}</a> v <a href="%{resource_path}">%{resource_title}</a>.
125
+ notification_title: Je tu nový komentář <a href="%{author_path}">%{author_name} %{author_nickname}</a> v <a href="%{resource_path}">%{resource_title}</a>.
102
126
  comment_by_followed_user_group:
103
127
  email_intro: 'Skupina %{author_name} zanechala komentář v %{resource_title}. Můžete si jej přečíst na této stránce:'
104
128
  email_outro: Obdrželi jste toto oznámení, protože sledujete %{author_name}. Můžete zrušit sledování této skupiny na její profilové stránce.
105
129
  email_subject: K dispozici je nový komentář %{author_name} v %{resource_title}
106
- notification_title: K dispozici je nový komentář <a href="%{author_path}">%{author_name} %{author_nickname}</a> v <a href="%{resource_path}">%{resource_title}</a>.
130
+ notification_title: Je tu nový komentář <a href="%{author_path}">%{author_name} %{author_nickname}</a> v <a href="%{resource_path}">%{resource_title}</a>.
107
131
  comment_created:
108
132
  email_intro: "%{resource_title} bylo komentováno. Můžete si přečíst komentář na této stránce:"
109
133
  email_outro: Toto oznámení jste obdrželi, protože jste sledovali "%{resource_title}" nebo jeho autora. Můžete jej odhlásit od předchozího odkazu.
110
134
  email_subject: K dispozici je nový komentář od %{author_name} do %{resource_title}
111
- notification_title: Je zde nový komentář od <a href="%{author_path}">%{author_name} %{author_nickname}</a> do <a href="%{resource_path}">%{resource_title}</a>
135
+ notification_title: Je tu nový komentář od <a href="%{author_path}">%{author_name} %{author_nickname}</a> do <a href="%{resource_path}">%{resource_title}</a>
112
136
  comment_downvoted:
113
137
  email_intro: Váš komentář v "%{resource_title}" byl nepodpořen. Nyní má celkem %{upvotes} hlasů podpory a %{downvotes} hlasuje proti.
114
138
  email_outro: Obdrželi jste toto oznámení, protože jste autorem tohoto komentáře.
@@ -123,7 +147,7 @@ cs:
123
147
  email_intro: "%{author_name} odpověděl váš komentář v %{resource_title}. Můžete si je přečíst na této stránce:"
124
148
  email_outro: Toto oznámení jste obdrželi, protože váš komentář byl zodpovězen.
125
149
  email_subject: "%{author_name} odpověděl váš komentář v %{resource_title}"
126
- notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> odpověděl / a svůj komentář v <a href="%{resource_path}">%{resource_title}</a>
150
+ notification_title: <a href="%{author_path}">%{author_name} %{author_nickname}</a> odpověděl na váš komentář v <a href="%{resource_path}">%{resource_title}</a>
127
151
  user_group_mentioned:
128
152
  email_intro: Byla zmíněna skupina, do které patříte
129
153
  email_outro: Obdrželi jste toto oznámení, protože jste členem skupiny %{group_name}, která byla zmíněna v %{resource_title}.
@@ -133,7 +157,7 @@ cs:
133
157
  email_intro: Byl jste zmíněn
134
158
  email_outro: Toto oznámení jste obdrželi, protože jste byli uvedeni v %{resource_title}.
135
159
  email_subject: Byl jste zmíněn v %{resource_title}
136
- notification_title: Byli jste uvedeni v <a href="%{resource_path}">%{resource_title}</a> podle <a href="%{author_path}">%{author_name} %{author_nickname}</a>
160
+ notification_title: Byli jste zmíněni v <a href="%{resource_path}">%{resource_title}</a> od <a href="%{author_path}">%{author_name} %{author_nickname}</a>
137
161
  metrics:
138
162
  comments:
139
163
  description: Počet komentářů generovaných uživateli