diff --git a/web/app/Command/Job.php b/web/app/Command/Job.php index c9db4ec6..7dd78d65 100644 --- a/web/app/Command/Job.php +++ b/web/app/Command/Job.php @@ -129,9 +129,10 @@ class Job } if (!Mail::send( $recipient, - Config::get('appName') . '-数据库备份', + 'Database Backup', 'news/backup.tpl', - ['text' => '数据库 SQL 备份已使用 AES-256 加密,请使用您配置的备份口令解压。'], + ['text' => 'The SQL database backup is encrypted with AES-256. ' + . 'Use the configured backup passphrase to extract it.'], [$archive] )) { throw new \RuntimeException('备份已保存,但邮件服务未接受备份邮件。'); diff --git a/web/app/Controllers/Admin/UserController.php b/web/app/Controllers/Admin/UserController.php index dd0797ae..61a74e04 100644 --- a/web/app/Controllers/Admin/UserController.php +++ b/web/app/Controllers/Admin/UserController.php @@ -5,7 +5,6 @@ namespace App\Controllers\Admin; use App\Services\Auth; use App\Services\AdminDataMasker; use App\Services\AdminPermission; -use App\Services\Config; use App\Services\Mail; use App\Services\LoginSessionRevocationService; use App\Services\RedisClient; @@ -66,8 +65,10 @@ class UserController extends AdminController if (!$user->save()) { return $this->echoJson($response, ['ret' => 0, 'msg' => '创建失败']); } - $sent = Mail::send($email, Config::get('appName') . ' - 新用户注册通知', 'news/monitor.tpl', [ - 'user' => $user, 'text' => '管理员为您创建了账户,邮箱:' . $email . ',初始密码:' . $password, + $sent = Mail::send($email, 'Account Created', 'news/monitor.tpl', [ + 'user' => $user, + 'text' => 'An administrator created your account. Email: ' . $email + . '. Initial password: ' . $password, ]); return $this->echoJson($response, [ @@ -198,7 +199,7 @@ class UserController extends AdminController if (AdminPermission::isSuperAdmin() && $user) { $to = $user->email; - $subject = Config::get('appName') . ' - ' . $subjectFromFrontEnd; + $subject = trim((string) $subjectFromFrontEnd); $text = $contentFromFrontEnd; try { $sent = Mail::send($to, $subject, 'news/monitor.tpl', [ diff --git a/web/app/Controllers/AuthController.php b/web/app/Controllers/AuthController.php index d17641bb..a6479f83 100644 --- a/web/app/Controllers/AuthController.php +++ b/web/app/Controllers/AuthController.php @@ -644,9 +644,7 @@ class AuthController extends BaseController } try { - $sent = Mail::send($email, $this->publicCopy('auth.login', 'auth.login.verify.subject', [ - 'site' => (string) Config::get('appName'), - ]), 'auth/verify.tpl', [ + $sent = Mail::send($email, 'Login Verification', 'auth/verify.tpl', [ "code" => $code, "expire" => date("Y-m-d H:i:s", time() + (int) CaptchaConfig::get('email_verify_ttl')), "language" => $this->language, @@ -769,9 +767,7 @@ class AuthController extends BaseController return $response->getBody()->write(json_encode($res)); } - $subject = $this->publicCopy('auth.register', 'auth.register.verify.subject', [ - 'site' => (string) Config::get('appName'), - ]); + $subject = 'Email Verification'; try { $sent = Mail::send($email, $subject, 'auth/verify.tpl', [ diff --git a/web/app/Services/AccountEmailChangeService.php b/web/app/Services/AccountEmailChangeService.php index b8654b01..2b6aecb9 100644 --- a/web/app/Services/AccountEmailChangeService.php +++ b/web/app/Services/AccountEmailChangeService.php @@ -77,7 +77,7 @@ final class AccountEmailChangeService try { $sent = Mail::send( $newEmail, - Config::get('appName') . ' - 修改邮箱验证', + 'Email Change Verification', 'auth/verify.tpl', [ 'code' => $plainCode, diff --git a/web/app/Services/AccountSecurityService.php b/web/app/Services/AccountSecurityService.php index 9444627c..e3af8815 100644 --- a/web/app/Services/AccountSecurityService.php +++ b/web/app/Services/AccountSecurityService.php @@ -64,7 +64,7 @@ class AccountSecurityService try { $sent = Mail::send( $email, - Config::get('appName') . ' - 修改密码验证', + 'Password Change Verification', 'auth/verify.tpl', [ 'code' => $plainCode, diff --git a/web/app/Services/Cloud/CloudInvoiceService.php b/web/app/Services/Cloud/CloudInvoiceService.php index e191b9d8..be019284 100644 --- a/web/app/Services/Cloud/CloudInvoiceService.php +++ b/web/app/Services/Cloud/CloudInvoiceService.php @@ -807,10 +807,9 @@ final class CloudInvoiceService $error = '用户邮箱无效'; } else { $base = rtrim((string) Config::get('baseUrl', ''), '/'); - $appName = trim((string) Config::get('appName', '')); if ($kind === 'renewal_due') { $ok = Mail::send((string) $user->email, - ($appName !== '' ? $appName . ' - ' : '') . '实例续费账单已生成', + 'Renewal Invoice Created', 'cloud/invoice.tpl', [ 'invoice_id' => (string) $invoice->id, 'instance_name' => (string) $instance->name, @@ -845,20 +844,20 @@ final class CloudInvoiceService ?? $spec['template_id'] ?? '')); $loginName = trim((string) ($spec['login_name'] ?? '')); $ok = Mail::send((string) $user->email, - ($appName !== '' ? $appName . ' - ' : '') . '实例开通成功', + 'Instance Provisioned', 'cloud/provision-success.tpl', [ 'instance_name' => (string) $instance->name, 'instance_id' => (string) $instance->id, 'region' => $region !== '' ? $region : '—', 'public_ip' => $ip, - 'os_name' => $osName !== '' ? $osName : '云镜像系统', + 'os_name' => $osName !== '' ? $osName : 'Cloud image', 'login_name' => preg_match( '/^[A-Za-z_][A-Za-z0-9_.-]{0,31}$/D', $loginName ) === 1 ? $loginName : 'root', 'created_at' => date('Y-m-d H:i:s', (int) $instance->created_at), 'expires_at' => $instance->expires_at === null - ? '未设置' : date('Y-m-d H:i:s', + ? 'Not set' : date('Y-m-d H:i:s', (int) $instance->expires_at), 'instance_url' => $base . '/user/cloud/instances/' . (int) $instance->id, diff --git a/web/app/Services/Cloud/CloudMaintenanceNoticeDeliveryService.php b/web/app/Services/Cloud/CloudMaintenanceNoticeDeliveryService.php index 65702524..9b641397 100644 --- a/web/app/Services/Cloud/CloudMaintenanceNoticeDeliveryService.php +++ b/web/app/Services/Cloud/CloudMaintenanceNoticeDeliveryService.php @@ -207,10 +207,10 @@ final class CloudMaintenanceNoticeDeliveryService throw new \RuntimeException('Maintenance instance list is empty.'); } $impacts = [ - 'network_interruption' => '网络可能短时中断', - 'instance_restart' => '实例将重新启动', - 'service_interruption' => '服务可能短时中断', - 'no_interruption' => '预计不会中断服务', + 'network_interruption' => 'Network connectivity may be briefly interrupted', + 'instance_restart' => 'Instances will be restarted', + 'service_interruption' => 'Service may be briefly interrupted', + 'no_interruption' => 'No service interruption is expected', ]; $impact = $impacts[(string) $notice->impact] ?? null; if ($impact === null) { diff --git a/web/app/Services/Cloud/CloudServiceCompensationNotificationService.php b/web/app/Services/Cloud/CloudServiceCompensationNotificationService.php index 79e6481d..380cac28 100644 --- a/web/app/Services/Cloud/CloudServiceCompensationNotificationService.php +++ b/web/app/Services/Cloud/CloudServiceCompensationNotificationService.php @@ -330,10 +330,12 @@ final class CloudServiceCompensationNotificationService throw new \RuntimeException('Compensation payload is invalid.'); } return [ - 'subject' => '实例可用时间补偿已到账', + 'subject' => 'Service Time Compensation Applied', 'variables' => [ 'reason_text' => $payload['reason_text'], - 'scope_label' => (string) ($payload['scope_label'] ?? ''), + 'scope_label' => self::scopeLabel( + (string) ($payload['scope_label'] ?? '') + ), 'compensation_duration' => self::duration( $payload['compensation_seconds'] ), @@ -416,15 +418,26 @@ final class CloudServiceCompensationNotificationService private static function duration(int $seconds): string { if ($seconds % 86400 === 0) { - return (int) ($seconds / 86400) . ' 天'; + $value = (int) ($seconds / 86400); + return $value . ($value === 1 ? ' day' : ' days'); } if ($seconds % 3600 === 0) { - return (int) ($seconds / 3600) . ' 小时'; + $value = (int) ($seconds / 3600); + return $value . ($value === 1 ? ' hour' : ' hours'); } if ($seconds % 60 === 0) { - return (int) ($seconds / 60) . ' 分钟'; + $value = (int) ($seconds / 60); + return $value . ($value === 1 ? ' minute' : ' minutes'); + } + return $seconds . ($seconds === 1 ? ' second' : ' seconds'); + } + + private static function scopeLabel(string $label): string + { + if (preg_match('/^单实例\s*#(\d+)$/u', $label, $matches) === 1) { + return 'Instance #' . $matches[1]; } - return $seconds . ' 秒'; + return $label; } private static function incidentWindow(array $payload): string @@ -432,7 +445,7 @@ final class CloudServiceCompensationNotificationService $start = $payload['incident_starts_at'] ?? null; $end = $payload['incident_ends_at'] ?? null; if (!is_int($start) || !is_int($end)) { - return '未单独记录'; + return 'Not recorded separately'; } return gmdate('Y-m-d H:i:s \U\T\C', $start) . ' — ' . gmdate('Y-m-d H:i:s \U\T\C', $end); diff --git a/web/app/Services/Mail.php b/web/app/Services/Mail.php index e0eb25d6..f7bd94cb 100644 --- a/web/app/Services/Mail.php +++ b/web/app/Services/Mail.php @@ -45,8 +45,11 @@ class Mail $smarty->settemplatedir(BASE_PATH . '/resources/email/'); $smarty->setcompiledir(BASE_PATH . '/storage/framework/smarty/compile/'); $smarty->setcachedir(BASE_PATH . '/storage/framework/smarty/cache/'); - // add config - $smarty->assign('config', Config::getPublicConfig()); + // Mail branding is global. It must use the administrator-managed + // default title instead of a request-domain-specific site mapping. + $publicConfig = Config::getPublicConfig(); + $publicConfig['appName'] = MailSenderIdentity::displayName(); + $smarty->assign('config', $publicConfig); foreach ($ary as $key => $value) { $smarty->assign($key, $value); } diff --git a/web/app/Services/Mail/Mailgun.php b/web/app/Services/Mail/Mailgun.php index 6f0cf23d..d4f33173 100644 --- a/web/app/Services/Mail/Mailgun.php +++ b/web/app/Services/Mail/Mailgun.php @@ -3,6 +3,7 @@ namespace App\Services\Mail; use App\Services\Config; +use App\Services\MailSenderIdentity; use GuzzleHttp\Client as GuzzleClient; use GuzzleHttp\Psr7\HttpFactory; use Mailgun\HttpClient\HttpClientConfigurator; @@ -24,7 +25,11 @@ class Mailgun extends Base $this->validateConfig(); $this->mg = $this->createClient(); $this->domain = $this->config["domain"]; - $this->sender = $this->config["sender"]; + try { + $this->sender = MailSenderIdentity::header($this->config["sender"]); + } catch (\InvalidArgumentException $exception) { + throw new RuntimeException('Mailgun configuration mailgun_sender must contain a valid email address.', 0, $exception); + } } public function getConfig() diff --git a/web/app/Services/Mail/Smtp.php b/web/app/Services/Mail/Smtp.php index e3275826..b37f3842 100644 --- a/web/app/Services/Mail/Smtp.php +++ b/web/app/Services/Mail/Smtp.php @@ -4,6 +4,7 @@ namespace App\Services\Mail; use App\Services\Config; +use App\Services\MailSenderIdentity; use PHPMailer\PHPMailer\PHPMailer; class Smtp extends Base @@ -15,7 +16,7 @@ class Smtp extends Base "username" => Config::get('smtp_username'), "port" => Config::get('smtp_port'), "sender" => Config::get('smtp_sender'), - "name" => Config::get('smtp_name'), + "name" => MailSenderIdentity::displayName(), "passsword" => Config::get('smtp_passsword') ]; } diff --git a/web/app/Services/MailSenderIdentity.php b/web/app/Services/MailSenderIdentity.php new file mode 100644 index 00000000..4f1a7a5e --- /dev/null +++ b/web/app/Services/MailSenderIdentity.php @@ -0,0 +1,55 @@ +]+)\s*>\s*$/D', $sender, $matches) === 1) { + $sender = trim($matches[1]); + } + + if (filter_var($sender, FILTER_VALIDATE_EMAIL) === false) { + throw new InvalidArgumentException('The configured sender must contain a valid email address.'); + } + + return $sender; + } + + public static function header($configuredSender): string + { + $displayName = addcslashes(self::displayName(), "\\\""); + + return '"' . $displayName . '" <' . self::mailbox($configuredSender) . '>'; + } + + public static function sanitizeDisplayName($name): string + { + $name = str_replace(["\r", "\n"], ' ', (string) $name); + $name = preg_replace('/[\x00-\x1F\x7F]+/', ' ', $name); + $name = preg_replace('/\s+/', ' ', (string) $name); + $name = trim((string) $name); + + if ($name === '') { + return self::FALLBACK_NAME; + } + + if (function_exists('mb_substr')) { + return (string) mb_substr($name, 0, self::MAX_DISPLAY_NAME_LENGTH, 'UTF-8'); + } + + return substr($name, 0, self::MAX_DISPLAY_NAME_LENGTH); + } +} diff --git a/web/app/Services/Password.php b/web/app/Services/Password.php index 89720647..6ab97e81 100644 --- a/web/app/Services/Password.php +++ b/web/app/Services/Password.php @@ -28,8 +28,7 @@ class Password return false; } - $subject = Config::get('appName') . ($english - ? ' - Password reset' : ' - 重置密码'); + $subject = 'Password Reset'; $resetUrl = Config::get('baseUrl') . "/password/token/" . $pwdRst->token; try { $sent = Mail::send($email, $subject, 'password/reset.tpl', [ diff --git a/web/app/Services/SiteName.php b/web/app/Services/SiteName.php index 8095ea54..e0283b50 100644 --- a/web/app/Services/SiteName.php +++ b/web/app/Services/SiteName.php @@ -24,6 +24,18 @@ class SiteName return self::resolveFromConfig($host, $defaultName, $mappings ?? []); } + /** + * Return the administrator-managed default site title without applying a + * request-host mapping. Mail and other global identities must not vary by + * the domain that happened to trigger a background operation. + */ + public static function defaultName(): string + { + $name = trim(self::defaultAppName()); + + return $name !== '' ? $name : 'Site'; + } + public static function resolveFromConfig($host, $defaultName, array $mappings): string { $requestHost = self::normalizeHost($host); diff --git a/web/app/Services/Ticket/TicketNotificationDispatcher.php b/web/app/Services/Ticket/TicketNotificationDispatcher.php index 3bef8e79..5aa00a73 100644 --- a/web/app/Services/Ticket/TicketNotificationDispatcher.php +++ b/web/app/Services/Ticket/TicketNotificationDispatcher.php @@ -25,15 +25,14 @@ final class TicketNotificationDispatcher $root = $event->result->root; $owner = User::where('id', (int) $root->userid)->first(); $jobs = []; - $appName = (string) Config::get('appName'); $ticketUrl = rtrim((string) Config::get('baseUrl'), '/') . '/user/ticket/' . (int) $root->id . '/view'; if ($event->kind === 'created' && $owner !== null && trim((string) $owner->email) !== '') { - $jobs[] = ['mail:owner', function () use ($owner, $root, $ticketUrl, $appName): void { + $jobs[] = ['mail:owner', function () use ($owner, $root, $ticketUrl): void { $this->transport->sendMail( (string) $owner->email, - $appName . ' - 工单已创建', + 'Ticket Created', 'ticket/created.tpl', ['user' => $owner, 'ticket' => $root, 'ticket_url' => $ticketUrl], 'ticket_created' @@ -46,14 +45,15 @@ final class TicketNotificationDispatcher if (trim((string) $admin->email) === '') { continue; } - $jobs[] = ['mail:admin:' . (int) $admin->id, function () use ($admin, $root, $appName): void { + $jobs[] = ['mail:admin:' . (int) $admin->id, function () use ($admin, $root): void { $this->transport->sendMail( (string) $admin->email, - $appName . ' - ' . (string) $root->title, + 'New Ticket: ' . (string) $root->title, 'news/warn.tpl', [ 'user' => $admin, - 'text' => '工单 #' . (int) $root->id . ' 有新的消息,请在网站管理页面查看。', + 'text' => 'Ticket #' . (int) $root->id + . ' has a new message. Open the admin panel to review it.', ] ); }]; @@ -64,10 +64,10 @@ final class TicketNotificationDispatcher } if ($event->kind === 'admin_reply' && $owner !== null && trim((string) $owner->email) !== '') { - $jobs[] = ['mail:owner', function () use ($owner, $root, $ticketUrl, $appName): void { + $jobs[] = ['mail:owner', function () use ($owner, $root, $ticketUrl): void { $this->transport->sendMail( (string) $owner->email, - $appName . ' - 工单收到回复', + 'Ticket Reply Received', 'ticket/replied.tpl', ['user' => $owner, 'ticket' => $root, 'ticket_url' => $ticketUrl], 'ticket_replied' diff --git a/web/config/.config.php.example b/web/config/.config.php.example index 44b4e3fe..25a72cc5 100644 --- a/web/config/.config.php.example +++ b/web/config/.config.php.example @@ -9,7 +9,7 @@ $System_Config['mailgun_sender'] = ''; $System_Config['smtp_host'] = ''; $System_Config['smtp_username'] = ''; $System_Config['smtp_port'] = ''; -$System_Config['smtp_name'] = ''; +# The sender display name comes from Site Settings -> Default title. $System_Config['smtp_sender'] = ''; $System_Config['smtp_passsword'] = ''; $System_Config['smtp_ssl'] = 'true'; diff --git a/web/resources/email/auth/verify.tpl b/web/resources/email/auth/verify.tpl index 8732c49e..6acd09e5 100644 --- a/web/resources/email/auth/verify.tpl +++ b/web/resources/email/auth/verify.tpl @@ -1,31 +1,29 @@ {extends file='layout.tpl'} -{block name='email_title'} - {if $language == 'true'}{if !empty($scene) && $scene == 'login'}Login verification{elseif !empty($scene) && $scene == 'password_change'}Password change verification{elseif !empty($scene) && $scene == 'email_change'}Email change verification{else}Email verification{/if} | {$config["appName"]|escape:"html"}{else}{if !empty($scene) && $scene == 'login'}登录安全验证{elseif !empty($scene) && $scene == 'password_change'}修改密码验证{elseif !empty($scene) && $scene == 'email_change'}修改邮箱验证{else}注册邮箱验证{/if} | {$config["appName"]|escape:"html"}{/if} -{/block} -{block name='preheader'}{if $language == 'true'}Your verification code is {$code|escape:"html"}.{else}您的验证码是 {$code|escape:"html"}。{/if}{/block} +{block name='email_title'}{if !empty($scene) && $scene == 'login'}Login verification{elseif !empty($scene) && $scene == 'password_change'}Password change verification{elseif !empty($scene) && $scene == 'email_change'}Email change verification{else}Email verification{/if}{/block} +{block name='preheader'}Your verification code is {$code|escape:"html"}.{/block} {block name='content'}
{if !empty($scene) && $scene == 'login'}ACCOUNT SECURITY{elseif !empty($scene) && $scene == 'registration'}WELCOME TO THE CLOUD{elseif !empty($scene) && ($scene == 'password_change' || $scene == 'email_change')}ACCOUNT SECURITY{else}EMAIL VERIFICATION{/if}
- {if $language == 'true'}{if !empty($scene) && $scene == 'login'}Enter the code below to complete the security check for your sign-in.{elseif !empty($scene) && $scene == 'password_change'}Enter the code below on the account page to confirm your password change.{elseif !empty($scene) && $scene == 'email_change'}Enter the code below in account settings to verify this new email address before using it to sign in.{else}Enter the code below on the registration page to finish creating your account.{/if}{else}{if !empty($scene) && $scene == 'login'}请在登录页面输入下方验证码,完成本次安全验证。{elseif !empty($scene) && $scene == 'password_change'}请在账户设置页面输入下方验证码,确认修改密码。{elseif !empty($scene) && $scene == 'email_change'}请在账户设置中输入下方验证码,验证此新邮箱后再将其设为登录邮箱。{else}请在注册页面输入下方验证码,完成邮箱验证并继续创建账户。{/if}{/if} + {if !empty($scene) && $scene == 'login'}Enter the code below to complete the security check for your sign-in.{elseif !empty($scene) && $scene == 'password_change'}Enter the code below on the account page to confirm your password change.{elseif !empty($scene) && $scene == 'email_change'}Enter the code below in account settings to verify this new email address before using it to sign in.{else}Enter the code below on the registration page to finish creating your account.{/if}
| - {if $language == 'true'}VERIFICATION CODE{else}邮箱验证码{/if} + VERIFICATION CODE {$code|escape:"html"} |
| - {if $language == 'true'}This code is valid until {$expire|escape:"html"}.{else}本验证码将在 {$expire|escape:"html"} 失效。{/if} + This code is valid until {$expire|escape:"html"}. |
{if $language == 'true'}Never share this code with anyone. If you did not request it, you can safely ignore this email.{else}请勿向任何人泄露此验证码。如果并非您本人操作,可以安全地忽略此邮件。{/if}
+Never share this code with anyone. If you did not request it, you can safely ignore this email.
{/block} diff --git a/web/resources/email/cloud/invoice.tpl b/web/resources/email/cloud/invoice.tpl index 8ae14eba..dc9952da 100644 --- a/web/resources/email/cloud/invoice.tpl +++ b/web/resources/email/cloud/invoice.tpl @@ -1,22 +1,22 @@ {extends file='layout.tpl'} -{block name='email_title'}续费账单已生成 | {$config["appName"]|escape:"html"}{/block} -{block name='preheader'}实例 {$instance_name|escape:"html"} 的续费账单已生成,最晚可在 {$payment_deadline_at|escape:"html"} 前支付。{/block} +{block name='email_title'}Renewal invoice created{/block} +{block name='preheader'}The renewal invoice for {$instance_name|escape:"html"} is ready. Payment is available until {$payment_deadline_at|escape:"html"}.{/block} {block name='content'}SERVICE RENEWAL
-您的云服务器 {$instance_name|escape:"html"} 将于 {$due_at|escape:"html"} 到期。到期后网络会暂停,您仍可在 {$payment_deadline_at|escape:"html"} 前完成续费。
+Your cloud server {$instance_name|escape:"html"} expires at {$due_at|escape:"html"}. Network access will be suspended after expiry, but you can still renew it before {$payment_deadline_at|escape:"html"}.
| 账单编号#{$invoice_id|escape:"html"} | -应付金额${$amount|escape:"html"} | -实例到期时间{$due_at|escape:"html"} | +Invoice#{$invoice_id|escape:"html"} | +Amount due${$amount|escape:"html"} | +Instance expiry{$due_at|escape:"html"} |
| 查看并支付账单 |
| View and pay invoice |
| 重要提醒实例到期后将立即停用网络,续费成功后会自动恢复。到期满 3 天仍未支付,实例及其系统盘将被永久删除,数据无法恢复。 |
| ImportantNetwork access is suspended immediately when the instance expires and is restored automatically after renewal. If payment is still outstanding three days after expiry, the instance and its system disk will be permanently deleted and cannot be recovered. |
MAINTENANCE NOTICE
@@ -10,21 +10,21 @@| 维护范围{$scope_label|escape:"html"} | -预计影响{$impact_label|escape:"html"} | +Maintenance scope{$scope_label|escape:"html"} | +Expected impact{$impact_label|escape:"html"} |
| 开始时间(UTC){$maintenance_starts_utc|escape:"html"} | -结束时间(UTC){$maintenance_ends_utc|escape:"html"} | +Start time (UTC){$maintenance_starts_utc|escape:"html"} | +End time (UTC){$maintenance_ends_utc|escape:"html"} |
受影响的实例
+Affected instances
{foreach $instances as $instance}| {$instance.name|escape:"html"}IPv4:{$instance.ipv4|default:'—'|escape:"html"}IPv6:{$instance.ipv6|default:'—'|escape:"html"} |
| {$instance.name|escape:"html"}IPv4: {$instance.ipv4|default:'—'|escape:"html"}IPv6: {$instance.ipv6|default:'—'|escape:"html"} |
| 维护时间统一使用 UTC。实际开始和结束时间可能因现场进度略有变化,请提前保存未完成的工作。 |
| All maintenance times are shown in UTC. Actual start and end times may vary slightly as work progresses. Please save any unfinished work in advance. |
INSTANCE READY
-您的云服务器 {$instance_name|escape:"html"} 已创建完成,现在可以进入控制台查看状态并进行管理。
+Your cloud server {$instance_name|escape:"html"} has been created. You can now view its status and manage it in the control panel.
-| ● 实例状态:开通成功 |
| ● Instance status: Provisioned |
| 实例名称{$instance_name|escape:"html"}实例 #{$instance_id|escape:"html"} | -地区{$region|default:'—'|escape:"html"} | +Instance name{$instance_name|escape:"html"}Instance #{$instance_id|escape:"html"} | +Region{$region|default:'—'|escape:"html"} |
| 公网 IP{$public_ip|default:'—'|escape:"html"} | -操作系统{$os_name|default:'—'|escape:"html"} | +Public IP{$public_ip|default:'—'|escape:"html"} | +Operating system{$os_name|default:'—'|escape:"html"} |
| SSH 登录用户{$login_name|default:'root'|escape:"html"} | -开通时间{$created_at|default:'—'|escape:"html"} | +SSH login user{$login_name|default:'root'|escape:"html"} | +Provisioned at{$created_at|default:'—'|escape:"html"} |
| 服务到期时间{$expires_at|default:'—'|escape:"html"} | |||
| Service expiry{$expires_at|default:'—'|escape:"html"} | |||
| 管理我的实例 |
出于安全考虑,本邮件不会展示账户密码、私钥或其他登录凭据。请前往实例详情页面查看面板保存的信息。
+| Manage instance |
For security, this email does not include account passwords, private keys, or other login credentials. Visit the instance details page to view information stored by the control panel.
{/block} diff --git a/web/resources/email/cloud/service-compensation.tpl b/web/resources/email/cloud/service-compensation.tpl index 38cb6b0f..b509238c 100644 --- a/web/resources/email/cloud/service-compensation.tpl +++ b/web/resources/email/cloud/service-compensation.tpl @@ -1,32 +1,32 @@ {extends file='layout.tpl'} -{block name='email_title'}实例可用时间补偿已到账 | {$config["appName"]|escape:"html"}{/block} -{block name='preheader'}受影响实例的服务到期时间已经延长,请查看补偿结果。{/block} +{block name='email_title'}Service time compensation applied{/block} +{block name='preheader'}The service expiry time of the affected instances has been extended. Review the compensation details.{/block} {block name='content'}SERVICE CREDIT
-因以下事件受到影响的实例已完成服务时间补偿。本次操作不会产生账单,也不会改变账户余额或流量额度。
+Service time compensation has been applied to the instances affected by the event below. This action does not create an invoice or change your account balance or traffic allowance.
| 补偿范围{$scope_label|default:'实例服务'|escape:"html"} | -补偿时长{$compensation_duration|escape:"html"} | +Compensation scope{$scope_label|default:'Instance service'|escape:"html"} | +Compensation duration{$compensation_duration|escape:"html"} |
| 事件时间(UTC){$incident_window_utc|escape:"html"} | +Incident window (UTC){$incident_window_utc|escape:"html"} | ||
补偿原因
+Compensation reason
{$reason_text|escape:"html"|nl2br}
-已补偿的实例
+Compensated instances
{foreach $instances as $instance}| {$instance.instance_name|escape:"html"}原到期时间:{$instance.previous_expires_utc|escape:"html"}新到期时间:{$instance.new_expires_utc|escape:"html"} |
| {$instance.instance_name|escape:"html"}Previous expiry: {$instance.previous_expires_utc|escape:"html"}New expiry: {$instance.new_expires_utc|escape:"html"} |
| 补偿已经直接计入实例当前服务周期,无需进行支付或其他操作。时间统一使用 UTC。 |
| The compensation has been added directly to each instance's current service period. No payment or other action is required. All times are shown in UTC. |
{if !empty($language) && $language == 'true'}This is an automated message. Please do not reply.{else}此邮件由系统自动发送,请勿直接回复。{/if}
+This is an automated message. Please do not reply.
- {if !empty($language) && $language == 'true'}Visit{else}访问{/if} {$config["appName"]|escape:"html"} - ·{if !empty($language) && $language == 'true'}Cloud control panel{else}云资源控制台{/if} + Visit {$config["appName"]|escape:"html"} + ·Cloud control panel
© 2026 {$config["appName"]|escape:"html"}. All rights reserved.
SYSTEM BACKUP
-系统已完成本次数据库备份,备份文件已作为附件随邮件发送。
+The database backup is complete. The backup file is attached to this email.
| {$text|default:'备份任务已成功完成。'|escape:"html"|nl2br} |
| {$text|default:'The backup task completed successfully.'|escape:"html"|nl2br} |
请妥善保管备份附件及解密口令,不要将其转发给无关人员。
+Keep the backup attachment and decryption passphrase secure. Do not forward them to unauthorized people.
{/block} diff --git a/web/resources/email/news/daily-traffic-report.tpl b/web/resources/email/news/daily-traffic-report.tpl index 8dbc4421..3b22a95a 100644 --- a/web/resources/email/news/daily-traffic-report.tpl +++ b/web/resources/email/news/daily-traffic-report.tpl @@ -1,17 +1,17 @@ {extends file='layout.tpl'} -{block name='email_title'}服务地址通知 | {$config["appName"]|escape:"html"}{/block} -{block name='preheader'}请使用最新的站点地址访问控制台。{/block} +{block name='email_title'}Service address notice{/block} +{block name='preheader'}Use the current site address to access the control panel.{/block} {block name='content'}SERVICE NOTICE
-您好,{$user->user_name|default:'用户'|escape:"html"}:
{/if} -请通过下方站点地址访问服务,并注意核对浏览器地址栏,避免进入非官方页面。
+Hello {$user->user_name|default:'User'|escape:"html"},
{/if} +Use the site address below to access the service. Check the browser address bar carefully to avoid unofficial pages.
| CURRENT SITE ADDRESS{$config["baseUrl"]|escape:"html"} |
| 访问控制台 |
| Open control panel |
BILLING NOTICE
-您好,{$user->user_name|default:'用户'|escape:"html"}:
+Hello {$user->user_name|default:'User'|escape:"html"},
| {$text|default:'请登录控制台查看账务详情。'|escape:"html"|nl2br} |
| {$text|default:'Sign in to the control panel to review your billing details.'|escape:"html"|nl2br} |
| 查看账户 |
| View account |
ACCOUNT NOTICE
-您好,{$user->user_name|default:'用户'|escape:"html"}:
+Hello {$user->user_name|default:'User'|escape:"html"},
| {$text|default:'请登录控制台查看最新账户信息。'|escape:"html"|nl2br} |
| {$text|default:'Sign in to the control panel to review the latest account information.'|escape:"html"|nl2br} |
| 进入控制台 |
| Open control panel |
NEW YEAR OFFER
-亲爱的用户,感谢您一直以来对 {$config["appName"]|escape:"html"} 的支持与信任。我们准备了新年专享套餐优惠,期待继续为您提供稳定的服务。
+Thank you for your continued support and trust in {$config["appName"]|escape:"html"}. We have prepared a New Year plan offer and look forward to continuing to provide reliable service.
套餐优惠
|
| 优惠码标准年付:20%myssr轻量套餐、标准季付:10%myssr |
Plan discounts
|
| Promo codesStandard annual: 20%myssrLightweight and standard quarterly: 10%myssr |
| 温馨提示当前套餐如仍有剩余价值,购买新套餐时可按系统页面展示的规则抵扣,并可叠加适用的优惠码。 |
| Please noteIf your current plan still has remaining value, the amount may be credited toward a new plan according to the rules shown in the control panel. Eligible promo codes can also be applied. |
| 登录查看优惠 |
感谢您的支持。
{$config["appName"]|escape:"html"} 团队
| View offer |
Thank you for your support.
The {$config["appName"]|escape:"html"} team
ACTION REQUIRED
-您好,{$user->user_name|default:'用户'|escape:"html"}:
+Hello {$user->user_name|default:'User'|escape:"html"},
| {$text|default:'请登录控制台查看并处理。'|escape:"html"|nl2br} |
| {$text|default:'Sign in to the control panel to review and resolve this notice.'|escape:"html"|nl2br} |
| 查看详情 |
| View details |
ACCOUNT SECURITY
-{if $language == 'true'}We received a request to reset the password for your {$config["appName"]|escape:"html"} account. Use the button below to continue.{else}我们收到了您为 {$config["appName"]|escape:"html"} 账户重置密码的请求,请点击下方按钮继续。{/if}
+We received a request to reset the password for your {$config["appName"]|escape:"html"} account. Use the button below to continue.
-| {if $language == 'true'}Reset password{else}前往重置密码{/if} |
| Reset password |
| {if $language == 'true'}This reset link is valid until {$expire|escape:"html"}.{else}此重置链接将在 {$expire|escape:"html"} 失效。{/if} |
| This reset link is valid until {$expire|escape:"html"}. |
{if $language == 'true'}If the button does not work, copy and paste this address into your browser:{else}如果按钮无法打开,请复制以下地址并粘贴到浏览器:{/if}
+If the button does not work, copy and paste this address into your browser:
-| {if $language == 'true'}Security notice{else}安全提示{/if}{if $language == 'true'}If you did not request a password reset, ignore this email. Do not forward this message or share the reset link with anyone.{else}如果并非您本人申请重置密码,请忽略此邮件。请勿转发本邮件或向任何人泄露重置链接。{/if} |
| Security noticeIf you did not request a password reset, ignore this email. Do not forward this message or share the reset link with anyone. |
DELIVERY TEST
-如果您收到这封邮件,说明 {$config["appName"]|escape:"html"} 的邮件发送配置工作正常。
-| 测试发送时间{$time|default:'—'|escape:"html"} |
If you received this message, the email delivery configuration for {$config["appName"]|escape:"html"} is working correctly.
+| Test sent at{$time|default:'—'|escape:"html"} |
TICKET CREATED
-您好,{$user->user_name|default:'用户'|escape:"html"},你的工单已经创建成功。管理员回复后,我们会再次通过邮件提醒你。
-工单 #{$ticket->id|escape:"html"} {$ticket->title|escape:"html"} |
| 查看工单 |
Hello {$user->user_name|default:'User'|escape:"html"}, your ticket has been created successfully. We will notify you by email when an administrator replies.
+Ticket #{$ticket->id|escape:"html"} {$ticket->title|escape:"html"} |
| View ticket |
TICKET REPLY
-您好,{$user->user_name|default:'用户'|escape:"html"},管理员已经回复你的工单,请登录控制台查看完整内容。
-工单 #{$ticket->id|escape:"html"} {$ticket->title|escape:"html"} |
| 查看回复 |
Hello {$user->user_name|default:'User'|escape:"html"}, an administrator has replied to your ticket. Sign in to the control panel to view the full response.
+Ticket #{$ticket->id|escape:"html"} {$ticket->title|escape:"html"} |
| View reply |