Browse Source

refactor(商品页): 重构商品页脚组件并更新翻译文案

将商品页脚部分抽离为独立组件 GoodsFooterSection
更新多语言翻译中的版权信息和公司名称
修改 totalCount 为 totalQuota 以保持术语一致
添加内购客服QQ信息显示功能
newdev_shunjiawei
lxm 10 months ago
parent
commit
94cb289f4c
  1. 3
      lib/core/translations/language/ar_sa.dart
  2. 3
      lib/core/translations/language/de_de.dart
  3. 6
      lib/core/translations/language/en_us.dart
  4. 3
      lib/core/translations/language/hi_in.dart
  5. 3
      lib/core/translations/language/it_it.dart
  6. 3
      lib/core/translations/language/ko_kr.dart
  7. 3
      lib/core/translations/language/pt_pt.dart
  8. 3
      lib/core/translations/language/ru_ru.dart
  9. 8
      lib/core/translations/language/zh_cn.dart
  10. 9
      lib/core/translations/language/zh_hk.dart
  11. 39
      lib/modules/goods/views/goodsai_view.dart
  12. 51
      lib/modules/goods/views/goodsmeet_view.dart
  13. 51
      lib/modules/goods/views/goodstrans_view.dart
  14. 41
      lib/modules/goods/views/goodsvip_view.dart
  15. 48
      lib/modules/goods/views/widgets/goods_footer_section.dart

3
lib/core/translations/language/ar_sa.dart

