decidim-blogs 0.26.5 → 0.27.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/app/commands/decidim/blogs/admin/create_post.rb +1 -1
  3. data/app/commands/decidim/blogs/admin/update_post.rb +6 -3
  4. data/app/controllers/decidim/blogs/admin/posts_controller.rb +6 -2
  5. data/app/forms/decidim/blogs/admin/post_form.rb +27 -7
  6. data/app/helpers/decidim/blogs/admin/posts_helper.rb +15 -0
  7. data/app/models/decidim/blogs/post.rb +9 -1
  8. data/app/presenters/decidim/blogs/admin_log/post_presenter.rb +36 -0
  9. data/app/presenters/decidim/blogs/official_author_presenter.rb +14 -0
  10. data/app/presenters/decidim/blogs/post_presenter.rb +7 -1
  11. data/app/views/decidim/blogs/admin/posts/_form.html.erb +4 -4
  12. data/app/views/decidim/blogs/posts/_posts.html.erb +2 -1
  13. data/app/views/decidim/blogs/posts/show.html.erb +3 -1
  14. data/config/locales/am-ET.yml +1 -0
  15. data/config/locales/ar.yml +5 -1
  16. data/config/locales/bg.yml +1 -0
  17. data/config/locales/ca.yml +12 -11
  18. data/config/locales/cs.yml +11 -10
  19. data/config/locales/da.yml +1 -0
  20. data/config/locales/de.yml +5 -1
  21. data/config/locales/el.yml +5 -1
  22. data/config/locales/en.yml +10 -10
  23. data/config/locales/eo.yml +1 -0
  24. data/config/locales/es-MX.yml +11 -10
  25. data/config/locales/es-PY.yml +11 -10
  26. data/config/locales/es.yml +12 -11
  27. data/config/locales/et.yml +1 -0
  28. data/config/locales/eu.yml +27 -32
  29. data/config/locales/fi-plain.yml +11 -10
  30. data/config/locales/fi.yml +11 -10
  31. data/config/locales/fr-CA.yml +5 -10
  32. data/config/locales/fr.yml +5 -10
  33. data/config/locales/ga-IE.yml +4 -0
  34. data/config/locales/gl.yml +5 -1
  35. data/config/locales/hr.yml +1 -0
  36. data/config/locales/hu.yml +4 -9
  37. data/config/locales/id-ID.yml +4 -0
  38. data/config/locales/is-IS.yml +5 -1
  39. data/config/locales/it.yml +5 -1
  40. data/config/locales/ja.yml +9 -9
  41. data/config/locales/ko.yml +1 -0
  42. data/config/locales/lb.yml +5 -1
  43. data/config/locales/lt.yml +1 -86
  44. data/config/locales/lv.yml +4 -0
  45. data/config/locales/mt.yml +1 -0
  46. data/config/locales/nl.yml +9 -5
  47. data/config/locales/no.yml +5 -1
  48. data/config/locales/om-ET.yml +1 -0
  49. data/config/locales/pl.yml +5 -1
  50. data/config/locales/pt-BR.yml +6 -2
  51. data/config/locales/pt.yml +5 -1
  52. data/config/locales/ro-RO.yml +5 -10
  53. data/config/locales/ru.yml +4 -0
  54. data/config/locales/si-LK.yml +1 -0
  55. data/config/locales/sk.yml +4 -0
  56. data/config/locales/sl.yml +1 -0
  57. data/config/locales/so-SO.yml +1 -0
  58. data/config/locales/sr-CS.yml +1 -0
  59. data/config/locales/sv.yml +6 -6
  60. data/config/locales/sw-KE.yml +1 -0
  61. data/config/locales/ti-ER.yml +1 -0
  62. data/config/locales/tr-TR.yml +4 -0
  63. data/config/locales/uk.yml +4 -0
  64. data/config/locales/val-ES.yml +1 -0
  65. data/config/locales/vi.yml +1 -0
  66. data/config/locales/zh-CN.yml +4 -0
  67. data/config/locales/zh-TW.yml +1 -0
  68. data/lib/decidim/blogs/component.rb +9 -3
  69. data/lib/decidim/blogs/version.rb +1 -1
  70. metadata +22 -24
  71. data/config/locales/gn-PY.yml +0 -1
  72. data/config/locales/ka-GE.yml +0 -1
  73. data/config/locales/lo-LA.yml +0 -1
  74. data/config/locales/oc-FR.yml +0 -1
