Files
pangolin/client/lib/l10n/app_text.dart
T
wangjia 58526b09e6
ci-pangolin / Lint — shellcheck (push) Successful in 7s
ci-pangolin / OpenAPI Sync Check (push) Successful in 19s
ci-pangolin / Redline Scan — 脱敏 (UI 文案) (push) Successful in 7s
ci-pangolin / Flutter — analyze + test (push) Successful in 23s
ci-pangolin / Portable SQL — 可移植性 (mysql/sqlite) (push) Successful in 5s
ci-pangolin / Codegen Drift — token 生成物未漂移 (push) Successful in 5s
ci-pangolin / Go — build + test (push) Successful in 9s
ci-pangolin / E2E Smoke — L4 进程级端到端 (push) Successful in 14s
ci-pangolin / Go — integration (mysql/redis testcontainers) (push) Failing after 4m12s
ci-pangolin / Golden — 视觉回归 (components + auth) (push) Successful in 15s
feat(client): P6 DevicesScreen 重做 + DevicePlatform 枚举
回应「状态码用枚举更好」:新增 DevicePlatform 枚举(线格式 fromWire 解析,
UI 只碰枚举,穷尽 switch),Device.platformKind getter;platform 图标按枚举 switch。
DevicesScreen 按 §7 视觉稿重做:行内 名称+「本机」标 / 平台·客户端版本·最后登录 /
在线绿点光晕·离线灰点 + 行尾 ⋯ 菜单(强制退出 / 清除登录信息·危险红)+ 危险二次
确认弹窗;本机行不显示 ⋯(不自我踢)。l10n 新增在线/离线/最后登录/从未登录/强制
退出/清除登录信息/取消 + 确认文案(中英);「当前设备」改「本机」。
新图标 moreVertical/trash/alertTriangle。localDeviceIdProvider 供本机判定。
测试:devices_screen widget 3 例(本机标+在线/离线+版本渲染 / ⋯菜单→强制退出→
确认→POST logout / 清除→DELETE);全量 flutter test 58 绿。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 06:10:37 +08:00

182 lines
4.8 KiB
Dart

// app_text.dart — 文案契约(l10n 资源层)
//
// 产品任一时刻只显示中文【或】英文(设计铁律 §6 单语言显示),由
// `localeProvider` 段控切换。所有界面文案必须经此处取用,禁止在组件内
// 写死中/英字面量。zh / en 两份资源分别在 strings_zh.dart / strings_en.dart。
//
// 红线词约束(设计铁律 §13):资源文件不得出现 VPN / 翻墙 / 科学上网 /
// 突破封锁 / 自由穿越 / Go anywhere。CI `ci/scan-redline.sh` 对本目录做扫描。
//
// 注意:这是手写资源(非 flutter gen-l10n 代码生成),保证离线可编译;
// 接口形态与 .arb 一致,后续可平滑迁移到官方 l10n 工具链。
/// 受支持语言。单显——任一时刻只渲染其一。
enum AppLang { zh, en }
/// 全部界面文案的抽象契约。zh / en 各实现一份。
abstract class AppText {
const AppText();
AppLang get lang;
// ── 品牌 / 连接状态 ──
String get brand;
String get online;
String get offline;
String get capOff;
String get capConnecting;
String get capOn;
String get connectNow; // 连接键 off 态圆内文字
String get secure; // 连接键圆内「已加密」
// ── 底部 / 侧栏导航 ──
String get tabConnect;
String get tabServers;
String get tabStats;
String get tabMe;
// ── 连接页 ──
String get currentNode;
String get download;
String get upload;
String get latency;
// ── 免费额度卡 ──
String get quotaToday;
String get minutes;
String get quotaFree;
String get watchAd;
String get adUnlocked;
// ── 节点页 ──
String get chooseNode;
String get searchPh;
String get smartSelect;
String get smartSub;
String get recommended;
// ── 统计页 ──
String get statsTitle;
String get trafficMonth;
String get avgPing;
String get durMonth;
String get weekTraffic;
List<String> get days7;
String get byDevice;
String get noDeviceUsage;
// 统计页重设计:周期(月/周/日) · 指标(下行/上行/时长) · 折线 · 设备下拉
String get periodMonth;
String get periodWeek;
String get periodToday;
String get statDown;
String get statUp;
String get statDuration;
String get chartTwoWeeks;
String get allDevices;
// ── 账户页 ──
String get meTitle;
String get proMember;
String get freePlanName;
String get expires;
String get upgradeBtn;
String get accInfoTitle;
String get accEmail;
String get accPassword;
String get accChange;
String get myDevices;
String get devicesSub;
String get thisDevice;
String get remove;
// 设备管理(P6):在线状态 / 操作 / 危险确认
String get devOnline;
String get devOffline;
String get devLastLogin; // 「最后登录」前缀
String get devNeverLogin;
String get devForceLogout;
String get devClearLogin;
String get devForceLogoutConfirm; // 弹窗正文(含设备名占位 %s)
String get devClearLoginConfirm;
String get devCancel;
String get redeemEntry;
String get contactEntry;
String get signOut;
String get language;
String get darkAppearance;
String get stateOn;
String get followLight;
String get protocol;
String get settingsTitle;
String get autostart;
String get autostartSub;
String get smartRoute;
String get smartRouteSub;
String get killSwitch;
String get killSwitchSub;
String get checkUpdate;
// ── 套餐选择 ──
String get choosePlan;
String get freePlan;
String get proPlan;
String get teamPlan;
String get perMonth;
String get current;
String get upgrade;
String get choose;
String get mostPopular;
List<String> get featsFree;
List<String> get featsPro;
List<String> get featsTeam;
// ── 兑换 & 购买 ──
String get redeemTitle;
String get redeemCodeTitle;
String get redeemPh;
String get redeemBtn;
String get redeemOk;
String get buyTitle;
String get buySub;
String get chStore;
String get chEmail;
// ── 联系我们 ──
String get contactTitle;
String get contactIntro;
String get contactEmail;
String get contactStore;
String get contactHoursTitle;
String get contactHours;
// ── 登录 / 注册 ──
String get authTagline;
String get tabLogin;
String get tabRegister;
String get emailLabel;
String get emailPh;
String get pwLabel;
String get pwPh;
String get setPwPh;
String get codeLabel;
String codeSentTo(String email);
String get sendCode;
String get resend;
String get doLogin;
String get doNext;
String get doCreate;
String get forgotPw;
String get tos;
// ── 首次引导 ──
String get obSkip;
String get obNext;
String get obAllow;
String get obStart;
String get ob1Title;
String get ob1Sub;
String get ob2Title;
String get ob2Sub;
String get ob3Title;
String get ob3Sub;
}