chore(i18n): Improvements in automation and macros (#11231)
# Pull Request Template ## Description This PR includes, 1. **Sort Accounts List** – Orders the accounts list alphabetically for better organization. 2. **Add Missing Translations in Automation** – Includes missing translations for actions, events, and conditions dropdown. 3. **Fix Missing Translation in Macros** – Adds missing translations in the macros action select dropdown. 4. Translate "Automation System" Username – Ensures the "Automation System" username is properly translated. Fixes: https://linear.app/chatwoot/issue/CW-4198/issues-[converso] ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules
This commit is contained in:
@@ -68,7 +68,7 @@ module ActivityMessageHandler
|
||||
|
||||
def automation_status_change_activity_content
|
||||
if Current.executed_by.instance_of?(AutomationRule)
|
||||
I18n.t("conversations.activity.status.#{status}", user_name: 'Automation System')
|
||||
I18n.t("conversations.activity.status.#{status}", user_name: I18n.t('automation.system_name'))
|
||||
elsif Current.executed_by.instance_of?(Contact)
|
||||
Current.executed_by = nil
|
||||
I18n.t('conversations.activity.status.system_auto_open')
|
||||
@@ -111,7 +111,7 @@ module ActivityMessageHandler
|
||||
end
|
||||
|
||||
def activity_message_owner(user_name)
|
||||
user_name = 'Automation System' if !user_name && Current.executed_by.present?
|
||||
user_name = I18n.t('automation.system_name') if !user_name && Current.executed_by.present?
|
||||
user_name
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,7 +7,7 @@ module PriorityActivityMessageHandler
|
||||
old_priority, new_priority = previous_changes.values_at('priority')[0]
|
||||
return unless priority_change?(old_priority, new_priority)
|
||||
|
||||
user = Current.executed_by.instance_of?(AutomationRule) ? 'Automation System' : user_name
|
||||
user = Current.executed_by.instance_of?(AutomationRule) ? I18n.t('automation.system_name') : user_name
|
||||
content = build_priority_change_content(user, old_priority, new_priority)
|
||||
|
||||
::Conversations::ActivityMessageJob.perform_later(self, activity_message_params(content)) if content
|
||||
|
||||
Reference in New Issue
Block a user