@@ -1,11 +1,6 @@
1
+ ---
1
2
  ja:
2
3
  activemodel:
3
- attributes:
4
- post:
5
- body: 本文
6
- decidim_author_id: 作成者
7
- published_at: 公開時刻
8
- title: タイトル
9
4
  models:
10
5
  decidim/blogs/create_post_event: 新しいブログ投稿
11
6
  activerecord:
@@ -15,14 +10,16 @@ ja:
15
10
  decidim:
16
11
  blogs:
17
12
  actions:
13
+ author_id: 次のように投稿を作成
18
14
  confirm_destroy: この投稿を削除してもよろしいですか?
19
15
  destroy: 削除
20
16
  edit: 編集
21
17
  new: 新規投稿
22
18
  title: アクション
23
- user_group_id: 次のように投稿を作成
24
19
  admin:
25
20
  models:
21
+ components:
22
+ body: 本文
26
23
  post:
27
24
  name: 投稿
28
25
  posts:
@@ -42,6 +39,11 @@ ja:
42
39
  update:
43
40
  invalid: 投稿の保存中に問題が発生しました。
44
41
  success: 投稿を保存しました
42
+ admin_log:
43
+ post:
44
+ create: "%{user_name} が %{space_name} でブログ投稿 %{resource_name} を作成しました"
45
+ delete: "%{user_name} がブログ投稿 %{resource_name} を %{space_name} から削除しました"
46
+ update: "%{user_name} が %{space_name} のブログ投稿 %{resource_name} を更新しました"
45
47
  last_activity:
46
48
  new_post_at_html: "<span> %{link}に新しい投稿</span>"
47
49
  models:
@@ -63,10 +65,8 @@ ja:
63
65
  components:
64
66
  blogs:
65
67
  actions:
66
- comment: コメント
67
68
  create: 作成
68
69
  destroy: 削除
69
- endorse: オススメ
70
70
  update: 更新
71
71
  name: ブログ
72
72
  settings:
@@ -1 +1,2 @@
1
+ ---
1
2
  ko:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  lb:
2
3
  activemodel:
3
4
  models:
@@ -10,14 +11,16 @@ lb:
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Beitrag erstellen als
13
15
  confirm_destroy: Möchten Sie diesen Beitrag wirklich löschen?
14
16
  destroy: Löschen
15
17
  edit: Bearbeiten
16
18
  new: Neuer Beitrag
17
19
  title: Aktionen
18
- user_group_id: Beitrag erstellen als
19
20
  admin:
20
21
  models:
22
+ components:
23
+ body: Haupttext
21
24
  post:
22
25
  name: Post
23
26
  posts:
@@ -45,6 +48,7 @@ lb:
45
48
  author: Autor
46
49
  body: Haupttext
47
50
  created_at: Hergestellt in
51
+ title: Titel
48
52
  posts:
49
53
  show:
50
54
  back: Zurück zur Liste
@@ -1,87 +1,2 @@
1
+ ---
1
2
  lt:
