ElyMail's window lists accounts and adds Gmail, Microsoft, iCloud (app-specific password), IMAP and POP3 ones; a check logs in to both servers and reports each. Accounts live in the store as JSON with a case-insensitive unique address; secrets go to the keychain. Removal names the cache it deletes, takes the secret first and puts it back when local removal fails. Originals are set aside until commit and restored after a crash. Requests are numbered so late results stay with their own dialog. The account list is keyboard-navigable.
216 lines
9.1 KiB
Rust
216 lines
9.1 KiB
Rust
//! ElyMail's accounts.
|
||
|
||
pub(super) const EN: &[(&str, &str)] = &[
|
||
("mail.menu.account", "Account"),
|
||
("mail.add.open", "Add Account…"),
|
||
("mail.remove.open", "Remove Account…"),
|
||
("mail.cancel", "Cancel"),
|
||
("mail.empty", "No mail accounts yet"),
|
||
("mail.accounts", "Accounts"),
|
||
("mail.add.title", "Add Account"),
|
||
("mail.kind.gmail", "Gmail"),
|
||
("mail.kind.microsoft", "Microsoft"),
|
||
("mail.kind.icloud", "iCloud"),
|
||
("mail.kind.imap", "IMAP"),
|
||
("mail.kind.pop", "POP3"),
|
||
("mail.add.address", "Email address"),
|
||
("mail.add.address_hint", "Email address (optional)"),
|
||
("mail.add.user", "User name"),
|
||
("mail.add.password", "Password"),
|
||
("mail.add.incoming", "Incoming server"),
|
||
("mail.add.outgoing", "Outgoing server (SMTP)"),
|
||
("mail.add.port", "Port"),
|
||
("mail.add.security", "Security"),
|
||
("mail.security.tls", "TLS"),
|
||
("mail.security.starttls", "STARTTLS"),
|
||
("mail.auth.title", "Sign-in"),
|
||
("mail.auth.password", "Password"),
|
||
("mail.auth.google", "Google"),
|
||
("mail.auth.microsoft", "Microsoft"),
|
||
(
|
||
"mail.icloud.steps",
|
||
"iCloud needs an app-specific password: sign in to your Apple Account, open Sign-In and Security, choose App-Specific Passwords, make one and paste it below.",
|
||
),
|
||
("mail.icloud.open", "Open Apple Account"),
|
||
("mail.icloud.password", "App-specific password"),
|
||
("mail.add.check", "Check"),
|
||
("mail.add.sign_in", "Sign In with {method}"),
|
||
("mail.add.save", "Add Account"),
|
||
("mail.add.signing", "Finish signing in in your browser."),
|
||
("mail.add.checking", "Checking both servers…"),
|
||
("mail.add.saving", "Saving…"),
|
||
("mail.check.incoming", "Incoming server: {result}"),
|
||
("mail.check.outgoing", "Outgoing server: {result}"),
|
||
("mail.check.passed", "signed in"),
|
||
("mail.add.need_address", "Type the email address."),
|
||
("mail.add.need_user", "Type the user name."),
|
||
("mail.add.need_password", "Type the password."),
|
||
("mail.add.need_host", "Type both server names."),
|
||
("mail.add.bad_port", "{port} is not a port; use 1 to 65535."),
|
||
("mail.add.invalid", "These settings cannot be used: {error}"),
|
||
("mail.add.taken", "{address} is already added."),
|
||
(
|
||
"mail.add.unavailable.google",
|
||
"Gmail sign-in is not in this build: it was built without a Google client ID.",
|
||
),
|
||
(
|
||
"mail.add.unavailable.microsoft",
|
||
"Microsoft sign-in is not in this build: it was built without a Microsoft client ID.",
|
||
),
|
||
("mail.add.sign_in_failed", "Sign-in did not finish: {error}"),
|
||
("mail.add.check_failed", "The check did not finish: {error}"),
|
||
("mail.add.save_failed", "The account was not saved: {error}"),
|
||
("mail.add.added", "{address} added."),
|
||
(
|
||
"mail.add.session_only",
|
||
"The system keychain refused the password, so it is kept only until ElyMail quits: {error}",
|
||
),
|
||
("mail.error.connect", "cannot connect ({detail})"),
|
||
(
|
||
"mail.error.tls_failed",
|
||
"the secure connection failed ({detail})",
|
||
),
|
||
(
|
||
"mail.error.rejected",
|
||
"the server refused the sign-in: {detail}",
|
||
),
|
||
("mail.error.server", "the server refused: {detail}"),
|
||
(
|
||
"mail.error.protocol",
|
||
"the server's reply cannot be read: {detail}",
|
||
),
|
||
("mail.error.timeout", "no answer while {detail}"),
|
||
("mail.error.other", "{detail}"),
|
||
(
|
||
"mail.error.tls",
|
||
"Secure connections are not available: {error}",
|
||
),
|
||
("mail.error.store", "The mail store is not open: {error}"),
|
||
("mail.store.unopened", "The mail store did not open"),
|
||
("mail.store.unread", "The accounts could not be read"),
|
||
(
|
||
"mail.store.read_only",
|
||
"The mail store is read-only, so nothing can be added or removed: {error}",
|
||
),
|
||
("mail.account.line", "{protocol} · {host}"),
|
||
("mail.account.server", "{host}:{port}, {security}"),
|
||
("mail.account.address", "Address"),
|
||
("mail.account.user", "User name"),
|
||
("mail.account.incoming", "Incoming"),
|
||
("mail.account.outgoing", "Outgoing"),
|
||
("mail.account.auth", "Sign-in"),
|
||
("mail.remove.title", "Remove {address}?"),
|
||
(
|
||
"mail.remove.message",
|
||
"This removes from this computer the {n} messages kept for it ({size}), its drafts, and its saved password or sign-in. Mail on the server is not touched.",
|
||
),
|
||
(
|
||
"mail.remove.message.one",
|
||
"This removes from this computer the 1 message kept for it ({size}), its drafts, and its saved password or sign-in. Mail on the server is not touched.",
|
||
),
|
||
("mail.remove.go", "Remove Account"),
|
||
("mail.remove.done", "{address} removed."),
|
||
("mail.remove.failed", "The account was not removed: {error}"),
|
||
];
|
||
|
||
pub(super) const ZH_CN: &[(&str, &str)] = &[
|
||
("mail.menu.account", "账号"),
|
||
("mail.add.open", "添加账号…"),
|
||
("mail.remove.open", "删除账号…"),
|
||
("mail.cancel", "取消"),
|
||
("mail.empty", "还没有邮件账号"),
|
||
("mail.accounts", "账号"),
|
||
("mail.add.title", "添加账号"),
|
||
("mail.kind.gmail", "Gmail"),
|
||
("mail.kind.microsoft", "Microsoft"),
|
||
("mail.kind.icloud", "iCloud"),
|
||
("mail.kind.imap", "IMAP"),
|
||
("mail.kind.pop", "POP3"),
|
||
("mail.add.address", "邮箱地址"),
|
||
("mail.add.address_hint", "邮箱地址(可不填)"),
|
||
("mail.add.user", "用户名"),
|
||
("mail.add.password", "密码"),
|
||
("mail.add.incoming", "收信服务器"),
|
||
("mail.add.outgoing", "发信服务器(SMTP)"),
|
||
("mail.add.port", "端口"),
|
||
("mail.add.security", "加密"),
|
||
("mail.security.tls", "TLS"),
|
||
("mail.security.starttls", "STARTTLS"),
|
||
("mail.auth.title", "登录方式"),
|
||
("mail.auth.password", "密码"),
|
||
("mail.auth.google", "Google"),
|
||
("mail.auth.microsoft", "Microsoft"),
|
||
(
|
||
"mail.icloud.steps",
|
||
"iCloud 须用应用专用密码:登录 Apple 账户,打开“登录与安全”,选“应用专用密码”,生成一个,粘贴到下面。",
|
||
),
|
||
("mail.icloud.open", "打开 Apple 账户"),
|
||
("mail.icloud.password", "应用专用密码"),
|
||
("mail.add.check", "检查"),
|
||
("mail.add.sign_in", "以 {method} 登录"),
|
||
("mail.add.save", "添加账号"),
|
||
("mail.add.signing", "请在浏览器中完成登录。"),
|
||
("mail.add.checking", "正在检查收发两个服务器…"),
|
||
("mail.add.saving", "正在保存…"),
|
||
("mail.check.incoming", "收信服务器:{result}"),
|
||
("mail.check.outgoing", "发信服务器:{result}"),
|
||
("mail.check.passed", "已登录"),
|
||
("mail.add.need_address", "请填写邮箱地址。"),
|
||
("mail.add.need_user", "请填写用户名。"),
|
||
("mail.add.need_password", "请填写密码。"),
|
||
("mail.add.need_host", "请填写两个服务器名。"),
|
||
("mail.add.bad_port", "{port} 不是端口,请填 1 至 65535。"),
|
||
("mail.add.invalid", "这些设置用不了:{error}"),
|
||
("mail.add.taken", "{address} 已经添加过。"),
|
||
(
|
||
"mail.add.unavailable.google",
|
||
"本构建没有 Gmail 登录:构建时未带 Google 客户端 ID。",
|
||
),
|
||
(
|
||
"mail.add.unavailable.microsoft",
|
||
"本构建没有 Microsoft 登录:构建时未带 Microsoft 客户端 ID。",
|
||
),
|
||
("mail.add.sign_in_failed", "登录没有完成:{error}"),
|
||
("mail.add.check_failed", "检查没有完成:{error}"),
|
||
("mail.add.save_failed", "账号没有保存:{error}"),
|
||
("mail.add.added", "已添加 {address}。"),
|
||
(
|
||
"mail.add.session_only",
|
||
"系统钥匙串拒绝了密码,它只保留到 ElyMail 退出:{error}",
|
||
),
|
||
("mail.error.connect", "连不上({detail})"),
|
||
("mail.error.tls_failed", "安全连接失败({detail})"),
|
||
("mail.error.rejected", "服务器拒绝登录:{detail}"),
|
||
("mail.error.server", "服务器拒绝:{detail}"),
|
||
("mail.error.protocol", "读不懂服务器的回复:{detail}"),
|
||
("mail.error.timeout", "{detail}时没有回应"),
|
||
("mail.error.other", "{detail}"),
|
||
("mail.error.tls", "无法建立安全连接:{error}"),
|
||
("mail.error.store", "邮件存储没有打开:{error}"),
|
||
("mail.store.unopened", "邮件存储打不开"),
|
||
("mail.store.unread", "读不出账号"),
|
||
(
|
||
"mail.store.read_only",
|
||
"邮件存储为只读,不能添加或删除:{error}",
|
||
),
|
||
("mail.account.line", "{protocol} · {host}"),
|
||
("mail.account.server", "{host}:{port},{security}"),
|
||
("mail.account.address", "地址"),
|
||
("mail.account.user", "用户名"),
|
||
("mail.account.incoming", "收信"),
|
||
("mail.account.outgoing", "发信"),
|
||
("mail.account.auth", "登录方式"),
|
||
("mail.remove.title", "删除 {address}?"),
|
||
(
|
||
"mail.remove.message",
|
||
"将从本机删去它的 {n} 封缓存邮件({size})、草稿与保存的密码或登录。服务器上的邮件不动。",
|
||
),
|
||
(
|
||
"mail.remove.message.one",
|
||
"将从本机删去它的 1 封缓存邮件({size})、草稿与保存的密码或登录。服务器上的邮件不动。",
|
||
),
|
||
("mail.remove.go", "删除账号"),
|
||
("mail.remove.done", "已删除 {address}。"),
|
||
("mail.remove.failed", "账号没有删除:{error}"),
|
||
];
|