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:
@@ -26,6 +26,12 @@ const showAccountSwitcher = computed(
|
||||
() => userAccounts.value.length > 1 && currentAccount.value.name
|
||||
);
|
||||
|
||||
const sortedCurrentUserAccounts = computed(() => {
|
||||
return [...(currentUser.value.accounts || [])].sort((a, b) =>
|
||||
a.name.localeCompare(b.name)
|
||||
);
|
||||
});
|
||||
|
||||
const onChangeAccount = newId => {
|
||||
const accountUrl = `/app/accounts/${newId}/dashboard`;
|
||||
window.location.href = accountUrl;
|
||||
@@ -70,7 +76,7 @@ const emitNewAccount = () => {
|
||||
<DropdownBody v-if="showAccountSwitcher" class="min-w-80 z-50">
|
||||
<DropdownSection :title="t('SIDEBAR_ITEMS.SWITCH_ACCOUNT')">
|
||||
<DropdownItem
|
||||
v-for="account in currentUser.accounts"
|
||||
v-for="account in sortedCurrentUserAccounts"
|
||||
:id="`account-${account.id}`"
|
||||
:key="account.id"
|
||||
class="cursor-pointer"
|
||||
|
||||
Reference in New Issue
Block a user