2
- activemodel:
3
- attributes:
4
- post:
5
- published_at: Paskelbimo laikas
6
- models:
7
- decidim/blogs/create_post_event: Naujas tinklaraščio įrašas
8
- activerecord:
9
- models:
10
- decidim/blogs/post:
11
- one: Publikacija
12
- few: Publikacijos
13
- many: Publikacijos
14
- other: Publikacijos
15
- decidim:
16
- blogs:
17
- actions:
18
- confirm_destroy: Ar tikrai norite ištrinti šį įrašą?
19
- destroy: Ištrinti
20
- edit: Redaguoti
21
- new: Naujas įrašas
22
- title: Veiksmai
23
- user_group_id: Sukurti įrašą kaip
24
- admin:
25
- models:
26
- post:
27
- name: Publikacija
28
- posts:
29
- create:
30
- invalid: Kuriant šį įrašą iškilo problema
31
- success: Įrašas sukurtas sėkmingai
32
- destroy:
33
- success: Įrašas pašalintas
34
- edit:
35
- save: Atnaujinimas
36
- title: Redaguoti publikaciją
37
- index:
38
- title: Publikacijos
39
- new:
40
- create: Sukurti
41
- title: Sukurti publikaciją
42
- update:
43
- invalid: Išsaugant šį įrašą iškilo problema.
44
- success: Įrašas išsaugotas
45
- last_activity:
46
- new_post_at_html: "<span> Naujas įrašas %{link}</span>"
47
- models:
48
- post:
49
- fields:
50
- author: Autorė(-ius)
51
- body: Pagrindinė dalis
52
- created_at: Sukurta
53
- posts:
54
- show:
55
- back: Grįžti į sąrašą
56
- comments: Komentarai
57
- view: Peržiūrėti
58
- sidebar_blog:
59
- comments: komentarai
60
- most_commented_posts: Labiausiai komentuojamos publikacijos
61
- read_more: Skaityti daugiau
62
- components:
63
- blogs:
64
- actions:
65
- create: Sukurti
66
- destroy: Ištrinti
67
- update: Atnaujinti
68
- name: Tinklaraštis
69
- settings:
70
- global:
71
- announcement: Pranešimas
72
- comments_enabled: Komentarai įjungti
73
- comments_max_length: Maksimalus komentaro ilgis (įrašyti 0 įprastam ilgiui)
74
- step:
75
- announcement: Pranešimas
76
- comments_blocked: Komentarai užblokuoti
77
- endorsements_blocked: Pritarimai užblokuoti
78
- endorsements_enabled: Pritarimai aktyvuoti
79
- events:
80
- blogs:
81
- post_created:
82
- email_intro: Publikacija%{resource_title} buvo publikuota %{participatory_space_title} kurią sekate.
83
- email_outro: Gavote šį pranešimą nes sekate %{participatory_space_title}. Galite nebesekti dėka praėjusios nuorodos.
84
- email_subject: Nauja publikacija paskelbta %{participatory_space_title}
85
- notification_title: Publikacija <a href="%{resource_path}">%{resource_title}</a> buvo publikuota %{participatory_space_title}
86
- statistics:
87
- posts_count: Publikacijos
@@ -1,3 +1,4 @@
1
+ ---
1
2
  lv:
2
3
  activemodel:
3
4
  models:
@@ -18,6 +19,8 @@ lv:
18
19
  title: Darbības
19
20
  admin:
20
21
  models:
22
+ components:
23
+ body: Pamatteksts
21
24
  post:
22
25
  name: Ziņa
23
26
  posts:
@@ -44,6 +47,7 @@ lv:
44
47
  author: Autors
45
48
  body: Pamatteksts
46
49
  created_at: Izveidots plkst.
50
+ title: nosaukums
47
51
  posts:
48
52
  show:
49
53
  back: Atpakaļ uz sarakstu
@@ -1 +1,2 @@
1
+ ---
1
2
  mt:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  nl:
2
3
  activemodel:
3
4
  models:
@@ -6,18 +7,20 @@ nl:
6
7
  models:
7
8
  decidim/blogs/post:
8
9
  one: Post
9
- other: Posts
10
+ other: berichten
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Bericht aanmaken als
13
15
  confirm_destroy: Weet je zeker dat je dit bericht wilt verwijderen?
14
16
  destroy: Verwijder
15
17
  edit: Bewerk
16
- new: Nieuwe blogpost
18
+ new: Nieuw bericht
17
19
  title: acties
18
- user_group_id: Bericht aanmaken als
19
20
  admin:
20
21
  models:
22
+ components:
23
+ body: Tekstgedeelte
21
24
  post:
22
25
  name: Post
23
26
  posts:
@@ -35,8 +38,8 @@ nl:
35
38
  create: creëren
36
39
  title: Maak bericht
37
40
  update:
