🌐 Localize dashboard
This commit is contained in:
parent
baa6b401d3
commit
e4a6ff2da4
@ -1,4 +1,5 @@
|
|||||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
import 'package:solian/models/account.dart';
|
import 'package:solian/models/account.dart';
|
||||||
|
|
||||||
part 'daily_sign.g.dart';
|
part 'daily_sign.g.dart';
|
||||||
@ -39,10 +40,10 @@ class DailySignRecord {
|
|||||||
};
|
};
|
||||||
|
|
||||||
String get overviewSuggestion => switch (resultTier) {
|
String get overviewSuggestion => switch (resultTier) {
|
||||||
0 => '诸事不宜',
|
0 => 'dailySignTier0'.tr,
|
||||||
1 => '有些不宜',
|
1 => 'dailySignTier1'.tr,
|
||||||
2 => '平平淡淡',
|
2 => 'dailySignTier2'.tr,
|
||||||
3 => '有些事宜',
|
3 => 'dailySignTier3'.tr,
|
||||||
_ => '诸事皆宜',
|
_ => 'dailySignTier4'.tr,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -144,10 +144,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|||||||
).paddingSymmetric(horizontal: 9),
|
).paddingSymmetric(horizontal: 9),
|
||||||
).paddingOnly(left: 4),
|
).paddingOnly(left: 4),
|
||||||
title: _signRecord == null
|
title: _signRecord == null
|
||||||
? const Text('签到')
|
? Text('dailySign'.tr)
|
||||||
: Text(_signRecord!.overviewSuggestion),
|
: Text(_signRecord!.overviewSuggestion),
|
||||||
subtitle: _signRecord == null
|
subtitle: _signRecord == null
|
||||||
? const Text('今日未拜访佛祖')
|
? Text('dailySignNone'.tr)
|
||||||
: Text('+${_signRecord!.resultExperience} EXP'),
|
: Text('+${_signRecord!.resultExperience} EXP'),
|
||||||
trailing: AnimatedSwitcher(
|
trailing: AnimatedSwitcher(
|
||||||
switchInCurve: Curves.fastOutSlowIn,
|
switchInCurve: Curves.fastOutSlowIn,
|
||||||
@ -414,7 +414,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
|||||||
style: TextStyle(color: _unFocusColor, fontSize: 12),
|
style: TextStyle(color: _unFocusColor, fontSize: 12),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'占卜多少都是玩,人生还得靠自己',
|
'dashboardFooter'.tr,
|
||||||
style: GoogleFonts.notoSerifHk(
|
style: GoogleFonts.notoSerifHk(
|
||||||
color: _unFocusColor,
|
color: _unFocusColor,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
|
@ -24,6 +24,14 @@ const i18nEnglish = {
|
|||||||
'feedUnreadCount': '@count posts you may missed',
|
'feedUnreadCount': '@count posts you may missed',
|
||||||
'messages': 'Messages',
|
'messages': 'Messages',
|
||||||
'messagesUnreadCount': '@count messages unread',
|
'messagesUnreadCount': '@count messages unread',
|
||||||
|
'dailySign': 'Daily Sign',
|
||||||
|
'dailySignNone': 'You haven\'t sign today',
|
||||||
|
'dailySignTier0': 'Everything may not be good',
|
||||||
|
'dailySignTier1': 'Something may be wrong',
|
||||||
|
'dailySignTier2': 'Just so so',
|
||||||
|
'dailySignTier3': 'Something may goes well',
|
||||||
|
'dailySignTier4': 'Everything will be awesome',
|
||||||
|
'dashboardFooter': 'Don\'t be serious, just for fun.',
|
||||||
'visitProfilePage': 'Visit Profile Page',
|
'visitProfilePage': 'Visit Profile Page',
|
||||||
'profilePosts': 'Posts',
|
'profilePosts': 'Posts',
|
||||||
'profileAlbum': 'Album',
|
'profileAlbum': 'Album',
|
||||||
|
@ -32,6 +32,14 @@ const i18nSimplifiedChinese = {
|
|||||||
'feedUnreadCount': '@count 条你可能错过的帖子',
|
'feedUnreadCount': '@count 条你可能错过的帖子',
|
||||||
'messages': '消息',
|
'messages': '消息',
|
||||||
'messagesUnreadCount': '@count 条未读的消息',
|
'messagesUnreadCount': '@count 条未读的消息',
|
||||||
|
'dailySign': '签到',
|
||||||
|
'dailySignNone': '今日未拜访佛祖',
|
||||||
|
'dailySignTier0': '诸事不宜',
|
||||||
|
'dailySignTier1': '有些不宜',
|
||||||
|
'dailySignTier2': '平平淡淡',
|
||||||
|
'dailySignTier3': '有些事宜',
|
||||||
|
'dailySignTier4': '诸事皆宜',
|
||||||
|
'dashboardFooter': '占卜多少沾点玩,人生还得靠实力',
|
||||||
'visitProfilePage': '造访个人主页',
|
'visitProfilePage': '造访个人主页',
|
||||||
'profilePosts': '帖子',
|
'profilePosts': '帖子',
|
||||||
'profileAlbum': '相簿',
|
'profileAlbum': '相簿',
|
||||||
|
Loading…
Reference in New Issue
Block a user