From 4e04cfe5e65e3e202d08ebcfe8a50df6e65b9cf6 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sat, 1 Oct 2016 18:20:00 +0200 Subject: [PATCH] Localized a string constant --- Site/App_Code/ControlV5Base.cs | 5 +++++ Site/App_GlobalResources/Global.designer.cs | 9 +++++++++ Site/App_GlobalResources/Global.resx | 3 +++ Site/Controls/v5/Base/AjaxTextBox.ascx | 2 +- 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Site/App_Code/ControlV5Base.cs b/Site/App_Code/ControlV5Base.cs index ea51aef2..5e984885 100644 --- a/Site/App_Code/ControlV5Base.cs +++ b/Site/App_Code/ControlV5Base.cs @@ -61,5 +61,10 @@ namespace Swarmops.Frontend { get { return JavascriptEscape (Resources.Global.Error_AjaxCallException); } } + + public string Localized_AjaxGeneralErrorSettingValue + { + get { return JavascriptEscape (Resources.Global.Error_UnspecifiedAjaxSetValue); } + } } } \ No newline at end of file diff --git a/Site/App_GlobalResources/Global.designer.cs b/Site/App_GlobalResources/Global.designer.cs index e0b1cba7..6d27d60b 100644 --- a/Site/App_GlobalResources/Global.designer.cs +++ b/Site/App_GlobalResources/Global.designer.cs @@ -141,6 +141,15 @@ namespace Resources { } } + /// + /// Looks up a localized string similar to There was an unspecified error attempting to set this value.. + /// + internal static string Error_UnspecifiedAjaxSetValue { + get { + return ResourceManager.GetString("Error_UnspecifiedAjaxSetValue", resourceCulture); + } + } + /// /// Looks up a localized string similar to Account. /// diff --git a/Site/App_GlobalResources/Global.resx b/Site/App_GlobalResources/Global.resx index 9ab5efbe..21687998 100644 --- a/Site/App_GlobalResources/Global.resx +++ b/Site/App_GlobalResources/Global.resx @@ -733,4 +733,7 @@ This field cannot be empty. Displayed as error when emptying fields like your name + + There was an unspecified error attempting to set this value. + \ No newline at end of file diff --git a/Site/Controls/v5/Base/AjaxTextBox.ascx b/Site/Controls/v5/Base/AjaxTextBox.ascx index 50dd6cf8..8105dd9c 100644 --- a/Site/Controls/v5/Base/AjaxTextBox.ascx +++ b/Site/Controls/v5/Base/AjaxTextBox.ascx @@ -36,7 +36,7 @@ if (msg.DisplayMessage != null) { alertify.error(msg.DisplayMessage); } else { - alertify.error("There was an error attempting to set this value."); // TODO: Localize + alertify.error(SwarmopsJS.unescape('<%= this.Localized_AjaxGeneralErrorSettingValue %>')); } $(this).css('background-color', '#FFA0A0'); } else {