effective_messaging 0.1.6 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d37eb42009c2a8b1145f7e8cd7b35cd855ccbb3ec7a242a2f8c0aecf25ac3ada
4
- data.tar.gz: 47e1d414597b4e055e78dd7fac10bb69ebc74aa2eb1daef1b432d8a952798d90
3
+ metadata.gz: e35295ff8cf6a9a6853b90d759fac39fab3bc3c72525811069334ab8cf3fef34
4
+ data.tar.gz: aa9ae425f27a31c1451022c85c4d725fc5021c6086e3df9c2692294182288962
5
5
  SHA512:
6
- metadata.gz: aba43008da596da217249e50059c97308e0583984e37823e3604f481980a882eee20d8ef6f074a649b46b2d305bbfe70c254cc748aa54d333c276a0cba218442
7
- data.tar.gz: e16f2c230b43c1d39a47ea7a1e761894c1c02ecb05e4cc1ee6fe5442833a7c2ed96fdb660ae907c23ba2a33e0159eb95765ec6843f203ef0ec4b1720720d8562
6
+ metadata.gz: ee5b67860a4d555136248666481efd153549b9a1a1503a577e35c30d3f1f3d05933585dfed3a3be1f0fb6793211ef597c2bc187957fff8a0777fdd01b3ee36b0
7
+ data.tar.gz: 6bd025233cd26a5f6e99cd22e6601e190423dc3e3990d9ccb9976161a2436aaf56dfba8fa56f405c16fcbb8c2776b8d127d9fc81c12d4b11588ebe0752e91bfd
@@ -5,11 +5,11 @@ class EffectiveChatsDatatable < Effective::Datatable
5
5
 
6
6
  col :token, visible: false
7
7
  col :created_at, visible: false
8
- col :updated_at, label: 'Last message'
8
+ col :updated_at, label: 'Last active'
9
9
 
10
10
  col :title
11
- col :chat_users, label: 'Participants'
12
- col :chat_messages_count, label: 'Messages'
11
+ col :chat_users
12
+ col :chat_messages_count, label: ets(Effective::ChatMessage)
13
13
 
14
14
  actions_col
15
15
  end
@@ -1,5 +1,5 @@
1
1
  = tabs do
2
- = tab "Chat" do
2
+ = tab(chat) do
3
3
  = render 'admin/chats/form_chat', chat: chat
4
4
 
5
5
  - if chat.persisted?
@@ -3,15 +3,15 @@
3
3
 
4
4
  - if f.object.anonymous?
5
5
  = f.static_field :anonymous do
6
- %p Yes, this is an anonymous chat. User names and emails will not be displayed
6
+ %p Yes, this is an anonymous #{etd(f.object)}. User names and emails will not be displayed
7
7
  - else
8
- = f.check_box :anonymous, label: 'Yes, this is an anonymous chat', hint: 'user names and emails will not be displayed'
8
+ = f.check_box :anonymous, label: "Yes, this is an anonymous #{etd(f.object)}", hint: 'user names and emails will not be displayed'
9
9
 
10
10
  = f.hidden_field :user_type, value: current_user.class.name
11
11
 
12
12
  - ajax_url = (@select2_ajax_path || effective_resources.users_admin_select2_ajax_index_path) unless Rails.env.test?
13
13
 
14
- = f.select :user_ids, current_user.class.all, required: true,
15
- ajax_url: ajax_url, hint: 'The users that can participate in this chat'
14
+ = f.select :user_ids, current_user.class.all, required: true, label: ets(chat.chat_users),
15
+ ajax_url: ajax_url, hint: "The users that can participate in this #{etd(f.object)}"
16
16
 
17
17
  = effective_submit(f)
@@ -7,7 +7,7 @@
7
7
  = render(partial: 'effective/chats/chat_message', collection: chat.chat_messages, chat: chat)
8
8
 
9
9
  - if chat.chat_messages.blank?
10
- %p There are no messages so far. Please send one!
10
+ %p There are no #{etsd(chat.chat_messages)} so far. Please send one!
11
11
 
12
12
  %hr
13
13
 
@@ -16,12 +16,12 @@
16
16
 
17
17
  .card
18
18
  .card-header.bg-secondary
19
- Send message
19
+ = et('effective_messaging.send')
20
20
  .card-body
21
21
  %p Your name is displayed as <strong>#{chat_user.name}</strong>
22
22
 
23
23
  = f.fields_for :chat_messages, chat_message do |fcm|
24
24
  - # The user and name are set by controller's current_user
25
- = fcm.text_area :body, required: true, label: 'Send message...'
25
+ = fcm.text_area :body, required: true, label: 'Send a message...'
26
26
 
27
- = f.submit 'Send Message'
27
+ = f.submit et('effective_messaging.send')
@@ -6,16 +6,16 @@
6
6
  = badges('anonymous')
7
7
 
8
8
  = succeed('.') do
9
- A chat with
9
+ A #{etd(chat)} with
10
10
 
11
11
  - if current_chat_user.present? && chat_users_count < 5
12
12
  = (chat.chat_users - [current_chat_user]).map(&:name).to_sentence
13
13
  - else
14
- = pluralize(chat_users_count, 'participants')
14
+ = pluralize(chat_users_count, etd(chat.chat_users))
15
15
 
16
16
  opened
17
17
  = time_ago_in_words(chat.created_at)
18
18
  ago
19
19
 
20
20
  = succeed('.') do
21
- = pluralize(chat.chat_messages_count, 'message')
21
+ = pluralize(chat.chat_messages_count, etd(chat.chat_messages))
@@ -1,10 +1,10 @@
1
- %h2 Messages and Chat
1
+ %h2= t('effective_messaging.dashboard')
2
2
 
3
3
  - if current_user.chats.present?
4
- %p You are a member of #{pluralize(current_user.chats.length, 'chat')}.
4
+ %p You are a #{etd(Effective::ChatUser)} of #{pluralize(current_user.chats.length, etd(Effective::Chat))}.
5
5
 
6
6
  - datatable = EffectiveResources.best('EffectiveChatsDatatable').new(self, namespace: :effective)
7
7
  = render_datatable(datatable, simple: true)
8
8
 
9
9
  - else
10
- %p You haven't received any messages. When you do, we'll show it here.
10
+ %p You haven't received any #{etsd(Effective::ChatMessage)}. When you do, we'll show it here.
@@ -0,0 +1,12 @@
1
+ en:
2
+ effective_messaging:
3
+ name: 'Effective Messaging'
4
+ acronym: 'Messaging'
5
+ dashboard: 'Chat Messages'
6
+ send: 'Send Message'
7
+
8
+ activerecord:
9
+ models:
10
+ effective/chat: 'Chat'
11
+ effective/chat_user: 'Chat Participant'
12
+ effective/chat_message: 'Chat Message'
@@ -1,3 +1,3 @@
1
1
  module EffectiveMessaging
2
- VERSION = '0.1.6'.freeze
2
+ VERSION = '0.1.8'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-09 00:00:00.000000000 Z
11
+ date: 2023-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -227,6 +227,7 @@ files:
227
227
  - app/views/effective/messaging/_dashboard.html.haml
228
228
  - app/views/effective/messaging_mailer/chat_new_message.liquid
229
229
  - config/effective_messaging.rb
230
+ - config/locales/effective_messaging.yml
230
231
  - config/routes.rb
231
232
  - db/migrate/01_create_effective_messaging.rb.erb
232
233
  - db/seeds.rb