38
- invalid: Er zijn fouten opgetreden bij het opslaan van deze blogpost.
39
- success: Post succesvol opgeslagen
41
+ invalid: Er zijn fouten opgetreden bij het opslaan van het bericht.
42
+ success: Bericht succesvol opgeslagen
40
43
  last_activity:
41
44
  new_post_at_html: "<span>Nieuw bericht op %{link}</span>"
42
45
  models:
@@ -45,6 +48,7 @@ nl:
45
48
  author: Auteur
46
49
  body: Tekstgedeelte
47
50
  created_at: Aangemaakt op
51
+ title: titel
48
52
  posts:
49
53
  show:
50
54
  back: Terug naar het overzicht
@@ -1,3 +1,4 @@
1
+ ---
1
2
  "no":
2
3
  activemodel:
3
4
  models:
@@ -10,14 +11,16 @@
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Opprett innlegg som
13
15
  confirm_destroy: Er du sikker på at du vil slette dette innlegget?
14
16
  destroy: Slett
15
17
  edit: Editar
16
18
  new: Nytt innlegg
17
19
  title: Handlinger
18
- user_group_id: Opprett innlegg som
19
20
  admin:
20
21
  models:
22
+ components:
23
+ body: Tekst
21
24
  post:
22
25
  name: Innlegg
23
26
  posts:
@@ -45,6 +48,7 @@
45
48
  author: Forfatter
46
49
  body: Tekst
47
50
  created_at: Opprettet på
51
+ title: tittel
48
52
  posts:
49
53
  show:
50
54
  back: Tilbake til listen
@@ -1 +1,2 @@
1
+ ---
1
2
  om:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  pl:
2
3
  activemodel:
3
4
  models:
@@ -12,14 +13,16 @@ pl:
12
13
  decidim:
13
14
  blogs:
14
15
  actions:
16
+ author_id: Utwórz wpis jako
15
17
  confirm_destroy: Czy na pewno chcesz usunąć ten wpis?
16
18
  destroy: Usuń
17
19
  edit: Edytuj
18
20
  new: Nowy wpis
19
21
  title: Działania
20
- user_group_id: Utwórz wpis jako
21
22
  admin:
22
23
  models:
24
+ components:
25
+ body: Treść
23
26
  post:
24
27
  name: Wpis
25
28
  posts:
@@ -47,6 +50,7 @@ pl:
47
50
  author: Autor
48
51
  body: Treść
49
52
  created_at: Utworzono
53
+ title: Tytuł
50
54
  posts:
51
55
  show:
52
56
  back: Powrót do listy
@@ -1,4 +1,5 @@
1
- pt-BR:
1
+ ---
2
+ pt:
2
3
  activemodel:
3
4
  models:
4
5
  decidim/blogs/create_post_event: Nova postagem no blog
@@ -10,14 +11,16 @@ pt-BR:
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Criar publicação como
13
15
  confirm_destroy: Deseja mesmo excluir este post?
14
16
  destroy: Excluir
15
17
  edit: Editar
16
18
  new: Nova postagem
17
19
  title: Ações
18
- user_group_id: Criar publicação como
19
20
  admin:
20
21
  models:
22
+ components:
23
+ body: Corpo
21
24
  post:
22
25
  name: Postar
23
26
  posts:
@@ -45,6 +48,7 @@ pt-BR:
45
48
  author: Autor
46
49
  body: Corpo
47
50
  created_at: Criado em
51
+ title: título
48
52
  posts:
49
53
  show:
50
54
  back: Voltar para a lista
@@ -1,3 +1,4 @@
1
+ ---
1
2
  pt:
2
3
  activemodel:
3
4
  models:
@@ -10,14 +11,16 @@ pt:
10
11
  decidim:
11
12
  blogs:
12
13
  actions:
14
+ author_id: Criar publicação como
13
15
  confirm_destroy: Tem a certeza de que deseja eliminar esta publicação?
14
16
  destroy: Eliminar
15
17
  edit: Editar
16
18
  new: Nova publicação
17
19
  title: Ações
18
- user_group_id: Criar publicação como
19
20
  admin:
20
21
  models:
