fix: standardize punctuation

This commit is contained in:
Linus Rath
2026-04-16 19:07:42 +02:00
parent 6b57118add
commit 8bdadc7ba3
107 changed files with 452 additions and 448 deletions
+4 -4
View File
@@ -87,7 +87,7 @@ export function ContactDetail({ contact, onEdit, onDelete, isMobile, className }
try {
let derBytes: ArrayBuffer | string | null = null;
if (key.uri.startsWith('data:')) {
// data URI extract base64 content
// data URI - extract base64 content
const commaIdx = key.uri.indexOf(',');
if (commaIdx === -1) continue;
const b64 = key.uri.substring(commaIdx + 1);
@@ -178,7 +178,7 @@ export function ContactDetail({ contact, onEdit, onDelete, isMobile, className }
<div className="flex items-center gap-4">
<Avatar name={name} email={email} size={isMobile ? "md" : "lg"} />
<div className="min-w-0 flex-1">
<h2 className={cn("font-semibold truncate", isMobile ? "text-lg" : "text-xl")}>{name || ""}</h2>
<h2 className={cn("font-semibold truncate", isMobile ? "text-lg" : "text-xl")}>{name || "-"}</h2>
{hasNickname && (
<p className="text-sm text-muted-foreground truncate">&ldquo;{nicknames.map(n => n.name).join(", ")}&rdquo;</p>
)}
@@ -278,7 +278,7 @@ export function ContactDetail({ contact, onEdit, onDelete, isMobile, className }
<div key={i} className="text-sm">
{o.name}
{o.units && o.units.length > 0 && (
<span className="text-muted-foreground"> {o.units.map(u => u.name).join(", ")}</span>
<span className="text-muted-foreground"> - {o.units.map(u => u.name).join(", ")}</span>
)}
</div>
))}
@@ -371,7 +371,7 @@ export function ContactDetail({ contact, onEdit, onDelete, isMobile, className }
{contact.speakToAs.pronouns && (() => {
const firstPronoun = Object.values(contact.speakToAs!.pronouns!)[0]?.pronouns;
return firstPronoun ? (
<span className="text-muted-foreground">{contact.speakToAs!.grammaticalGender ? " " : ""}{firstPronoun}</span>
<span className="text-muted-foreground">{contact.speakToAs!.grammaticalGender ? " - " : ""}{firstPronoun}</span>
) : null;
})()}
</div>
+7 -7
View File
@@ -507,7 +507,7 @@ export function ContactForm({ contact, addressBooks, allKeywords, onSave, onCanc
</div>
)}
{/* Name & Identity full width */}
{/* Name & Identity - full width */}
<div className="md:col-span-2 xl:col-span-3">
<FormSection icon={User} title={t("section_identity")} category="contact">
<div className="grid grid-cols-[auto_1fr_1fr_auto] gap-2">
@@ -575,7 +575,7 @@ export function ContactForm({ contact, addressBooks, allKeywords, onSave, onCanc
setEmails(next);
}}
>
<option value=""></option>
<option value="">-</option>
<option value="work">{t("context_work")}</option>
<option value="private">{t("context_private")}</option>
</Select>
@@ -639,7 +639,7 @@ export function ContactForm({ contact, addressBooks, allKeywords, onSave, onCanc
setPhones(next);
}}
>
<option value=""></option>
<option value="">-</option>
<option value="work">{t("context_work")}</option>
<option value="private">{t("context_private")}</option>
</Select>
@@ -677,7 +677,7 @@ export function ContactForm({ contact, addressBooks, allKeywords, onSave, onCanc
</div>
</FormSection>
{/* Addresses full width */}
{/* Addresses - full width */}
<div className="md:col-span-2 xl:col-span-3">
<FormSection icon={MapPin} title={t("addresses")} collapsible defaultOpen category="location">
<div className="space-y-3">
@@ -698,7 +698,7 @@ export function ContactForm({ contact, addressBooks, allKeywords, onSave, onCanc
value={addr.context}
onChange={(e) => { const n = [...addresses]; n[i] = { ...n[i], context: e.target.value as AddressEntry["context"] }; setAddresses(n); }}
>
<option value=""></option>
<option value="">-</option>
<option value="work">{t("context_work")}</option>
<option value="private">{t("context_private")}</option>
</Select>
@@ -833,7 +833,7 @@ export function ContactForm({ contact, addressBooks, allKeywords, onSave, onCanc
<div>
<label className="text-xs text-muted-foreground mb-1 block">{t("gender_sex")}</label>
<Select value={genderSex} onChange={(e) => setGenderSex(e.target.value)} className="w-full">
<option value=""></option>
<option value="">-</option>
<option value="masculine">{t("gender_male")}</option>
<option value="feminine">{t("gender_female")}</option>
<option value="other">{t("gender_other")}</option>
@@ -866,7 +866,7 @@ export function ContactForm({ contact, addressBooks, allKeywords, onSave, onCanc
</div>
</FormSection>
{/* Notes full width */}
{/* Notes - full width */}
<div className="md:col-span-2 xl:col-span-3">
<FormSection icon={StickyNote} title={t("note")} collapsible defaultOpen category="notes">
<textarea
@@ -199,7 +199,7 @@ export function ContactImportDialog({
</div>
<FileText className="w-4 h-4 text-muted-foreground flex-shrink-0" />
<div className="flex-1 min-w-0">
<div className="text-sm font-medium truncate">{cName || cEmail || ""}</div>
<div className="text-sm font-medium truncate">{cName || cEmail || "-"}</div>
{cEmail && cName && (
<div className="text-xs text-muted-foreground truncate">{cEmail}</div>
)}
+1 -1
View File
@@ -90,7 +90,7 @@ export function ContactListItem({ contact, isSelected, isChecked, hasSelection,
<div className="flex-1 min-w-0">
<div className="text-sm font-medium truncate">
{name || email || ""}
{name || email || "-"}
</div>
{density !== 'extra-compact' && email && name && (
<div className="text-xs text-muted-foreground truncate">{email}</div>
@@ -527,7 +527,7 @@ export function CalendarInvitationBanner({ email }: CalendarInvitationBannerProp
|| null;
// Send the iMIP REPLY email to the organizer (client-side scheduling).
// Called after updating the local calendar event. Best-effort if it
// Called after updating the local calendar event. Best-effort - if it
// fails we still report the RSVP as sent since the calendar was updated.
const sendImipReply = async () => {
if (!organizerEmail || !parsedEvent?.uid || !currentUserEmail) {
+18 -18
View File
@@ -740,7 +740,7 @@ function ContactSidebarPanel({
<div key={i} className="text-sm">
{o.name}
{o.units && o.units.length > 0 && (
<span className="text-muted-foreground"> {o.units.map(u => u.name).join(", ")}</span>
<span className="text-muted-foreground"> - {o.units.map(u => u.name).join(", ")}</span>
)}
</div>
))}
@@ -1170,7 +1170,7 @@ export function EmailViewer({
return;
}
// Already read record that so manual unread toggle won't re-trigger auto-mark
// Already read - record that so manual unread toggle won't re-trigger auto-mark
if (email.keywords?.$seen) {
autoMarkedEmailRef.current = email.id;
return;
@@ -1644,7 +1644,7 @@ export function EmailViewer({
// Check if inner content is also signed
const nestedSignedData = extractNestedSignedDataCandidate(parsed, result.mimeBytes);
if (nestedSignedData) {
// Nested sign-then-encrypt verify inner signature
// Nested sign-then-encrypt - verify inner signature
const innerBytes = normalizeCmsBytes(nestedSignedData.bytes);
smimeDebug('[S/MIME] nested signed-data candidate:', {
source: nestedSignedData.source,
@@ -1853,7 +1853,7 @@ export function EmailViewer({
// Check if the email already has a usable HTML body with real content
// Outlook often forwards TNEF emails with an HTML body that's just Word
// boilerplate (CSS + &nbsp;) treat these as effectively empty.
// boilerplate (CSS + &nbsp;) - treat these as effectively empty.
const htmlPartId = email.htmlBody?.[0]?.partId;
const htmlValue = htmlPartId ? email.bodyValues?.[htmlPartId]?.value?.trim() : '';
let hasRealHtmlBody = !!htmlValue;
@@ -1898,7 +1898,7 @@ export function EmailViewer({
return;
}
debug.log('email', 'TNEF parse result htmlBody:', !!parsed.htmlBody, '(' + (parsed.htmlBody?.length ?? 0) + ' chars)', ', body:', !!parsed.body, '(' + (parsed.body?.length ?? 0) + ' chars)', ', attachments:', parsed.attachments.length);
debug.log('email', 'TNEF parse result - htmlBody:', !!parsed.htmlBody, '(' + (parsed.htmlBody?.length ?? 0) + ' chars)', ', body:', !!parsed.body, '(' + (parsed.body?.length ?? 0) + ' chars)', ', attachments:', parsed.attachments.length);
if (parsed.htmlBody && !hasRealHtmlBody) {
setTnefHtml(parsed.htmlBody);
@@ -1912,7 +1912,7 @@ export function EmailViewer({
}
if (!parsed.htmlBody && !parsed.body && parsed.attachments.length === 0) {
debug.warn('email', 'TNEF: Parsing succeeded but no content was extracted the winmail.dat may use an unsupported format');
debug.warn('email', 'TNEF: Parsing succeeded but no content was extracted - the winmail.dat may use an unsupported format');
}
debug.groupEnd();
@@ -1975,7 +1975,7 @@ export function EmailViewer({
const parsed = await parser.parse(new Uint8Array(blobBytes));
if (cancelled) { debug.groupEnd(); return; }
debug.log('email', 'Embedded RFC822 parsed html:', !!parsed.html, '(' + (parsed.html?.length ?? 0) + ' chars)',
debug.log('email', 'Embedded RFC822 parsed - html:', !!parsed.html, '(' + (parsed.html?.length ?? 0) + ' chars)',
', text:', !!parsed.text, '(' + (parsed.text?.length ?? 0) + ' chars)',
', attachments:', parsed.attachments?.length ?? 0);
@@ -2091,7 +2091,7 @@ export function EmailViewer({
// Hide message/rfc822 when we have unwrapped the embedded email
.filter(att => !embeddedEmailUnwrapped || att.type !== 'message/rfc822')
// Hide calendar MIME parts (text/calendar, application/ics) when the invitation
// banner is shown prevents raw ICS files appearing as spurious attachments.
// banner is shown - prevents raw ICS files appearing as spurious attachments.
.filter(att => !hasCalInvitation || !isCalendarMimeType(att.type))
.map((attachment, index) => ({
id: attachment.blobId || `${attachment.name || 'attachment'}-${index}`,
@@ -2961,7 +2961,7 @@ export function EmailViewer({
<PluginSlot name="toolbar-actions" />
</div>
{/* Right: Organize actions order: archive, delete, move, star, tag, spam, read state, print, view source */}
{/* Right: Organize actions - order: archive, delete, move, star, tag, spam, read state, print, view source */}
<div className="flex items-center gap-0 sm:gap-0.5">
{isLoading && (
<div className="mr-2 flex items-center gap-1.5 text-muted-foreground">
@@ -3058,7 +3058,7 @@ export function EmailViewer({
<span className="text-[10px] leading-tight sm:hidden">{isStarred ? t('tooltips.unstar') : t('tooltips.star')}</span>
</Button>
{/* Tag Picker hidden on mobile, overflows to More menu */}
{/* Tag Picker - hidden on mobile, overflows to More menu */}
<div data-overflow-item data-overflow-priority="6" className="hidden sm:flex items-center">
<div className="w-px h-5 bg-border mx-0.5" />
<div ref={tagMenuRef} className="relative">
@@ -3127,7 +3127,7 @@ export function EmailViewer({
</div>
</div>
{/* Spam hidden on mobile, overflows to More menu */}
{/* Spam - hidden on mobile, overflows to More menu */}
{(onMarkAsSpam || onUndoSpam) && (
<Button
variant="ghost"
@@ -3149,7 +3149,7 @@ export function EmailViewer({
</Button>
)}
{/* Toggle read state hidden on mobile, overflows to More menu */}
{/* Toggle read state - hidden on mobile, overflows to More menu */}
<Button
variant="ghost"
size="sm"
@@ -3162,7 +3162,7 @@ export function EmailViewer({
{isUnread ? <MailOpen className="w-4 h-4" /> : <Mail className="w-4 h-4" />}
</Button>
{/* Print hidden on mobile, overflows to More menu */}
{/* Print - hidden on mobile, overflows to More menu */}
<Button
variant="ghost"
size="sm"
@@ -3176,7 +3176,7 @@ export function EmailViewer({
{showToolbarLabels && <span className="hidden sm:inline text-sm">{t('print')}</span>}
</Button>
{/* View source hidden on mobile, overflows to More menu */}
{/* View source - hidden on mobile, overflows to More menu */}
<Button
variant="ghost"
size="sm"
@@ -3204,7 +3204,7 @@ export function EmailViewer({
</Button>
)}
{/* More menu click-based */}
{/* More menu - click-based */}
<div ref={moreMenuRef} className="relative">
<Button
variant="ghost"
@@ -3250,7 +3250,7 @@ export function EmailViewer({
<Archive className="w-4 h-4" />
{t('archive')}
</button>
{/* Overflow: move to folder submenu */}
{/* Overflow: move to folder - submenu */}
{moveTree.length > 0 && onMoveToMailbox && (
<div className={cn("relative", hiddenPriorities.has(5) ? "" : "sm:hidden")}
onMouseEnter={() => setMoreMenuSub('move')}
@@ -3302,7 +3302,7 @@ export function EmailViewer({
)}
</div>
)}
{/* Overflow: tag submenu */}
{/* Overflow: tag - submenu */}
{colorOptions.length > 0 && (
<div className={cn("relative", hiddenPriorities.has(6) ? "" : "sm:hidden")}
onMouseEnter={() => setMoreMenuSub('tag')}
@@ -4039,7 +4039,7 @@ export function EmailViewer({
<div className="flex-1">
<div className="text-xs font-medium text-gray-900 dark:text-gray-100 flex items-center gap-1">
Spam Score
<InfoTooltip text="A score assigned by the server based on spam analysis. Lower is better scores above 5 are likely spam" />
<InfoTooltip text="A score assigned by the server based on spam analysis. Lower is better - scores above 5 are likely spam" />
</div>
<div className={cn(
"text-xs",
+1 -1
View File
@@ -14,7 +14,7 @@ interface RecipientPopoverProps {
email: string;
/** Display label override (e.g. "me") */
displayLabel?: string;
/** Called when user clicks "View contact" receives the contact and email */
/** Called when user clicks "View contact" - receives the contact and email */
onViewContact?: (contact: ContactCard | null, email: string) => void;
className?: string;
}
+2 -2
View File
@@ -412,7 +412,7 @@ export function FileBrowser({
// Filter and sort resources
const displayResources = useMemo(() => {
let filtered = resources;
// In sidebar mode, folders are shown in the sidebar tree hide them from the main list
// In sidebar mode, folders are shown in the sidebar tree - hide them from the main list
if (folderLayout === "sidebar") {
filtered = filtered.filter(r => !r.isDirectory);
}
@@ -1466,7 +1466,7 @@ export function FileBrowser({
</div>
</td>
<td className="px-4 py-2.5 text-muted-foreground hidden md:table-cell tabular-nums">
{resource.isDirectory ? "" : formatFileSize(resource.contentLength)}
{resource.isDirectory ? "-" : formatFileSize(resource.contentLength)}
</td>
<td className="px-4 py-2.5 text-muted-foreground hidden lg:table-cell tabular-nums">
{formatDate(resource.lastModified)}
+1 -1
View File
@@ -58,7 +58,7 @@ export function FolderTreeSidebar({ currentPath, onNavigate, listByParentId, wid
};
});
// Don't cache empty root results empty root likely means client wasn't ready yet
// Don't cache empty root results - empty root likely means client wasn't ready yet
if (folders.length > 0 || parentId !== null) {
setChildrenCache(prev => new Map(prev).set(cacheKey, folders));
}
+1 -1
View File
@@ -155,7 +155,7 @@ function SidebarAppForm({
{t('icon_label')} <span className="text-destructive">*</span>
{SelectedIcon && (
<span className="inline-flex items-center gap-1.5 ml-2 text-muted-foreground font-normal">
<SelectedIcon className="w-4 h-4" /> {formData.icon}
- <SelectedIcon className="w-4 h-4" /> {formData.icon}
</span>
)}
</label>
+1 -1
View File
@@ -22,7 +22,7 @@ const DENSITY_PREVIEW: Record<Density, { py: string; gap: string; showAvatar: bo
function DensityPreview({ density }: { density: Density }) {
const cfg = DENSITY_PREVIEW[density];
const rows = [
{ unread: true, sender: 'Alice Johnson', subject: 'Project update Q1 roadmap', preview: 'Here are the latest numbers from…' },
{ unread: true, sender: 'Alice Johnson', subject: 'Project update - Q1 roadmap', preview: 'Here are the latest numbers from…' },
{ unread: false, sender: 'Bob Smith', subject: 'Re: Meeting notes', preview: 'Thanks, will review and get back...' },
{ unread: true, sender: 'Carol Lee', subject: 'Invoice #4092', preview: 'Please find attached the invoice…' },
];
+1 -1
View File
@@ -575,7 +575,7 @@ export function EmailSettings() {
</button>
</SettingItem>
{/* Trusted Senders address book storage */}
{/* Trusted Senders - address book storage */}
<SettingItem label={t('trusted_senders.use_address_book_label')} description={t('trusted_senders.use_address_book_description')}>
<ToggleSwitch
checked={trustedSendersAddressBook}
+1 -1
View File
@@ -49,7 +49,7 @@ function getPreviewIcon(file: SampleFile, colored: boolean, size: "sm" | "lg") {
}
function formatSize(bytes: number): string {
if (bytes === 0) return "";
if (bytes === 0) return "-";
if (bytes < 1024) return `${bytes} B`;
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
+2 -2
View File
@@ -490,7 +490,7 @@ export function FolderSettings() {
return (
<div className="space-y-8">
{/* Folder List primary section */}
{/* Folder List - primary section */}
<SettingsSection title={t('folder_list')} description={t('folder_list_description')}>
<div className="space-y-0.5">
{folderTree.length === 0 ? (
@@ -516,7 +516,7 @@ export function FolderSettings() {
)}
</SettingsSection>
{/* Standard Folder Roles advanced section */}
{/* Standard Folder Roles - advanced section */}
<SettingsSection title={t('standard_roles')} description={t('standard_roles_description')}>
{STANDARD_ROLES.map((role) => {
// Disambiguate duplicate folder names by appending parent path
@@ -40,7 +40,7 @@ export function SmimeCertificateModal({
{ label: t("cert_email"), value: record.email },
{
label: t("cert_validity"),
value: `${new Date(record.notBefore).toLocaleDateString()} ${new Date(record.notAfter).toLocaleDateString()}`,
value: `${new Date(record.notBefore).toLocaleDateString()} - ${new Date(record.notAfter).toLocaleDateString()}`,
},
{ label: t("cert_fingerprint"), value: record.fingerprint },
];
+2 -2
View File
@@ -123,7 +123,7 @@ export function TourOverlay() {
// Wait for target element to appear, then show
useEffect(() => {
if (!step) return;
console.log(`[Tour] Step ${currentStep + 1}/${totalSteps}: "${step.id}" target: ${step.target}, placement: ${step.placement}, interactive: ${!!step.interactive}`);
console.log(`[Tour] Step ${currentStep + 1}/${totalSteps}: "${step.id}" - target: ${step.target}, placement: ${step.placement}, interactive: ${!!step.interactive}`);
setVisible(false);
// Keep old targetRect and tooltipPos so the cutout/tooltip animate to the new position
// instead of disappearing and reappearing
@@ -178,7 +178,7 @@ export function TourOverlay() {
clearInterval(interval);
if (attempts >= maxAttempts && !cancelled) {
// Skip this step if element never appears
console.warn(`[Tour] Step ${currentStep + 1} "${step.id}": SKIPPED element never appeared after ${maxAttempts} attempts`);
console.warn(`[Tour] Step ${currentStep + 1} "${step.id}": SKIPPED - element never appeared after ${maxAttempts} attempts`);
nextStepRef.current();
}
}