@ -1188,8 +1188,7 @@ const Map<String, String> arSA = {
"guideSmsEnd": "Message sent—voice control is convenient",
// Goods pages common footer (placeholders)
'appNameProvider': 'App: VoiTrans · Provided by: VoiTrans',
'moreInfoViewInSettingsAbout': 'For more info, go to Settings > About',
'copyrightVoiTrans': '© 2025 VoiTrans',
'copyrightVoitrans': '© 2025 Voitrans Technologies',
// Meeting goods page (placeholders)
'meetingHeaderDesc1':

3
lib/core/translations/language/de_de.dart

@ -909,8 +909,7 @@ const Map<String, String> deDE = {
"guideSmsEnd": "Message sent—voice control is convenient",
// Goods pages common footer (placeholders)
'appNameProvider': 'App: VoiTrans · Provided by: VoiTrans',
'moreInfoViewInSettingsAbout': 'For more info, go to Settings > About',
'copyrightVoiTrans': '© 2025 VoiTrans',
'copyrightVoitrans': '© 2025 Voitrans Technologies',
// Meeting goods page (placeholders)
'meetingHeaderDesc1':

6
lib/core/translations/language/en_us.dart

@ -189,7 +189,7 @@ const Map<String, String> enUS = {
// 商品页面(AI/翻译/会议)
'availablePackages': 'Available Packages',
'remainingQuota': 'Remaining Quota',
'totalCount': 'Total Count',
'totalQuota': 'Total Quota',
'remaining': 'Remaining',
'featureDescription': 'Feature Description',
// AI 功能卡片
@ -232,8 +232,8 @@ const Map<String, String> enUS = {
// 商品页通用页脚
'appNameProvider': 'App: VoiTrans · Provided by: VoiTrans',
'moreInfoViewInSettingsAbout': 'For more info, go to Settings > About',
'copyrightVoiTrans': '© 2025 VoiTrans',
'iapCustomerServiceQQLabel': 'IAP customer service QQ: @qq',
'copyrightVoitrans': '© 2025 Voitrans Technologies',
// 会议商品页描述
'meetingHeaderDesc1':

3
lib/core/translations/language/hi_in.dart

@ -877,8 +877,7 @@ const Map<String, String> hiIN = {
"guideSmsEnd": "Message sent—voice control is convenient",
// Goods pages common footer (placeholders)
'appNameProvider': 'App: VoiTrans · Provided by: VoiTrans',
'moreInfoViewInSettingsAbout': 'For more info, go to Settings > About',
'copyrightVoiTrans': '© 2025 VoiTrans',
'copyrightVoitrans': '© 2025 Voitrans Technologies',
// Meeting goods page (placeholders)
'meetingHeaderDesc1':

3
lib/core/translations/language/it_it.dart

@ -896,8 +896,7 @@ const Map<String, String> itIT = {
"guideSmsEnd": "Message sent—voice control is convenient",
// Goods pages common footer (placeholders)
'appNameProvider': 'App: VoiTrans · Provided by: VoiTrans',
'moreInfoViewInSettingsAbout': 'For more info, go to Settings > About',
'copyrightVoiTrans': '© 2025 VoiTrans',
'copyrightVoitrans': '© 2025 Voitrans Technologies',
// Meeting goods page (placeholders)
'meetingHeaderDesc1':

3
lib/core/translations/language/ko_kr.dart

@ -813,8 +813,7 @@ const Map<String, String> koKR = {
"guideSmsEnd": "Message sent—voice control is convenient",
// Goods pages common footer (placeholders)
'appNameProvider': 'App: VoiTrans · Provided by: VoiTrans',
'moreInfoViewInSettingsAbout': 'For more info, go to Settings > About',
'copyrightVoiTrans': '© 2025 VoiTrans',
'copyrightVoitrans': '© 2025 Voitrans Technologies',
// Meeting goods page (placeholders)
'meetingHeaderDesc1':

3
lib/core/translations/language/pt_pt.dart

@ -898,8 +898,7 @@ const Map<String, String> ptPT = {
"guideSmsEnd": "Message sent—voice control is convenient",
// Goods pages common footer (placeholders)
'appNameProvider': 'App: VoiTrans · Provided by: VoiTrans',
'moreInfoViewInSettingsAbout': 'For more info, go to Settings > About',
'copyrightVoiTrans': '© 2025 VoiTrans',
'copyrightVoitrans': '© 2025 Voitrans Technologies',
// Meeting goods page (placeholders)
'meetingHeaderDesc1':

3
lib/core/translations/language/ru_ru.dart

@ -891,8 +891,7 @@ const Map<String, String> ruRU = {
"guideSmsEnd": "Message sent—voice control is convenient",
// Goods pages common footer (placeholders)
'appNameProvider': 'App: VoiTrans · Provided by: VoiTrans',
'moreInfoViewInSettingsAbout': 'For more info, go to Settings > About',
'copyrightVoiTrans': '© 2025 VoiTrans',
'copyrightVoitrans': '© 2025 Voitrans Technologies',
// Meeting goods page (placeholders)
'meetingHeaderDesc1':

8
lib/core/translations/language/zh_cn.dart

@ -183,7 +183,7 @@ const Map<String, String> zhCN = {
// 商品页面(AI/翻译/会议)
'availablePackages': '可购买套餐',
'remainingQuota': '剩余额度',
'totalCount': '总次数',
'totalQuota': '总额度',
'remaining': '剩余',
'featureDescription': '功能说明',
// AI 功能卡片
@ -225,9 +225,9 @@ const Map<String, String> zhCN = {
'trans_003_desc': '含 1000 次翻译(语音/文本)',
// 商品页通用页脚
'appNameProvider': '应用名称:VoiTrans · 服务提供:VoiTrans',
'moreInfoViewInSettingsAbout': '更多信息请前往 设置 > 关于 查看',
'copyrightVoiTrans': '© 2025 VoiTrans',
'appNameProvider': '应用名称:Voitrans · 服务提供:Voitrans',
'iapCustomerServiceQQLabel': '内购商品专属客服QQ:@qq',
'copyrightVoitrans': '© 2025 Voitrans Technologies',
// 会议商品页描述
'meetingHeaderDesc1': '录音转写、关键词检索与自动总结,提升会议效率。',

9
lib/core/translations/language/zh_hk.dart

@ -835,10 +835,11 @@ const Map<String, String> zhHK = {
"guideSmsInput": "Text Dad: I’ll be home for dinner",
"guideSmsSend": "Lily will send the message",
"guideSmsEnd": "Message sent—voice control is convenient",
// Goods pages common footer (placeholders)
'appNameProvider': '應用名稱:VoiTrans · 服務提供:VoiTrans',
'moreInfoViewInSettingsAbout': '更多信息請前往 設置 > 關於 查看',
'copyrightVoiTrans': '© 2025 VoiTrans',
// 商品页通用页脚
'appNameProvider': '應用名稱:Voitrans · 服務提供:Voitrans',
'iapCustomerServiceQQLabel': '內购商品专属客服QQ:@qq',
'copyrightVoitrans': '© 2025 Voitrans Technologies',
// Meeting goods page (placeholders)
'meetingHeaderDesc1': '錄音轉寫、關鍵詞檢索與自動總結,提升會議效率。',

39
lib/modules/goods/views/goodsai_view.dart

@ -6,6 +6,7 @@ import '../../../data/models/goods.dart';
import '../../../data/models/user_Info.dart';
import '../controllers/goodsai_controller.dart';
import '../utils/goods_i18n.dart';
import 'widgets/goods_footer_section.dart';
class GoodsaiView extends GetView<GoodsaiController> {
const GoodsaiView({super.key});
@ -61,7 +62,7 @@ class GoodsaiView extends GetView<GoodsaiController> {
SizedBox(height: 16.h),
_buildFeaturesSection(isDarkMode),
SizedBox(height: 16.h),
_buildFooterSection(isDarkMode),
GoodsFooterSection(isDarkMode: isDarkMode),
],
);
}
@ -212,7 +213,7 @@ class GoodsaiView extends GetView<GoodsaiController> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'${'totalCount'.tr}:$totalAi',
'${'totalQuota'.tr}:$totalAi',
style: TextStyle(
fontSize: 12.sp,
color: isDarkMode ? Colors.white70 : Colors.grey[700],
@ -334,40 +335,6 @@ class GoodsaiView extends GetView<GoodsaiController> {
);
}
Widget _buildFooterSection(bool isDarkMode) {
final subColor = isDarkMode ? Colors.white60 : Colors.grey[600];
return Padding(
padding: EdgeInsets.symmetric(vertical: 12.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: double.infinity,
child: Divider(color: isDarkMode ? Colors.white24 : Colors.black12),
),
SizedBox(height: 8.h),
Text(
'appNameProvider'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11.sp, color: subColor),
),
SizedBox(height: 4.h),
Text(
'moreInfoViewInSettingsAbout'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11.sp, color: subColor),
),
SizedBox(height: 4.h),
Text(
'copyrightVoiTrans'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11.sp, color: subColor),
),
],
),
);
}
Widget _buildFeatureCard(
bool isDarkMode, {
required IconData icon,

51
lib/modules/goods/views/goodsmeet_view.dart

@ -5,6 +5,7 @@ import '../../../data/models/goods.dart';
import '../../../data/models/user_Info.dart';
import '../controllers/goodsmeet_controller.dart';
import '../utils/goods_i18n.dart';
import 'widgets/goods_footer_section.dart';
class GoodsmeetView extends GetView<GoodsmeetController> {
const GoodsmeetView({super.key});
@ -64,7 +65,7 @@ class GoodsmeetView extends GetView<GoodsmeetController> {
if (index == controller.items.length + 2) {
return _buildFeaturesSection(isDarkMode);
}
return _buildFooterSection(isDarkMode);
return GoodsFooterSection(isDarkMode: isDarkMode);
},
);
}),
@ -195,7 +196,7 @@ class GoodsmeetView extends GetView<GoodsmeetController> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'${'totalCount'.tr}:$totalAi',
'${'totalQuota'.tr}:$totalAi',
style: TextStyle(
fontSize: 12.sp,
color: isDarkMode ? Colors.white70 : Colors.grey[700],
@ -256,12 +257,12 @@ class GoodsmeetView extends GetView<GoodsmeetController> {
fontWeight: FontWeight.w600,
color: isDarkMode ? Colors.white : Colors.black,
)),
SizedBox(height: 4.h),
Text(localizedGoodsDesc(item),
style: TextStyle(
fontSize: 12.sp,
color: isDarkMode ? Colors.white70 : Colors.grey[600],
)),
// SizedBox(height: 4.h),
// Text(localizedGoodsDesc(item),
// style: TextStyle(
// fontSize: 12.sp,
// color: isDarkMode ? Colors.white70 : Colors.grey[600],
// )),
],
),
),
@ -429,38 +430,4 @@ class GoodsmeetView extends GetView<GoodsmeetController> {
),
);
}
Widget _buildFooterSection(bool isDarkMode) {
final subColor = isDarkMode ? Colors.white60 : Colors.grey[600];
return Padding(
padding: EdgeInsets.symmetric(vertical: 12.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: double.infinity,
child: Divider(color: isDarkMode ? Colors.white24 : Colors.black12),
),
SizedBox(height: 8.h),
Text(
'appNameProvider'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11.sp, color: subColor),
),
SizedBox(height: 4.h),
Text(
'moreInfoViewInSettingsAbout'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11.sp, color: subColor),
),
SizedBox(height: 4.h),
Text(
'copyrightVoiTrans'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11.sp, color: subColor),
),
],
),
);
}
}

