fix: say Moving, not Adding, in the Move to address book dialog

This commit is contained in:
Linus Rath
2026-10-28 09:56:39 +01:00
parent 6c63b6f5b8
commit b882d4b4de
31 changed files with 48 additions and 1 deletions
@@ -0,0 +1,18 @@
import { render, screen } from '@testing-library/react';
import { describe, it, expect, vi } from 'vitest';
import { AddressBookPickerDialog } from '../address-book-picker-dialog';
import type { AddressBook } from '@/lib/jmap/types';
// next-intl is mocked globally (t returns the key).
const books = [
{ id: 'b1', name: 'Personal' },
{ id: 'b2', name: 'Work' },
] as unknown as AddressBook[];
describe('AddressBookPickerDialog', () => {
it('says the contacts are being moved, not added', () => {
render(<AddressBookPickerDialog isOpen onClose={vi.fn()} addressBooks={books} currentId="b1" count={1} onPick={vi.fn()} />);
expect(screen.getByText('bulk.moving_contacts')).toBeInTheDocument();
expect(screen.queryByText('bulk.adding_contacts')).toBeNull();
});
});
@@ -30,7 +30,7 @@ export function AddressBookPickerDialog({ isOpen, onClose, addressBooks, current
isOpen={isOpen}
onClose={onClose}
title={t("address_books.move_title")}
description={t("bulk.adding_contacts", { count })}
description={t("bulk.moving_contacts", { count })}
onSubmit={(e) => {
e.preventDefault();
if (!choice) return;
+1
View File
@@ -3546,6 +3546,7 @@
"choose_group": "اختر مجموعة",
"new_group": "مجموعة جديدة…",
"adding_contacts": "جارٍ إضافة {count, plural, one {جهة اتصال واحدة} other {# جهة اتصال}}",
"moving_contacts": "جارٍ نقل {count, plural, one {جهة اتصال واحدة} other {# جهة اتصال}}",
"added_to_group": "تمت إضافة جهات الاتصال إلى المجموعة",
"export": "تصدير",
"clear": "إلغاء التحديد"
+1
View File
@@ -3546,6 +3546,7 @@
"choose_group": "Trieu un grup",
"new_group": "Grup nou…",
"adding_contacts": "Afegint {count, plural, one {1 contacte} other {# contactes}}",
"moving_contacts": "Movent {count, plural, one {1 contacte} other {# contactes}}",
"added_to_group": "Contactes afegits al grup",
"export": "Exporta",
"clear": "Neteja la selecció"
+1
View File
@@ -3544,6 +3544,7 @@
"choose_group": "Vyberte skupinu",
"new_group": "Nová skupina…",
"adding_contacts": "Přidávání {count, plural, one {1 kontaktu} few {# kontaktů} other {# kontaktů}}",
"moving_contacts": "Přesouvání {count, plural, one {1 kontaktu} few {# kontaktů} other {# kontaktů}}",
"added_to_group": "Kontakty byly přidány do skupiny",
"export": "Exportovat",
"clear": "Zrušit výběr"
+1
View File
@@ -3544,6 +3544,7 @@
"choose_group": "Vælg en gruppe",
"new_group": "Ny gruppe…",
"adding_contacts": "Tilføjer {count, plural, one {1 kontakt} other {# kontakter}}",
"moving_contacts": "Flytter {count, plural, one {1 kontakt} other {# kontakter}}",
"added_to_group": "Kontakter tilføjet til gruppe",
"export": "Eksportér",
"clear": "Ryd markering"
+1
View File
@@ -3544,6 +3544,7 @@
"choose_group": "Gruppe wählen",
"new_group": "Neue Gruppe…",
"adding_contacts": "{count, plural, one {1 Kontakt} other {# Kontakte}} hinzufügen",
"moving_contacts": "{count, plural, one {1 Kontakt} other {# Kontakte}} verschieben",
"added_to_group": "Kontakte zur Gruppe hinzugefügt",
"export": "Exportieren",
"clear": "Auswahl aufheben"
+1
View File
@@ -3546,6 +3546,7 @@
"choose_group": "Choose a group",
"new_group": "New group…",
"adding_contacts": "Adding {count, plural, one {1 contact} other {# contacts}}",
"moving_contacts": "Moving {count, plural, one {1 contact} other {# contacts}}",
"added_to_group": "Contacts added to group",
"export": "Export",
"clear": "Clear selection"
+1
View File
@@ -3544,6 +3544,7 @@
"choose_group": "Elegir un grupo",
"new_group": "Nuevo grupo…",
"adding_contacts": "Agregando {count, plural, one {1 contacto} other {# contactos}}",
"moving_contacts": "Moviendo {count, plural, one {1 contacto} other {# contactos}}",
"added_to_group": "Contactos agregados al grupo",
"export": "Exportar",
"clear": "Limpiar selección"
+1
View File
@@ -3546,6 +3546,7 @@
"choose_group": "Vali grupp",
"new_group": "Uus rühm…",
"adding_contacts": "Lisamine: {count, plural, one {1 kontakt} other {# kontakti}}",
"moving_contacts": "Teisaldamine: {count, plural, one {1 kontakt} other {# kontakti}}",
"added_to_group": "Kontaktid lisati gruppi",
"export": "Eksport",
"clear": "Tühista valik"
+1
View File
@@ -3546,6 +3546,7 @@
"choose_group": "انتخاب گروه",
"new_group": "گروه جدید…",
"adding_contacts": "افزودن {count, plural, one {۱ مخاطب} other {# مخاطب}}",
"moving_contacts": "انتقال {count, plural, one {۱ مخاطب} other {# مخاطب}}",
"added_to_group": "مخاطبین به گروه اضافه شدند",
"export": "خروجی",
"clear": "پاک کردن انتخاب"
+1
View File
@@ -3544,6 +3544,7 @@
"choose_group": "Choisir un groupe",
"new_group": "Nouveau groupe…",
"adding_contacts": "Ajout de {count, plural, one {1 contact} other {# contacts}}",
"moving_contacts": "Déplacement de {count, plural, one {1 contact} other {# contacts}}",
"added_to_group": "Contacts ajoutés au groupe",
"export": "Exporter",
"clear": "Effacer la sélection"
+1
View File
@@ -3448,6 +3448,7 @@
"choose_group": "בחר קבוצה",
"new_group": "קבוצה חדשה…",
"adding_contacts": "מוסיף {count, plural, one {איש קשר אחד} other {# אנשי קשר}}",
"moving_contacts": "מעביר {count, plural, one {איש קשר אחד} other {# אנשי קשר}}",
"added_to_group": "אנשי קשר נוספו לקבוצה",
"export": "ייצוא",
"clear": "נקה בחירה"
+1
View File
@@ -3546,6 +3546,7 @@
"choose_group": "Csoport kiválasztása",
"new_group": "Új csoport…",
"adding_contacts": "{count, plural, one {1 névjegy} other {# névjegy}} hozzáadása",
"moving_contacts": "{count, plural, one {1 névjegy} other {# névjegy}} áthelyezése",
"added_to_group": "Névjegyek hozzáadva a csoporthoz",
"export": "Exportálás",
"clear": "Kijelölés megszüntetése"
+1
View File
@@ -3544,6 +3544,7 @@
"choose_group": "Scegli un gruppo",
"new_group": "Nuovo gruppo…",
"adding_contacts": "Aggiunta di {count, plural, one {1 contatto} other {# contatti}}",
"moving_contacts": "Spostamento di {count, plural, one {1 contatto} other {# contatti}}",
"added_to_group": "Contatti aggiunti al gruppo",
"export": "Esporta",
"clear": "Cancella selezione"
+1
View File
@@ -3544,6 +3544,7 @@
"choose_group": "グループを選択",
"new_group": "新しいグループ…",
"adding_contacts": "{count, plural, other {#件の連絡先}}を追加",
"moving_contacts": "{count, plural, other {#件の連絡先}}を移動",
"added_to_group": "連絡先をグループに追加しました",
"export": "エクスポート",
"clear": "選択を解除"
+1
View File
@@ -3544,6 +3544,7 @@
"choose_group": "그룹 선택",
"new_group": "새 그룹…",
"adding_contacts": "{count}개의 연락처를 추가하는 중...",
"moving_contacts": "연락처 {count}개 이동",
"added_to_group": "연락처가 그룹에 추가되었어요",
"export": "내보내기",
"clear": "선택 취소"
+1
View File
@@ -3536,6 +3536,7 @@
"choose_group": "Izvēlēties grupu",
"new_group": "Jauna grupa…",
"adding_contacts": "Pievieno {count, plural, one {1 kontaktu} other {# kontaktus}}",
"moving_contacts": "Pārvieto {count, plural, one {1 kontaktu} other {# kontaktus}}",
"added_to_group": "Kontakti pievienoti grupai",
"export": "Eksportēt",
"clear": "Notīrīt atlasi"
+1
View File
@@ -3546,6 +3546,7 @@
"choose_group": "Бүлэг сонгох",
"new_group": "Шинэ бүлэг…",
"adding_contacts": "{count, plural, one {1 контакт} other {# контакт}} нэмэж байна",
"moving_contacts": "{count, plural, one {1 контакт} other {# контакт}} зөөж байна",
"added_to_group": "Харилцагчдыг группт нэмсэн",
"export": "Экспорт хийх",
"clear": "Сонголтыг арилгах"
+1
View File
@@ -3546,6 +3546,7 @@
"choose_group": "Velg en gruppe",
"new_group": "Ny gruppe…",
"adding_contacts": "Legger til {count, plural, one {1 kontakt} other {# kontakter}}",
"moving_contacts": "Flytter {count, plural, one {1 kontakt} other {# kontakter}}",
"added_to_group": "Kontaktene er lagt til i gruppen",
"export": "Eksporter",
"clear": "Fjern valg"
+1
View File
@@ -3544,6 +3544,7 @@
"choose_group": "Kies een groep",
"new_group": "Nieuwe groep…",
"adding_contacts": "{count, plural, one {1 contact} other {# contacten}} toevoegen",
"moving_contacts": "{count, plural, one {1 contact} other {# contacten}} verplaatsen",
"added_to_group": "Contacten aan groep toegevoegd",
"export": "Exporteren",
"clear": "Selectie wissen"
+1
View File
@@ -3544,6 +3544,7 @@
"choose_group": "Wybierz grupę",
"new_group": "Nowa grupa…",
"adding_contacts": "Dodawanie {count, plural, one {1 kontaktu} other {# kontaktów}}",
"moving_contacts": "Przenoszenie {count, plural, one {1 kontaktu} other {# kontaktów}}",
"added_to_group": "Kontakty dodano do grupy",
"export": "Eksportuj",
"clear": "Wyczyść zaznaczenie"
+1
View File
@@ -3544,6 +3544,7 @@
"choose_group": "Escolher um grupo",
"new_group": "Novo grupo…",
"adding_contacts": "Adicionando {count, plural, one {1 contato} other {# contatos}}",
"moving_contacts": "Movendo {count, plural, one {1 contato} other {# contatos}}",
"added_to_group": "Contatos adicionados ao grupo",
"export": "Exportar",
"clear": "Limpar seleção"
+1
View File
@@ -3546,6 +3546,7 @@
"choose_group": "Alegeți un grup",
"new_group": "Grup nou…",
"adding_contacts": "Adăugare {count, plural, one {1 contact} few {# contacte} other {# de contacte}}",
"moving_contacts": "Mutare {count, plural, one {1 contact} few {# contacte} other {# de contacte}}",
"added_to_group": "Contacte adăugate la grup",
"export": "Export",
"clear": "Șterge selecția"
+1
View File
@@ -3544,6 +3544,7 @@
"choose_group": "Выбрать группу",
"new_group": "Новая группа…",
"adding_contacts": "Добавляем {count, plural, one {1 контакт} other {# контактов}}",
"moving_contacts": "Перемещение {count, plural, one {# контакта} other {# контактов}}",
"added_to_group": "Контакты добавлены в группу",
"export": "Экспорт",
"clear": "Очистить выбор"
+1
View File
@@ -3546,6 +3546,7 @@
"choose_group": "Vyberte skupinu",
"new_group": "Nová skupina…",
"adding_contacts": "Pridávanie {count, plural, one {1 kontaktu} other {# kontaktov}}",
"moving_contacts": "Presúvanie {count, plural, one {1 kontaktu} other {# kontaktov}}",
"added_to_group": "Kontakty boli pridané do skupiny",
"export": "Exportovať",
"clear": "Zrušiť výber"
+1
View File
@@ -2670,6 +2670,7 @@
"choose_group": "เลือกกลุ่ม",
"new_group": "กลุ่มใหม่…",
"adding_contacts": "กำลังเพิ่มผู้ติดต่อ {count, plural, one {1 รายการ} other {# รายการ}}",
"moving_contacts": "กำลังย้ายผู้ติดต่อ {count, plural, one {1 รายการ} other {# รายการ}}",
"added_to_group": "เพิ่มผู้ติดต่อในกลุ่มแล้ว",
"export": "ส่งออก",
"clear": "ล้างการเลือก"
+1
View File
@@ -3544,6 +3544,7 @@
"choose_group": "Grup seçin",
"new_group": "Yeni grup…",
"adding_contacts": "{count, plural, one {1 kişi} other {# kişi}} ekleniyor",
"moving_contacts": "{count, plural, one {1 kişi} other {# kişi}} taşınıyor",
"added_to_group": "Kişiler gruba eklendi",
"export": "Dışa Aktar",
"clear": "Seçimi temizle"
+1
View File
@@ -3544,6 +3544,7 @@
"choose_group": "Виберіть групу",
"new_group": "Нова група…",
"adding_contacts": "Додавання {count, plural, one {1 contact} other {# contacts}}",
"moving_contacts": "Переміщення {count, plural, one {# контакту} other {# контактів}}",
"added_to_group": "Контакти додано до групи",
"export": "Експорт",
"clear": "Очистити вибір"
+1
View File
@@ -3546,6 +3546,7 @@
"choose_group": "選擇群組",
"new_group": "新增群組…",
"adding_contacts": "正在新增{count, plural, one {1 位聯絡人} other {# 位聯絡人}}",
"moving_contacts": "正在移動{count, plural, one {1 位聯絡人} other {# 位聯絡人}}",
"added_to_group": "聯絡人已新增至群組",
"export": "匯出",
"clear": "清除選取"
+1
View File
@@ -3544,6 +3544,7 @@
"choose_group": "选择一个组",
"new_group": "新建群组…",
"adding_contacts": "正在添加{count, plural, one {1 位联系人} other {# 位联系人}}",
"moving_contacts": "正在移动{count, plural, one {1 位联系人} other {# 位联系人}}",
"added_to_group": "联系人已添加至群组",
"export": "导出",
"clear": "清除选择"