Files
pangolin/client/lib/l10n/app_text.dart
T
wangjia f97ae8186b feat(client): Flutter 逐屏还原 + iPad ≥900 断点 (tsk_gpPXi-icyeOE)
对照 design/ui_kits mobile+tablet 原型逐屏补齐 Flutter 客户端:

- l10n 资源层(strings_zh/en,单显)+ Riverpod 状态层(连接状态机/免费额度/
  节点选择/语言/主题),UI 与数据解耦,mock 数据接 API 不动 UI。
- 连接键严格三态(off 虚线轨道环 / connecting 旋转弧 / on 满环+计时+光晕),
  状态来自 connectionProvider,点击只派发事件——禁止乐观显示。
- 节点页置顶「智能选择」推荐卡(clay 渐变 zap + 推荐胶囊,默认选中);
  免费额度卡(剩余分钟+进度条 ≤3 分钟切 warning + 看广告解锁变绿)。
- Tab 左右滑动切换(手势竞技场仲裁,子页滚动不误触发,200ms 方向感知滑入)。
- iPad/宽屏 ≥900 LayoutBuilder 切侧栏分栏(导航行高 ≥48,连接页双栏/节点双列网格),
  复用同一批原子组件,不 fork 页面。
- 语义 token 零硬编码;文案全部走 l10n;套餐数字对齐 §7;无支付表单/emoji 国旗。
- CI 红线词扫描扩展到 client/lib;新增 Flutter analyze+test CI 任务。
- 测试:连接状态机/额度/节点单测、连接键三态与卡片组件测试、
  golden(连接键三态/推荐卡/额度卡 × 明暗)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-13 14:32:36 +08:00

153 lines
3.9 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 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;
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 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;
}