51
lib/modules/goods/views/goodstrans_view.dart

@ -5,6 +5,7 @@ import '../../../data/models/goods.dart';
import '../../../data/models/user_Info.dart';
import '../controllers/goodstrans_controller.dart';
import '../utils/goods_i18n.dart';
import 'widgets/goods_footer_section.dart';
class GoodstransView extends GetView<GoodstransController> {
const GoodstransView({super.key});
@ -63,7 +64,7 @@ class GoodstransView extends GetView<GoodstransController> {
if (index == controller.items.length + 2) {
return _buildFeaturesSection(isDarkMode);
}
return _buildFooterSection(isDarkMode);
return GoodsFooterSection(isDarkMode: isDarkMode);
},
);
}),
@ -194,7 +195,7 @@ class GoodstransView extends GetView<GoodstransController> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'${'totalCount'.tr}:$totalAi',
'${'totalQuota'.tr}:$totalAi',
style: TextStyle(
fontSize: 12.sp,
color: isDarkMode ? Colors.white70 : Colors.grey[700],
@ -255,12 +256,12 @@ class GoodstransView extends GetView<GoodstransController> {
fontWeight: FontWeight.w600,
color: isDarkMode ? Colors.white : Colors.black,
)),
SizedBox(height: 4.h),
Text(localizedGoodsDesc(item),
style: TextStyle(
fontSize: 12.sp,
color: isDarkMode ? Colors.white70 : Colors.grey[600],
)),
// SizedBox(height: 4.h),
// Text(localizedGoodsDesc(item),
// style: TextStyle(
// fontSize: 12.sp,
// color: isDarkMode ? Colors.white70 : Colors.grey[600],
// )),
],
),
),
@ -431,38 +432,4 @@ class GoodstransView extends GetView<GoodstransController> {
),
);
}
Widget _buildFooterSection(bool isDarkMode) {
final subColor = isDarkMode ? Colors.white60 : Colors.grey[600];
return Padding(
padding: EdgeInsets.symmetric(vertical: 12.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: double.infinity,
child: Divider(color: isDarkMode ? Colors.white24 : Colors.black12),
),
SizedBox(height: 8.h),
Text(
'appNameProvider'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11.sp, color: subColor),
),
SizedBox(height: 4.h),
Text(
'moreInfoViewInSettingsAbout'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11.sp, color: subColor),
),
SizedBox(height: 4.h),
Text(
'copyrightVoiTrans'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11.sp, color: subColor),
),
],
),
);
}
}

