Skip to content

Commit

Permalink
Translation: desktop-client/components/payees/PayeeMenu (actualbudget…
Browse files Browse the repository at this point in the history
…#3670)

* Translation: desktop-client/components/payees/PayeeMenu

* Add release notes

* Merge master

* Remove dynamic values from selected payee translation
  • Loading branch information
glorenzen authored Nov 12, 2024
1 parent 1e1092e commit db68170
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/desktop-client/src/components/payees/PayeeMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { useTranslation } from 'react-i18next';

import { type PayeeEntity } from 'loot-core/src/types/models';

import { SvgDelete, SvgMerge } from '../../icons/v0';
Expand All @@ -23,6 +25,8 @@ export function PayeeMenu({
onFavorite,
onClose,
}: PayeeMenuProps) {
const { t } = useTranslation();

// Transfer accounts are never editable
const isDisabled = [...selectedPayees].some(
id => payeesById[id] == null || payeesById[id].transfer_acct,
Expand Down Expand Up @@ -57,28 +61,28 @@ export function PayeeMenu({
{[...selectedPayees]
.slice(0, 4)
.map(id => payeesById[id].name)
.join(', ') + (selectedPayees.size > 4 ? ', and more' : '')}
.join(', ') + (selectedPayees.size > 4 ? t(', and more') : '')}
</View>
}
items={[
{
icon: SvgDelete,
name: 'delete',
text: 'Delete',
text: t('Delete'),
disabled: isDisabled,
},
{
icon: SvgBookmark,
iconSize: 9,
name: 'favorite',
text: 'Favorite',
text: t('Favorite'),
disabled: isDisabled,
},
{
icon: SvgMerge,
iconSize: 9,
name: 'merge',
text: 'Merge',
text: t('Merge'),
disabled: isDisabled || selectedPayees.size < 2,
},
Menu.line,
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/3670.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [glorenzen]
---

Support translations in packages/desktop-client/src/components/payees/PayeeMenu.tsx.

0 comments on commit db68170

Please sign in to comment.