22
+ components:
23
+ body: Corpo
21
24
  post:
22
25
  name: Publicação
23
26
  posts:
@@ -45,6 +48,7 @@ pt:
45
48
  author: Autor
46
49
  body: Corpo
47
50
  created_at: Criado em
51
+ title: título
48
52
  posts:
49
53
  show:
50
54
  back: Retroceder à lista
@@ -1,11 +1,6 @@
1
+ ---
1
2
  ro:
2
3
  activemodel:
3
- attributes:
4
- post:
5
- body: Conținut
6
- decidim_author_id: Autor
7
- published_at: Publicat la
8
- title: Titlu
9
4
  models:
10
5
  decidim/blogs/create_post_event: Postare nouă pe blog
11
6
  activerecord:
@@ -17,14 +12,16 @@ ro:
17
12
  decidim:
18
13
  blogs:
19
14
  actions:
15
+ author_id: Creează postare ca
20
16
  confirm_destroy: Sigur dorești să ştergi această postare?
21
17
  destroy: Șterge
22
18
  edit: Editează
23
19
  new: Postare nouă
24
20
  title: Acțiuni
25
- user_group_id: Creează postare ca
26
21
  admin:
27
22
  models:
23
+ components:
24
+ body: Conținut
28
25
  post:
29
26
  name: Postează
30
27
  posts:
@@ -52,7 +49,7 @@ ro:
52
49
  author: Autor
53
50
  body: Conținut
54
51
  created_at: Creat la
55
- title: Titlu
52
+ title: titlu
56
53
  posts:
57
54
  show:
58
55
  back: Înapoi la listă
@@ -65,10 +62,8 @@ ro:
65
62
  components:
66
63
  blogs:
67
64
  actions:
68
- comment: Comentariu
69
65
  create: Creează
70
66
  destroy: Șterge
71
- endorse: Susține
72
67
  update: Actualizează
73
68
  name: Blog
74
69
  settings:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ru:
2
3
  activemodel:
3
4
  models:
@@ -19,6 +20,8 @@ ru:
19
20
  title: Действия
20
21
  admin:
21
22
  models:
23
+ components:
24
+ body: Основной текст
22
25
  post:
23
26
  name: Пост
24
27
  posts:
@@ -45,6 +48,7 @@ ru:
45
48
  author: Автор
46
49
  body: Основной текст
47
50
  created_at: 'Создано:'
51
+ title: заголовок
48
52
  posts:
49
53
  show:
50
54
  view: Посмотреть
@@ -1 +1,2 @@
1
+ ---
1
2
  si:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  sk:
2
3
  activemodel:
3
4
  models:
@@ -19,6 +20,8 @@ sk:
19
20
  title: Akcie
20
21
  admin:
21
22
  models:
23
+ components:
24
+ body: Telo textu
22
25
  post:
23
26
  name: Príspevok
24
27
  posts:
@@ -45,6 +48,7 @@ sk:
45
48
  author: Autor
46
49
  body: Telo textu
47
50
  created_at: Vytvorené
51
+ title: názov
48
52
  posts:
49
53
  show:
50
54
  back: Späť na zoznam
@@ -1,3 +1,4 @@
1
+ ---
1
2
  sl:
2
3
  decidim:
3
4
  blogs:
@@ -1 +1,2 @@
1
+ ---
1
2
  so:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  sr:
2
3
  decidim:
3
4
  blogs:
@@ -1,9 +1,6 @@
1
+ ---
1
2
  sv:
2
3
  activemodel:
3
- attributes:
4
- post:
5
- decidim_author_id: Författare
6
- title: Titel
7
4
  models:
8
5
  decidim/blogs/create_post_event: Nytt blogginlägg
9
6
  activerecord:
@@ -14,14 +11,16 @@ sv:
14
11
  decidim:
15
12
  blogs:
16
13
  actions:
14
+ author_id: Skapa inlägg som
17
15
  confirm_destroy: Vill du radera inlägget?
18
16
  destroy: Radera
19
17
  edit: Redigera
20
18
  new: Nytt inlägg
21
19
  title: Åtgärder
