🌐 Localize daily sign history chart

This commit is contained in:
LittleSheep 2024-09-11 22:03:43 +08:00
parent 408a2489e2
commit bba38e6845
4 changed files with 21 additions and 7 deletions

View File

@ -26,12 +26,17 @@
"messages": "Messages",
"messagesUnreadCount": "@count messages unread",
"dailySign": "Daily Sign",
"dailySignAction": "Sign Today",
"dailySignHistoryAction": "View History",
"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",
"dailySignHistoryTitle": "Fortune History",
"dailySignHistoryRecent": "Recent Fortune",
"dailySignHistoryReward": "Reward Trends",
"dashboardFooter": "Don't be serious, just for fun.",
"visitProfilePage": "Visit Profile Page",
"profilePage": "Page",

View File

@ -34,12 +34,17 @@
"messages": "消息",
"messagesUnreadCount": "@count 条未读的消息",
"dailySign": "签到",
"dailySignAction": "烧香拜佛",
"dailySignHistoryAction": "查看运势历史",
"dailySignNone": "今日未拜访佛祖",
"dailySignTier0": "诸事不宜",
"dailySignTier1": "有些不宜",
"dailySignTier2": "平平淡淡",
"dailySignTier3": "有些事宜",
"dailySignTier4": "诸事皆宜",
"dailySignHistoryTitle": "运势历史",
"dailySignHistoryRecent": "近期运势",
"dailySignHistoryReward": "成果趋势",
"dashboardFooter": "占卜多少沾点玩,人生还得靠实力",
"visitProfilePage": "造访个人主页",
"profilePage": "主页",

View File

@ -197,12 +197,12 @@ class _DashboardScreenState extends State<DashboardScreen> {
},
child: _signRecord == null
? IconButton(
tooltip: '上香求签',
tooltip: 'dailySignAction'.tr,
icon: const Icon(Icons.local_fire_department),
onPressed: _signingDaily ? null : _signDaily,
)
: IconButton(
tooltip: '查看运势历史',
tooltip: 'dailySignHistoryAction'.tr,
icon: const Icon(Icons.history),
onPressed: () {
showDialog(

View File

@ -24,7 +24,7 @@ class DailySignHistoryChartDialog extends StatelessWidget {
title: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text('运势历史'),
Text('dailySignHistoryTitle'.tr),
Text(
'${DateFormat('yyyy/MM/dd').format(_firstRecordDate!)} - ${DateFormat('yyyy/MM/dd').format(DateTime.now())}',
style: TextStyle(
@ -46,8 +46,10 @@ class DailySignHistoryChartDialog extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('近期运势', style: Theme.of(context).textTheme.titleMedium)
.paddingOnly(bottom: 18),
Text(
'dailySignHistoryRecent'.tr,
style: Theme.of(context).textTheme.titleMedium,
).paddingOnly(bottom: 18),
SizedBox(
height: 180,
width: max(640, MediaQuery.of(context).size.width),
@ -147,8 +149,10 @@ class DailySignHistoryChartDialog extends StatelessWidget {
),
).marginOnly(right: 24, bottom: 8, top: 8),
const Gap(16),
Text('功德趋势', style: Theme.of(context).textTheme.titleMedium)
.paddingOnly(bottom: 18),
Text(
'dailySignHistoryReward'.tr,
style: Theme.of(context).textTheme.titleMedium,
).paddingOnly(bottom: 18),
SizedBox(
height: 180,
width: max(640, MediaQuery.of(context).size.width),