diff --git a/frontend/genex-mobile/lib/app/i18n/strings/en.dart b/frontend/genex-mobile/lib/app/i18n/strings/en.dart index 06f302d..02036dd 100644 --- a/frontend/genex-mobile/lib/app/i18n/strings/en.dart +++ b/frontend/genex-mobile/lib/app/i18n/strings/en.dart @@ -71,6 +71,7 @@ const Map en = { 'register.agreement': 'I have read and agree to', 'register.userAgreement': 'Terms of Service', 'register.privacyPolicy': 'Privacy Policy', + 'register.and': 'and', 'register.submit': 'Sign Up', 'register.stepVerify': 'Verify', 'register.stepPassword': 'Password', diff --git a/frontend/genex-mobile/lib/app/i18n/strings/ja.dart b/frontend/genex-mobile/lib/app/i18n/strings/ja.dart index 3ce5130..bca4c93 100644 --- a/frontend/genex-mobile/lib/app/i18n/strings/ja.dart +++ b/frontend/genex-mobile/lib/app/i18n/strings/ja.dart @@ -71,6 +71,7 @@ const Map ja = { 'register.agreement': '以下に同意します', 'register.userAgreement': '「利用規約」', 'register.privacyPolicy': '「プライバシーポリシー」', + 'register.and': 'および', 'register.submit': '登録', 'register.stepVerify': '認証', 'register.stepPassword': 'パスワード設定', diff --git a/frontend/genex-mobile/lib/app/i18n/strings/zh_cn.dart b/frontend/genex-mobile/lib/app/i18n/strings/zh_cn.dart index 9418272..89efc1b 100644 --- a/frontend/genex-mobile/lib/app/i18n/strings/zh_cn.dart +++ b/frontend/genex-mobile/lib/app/i18n/strings/zh_cn.dart @@ -71,6 +71,7 @@ const Map zhCN = { 'register.agreement': '我已阅读并同意', 'register.userAgreement': '《用户协议》', 'register.privacyPolicy': '《隐私政策》', + 'register.and': '和', 'register.submit': '注册', 'register.stepVerify': '验证', 'register.stepPassword': '设密码', diff --git a/frontend/genex-mobile/lib/app/i18n/strings/zh_tw.dart b/frontend/genex-mobile/lib/app/i18n/strings/zh_tw.dart index a40469f..3ec57c0 100644 --- a/frontend/genex-mobile/lib/app/i18n/strings/zh_tw.dart +++ b/frontend/genex-mobile/lib/app/i18n/strings/zh_tw.dart @@ -71,6 +71,7 @@ const Map zhTW = { 'register.agreement': '我已閱讀並同意', 'register.userAgreement': '《使用者協議》', 'register.privacyPolicy': '《隱私權政策》', + 'register.and': '和', 'register.submit': '註冊', 'register.stepVerify': '驗證', 'register.stepPassword': '設密碼', diff --git a/frontend/genex-mobile/lib/features/auth/presentation/pages/register_page.dart b/frontend/genex-mobile/lib/features/auth/presentation/pages/register_page.dart index 8f58c29..0570f64 100644 --- a/frontend/genex-mobile/lib/features/auth/presentation/pages/register_page.dart +++ b/frontend/genex-mobile/lib/features/auth/presentation/pages/register_page.dart @@ -267,7 +267,7 @@ class _RegisterPageState extends State { text: context.t('register.userAgreement'), style: AppTypography.bodySmall.copyWith(color: AppColors.primary), ), - const TextSpan(text: ' 和 '), + TextSpan(text: ' ${context.t('register.and')} '), TextSpan( text: context.t('register.privacyPolicy'), style: AppTypography.bodySmall.copyWith(color: AppColors.primary), diff --git a/frontend/miniapp/src/components/ai-guide/index.tsx b/frontend/miniapp/src/components/ai-guide/index.tsx index 9a6daae..e2f96e2 100644 --- a/frontend/miniapp/src/components/ai-guide/index.tsx +++ b/frontend/miniapp/src/components/ai-guide/index.tsx @@ -18,10 +18,10 @@ const AiGuide: React.FC = ({ type }) => { return ( {[ - { id: 1, text: '星巴克 8.5折' }, - { id: 2, text: 'Nike 限时特价' }, - { id: 3, text: '新品餐饮券' }, - { id: 4, text: '高评级推荐' }, + { id: 1, text: t('ai_recommend_1') }, + { id: 2, text: t('ai_recommend_2') }, + { id: 3, text: t('ai_recommend_3') }, + { id: 4, text: t('ai_recommend_4') }, ].map(s => ( diff --git a/frontend/miniapp/src/i18n/index.ts b/frontend/miniapp/src/i18n/index.ts index 373a96e..8568e4b 100644 --- a/frontend/miniapp/src/i18n/index.ts +++ b/frontend/miniapp/src/i18n/index.ts @@ -151,8 +151,8 @@ const translations: Record> = { 'login_send_code': '获取验证码', 'login_resend': '{seconds}秒后重发', 'login_agree_prefix': '我已阅读并同意', - 'login_user_agreement': '用户协议', - 'login_privacy_policy': '隐私政策', + 'login_user_agreement': '《用户协议》', + 'login_privacy_policy': '《隐私政策》', 'login_and': '和', // ── Redeem ── @@ -310,6 +310,10 @@ const translations: Record> = { // ── AI Guide ── 'ai_guide_greeting': '你好!我是AI助手,可以帮你找到最适合的券。试试搜索"星巴克"?', + 'ai_recommend_1': '星巴克 8.5折', + 'ai_recommend_2': 'Nike 限时特价', + 'ai_recommend_3': '新品餐饮券', + 'ai_recommend_4': '高评级推荐', // ── Share Card ── 'share_miniapp_code': '小程序码', @@ -766,6 +770,10 @@ const translations: Record> = { // ── AI Guide ── 'ai_guide_greeting': 'Hi! I\'m the AI assistant. I can help you find the best coupons. Try searching "Starbucks"!', + 'ai_recommend_1': 'Starbucks 15% off', + 'ai_recommend_2': 'Nike Flash Sale', + 'ai_recommend_3': 'New Dining Coupons', + 'ai_recommend_4': 'Top Rated Picks', // ── Share Card ── 'share_miniapp_code': 'Mini Program Code', @@ -1063,8 +1071,8 @@ const translations: Record> = { 'login_send_code': 'コードを送信', 'login_resend': '{seconds}秒後に再送信', 'login_agree_prefix': '以下に同意します:', - 'login_user_agreement': '利用規約', - 'login_privacy_policy': 'プライバシーポリシー', + 'login_user_agreement': '「利用規約」', + 'login_privacy_policy': '「プライバシーポリシー」', 'login_and': 'および', // ── Redeem ── @@ -1222,6 +1230,10 @@ const translations: Record> = { // ── AI Guide ── 'ai_guide_greeting': 'こんにちは!AIアシスタントです。最適なクーポンを見つけるお手伝いをします。「スターバックス」で検索してみてください!', + 'ai_recommend_1': 'スタバ 15%オフ', + 'ai_recommend_2': 'Nike タイムセール', + 'ai_recommend_3': '新作グルメクーポン', + 'ai_recommend_4': '高評価おすすめ', // ── Share Card ── 'share_miniapp_code': 'ミニプログラムコード', diff --git a/frontend/miniapp/src/pages/h5-register/index.tsx b/frontend/miniapp/src/pages/h5-register/index.tsx index 3503ed9..1777a36 100644 --- a/frontend/miniapp/src/pages/h5-register/index.tsx +++ b/frontend/miniapp/src/pages/h5-register/index.tsx @@ -26,7 +26,7 @@ const H5RegisterPage: React.FC = () => { setCodeSending(true); sendSmsCode(phone, 'REGISTER') .then(() => { - Taro.showToast({ title: t('login_code_sent') || '验证码已发送', icon: 'success' }); + Taro.showToast({ title: t('login_code_sent'), icon: 'success' }); setCodeCountdown(60); const timer = setInterval(() => { setCodeCountdown((prev) => { @@ -51,7 +51,7 @@ const H5RegisterPage: React.FC = () => { const { config } = require('../../config'); Taro.setStorageSync(config.TOKEN_KEY, result.accessToken); Taro.setStorageSync(config.USER_KEY, JSON.stringify(result.user)); - Taro.showToast({ title: t('register_success') || '注册成功', icon: 'success' }); + Taro.showToast({ title: t('register_success'), icon: 'success' }); setTimeout(() => { Taro.reLaunch({ url: '/pages/home/index' }); }, 1000); @@ -163,15 +163,15 @@ const H5RegisterPage: React.FC = () => { {t('login_agree_prefix')} - {`《${t('login_user_agreement')}》`} + {t('login_user_agreement')} {t('login_and')} - {`《${t('login_privacy_policy')}》`} + {t('login_privacy_policy')} {/* Primary CTA Button */} - {submitting ? (t('loading') || '注册中...') : t('register_now')} + {submitting ? t('loading') : t('register_now')} {/* Social Login Divider */} diff --git a/frontend/miniapp/src/pages/login/index.tsx b/frontend/miniapp/src/pages/login/index.tsx index 8be78ea..5a3175b 100644 --- a/frontend/miniapp/src/pages/login/index.tsx +++ b/frontend/miniapp/src/pages/login/index.tsx @@ -25,7 +25,7 @@ const LoginPage: React.FC = () => { setCodeSending(true); sendSmsCode(phone, 'LOGIN') .then(() => { - Taro.showToast({ title: t('login_code_sent') || '验证码已发送', icon: 'success' }); + Taro.showToast({ title: t('login_code_sent'), icon: 'success' }); setCodeCountdown(60); const timer = setInterval(() => { setCodeCountdown((prev) => { @@ -75,7 +75,7 @@ const LoginPage: React.FC = () => { 💬 - {logging ? (t('loading') || '登录中...') : t('login_wechat')} + {logging ? t('loading') : t('login_wechat')} @@ -116,16 +116,16 @@ const LoginPage: React.FC = () => { - {logging ? (t('loading') || '登录中...') : t('login_btn')} + {logging ? t('loading') : t('login_btn')} {/* Terms */} {t('login_agree')} - {`《${t('login_user_agreement')}》`} + {t('login_user_agreement')} {t('login_and')} - {`《${t('login_privacy_policy')}》`} + {t('login_privacy_policy')}