41
lib/modules/goods/views/goodsvip_view.dart

@ -5,6 +5,7 @@ import '../../../data/models/goods.dart';
import '../../../data/models/user_Info.dart';
import '../controllers/goodsvip_controller.dart';
import '../utils/goods_i18n.dart';
import 'widgets/goods_footer_section.dart';
class GoodsvipView extends GetView<GoodsvipController> {
const GoodsvipView({super.key});
@ -68,7 +69,7 @@ class GoodsvipView extends GetView<GoodsvipController> {
}
}
children.add(_buildFooterSection(isDarkMode));
children.add(GoodsFooterSection(isDarkMode: isDarkMode));
content = ListView(
key: ValueKey(userTick),
padding: EdgeInsets.all(16.w),
@ -223,40 +224,6 @@ class GoodsvipView extends GetView<GoodsvipController> {
);
}
Widget _buildFooterSection(bool isDarkMode) {
final subColor = isDarkMode ? Colors.white60 : Colors.grey[600];
return Padding(
padding: EdgeInsets.symmetric(vertical: 12.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: double.infinity,
child: Divider(color: isDarkMode ? Colors.white24 : Colors.black12),
),
SizedBox(height: 8.h),
Text(
'appNameProvider'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11.sp, color: subColor),
),
SizedBox(height: 4.h),
Text(
'moreInfoViewInSettingsAbout'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11.sp, color: subColor),
),
SizedBox(height: 4.h),
Text(
'copyrightVoiTrans'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11.sp, color: subColor),
),
],
),
);
}
Widget _buildTypeHeader(UsageType type, bool isDarkMode) {
final titles = {
UsageType.AI: 'aiFunction'.tr,
@ -442,7 +409,7 @@ class GoodsvipView extends GetView<GoodsvipController> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'${'totalCount'.tr}:$total',
'${'totalQuota'.tr}:$total',
style: TextStyle(fontSize: 12.sp, color: subColor),
),
Text(
@ -701,7 +668,7 @@ class GoodsvipView extends GetView<GoodsvipController> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'${'totalCount'.tr}:$total',
'${'totalQuota'.tr}:$total',
style: TextStyle(fontSize: 12.sp, color: subColor),
),
Text(

48
lib/modules/goods/views/widgets/goods_footer_section.dart

@ -0,0 +1,48 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import '../../../../data/models/appconfig.dart';
class GoodsFooterSection extends StatelessWidget {
final bool isDarkMode;
const GoodsFooterSection({super.key, required this.isDarkMode});
@override
Widget build(BuildContext context) {
final subColor = isDarkMode ? Colors.white60 : Colors.grey[600];
final qq = AppConfig.env('iapCustomerServiceQQ') ?? '';
return Padding(
padding: EdgeInsets.symmetric(vertical: 12.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: double.infinity,
child: Divider(color: isDarkMode ? Colors.white24 : Colors.black12),
),
SizedBox(height: 8.h),
Text(
'appNameProvider'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11.sp, color: subColor),
),
SizedBox(height: 4.h),
if (qq.isNotEmpty) ...[
Text(
'iapCustomerServiceQQLabel'.trParams({'qq': qq}),
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11.sp, color: subColor),
),
SizedBox(height: 4.h),
],
// SizedBox(height: 4.h),
Text(
'copyrightVoitrans'.tr,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 11.sp, color: subColor),
),
],
),
);
}
}
Loading…
Cancel
Save