- Snooze (with a Snoozed folder), keyboard shortcuts with a Settings section, mail templates (Compose > More > Templates), a Subscriptions folder with bulk unsubscribe/delete, and tracker blocking with a Privacy toggle (on by default) - Own dialogs instead of browser popups; emoji picker in compose; compose windows survive a visit to Settings - Sentence completion learned from the user's sent mail (no AI) - Interface in English and Polish (one file per language, English as the fallback), picked from the browser on first run, then kept - Email translation on the server via LibreTranslate: Translate button and "Translate to...", messages in several languages translated part by part, names/addresses/emoji/file names/phone numbers kept, an animated line while translating - Antispam "Mark as spam" loads with the message, not when the menu opens Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
46 lines
1.3 KiB
Python
46 lines
1.3 KiB
Python
"""email translation: a message's detected language, and translations kept
|
|
|
|
``messages.content_language``: NULL until the message is first shown, '' when
|
|
the language could not be told. ``message_translations``: one translated HTML
|
|
per message, target language and remote-images choice (app/translation.py);
|
|
dropped with the message.
|
|
|
|
Revision ID: 0030
|
|
Revises: 0029
|
|
Create Date: 2026-10-18
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from collections.abc import Sequence
|
|
|
|
from alembic import op
|
|
|
|
revision: str = "0030"
|
|
down_revision: str | None = "0029"
|
|
branch_labels: str | Sequence[str] | None = None
|
|
depends_on: str | Sequence[str] | None = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.execute("ALTER TABLE messages ADD COLUMN content_language text")
|
|
op.execute(
|
|
"""
|
|
CREATE TABLE message_translations (
|
|
message_id uuid NOT NULL REFERENCES messages(id) ON DELETE CASCADE,
|
|
target text NOT NULL,
|
|
images boolean NOT NULL,
|
|
source text NOT NULL,
|
|
html text NOT NULL,
|
|
sanitizer_v integer NOT NULL,
|
|
created_at timestamptz NOT NULL DEFAULT now(),
|
|
PRIMARY KEY (message_id, target, images)
|
|
)
|
|
"""
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.execute("DROP TABLE IF EXISTS message_translations")
|
|
op.execute("ALTER TABLE messages DROP COLUMN IF EXISTS content_language")
|