add localized translation placeholders

This commit is contained in:
Max Hao
2026-06-10 19:06:44 +02:00
committed by Linus Rath
parent f2913a7c7d
commit 7c11e2b3c9
2 changed files with 11 additions and 5 deletions
+6 -4
View File
@@ -2747,6 +2747,8 @@ function RecipientChipInput({
validationMessage?: string;
onTab?: () => void;
}) {
const t = useTranslations('email_composer');
const tCommon = useTranslations('common');
const { contextMenu, openContextMenu, closeContextMenu, menuRef } = useContextMenu<{ index: number; chip: string }>();
const [editingChip, setEditingChip] = useState<{ index: number; chip: string; editType: 'email' | 'name' } | null>(null);
const [editValue, setEditValue] = useState('');
@@ -2963,7 +2965,7 @@ function RecipientChipInput({
handleSaveEdit(editValue);
}}
className="flex-1 min-w-[80px] border-0 outline-none h-5 text-sm bg-transparent text-foreground placeholder:text-muted-foreground"
placeholder={editingChip?.editType === 'email' ? 'Email address' : 'Display name'}
placeholder={editingChip?.editType === 'email' ? t('recipient_email_placeholder') : t('recipient_name_placeholder')}
data-bwignore="true"
/>
) : (
@@ -3039,10 +3041,10 @@ function RecipientChipInput({
{formatChipDisplay(contextMenu.data.chip)}
</div>
<ContextMenuSeparator />
<ContextMenuItem label="Edit email address" onClick={handleEditEmail} />
<ContextMenuItem label="Edit display name" onClick={handleEditName} />
<ContextMenuItem label={t('recipient_edit_email')} onClick={handleEditEmail} />
<ContextMenuItem label={t('recipient_edit_name')} onClick={handleEditName} />
<ContextMenuSeparator />
<ContextMenuItem label="Remove" onClick={() => {
<ContextMenuItem label={tCommon('delete')} onClick={() => {
if (contextMenu.data) {
handleChipRemove(contextMenu.data.index, { stopPropagation: () => {} } as React.MouseEvent);
}