Skip to content

Commit

Permalink
feat: New icons and localized strings
Browse files Browse the repository at this point in the history
  • Loading branch information
lebojo committed Nov 22, 2024
1 parent 0cfaff3 commit 81676ba
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ struct ScheduleFloatingPanelView: View {

switch Calendar.current.component(.hour, from: Date.now) {
case 0 ... 7:
return [.laterThisMorning, .tomorrowMorning, .nextMondayMorning]
return [.laterThisMorning, .tomorrowMorning, .nextMonday]
case 8 ... 13:
return [.thisAfternoon, .tomorrowMorning, .nextMondayMorning]
return [.thisAfternoon, .tomorrowMorning, .nextMonday]
case 14 ... 19:
return [.thisEvening, .tomorrowMorning, .nextMondayMorning]
return [.thisEvening, .tomorrowMorning, .nextMonday]
case 20 ... 23:
return [.tomorrowMorning, .nextMondayMorning]
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ enum ScheduleSendOption: Identifiable, Equatable {
case thisAfternoon
case thisEvening
case tomorrowMorning
case nextMonday
case nextMondayMorning
case nextMondayAfternoon
case lastSchedule(value: Date)
Expand All @@ -40,7 +41,7 @@ enum ScheduleSendOption: Identifiable, Equatable {
return dateFromNow(setHour: 18)
case .tomorrowMorning:
return dateFromNow(setHour: 8, tomorrow: true)
case .nextMondayMorning:
case .nextMondayMorning, .nextMonday:
return nextMonday(setHour: 8)
case .nextMondayAfternoon:
return nextMonday(setHour: 14)
Expand All @@ -59,10 +60,12 @@ enum ScheduleSendOption: Identifiable, Equatable {
return MailResourcesStrings.Localizable.thisEvening
case .tomorrowMorning:
return MailResourcesStrings.Localizable.tomorrowMorning
case .nextMonday:
return MailResourcesStrings.Localizable.nextMonday
case .nextMondayMorning:
return MailResourcesStrings.Localizable.nextMondayMorning
return MailResourcesStrings.Localizable.mondayMorning
case .nextMondayAfternoon:
return MailResourcesStrings.Localizable.nextMondayAfternoon
return MailResourcesStrings.Localizable.mondayAfternoon
case .lastSchedule:
return MailResourcesStrings.Localizable.lastSelectedSchedule
}
Expand All @@ -71,17 +74,19 @@ enum ScheduleSendOption: Identifiable, Equatable {
var icon: Image {
switch self {
case .laterThisMorning:
return MailResourcesAsset.clockArrowCounterclockwise.swiftUIImage
return MailResourcesAsset.sunHorizon.swiftUIImage
case .thisAfternoon:
return MailResourcesAsset.sunHalf.swiftUIImage
return MailResourcesAsset.sunFilledRighthalf.swiftUIImage
case .thisEvening:
return MailResourcesAsset.moon.swiftUIImage
case .tomorrowMorning:
return MailResourcesAsset.sun.swiftUIImage
case .nextMondayMorning:
case .nextMonday:
return MailResourcesAsset.arrowBackward.swiftUIImage
case .nextMondayMorning:
return MailResourcesAsset.sun.swiftUIImage
case .nextMondayAfternoon:
return MailResourcesAsset.sunHalf.swiftUIImage
return MailResourcesAsset.sunFilledRighthalf.swiftUIImage
case .lastSchedule:
return MailResourcesAsset.clockArrowCounterclockwise.swiftUIImage
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "sun.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions MailResources/Localizable/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,12 @@
/* loco:6400bafe3dae40636c716ea2 */
"messageShowQuotedText" = "Anzeigen der Konversation";

/* loco:6723980d4062e74f78028152 */
"mondayAfternoon" = "Montagnachmittag";

/* loco:673effba4883a6c33a0a7113 */
"mondayMorning" = "Montagmorgen";

/* loco:66334ad612173107a60187e4 */
"moreInfo" = "Weitere Informationen";

Expand Down Expand Up @@ -1042,11 +1048,8 @@
/* loco:6266655afabeeb6bc774c932 */
"newMessagePlaceholderTitle" = "Geben Sie Ihre Nachricht ein";

/* loco:6723980d4062e74f78028152 */
"nextMondayAfternoon" = "Montagnachmittag";

/* loco:67238d29fe561f9d0a0f5732 */
"nextMondayMorning" = "Nächsten Montag";
"nextMonday" = "Nächsten Montag";

/* loco:62fb875a6743ac5a237b07e3 */
"noBodyTitle" = "Diese Nachricht ist leer.";
Expand Down
11 changes: 7 additions & 4 deletions MailResources/Localizable/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,12 @@
/* loco:6400bafe3dae40636c716ea2 */
"messageShowQuotedText" = "Display the conversation";

/* loco:6723980d4062e74f78028152 */
"mondayAfternoon" = "Monday afternoon";

/* loco:673effba4883a6c33a0a7113 */
"mondayMorning" = "Monday morning";

/* loco:66334ad612173107a60187e4 */
"moreInfo" = "More information";

Expand Down Expand Up @@ -1042,11 +1048,8 @@
/* loco:6266655afabeeb6bc774c932 */
"newMessagePlaceholderTitle" = "Type your message";

/* loco:6723980d4062e74f78028152 */
"nextMondayAfternoon" = "Monday afternoon";

/* loco:67238d29fe561f9d0a0f5732 */
"nextMondayMorning" = "Next monday";
"nextMonday" = "Next monday";

/* loco:62fb875a6743ac5a237b07e3 */
"noBodyTitle" = "This message is empty.";
Expand Down
11 changes: 7 additions & 4 deletions MailResources/Localizable/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,12 @@
/* loco:6400bafe3dae40636c716ea2 */
"messageShowQuotedText" = "Mostrar la conversación";

/* loco:6723980d4062e74f78028152 */
"mondayAfternoon" = "lunes por la tarde";

/* loco:673effba4883a6c33a0a7113 */
"mondayMorning" = "Lunes mañana";

/* loco:66334ad612173107a60187e4 */
"moreInfo" = "Más información";

Expand Down Expand Up @@ -1042,11 +1048,8 @@
/* loco:6266655afabeeb6bc774c932 */
"newMessagePlaceholderTitle" = "Escriba su mensaje";

/* loco:6723980d4062e74f78028152 */
"nextMondayAfternoon" = "lunes por la tarde";

/* loco:67238d29fe561f9d0a0f5732 */
"nextMondayMorning" = "El lunes próximo";
"nextMonday" = "El lunes próximo";

/* loco:62fb875a6743ac5a237b07e3 */
"noBodyTitle" = "Este mensaje está vacío.";
Expand Down
11 changes: 7 additions & 4 deletions MailResources/Localizable/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,12 @@
/* loco:6400bafe3dae40636c716ea2 */
"messageShowQuotedText" = "Afficher la conversation";

/* loco:6723980d4062e74f78028152 */
"mondayAfternoon" = "Lundi après-midi";

/* loco:673effba4883a6c33a0a7113 */
"mondayMorning" = "Lundi matin";

/* loco:66334ad612173107a60187e4 */
"moreInfo" = "En savoir plus";

Expand Down Expand Up @@ -1042,11 +1048,8 @@
/* loco:6266655afabeeb6bc774c932 */
"newMessagePlaceholderTitle" = "Rédigez votre message";

/* loco:6723980d4062e74f78028152 */
"nextMondayAfternoon" = "Lundi après-midi";

/* loco:67238d29fe561f9d0a0f5732 */
"nextMondayMorning" = "Lundi prochain";
"nextMonday" = "Lundi prochain";

/* loco:62fb875a6743ac5a237b07e3 */
"noBodyTitle" = "Ce message est vide.";
Expand Down
11 changes: 7 additions & 4 deletions MailResources/Localizable/it.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,12 @@
/* loco:6400bafe3dae40636c716ea2 */
"messageShowQuotedText" = "Visualizza la conversazione";

/* loco:6723980d4062e74f78028152 */
"mondayAfternoon" = "Lunedì pomeriggio";

/* loco:673effba4883a6c33a0a7113 */
"mondayMorning" = "Lunedì mattina";

/* loco:66334ad612173107a60187e4 */
"moreInfo" = "Ulteriori informazioni";

Expand Down Expand Up @@ -1042,11 +1048,8 @@
/* loco:6266655afabeeb6bc774c932 */
"newMessagePlaceholderTitle" = "Digitare il messaggio";

/* loco:6723980d4062e74f78028152 */
"nextMondayAfternoon" = "Lunedì pomeriggio";

/* loco:67238d29fe561f9d0a0f5732 */
"nextMondayMorning" = "Lunedì prossimo";
"nextMonday" = "Lunedì prossimo";

/* loco:62fb875a6743ac5a237b07e3 */
"noBodyTitle" = "Questo messaggio è vuoto.";
Expand Down

0 comments on commit 81676ba

Please sign in to comment.