22
- user_group_id: Skapa inlägg som
23
20
  admin:
24
21
  models:
22
+ components:
23
+ body: Innehåll
25
24
  post:
26
25
  name: Publicera
27
26
  posts:
@@ -49,7 +48,8 @@ sv:
49
48
  author: Författare
50
49
  body: Innehåll
51
50
  created_at: Skapad
52
- title: Titel
51
+ official_blog_post: Officiellt inlägg
52
+ title: titel
53
53
  posts:
54
54
  show:
55
55
  back: Tillbaka till listan
@@ -1 +1,2 @@
1
+ ---
1
2
  sw:
@@ -1 +1,2 @@
1
+ ---
1
2
  ti:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  tr:
2
3
  activemodel:
3
4
  models:
@@ -17,6 +18,8 @@ tr:
17
18
  title: Eylemler
18
19
  admin:
19
20
  models:
21
+ components:
22
+ body: Vücut
20
23
  post:
21
24
  name: posta
22
25
  posts:
@@ -44,6 +47,7 @@ tr:
44
47
  author: Yazar
45
48
  body: Vücut
46
49
  created_at: Adresinde düzenlendi
50
+ title: Başlık
47
51
  posts:
48
52
  show:
49
53
  back: Listeye geri dön
@@ -1,3 +1,4 @@
1
+ ---
1
2
  uk:
2
3
  activemodel:
3
4
  models:
@@ -19,6 +20,8 @@ uk:
19
20
  title: Дії
20
21
  admin:
21
22
  models:
23
+ components:
24
+ body: Основний текст
22
25
  post:
23
26
  name: Допис
24
27
  posts:
@@ -43,6 +46,7 @@ uk:
43
46
  author: Автор
44
47
  body: Основний текст
45
48
  created_at: 'Створено:'
49
+ title: заголовок
46
50
  posts:
47
51
  show:
48
52
  view: Переглянути
@@ -1 +1,2 @@
1
+ ---
1
2
  val:
@@ -1 +1,2 @@
1
+ ---
1
2
  vi:
@@ -1,3 +1,4 @@
1
+ ---
1
2
  zh-CN:
2
3
  activemodel:
3
4
  models:
@@ -16,6 +17,8 @@ zh-CN:
16
17
  title: 行动
17
18
  admin:
18
19
  models:
20
+ components:
21
+ body: 正文内容
19
22
  post:
20
23
  name: 帖子
21
24
  posts:
@@ -42,6 +45,7 @@ zh-CN:
42
45
  author: 作者
43
46
  body: 正文内容
44
47
  created_at: 创建于
48
+ title: 标题
45
49
  posts:
46
50
  show:
47
51
  back: 返回列表
@@ -1 +1,2 @@
1
+ ---
1
2
  zh-TW:
@@ -36,7 +36,7 @@ Decidim.register_component(:blogs) do |component|
36
36
  component.register_resource(:blogpost) do |resource|
37
37
  resource.model_class_name = "Decidim::Blogs::Post"
38
38
  resource.card = "decidim/blogs/post"
39
- resource.actions = %w(endorse comment)
39
+ resource.actions = %w(endorse vote amend comment)
40
40
  resource.searchable = true
41
41
  end
42
42
 
@@ -72,8 +72,14 @@ Decidim.register_component(:blogs) do |component|
72
72
  Decidim::Component.create!(params)
73
73
  end
74
74
 
75
- 5.times do
76
- author = Decidim::User.where(organization: component.organization).all.first
75
+ 6.times do |n|
76
+ author = if n >= 3
77
+ Decidim::User.where(organization: component.organization).order(Arel.sql("RANDOM()")).first
78
+ elsif n <= 1
79
+ Decidim::UserGroup.where(organization: component.organization).order(Arel.sql("RANDOM()")).first
80
+ else
81
+ component.organization
82
+ end
77
83
 
78
84
  params = {
79
85
  component: component,
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-pages version.
5
5
  module Blogs
6
6
  def self.version
7
- "0.26.5"
7
+ "0.27.0.rc1"
8
8
  end
9
9
  end
10
10
  end