diff --git a/android/app/src/main/kotlin/dev/solsynth/solian/widgets/CheckInWidget.kt b/android/app/src/main/kotlin/dev/solsynth/solian/widgets/CheckInWidget.kt index 2d49da7..29d8d61 100644 --- a/android/app/src/main/kotlin/dev/solsynth/solian/widgets/CheckInWidget.kt +++ b/android/app/src/main/kotlin/dev/solsynth/solian/widgets/CheckInWidget.kt @@ -54,7 +54,7 @@ class CheckInWidget : GlanceAppWidget() { .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) .registerTypeAdapter(Instant::class.java, InstantAdapter()) .create() - val resultTierSymbols = listOf("大凶", "凶", "中平", "吉", "大吉") + val resultTierSymbols = listOf("Bad", "Poor", "Medium", "Good", "Great") val prefs = currentState.preferences val checkInRaw: String? = prefs.getString("pas_check_in_record", null) @@ -120,7 +120,7 @@ class CheckInWidget : GlanceAppWidget() { } Text( - text = "You haven't checked in today", + text = "You haven't divined today", style = TextStyle(fontSize = 15.sp, color = GlanceTheme.colors.onSurface) ) } diff --git a/assets/translations/en-US.json b/assets/translations/en-US.json index 52e1cef..983eeae 100644 --- a/assets/translations/en-US.json +++ b/assets/translations/en-US.json @@ -419,7 +419,7 @@ "callMessageEnded": "Call lasted {}", "callMessageStarted": "Call started", "dailyCheckIn": "Check In", - "dailyCheckInNone": "You haven't checked in today", + "dailyCheckInNone": "You haven't divined today", "dailyCheckAction": "Check in right now!", "dailyCheckDetail": "Can't understand the symbol? Master, help me understand it!", "dailyCheckDetailTitle": "{}'s fortune details", diff --git a/ios/SolarWidget/CheckInWidget.swift b/ios/SolarWidget/CheckInWidget.swift index 9e7ef35..b943597 100644 --- a/ios/SolarWidget/CheckInWidget.swift +++ b/ios/SolarWidget/CheckInWidget.swift @@ -15,14 +15,14 @@ struct CheckInProvider: TimelineProvider { func getSnapshot(in context: Context, completion: @escaping (CheckInEntry) -> ()) { let prefs = UserDefaults(suiteName: "group.solsynth.solian") - + let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'" - + let jsonDecoder = JSONDecoder() jsonDecoder.dateDecodingStrategy = .formatted(dateFormatter) jsonDecoder.keyDecodingStrategy = .convertFromSnakeCase - + let checkInRaw = prefs?.string(forKey: "pas_check_in_record") var checkIn: SolarCheckInRecord? if let checkInRaw = checkInRaw { @@ -31,7 +31,7 @@ struct CheckInProvider: TimelineProvider { checkIn = nil } } - + let entry = CheckInEntry( date: Date(), checkIn: checkIn @@ -54,11 +54,11 @@ struct CheckInEntry: TimelineEntry { struct CheckInWidgetEntryView : View { var entry: CheckInProvider.Entry - - private let resultTierSymbols: [String] = ["大凶", "凶", "中平", "吉", "大吉"] - + + private let resultTierSymbols: [String] = ["Bad", "Poor", "Medium", "Good", "Great"] + func checkIn() -> Void {} - + func seeDetail() -> Void {} var body: some View { @@ -68,9 +68,9 @@ struct CheckInWidgetEntryView : View { Text(resultTierSymbols[checkIn.resultTier]).font(.system(size: 27, weight: .bold)) Text("+\(checkIn.resultExperience) EXP").font(.system(size: 15, design: .monospaced)) }.padding(.horizontal, 4) - + Spacer() - + HStack { VStack(alignment: .leading) { Text( @@ -82,7 +82,7 @@ struct CheckInWidgetEntryView : View { format: .dateTime.day().month() ).font(.system(size: 13)) }.padding(.leading, 4) - + Button("See Detail", systemImage: "arrow.right", action: seeDetail) .labelStyle(.iconOnly) .buttonBorderShape(.circle) @@ -91,11 +91,11 @@ struct CheckInWidgetEntryView : View { } else { VStack(alignment: .leading) { Text("Check In").font(.system(size: 19, weight: .bold)) - Text("You haven't check in today").font(.system(size: 15)) + Text("You haven't divined today").font(.system(size: 15)) }.padding(.horizontal, 4) - + Spacer() - + HStack(alignment: .bottom) { Button("Check In", systemImage: "checkmark", action: checkIn).labelStyle(.iconOnly).buttonBorderShape(.circle).frame(maxWidth: .infinity, alignment: .trailing) } diff --git a/lib/types/check_in.dart b/lib/types/check_in.dart index 58c7273..4becd56 100644 --- a/lib/types/check_in.dart +++ b/lib/types/check_in.dart @@ -3,7 +3,7 @@ import 'package:freezed_annotation/freezed_annotation.dart'; part 'check_in.freezed.dart'; part 'check_in.g.dart'; -const List kCheckInResultTierSymbols = ['大凶', '凶', '中平', '吉', '大吉']; +const List kCheckInResultTierSymbols = ['Bad', 'Poor', 'Medium', 'Good', 'Great']; @freezed class SnCheckInRecord with _$SnCheckInRecord {