diff --git a/app/models/conversation.rb b/app/models/conversation.rb index 7dabd9712..db88caa34 100644 --- a/app/models/conversation.rb +++ b/app/models/conversation.rb @@ -30,7 +30,14 @@ class Conversation < ApplicationRecord def self.grouped_by_increasing_time_interval_for_user(user) nav_conversations = user.conversations.ordered - keys = ["Today", "Yesterday", "This Week", "This Month", "Last Month", "Older"] + keys = [ + I18n.t('models.conversation.groupings.today'), + I18n.t('models.conversation.groupings.yesterday'), + I18n.t('models.conversation.groupings.this_week'), + I18n.t('models.conversation.groupings.this_month'), + I18n.t('models.conversation.groupings.last_month'), + I18n.t('models.conversation.groupings.older'), + ] values = [ nil, Date.current.beginning_of_day, diff --git a/app/models/document.rb b/app/models/document.rb index e8181ab86..43c6e5a15 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -70,7 +70,7 @@ def set_default_bytes end def file_present - errors.add(:file, "must be attached") unless file.attached? + errors.add(:file) unless file.attached? end def wait_for_file_variant_to_process!(variant) diff --git a/app/models/message.rb b/app/models/message.rb index d76b56e2d..cfc764da1 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -49,11 +49,11 @@ def create_conversation end def validate_conversation - errors.add(:conversation, 'is invalid') unless conversation.user == Current.user + errors.add(:conversation) unless conversation.user == Current.user end def validate_assistant - errors.add(:assistant, 'is invalid') unless assistant.user == Current.user + errors.add(:assistant) unless assistant.user == Current.user end def start_assistant_reply diff --git a/app/models/person.rb b/app/models/person.rb index 5ab7be58d..5cf4e8463 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -19,13 +19,13 @@ class Person < ApplicationRecord def personable_id_unchanged if personable_id_changed? && persisted? - errors.add(:personable_id, "cannot be changed after creation") + errors.add(:personable_id) end end def proper_personable_id if personable_id.present? && personable.id.blank? - errors.add(:personable_id, 'must be provided on update') + errors.add(:personable_id) end end end diff --git a/app/views/authentications/new.html.erb b/app/views/authentications/new.html.erb index fcf042545..c1d0a7ca3 100644 --- a/app/views/authentications/new.html.erb +++ b/app/views/authentications/new.html.erb @@ -4,16 +4,16 @@ <%= image_tag("logo.svg", width: "24", height: "24", class: "text-gray-950") %> -