Say how much an LDIF re-import duplicated, without acting on it

The half of #223 that can move while the matching question is still open.

Mozilla's schema defines no UID, so the import invents one and a re-import
duplicates everything. Whether to guess an identity from a name and an address
instead is the reporter's call and he has not made it -- but the harm that was
actually reported was confusion rather than duplication: somebody imports a
file twice and cannot tell what happened.

So the import now counts how many of the entries look like contacts the book
already held, and says so in a second message. Every card is still imported.
Nothing is skipped and nothing is merged, which is the point: counting is a
different act from matching, and it takes no decision away from the person who
still owes us one.

The likeness key is name plus one address, and it is wrong in both directions
by design -- two colleagues sharing a name and an alias collapse, somebody
whose address changed since the last export looks like a stranger. That is
tolerable for a number on a toast and would not be tolerable for a merge,
which is exactly why the number is all it does.

The scan the vCard import already makes for UIDs now collects names and
addresses on the same request, so this costs no extra round trip. It is read
before anything is created, so a file that repeats a person twice counts as
two new cards rather than as a duplicate of itself.

If the answer comes back "match on name and email", the matching is written
and becomes a skip instead of a count.

Refs #223.
This commit is contained in:
2026-09-02 12:45:30 -07:00
parent 0d5975d427
commit 9622875659
15 changed files with 229 additions and 24 deletions
+1
View File
@@ -1060,6 +1060,7 @@ export const catalog: Catalog = {
"Nothing unread here": "ここに未読はありません",
},
plurals: {
"{n} of them look like contacts you already had": { other: "うち {n} 件はすでにある連絡先に似ています" },
"Your administrator changed {n} settings": { other: "管理者が {n} 件の設定を変更しました" },
"Already here: {n} contacts, nothing imported": { other: "すでに存在: {n} 件、インポートなし" },
"All {n} are already in your contacts": { other: "{n} 件はすでに連絡先にあります" },