Showing
12 changed files
with
27 additions
and
25 deletions
27 KB
9.89 KB
| @@ -588,22 +588,6 @@ class _ProCard extends StatelessWidget { | @@ -588,22 +588,6 @@ class _ProCard extends StatelessWidget { | ||
| 588 | } | 588 | } |
| 589 | } | 589 | } |
| 590 | 590 | ||
| 591 | -// class _WatchThemeCard extends StatelessWidget { | ||
| 592 | -// const _WatchThemeCard(); | ||
| 593 | -// | ||
| 594 | -// @override | ||
| 595 | -// Widget build(BuildContext context) { | ||
| 596 | -// return Container( | ||
| 597 | -// height: 145, | ||
| 598 | -// decoration: BoxDecoration( | ||
| 599 | -// color: Colors.white, | ||
| 600 | -// borderRadius: BorderRadius.circular(16), | ||
| 601 | -// ), | ||
| 602 | -// child: Image.asset('assets/images/my/ic_my_watch_theme.png'), | ||
| 603 | -// ); | ||
| 604 | -// } | ||
| 605 | -// } | ||
| 606 | - | ||
| 607 | class _WatchThemeCard extends StatelessWidget { | 591 | class _WatchThemeCard extends StatelessWidget { |
| 608 | const _WatchThemeCard({ | 592 | const _WatchThemeCard({ |
| 609 | required this.themes, | 593 | required this.themes, |
| @@ -635,7 +619,7 @@ class _WatchThemeCard extends StatelessWidget { | @@ -635,7 +619,7 @@ class _WatchThemeCard extends StatelessWidget { | ||
| 635 | Row( | 619 | Row( |
| 636 | children: [ | 620 | children: [ |
| 637 | Text( | 621 | Text( |
| 638 | - 'Watch主题', | 622 | + context.l10n.watchThemePageTitle, |
| 639 | style: TextStyle( | 623 | style: TextStyle( |
| 640 | color: AppColors.textPrimary, | 624 | color: AppColors.textPrimary, |
| 641 | fontSize: 16, | 625 | fontSize: 16, |
| @@ -679,7 +663,7 @@ class _WatchThemeCard extends StatelessWidget { | @@ -679,7 +663,7 @@ class _WatchThemeCard extends StatelessWidget { | ||
| 679 | ), | 663 | ), |
| 680 | SizedBox(height: 10), | 664 | SizedBox(height: 10), |
| 681 | Text( | 665 | Text( |
| 682 | - '支持自定义创作主题哦~', | 666 | + context.l10n.watchThemeCardSubtitle, |
| 683 | style: TextStyle( | 667 | style: TextStyle( |
| 684 | color: AppColors.primary, | 668 | color: AppColors.primary, |
| 685 | fontSize: 12, | 669 | fontSize: 12, |
| @@ -26,14 +26,18 @@ class WatchFacePreview extends StatelessWidget { | @@ -26,14 +26,18 @@ class WatchFacePreview extends StatelessWidget { | ||
| 26 | final WatchFacePreviewType type; | 26 | final WatchFacePreviewType type; |
| 27 | final Function()? switchFriend; | 27 | final Function()? switchFriend; |
| 28 | 28 | ||
| 29 | - String get _backgroundAsset { | 29 | + String _backgroundAsset(BuildContext context) { |
| 30 | + final isChinese = Localizations.localeOf(context).languageCode == 'zh'; | ||
| 31 | + final directory = | ||
| 32 | + isChinese ? 'assets/images/watch_theme/zh' : 'assets/images/watch_theme'; | ||
| 33 | + | ||
| 30 | if (type == WatchFacePreviewType.surface) { | 34 | if (type == WatchFacePreviewType.surface) { |
| 31 | - return 'assets/images/watch_theme/watch_theme_preview_surface.png'; | 35 | + return '$directory/watch_theme_preview_surface.png'; |
| 32 | } | 36 | } |
| 33 | if (type == WatchFacePreviewType.coupleSmall) { | 37 | if (type == WatchFacePreviewType.coupleSmall) { |
| 34 | - return 'assets/images/watch_theme/watch_theme_preview_couple.png'; | 38 | + return '$directory/watch_theme_preview_couple.png'; |
| 35 | } | 39 | } |
| 36 | - return 'assets/images/watch_theme/watch_theme_preview_single.png'; | 40 | + return '$directory/watch_theme_preview_single.png'; |
| 37 | } | 41 | } |
| 38 | 42 | ||
| 39 | Size get _previewSize { | 43 | Size get _previewSize { |
| @@ -68,7 +72,7 @@ class WatchFacePreview extends StatelessWidget { | @@ -68,7 +72,7 @@ class WatchFacePreview extends StatelessWidget { | ||
| 68 | clipBehavior: Clip.none, | 72 | clipBehavior: Clip.none, |
| 69 | children: [ | 73 | children: [ |
| 70 | Image( | 74 | Image( |
| 71 | - image: AssetImage(_backgroundAsset), | 75 | + image: AssetImage(_backgroundAsset(context)), |
| 72 | width: size.width, | 76 | width: size.width, |
| 73 | height: size.height, | 77 | height: size.height, |
| 74 | fit: BoxFit.fitWidth, | 78 | fit: BoxFit.fitWidth, |
| @@ -721,6 +721,7 @@ | @@ -721,6 +721,7 @@ | ||
| 721 | "watchThemeWatchDataUnavailable": "Watch data is unavailable", | 721 | "watchThemeWatchDataUnavailable": "Watch data is unavailable", |
| 722 | "watchThemeWatchAppNotInstalled": "Watch app is not installed", | 722 | "watchThemeWatchAppNotInstalled": "Watch app is not installed", |
| 723 | "watchThemePurchaseChannel": "Watch Face Themes", | 723 | "watchThemePurchaseChannel": "Watch Face Themes", |
| 724 | + "watchThemeCardSubtitle": "Customize your watch theme ⭐", | ||
| 724 | "feedbackMaxImagesLimit": "Up to {count} images or videos can be uploaded", | 725 | "feedbackMaxImagesLimit": "Up to {count} images or videos can be uploaded", |
| 725 | "@feedbackMaxImagesLimit": { | 726 | "@feedbackMaxImagesLimit": { |
| 726 | "description": "Feedback upload images/videos limit hint", | 727 | "description": "Feedback upload images/videos limit hint", |
| @@ -868,4 +869,4 @@ | @@ -868,4 +869,4 @@ | ||
| 868 | "quarterlyMembership": "Quarterly", | 869 | "quarterlyMembership": "Quarterly", |
| 869 | "annualMembership": "Annual", | 870 | "annualMembership": "Annual", |
| 870 | "lifetimeMembership": "Lifetime" | 871 | "lifetimeMembership": "Lifetime" |
| 871 | -} | ||
| 872 | +} |
| @@ -1114,6 +1114,7 @@ | @@ -1114,6 +1114,7 @@ | ||
| 1114 | "watchThemeWatchDataUnavailable": "手表数据无法传递", | 1114 | "watchThemeWatchDataUnavailable": "手表数据无法传递", |
| 1115 | "watchThemeWatchAppNotInstalled": "Watch App 未安装", | 1115 | "watchThemeWatchAppNotInstalled": "Watch App 未安装", |
| 1116 | "watchThemePurchaseChannel": "表盘主题", | 1116 | "watchThemePurchaseChannel": "表盘主题", |
| 1117 | + "watchThemeCardSubtitle": "支持自定义创作主题哦~", | ||
| 1117 | "feedbackMaxImagesLimit": "最多上传{count}个图片或视频", | 1118 | "feedbackMaxImagesLimit": "最多上传{count}个图片或视频", |
| 1118 | "@feedbackMaxImagesLimit": { | 1119 | "@feedbackMaxImagesLimit": { |
| 1119 | "description": "反馈上传图片或视频的最大限制提示", | 1120 | "description": "反馈上传图片或视频的最大限制提示", |
| @@ -1261,4 +1262,4 @@ | @@ -1261,4 +1262,4 @@ | ||
| 1261 | "quarterlyMembership": "季度会员", | 1262 | "quarterlyMembership": "季度会员", |
| 1262 | "annualMembership": "年度会员", | 1263 | "annualMembership": "年度会员", |
| 1263 | "lifetimeMembership": "终身会员" | 1264 | "lifetimeMembership": "终身会员" |
| 1264 | -} | ||
| 1265 | +} |
| @@ -4119,6 +4119,12 @@ abstract class AppLocalizations { | @@ -4119,6 +4119,12 @@ abstract class AppLocalizations { | ||
| 4119 | /// **'表盘主题'** | 4119 | /// **'表盘主题'** |
| 4120 | String get watchThemePurchaseChannel; | 4120 | String get watchThemePurchaseChannel; |
| 4121 | 4121 | ||
| 4122 | + /// No description provided for @watchThemeCardSubtitle. | ||
| 4123 | + /// | ||
| 4124 | + /// In zh, this message translates to: | ||
| 4125 | + /// **'自定义你的 Watch 主题 ⭐'** | ||
| 4126 | + String get watchThemeCardSubtitle; | ||
| 4127 | + | ||
| 4122 | /// 反馈上传图片或视频的最大限制提示 | 4128 | /// 反馈上传图片或视频的最大限制提示 |
| 4123 | /// | 4129 | /// |
| 4124 | /// In zh, this message translates to: | 4130 | /// In zh, this message translates to: |
| @@ -2299,6 +2299,9 @@ class AppLocalizationsEn extends AppLocalizations { | @@ -2299,6 +2299,9 @@ class AppLocalizationsEn extends AppLocalizations { | ||
| 2299 | String get watchThemePurchaseChannel => 'Watch Face Themes'; | 2299 | String get watchThemePurchaseChannel => 'Watch Face Themes'; |
| 2300 | 2300 | ||
| 2301 | @override | 2301 | @override |
| 2302 | + String get watchThemeCardSubtitle => 'Customize your watch theme ⭐'; | ||
| 2303 | + | ||
| 2304 | + @override | ||
| 2302 | String feedbackMaxImagesLimit(int count) { | 2305 | String feedbackMaxImagesLimit(int count) { |
| 2303 | return 'Up to $count images or videos can be uploaded'; | 2306 | return 'Up to $count images or videos can be uploaded'; |
| 2304 | } | 2307 | } |
| @@ -2200,6 +2200,9 @@ class AppLocalizationsZh extends AppLocalizations { | @@ -2200,6 +2200,9 @@ class AppLocalizationsZh extends AppLocalizations { | ||
| 2200 | String get watchThemePurchaseChannel => '表盘主题'; | 2200 | String get watchThemePurchaseChannel => '表盘主题'; |
| 2201 | 2201 | ||
| 2202 | @override | 2202 | @override |
| 2203 | + String get watchThemeCardSubtitle => '自定义你的 Watch 主题 ⭐'; | ||
| 2204 | + | ||
| 2205 | + @override | ||
| 2203 | String feedbackMaxImagesLimit(int count) { | 2206 | String feedbackMaxImagesLimit(int count) { |
| 2204 | return '最多上传$count个图片或视频'; | 2207 | return '最多上传$count个图片或视频'; |
| 2205 | } | 2208 | } |
-
Please register or login to post a comment