From 307750d6f60a43d0fb90d9515aa179cd2a854bf2 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Wed, 4 Jan 2017 12:34:39 +0100 Subject: [PATCH] Added some loc --- Backend/CommsTransmitter.cs | 3 ++- ...ransmission.NotificationPayload.Designer.cs | 2 +- ...tions.Transmission.NotificationPayload.resx | 2 +- .../Pages.Comms.designer.cs | 18 ++++++++++++++++++ Site/App_GlobalResources/Pages.Comms.resx | 6 ++++++ Site/Pages/v5/Comms/SendMassMessage.aspx | 4 ++-- Site/Pages/v5/Comms/SendMassMessage.aspx.cs | 11 +++++++++++ 7 files changed, 41 insertions(+), 5 deletions(-) diff --git a/Backend/CommsTransmitter.cs b/Backend/CommsTransmitter.cs index 4a93235f..6b71fc6c 100644 --- a/Backend/CommsTransmitter.cs +++ b/Backend/CommsTransmitter.cs @@ -88,7 +88,8 @@ namespace Swarmops.Backend BotLog.Write(2, "CommsTx", "--closing"); OutboundComm reloadedComm = OutboundComm.FromIdentity(comm.Identity); - // object doesn't update as we get results + // active object doesn't update as we get results, so need to load + // from database to get final counts of successes and fails if (comm.RecipientCount > 1 && comm.SenderPersonId != 0) { diff --git a/Logic/Resources/Logic.Communications.Transmission.NotificationPayload.Designer.cs b/Logic/Resources/Logic.Communications.Transmission.NotificationPayload.Designer.cs index 1ec94b2c..c6f7da16 100644 --- a/Logic/Resources/Logic.Communications.Transmission.NotificationPayload.Designer.cs +++ b/Logic/Resources/Logic.Communications.Transmission.NotificationPayload.Designer.cs @@ -572,7 +572,7 @@ namespace Swarmops.Logic.Resources { } /// - /// Looks up a localized string similar to Your message to [GeographyName] has been sent to all scheduled recipients. Of the [RecipientCount] planned recipients, [RecipientsSuccess] succeeded from Swarmops' horizon. (These can fail later for a number of reasons, from broken computers to hospitalized recipients.) + /// Looks up a localized string similar to Your message to [GeographyName] has been sent to all scheduled recipients. Out of the [RecipientCount] planned recipients, [RecipientsSuccess] succeeded as far as we can tell -- remember that mail can be undelivered or unread later for a number of reasons. /// ///Time spent resolving: [ResolvingTime]. ///Time spent transmitting: [TransmissionTime]. diff --git a/Logic/Resources/Logic.Communications.Transmission.NotificationPayload.resx b/Logic/Resources/Logic.Communications.Transmission.NotificationPayload.resx index 0ddc2208..1d899baf 100644 --- a/Logic/Resources/Logic.Communications.Transmission.NotificationPayload.resx +++ b/Logic/Resources/Logic.Communications.Transmission.NotificationPayload.resx @@ -326,7 +326,7 @@ This mail was sent to [Addressee] from [OrganizationName]. If you do not desire [[OrganizationName]] Comm recipients determined for [GeographyName]: [RecipientCount] - Your message to [GeographyName] has been sent to all scheduled recipients. Of the [RecipientCount] planned recipients, [RecipientsSuccess] succeeded from Swarmops' horizon. (These can fail later for a number of reasons, from broken computers to hospitalized recipients.) + Your message to [GeographyName] has been sent to all scheduled recipients. Out of the [RecipientCount] planned recipients, [RecipientsSuccess] succeeded as far as we can tell -- remember that mail can be undelivered or unread later for a number of reasons. Time spent resolving: [ResolvingTime]. Time spent transmitting: [TransmissionTime]. diff --git a/Site/App_GlobalResources/Pages.Comms.designer.cs b/Site/App_GlobalResources/Pages.Comms.designer.cs index 1bcac62d..1c381c3c 100644 --- a/Site/App_GlobalResources/Pages.Comms.designer.cs +++ b/Site/App_GlobalResources/Pages.Comms.designer.cs @@ -60,6 +60,24 @@ namespace Resources.Pages { } } + /// + /// Looks up a localized string similar to You should write a message body before sending your message.. + /// + internal static string SendMassMessage_Error_EmptyBody { + get { + return ResourceManager.GetString("SendMassMessage_Error_EmptyBody", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You should write a message subject to go with your message.. + /// + internal static string SendMassMessage_Error_EmptySubject { + get { + return ResourceManager.GetString("SendMassMessage_Error_EmptySubject", resourceCulture); + } + } + /// /// Looks up a localized string similar to Who are located in. /// diff --git a/Site/App_GlobalResources/Pages.Comms.resx b/Site/App_GlobalResources/Pages.Comms.resx index a49843b1..fd2fb2d1 100644 --- a/Site/App_GlobalResources/Pages.Comms.resx +++ b/Site/App_GlobalResources/Pages.Comms.resx @@ -117,6 +117,12 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + You should write a message body before sending your message. + + + You should write a message subject to go with your message. + Who are located in diff --git a/Site/Pages/v5/Comms/SendMassMessage.aspx b/Site/Pages/v5/Comms/SendMassMessage.aspx index a83afabe..c4a6d8c3 100644 --- a/Site/Pages/v5/Comms/SendMassMessage.aspx +++ b/Site/Pages/v5/Comms/SendMassMessage.aspx @@ -44,14 +44,14 @@ if (body.length < 2) // interpreted as empty { - alertify.alert("You should write a message body before sending your message."); // TODO: LOC + alertify.alert(SwarmopsJS.unescape('<%=this.Localized_Error_EmptyBody%>')); return false; } if (subject.length < 2) // interpreted as empty { // TODO: ADD TRANSMISSION MODUS / ONLY TRIGGER ON MODUS WITH SUBJECTS - alertify.alert("You should write a message subject to go with your message."); // TODO: LOC + alertify.alert(SwarmopsJS.unescape('<%=this.Localized_Error_EmptySubject%>')); return false; } diff --git a/Site/Pages/v5/Comms/SendMassMessage.aspx.cs b/Site/Pages/v5/Comms/SendMassMessage.aspx.cs index 53ef7bc8..3b80cebc 100644 --- a/Site/Pages/v5/Comms/SendMassMessage.aspx.cs +++ b/Site/Pages/v5/Comms/SendMassMessage.aspx.cs @@ -156,5 +156,16 @@ namespace Swarmops.Frontend.Pages.Comms { get { return JavascriptEscape (Resources.Pages.Comms.SendMassMessage_TestMessageResult); } } + + public string Localized_Error_EmptyBody + { + get { return JavascriptEscape(Resources.Pages.Comms.SendMassMessage_Error_EmptyBody); } + } + + public string Localized_Error_EmptySubject + { + get { return JavascriptEscape(Resources.Pages.Comms.SendMassMessage_Error_EmptySubject); } + } + } } \ No newline at end of file