diff --git a/Site/App_Code/PageV5Base.cs b/Site/App_Code/PageV5Base.cs index 0c5bfa38..701f495c 100644 --- a/Site/App_Code/PageV5Base.cs +++ b/Site/App_Code/PageV5Base.cs @@ -173,6 +173,21 @@ namespace Swarmops.Frontend { return CommonV5.JavascriptEscape (input); } + + + // Common localizations + + // ReSharper disable InconsistentNaming + public string Localized_SwitchLabelOn_Upper + { + get { return JavascriptEscape(Resources.Global.Global_On.ToUpperInvariant()); } + } + + public string Localized_SwitchLabelOff_Upper + { + get { return JavascriptEscape(Resources.Global.Global_Off.ToUpperInvariant()); } + } + } diff --git a/Site/Pages/v5/Admin/OrgSettings.aspx b/Site/Pages/v5/Admin/OrgSettings.aspx index 131d222a..f70f1f18 100644 --- a/Site/Pages/v5/Admin/OrgSettings.aspx +++ b/Site/Pages/v5/Admin/OrgSettings.aspx @@ -1,5 +1,5 @@ -<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.v5.Admin.OrgSettings" Codebehind="OrgSettings.aspx.cs" %> -<%@ Import Namespace="Resources" %> +<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.Admin.OrgSettings" Codebehind="OrgSettings.aspx.cs" %> +<%@ Import Namespace="Swarmops.Frontend" %> <%@ Register tagPrefix="Swarmops5" tagName="FileUpload" src="~/Controls/v5/Base/FileUpload.ascx" %> <%@ Register tagPrefix="Swarmops5" tagName="DropDown" src="~/Controls/v5/Base/DropDown.ascx" %> <%@ Register tagPrefix="Swarmops5" tagName="AjaxTextBox" src="~/Controls/v5/Base/AjaxTextBox.ascx" %> @@ -11,8 +11,8 @@ $('#divTabs').tabs(); $('.EditCheck').switchbutton({ - checkedLabel: '<%= Global.Global_On.ToUpperInvariant() %>', - uncheckedLabel: '<%= Global.Global_Off.ToUpperInvariant() %>', + checkedLabel: SwarmopsJS.unescape('<%= this.Localized_SwitchLabelOn_Upper %>'), + uncheckedLabel: SwarmopsJS.unescape('<%= this.Localized_SwitchLabelOff_Upper %>'), }).change(function() { if (suppressSwitchResponse) { diff --git a/Site/Pages/v5/Admin/OrgSettings.aspx.cs b/Site/Pages/v5/Admin/OrgSettings.aspx.cs index bd50d943..137e33b1 100644 --- a/Site/Pages/v5/Admin/OrgSettings.aspx.cs +++ b/Site/Pages/v5/Admin/OrgSettings.aspx.cs @@ -12,7 +12,7 @@ using Swarmops.Logic.Structure; using Swarmops.Logic.Support; using Swarmops.Logic.Swarm; -namespace Swarmops.Frontend.Pages.v5.Admin +namespace Swarmops.Frontend.Pages.Admin { public partial class OrgSettings : PageV5Base { diff --git a/Site/Pages/v5/Admin/OrgSettings.aspx.designer.cs b/Site/Pages/v5/Admin/OrgSettings.aspx.designer.cs index 8c3963a5..731e2f74 100644 --- a/Site/Pages/v5/Admin/OrgSettings.aspx.designer.cs +++ b/Site/Pages/v5/Admin/OrgSettings.aspx.designer.cs @@ -7,7 +7,7 @@ // //------------------------------------------------------------------------------ -namespace Swarmops.Frontend.Pages.v5.Admin { +namespace Swarmops.Frontend.Pages.Admin { public partial class OrgSettings { diff --git a/Site/Pages/v5/Admin/SystemSettings.aspx b/Site/Pages/v5/Admin/SystemSettings.aspx index 1c2ac6ff..64d4d9f6 100644 --- a/Site/Pages/v5/Admin/SystemSettings.aspx +++ b/Site/Pages/v5/Admin/SystemSettings.aspx @@ -1,5 +1,4 @@ -<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.v5.Admin.SystemSettingsPage" Codebehind="SystemSettings.aspx.cs" %> -<%@ Import Namespace="Resources" %> +<%@ Page Title="" Language="C#" MasterPageFile="~/Master-v5.master" AutoEventWireup="true" Inherits="Swarmops.Frontend.Pages.Admin.SystemSettingsPage" Codebehind="SystemSettings.aspx.cs" %> <%@ Register tagPrefix="Swarmops5" tagName="AjaxTextBox" src="~/Controls/v5/Base/AjaxTextBox.ascx" %> <%@ Register tagPrefix="Swarmops5" tagName="TreePositions" src="~/Controls/v5/Swarm/TreePositions.ascx" %> <%@ Register tagPrefix="Swarmops5" tagName="DropDown" src="~/Controls/v5/Base/DropDown.ascx" %> @@ -13,8 +12,8 @@ setTimeout(function() { $('.EditCheck').switchbutton({ - checkedLabel: '<%= Global.Global_On.ToUpperInvariant() %>', - uncheckedLabel: '<%= Global.Global_Off.ToUpperInvariant() %>', + checkedLabel: SwarmopsJS.unescape('<%= this.Localized_SwitchLabelOn_Upper %>'), + uncheckedLabel: SwarmopsJS.unescape('<%= this.Localized_SwitchLabelOff_Upper %>'), }).change(function() { if (suppressSwitchResponse) { @@ -80,7 +79,7 @@ // Also, nag an admin who tries to create an unsecure website if (newText.length >= 7 && newText.substring(0,7) == 'http://') { - alertify.log("<%=Resources.Pages.Admin.SystemSettings_Warning_Insecure %>"); + alertify.log(SwarmopsJS.unescape('<%= this.Localized_Warning_Insecure %>')); } } diff --git a/Site/Pages/v5/Admin/SystemSettings.aspx.cs b/Site/Pages/v5/Admin/SystemSettings.aspx.cs index 2e27cef5..ce226bfb 100644 --- a/Site/Pages/v5/Admin/SystemSettings.aspx.cs +++ b/Site/Pages/v5/Admin/SystemSettings.aspx.cs @@ -18,7 +18,7 @@ using Swarmops.Logic.Communications; using Swarmops.Logic.Structure; using Swarmops.Logic.Swarm; -namespace Swarmops.Frontend.Pages.v5.Admin +namespace Swarmops.Frontend.Pages.Admin { public partial class SystemSettingsPage : PageV5Base // different classname to not collide with Logic.Structure.SystemSettings { @@ -348,6 +348,13 @@ namespace Swarmops.Frontend.Pages.v5.Admin { public bool RequireSsl; } + + + // ReSharper disable InconsistentNaming + public string Localized_Warning_Insecure + { + get { return JavascriptEscape (Resources.Pages.Admin.SystemSettings_Warning_Insecure); } + } } } \ No newline at end of file diff --git a/Site/Pages/v5/Admin/SystemSettings.aspx.designer.cs b/Site/Pages/v5/Admin/SystemSettings.aspx.designer.cs index 543ed315..294ad546 100644 --- a/Site/Pages/v5/Admin/SystemSettings.aspx.designer.cs +++ b/Site/Pages/v5/Admin/SystemSettings.aspx.designer.cs @@ -7,7 +7,7 @@ // //------------------------------------------------------------------------------ -namespace Swarmops.Frontend.Pages.v5.Admin { +namespace Swarmops.Frontend.Pages.Admin { public partial class SystemSettingsPage {