diff --git a/src/Umbraco.Web.UI/umbraco/create/PartialViewMacro.ascx b/src/Umbraco.Web.UI/umbraco/create/PartialViewMacro.ascx
index deaeebe2f9..99932fc2fe 100644
--- a/src/Umbraco.Web.UI/umbraco/create/PartialViewMacro.ascx
+++ b/src/Umbraco.Web.UI/umbraco/create/PartialViewMacro.ascx
@@ -34,5 +34,5 @@
<%=Services.TextService.Localize("cancel")%>
-
+
diff --git a/src/Umbraco.Web.UI/umbraco/create/User.ascx b/src/Umbraco.Web.UI/umbraco/create/User.ascx
index deb139c557..4f776bb02f 100644
--- a/src/Umbraco.Web.UI/umbraco/create/User.ascx
+++ b/src/Umbraco.Web.UI/umbraco/create/User.ascx
@@ -30,6 +30,6 @@
diff --git a/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx b/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx
index 03f909abaa..1526bb9edf 100644
--- a/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx
+++ b/src/Umbraco.Web.UI/umbraco/dialogs/ChangeDocType.aspx
@@ -115,7 +115,7 @@
<%= Services.TextService.Localize("or") %>
- <%=umbraco.ui.Text("general", "cancel", Security.CurrentUser)%>
+ <%=Services.TextService.Localize("general/cancel")%>
diff --git a/src/Umbraco.Web.UI/umbraco/settings/views/EditView.aspx.cs b/src/Umbraco.Web.UI/umbraco/settings/views/EditView.aspx.cs
index bfe7974cd6..58c78827ec 100644
--- a/src/Umbraco.Web.UI/umbraco/settings/views/EditView.aspx.cs
+++ b/src/Umbraco.Web.UI/umbraco/settings/views/EditView.aspx.cs
@@ -89,7 +89,7 @@ namespace Umbraco.Web.UI.Umbraco.Settings.Views
//configure screen for editing a template
if (_template != null)
{
- MasterTemplate.Items.Add(new ListItem(ui.Text("none"), "0"));
+ MasterTemplate.Items.Add(new ListItem(Services.TextService.Localize("none"), "0"));
var selectedTemplate = string.Empty;
foreach (var t in Template.GetAllAsList())
@@ -166,15 +166,15 @@ namespace Umbraco.Web.UI.Umbraco.Settings.Views
}
Panel1.hasMenu = true;
- var editor = Panel1.NewTabPage(ui.Text("template"));
+ var editor = Panel1.NewTabPage(Services.TextService.Localize("template"));
editor.Controls.Add(Pane8);
- var props = Panel1.NewTabPage(ui.Text("properties"));
+ var props = Panel1.NewTabPage(Services.TextService.Localize("properties"));
props.Controls.Add(Pane7);
SaveButton = Panel1.Menu.NewButton();
- SaveButton.Text = ui.Text("save");
+ SaveButton.Text = Services.TextService.Localize("save");
SaveButton.ButtonType = MenuButtonType.Primary;
SaveButton.ID = "save";
SaveButton.CssClass = "client-side";
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMemberGroups.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMemberGroups.cs
index 1710b0ad5e..e851117f0e 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMemberGroups.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMemberGroups.cs
@@ -1,4 +1,5 @@
-using System;
+using Umbraco.Core.Services;
+using System;
using System.Text;
using System.Web;
using umbraco.businesslogic;
@@ -23,7 +24,7 @@ namespace umbraco
// if we're using 3rd party membership providers we should use the Role terminology
if (!Member.IsUsingUmbracoRoles())
{
- rootNode.Text = ui.Text("memberRoles");
+ rootNode.Text = Services.TextService.Localize("memberRoles");
}
rootNode.NodeType = "initmemberGroup";
rootNode.NodeID = "init";
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/actions/delete.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/actions/delete.aspx.cs
index c98178237c..d447107acb 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/actions/delete.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/actions/delete.aspx.cs
@@ -1,15 +1,7 @@
using System;
-using System.Data;
-using System.Configuration;
-using System.Collections;
-using System.Web;
-using System.Web.Security;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-using System.Web.UI.WebControls.WebParts;
-using System.Web.UI.HtmlControls;
using umbraco.cms.businesslogic.web;
using Umbraco.Core;
+using Umbraco.Core.Services;
using Umbraco.Web;
using Umbraco.Web.UI.Pages;
@@ -28,16 +20,16 @@ namespace umbraco.presentation.actions
if (Security.ValidateUserNodeTreePermissions(UmbracoUser, d.Path, "D") == false)
throw new ArgumentException("The current user doesn't have permissions to delete this document. Please contact the system administrator.");
- pane_delete.Text = ui.Text("delete") + " '" + d.Text + "'";
- Panel2.Text = ui.Text("delete");
- warning.Text = ui.Text("confirmdelete") + " '" + d.Text + "'";
- deleteButton.Text = ui.Text("delete");
+ pane_delete.Text = Services.TextService.Localize("delete") + " '" + d.Text + "'";
+ Panel2.Text = Services.TextService.Localize("delete");
+ warning.Text = Services.TextService.Localize("confirmdelete") + " '" + d.Text + "'";
+ deleteButton.Text = Services.TextService.Localize("delete");
}
protected void deleteButton_Click(object sender, EventArgs e)
{
- deleteMessage.Text = ui.Text("deleted");
- deleted.Text = "'" + d.Text + "' " + ui.Text("deleted");
+ deleteMessage.Text = Services.TextService.Localize("deleted");
+ deleted.Text = "'" + d.Text + "' " + Services.TextService.Localize("deleted");
deleteMessage.Visible = true;
confirm.Visible = false;
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/actions/publish.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/actions/publish.aspx.cs
index f5b7386910..08ef45dd73 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/actions/publish.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/actions/publish.aspx.cs
@@ -31,23 +31,23 @@
// if (!base.ValidateUserNodeTreePermissions(d.Path, "U"))
// throw new ArgumentException("The current user doesn't have permissions to publish this document. Please contact the system administrator.");
-// pane_publish.Text = ui.Text("publish") + " '" + d.Text + "'";
-// Panel2.Text = ui.Text("publish");
-// warning.Text = ui.Text("publish") + " '" + d.Text + "'. " + ui.Text("areyousure");
-// deleteButton.Text = ui.Text("publish");
+// pane_publish.Text = Services.TextService.Localize("publish") + " '" + d.Text + "'";
+// Panel2.Text = Services.TextService.Localize("publish");
+// warning.Text = Services.TextService.Localize("publish") + " '" + d.Text + "'. " + Services.TextService.Localize("areyousure");
+// deleteButton.Text = Services.TextService.Localize("publish");
// }
// protected void deleteButton_Click(object sender, EventArgs e)
// {
// deleteMessage.Visible = true;
-// deleteMessage.Text = ui.Text("editContentPublishedHeader");
+// deleteMessage.Text = Services.TextService.Localize("editContentPublishedHeader");
// confirm.Visible = false;
// var result = d.SaveAndPublishWithResult(UmbracoUser);
// if (result.Success)
// {
-// deleted.Text = ui.Text("editContentPublishedHeader") + " ('" + d.Text + "') " + ui.Text("editContentPublishedText") + " " + ui.Text("view") + " " + d.Text + "";
+// deleted.Text = Services.TextService.Localize("editContentPublishedHeader") + " ('" + d.Text + "') " + Services.TextService.Localize("editContentPublishedText") + "
" + Services.TextService.Localize("view") + " " + d.Text + "";
// }
// else
// {
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs
index 1a1a6f40a8..dfadb066a5 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs
@@ -278,7 +278,7 @@
// // Name validation
// NameTxtValidator.ControlToValidate = NameTxt.ID;
// _nameTxtCustomValidator.ControlToValidate = NameTxt.ID;
-// string[] errorVars = { ui.Text("name") };
+// string[] errorVars = { Services.TextService.Localize("name") };
// NameTxtValidator.ErrorMessage = " " + ui.Text("errorHandling", "errorMandatoryWithoutTab", errorVars) + "
";
// NameTxtValidator.EnableClientScript = false;
// NameTxtValidator.Display = ValidatorDisplay.Dynamic;
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControl.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControl.cs
index a640548ab4..450b1443c9 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControl.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControl.cs
@@ -430,7 +430,7 @@
// else
// {
-// ctctrl.prnt.ClientTools.ShowSpeechBubble(BasePages.BasePage.speechBubbleIcon.error, ui.Text("error"), Services.TextService.Localize("errors/contentTypeAliasAndNameNotNull"));
+// ctctrl.prnt.ClientTools.ShowSpeechBubble(BasePages.BasePage.speechBubbleIcon.error, Services.TextService.Localize("error"), Services.TextService.Localize("errors/contentTypeAliasAndNameNotNull"));
// }
// }
// }
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/language.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/language.ascx.cs
index c7b8fced80..d9737c3f39 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/language.ascx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/create/language.ascx.cs
@@ -1,4 +1,5 @@
-using System;
+using Umbraco.Core.Services;
+using System;
using System.Collections;
using System.Globalization;
using System.Web;
@@ -17,12 +18,12 @@ namespace umbraco.cms.presentation.create.controls
{
// get all existing languages
- pp1.Text = ui.Text("choose") + " " + ui.Text("language");
- sbmt.Text = ui.Text("create");
+ pp1.Text = Services.TextService.Localize("choose") + " " + Services.TextService.Localize("language");
+ sbmt.Text = Services.TextService.Localize("create");
var sortedCultures = new SortedList();
Cultures.Items.Clear();
- Cultures.Items.Add(new ListItem(ui.Text("choose") + "...", ""));
+ Cultures.Items.Add(new ListItem(Services.TextService.Localize("choose") + "...", ""));
foreach (var cultureInfo in CultureInfo.GetCultures(CultureTypes.AllCultures))
sortedCultures.Add(cultureInfo.DisplayName + "|||" + Guid.NewGuid(), cultureInfo.Name);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/script.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/script.ascx.cs
index c2afa06aef..89bfa8a211 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/script.ascx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/create/script.ascx.cs
@@ -1,4 +1,5 @@
-using System;
+using Umbraco.Core.Services;
+using System;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
@@ -15,7 +16,7 @@ namespace umbraco.presentation.umbraco.create
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
- sbmt.Text = ui.Text("create");
+ sbmt.Text = Services.TextService.Localize("create");
// Enable new item in folders to place items in that folder.
if (Request["nodeType"] == "scriptsFolder")
@@ -57,8 +58,8 @@ namespace umbraco.presentation.umbraco.create
string[] fileTypes = UmbracoConfig.For.UmbracoSettings().Content.ScriptFileTypes.ToArray();
- scriptType.Items.Add(new ListItem(ui.Text("folder"), ""));
- scriptType.Items.FindByText(ui.Text("folder")).Selected = true;
+ scriptType.Items.Add(new ListItem(Services.TextService.Localize("folder"), ""));
+ scriptType.Items.FindByText(Services.TextService.Localize("folder")).Selected = true;
foreach (string str in fileTypes)
{
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/simple.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/simple.ascx.cs
index 45238d9b22..61d752e739 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/simple.ascx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/create/simple.ascx.cs
@@ -1,4 +1,5 @@
-using System.Web;
+using Umbraco.Core.Services;
+using System.Web;
using Umbraco.Core;
using Umbraco.Web.UI;
using Umbraco.Web;
@@ -18,8 +19,8 @@ namespace umbraco.cms.presentation.create.controls
protected void Page_Load(object sender, EventArgs e)
{
- sbmt.Text = ui.Text("create");
- rename.Attributes["placeholder"] = ui.Text("name");
+ sbmt.Text = Services.TextService.Localize("create");
+ rename.Attributes["placeholder"] = Services.TextService.Localize("name");
// Put user code to initialize the page here
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/xslt.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/xslt.ascx.cs
index 8f6aae71c2..71fde33a17 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/xslt.ascx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/create/xslt.ascx.cs
@@ -1,4 +1,5 @@
-using System.Web;
+using Umbraco.Core.Services;
+using System.Web;
using System.Web.UI.WebControls;
using System.IO;
using Umbraco.Core;
@@ -20,7 +21,7 @@ namespace umbraco.presentation.create
protected void Page_Load(object sender, System.EventArgs e)
{
- sbmt.Text = ui.Text("create");
+ sbmt.Text = Services.TextService.Localize("create");
foreach (string fileName in Directory.GetFiles(IOHelper.MapPath(SystemDirectories.Umbraco + GetXsltTemplatePath()), "*.xslt"))
{
FileInfo fi = new FileInfo(fileName);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/editMacro.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/editMacro.aspx.cs
index 7be80014f7..1a9c245794 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/editMacro.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/editMacro.aspx.cs
@@ -281,7 +281,7 @@ namespace umbraco.cms.presentation.developer
var save = TabView1.Menu.NewButton();
save.ButtonType = MenuButtonType.Primary;
- save.Text = ui.Text("save");
+ save.Text = Services.TextService.Localize("save");
save.ID = "save";
save.Click += Save_Click;
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx.cs
index b0cc221a8d..8e69677e5b 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/editPackage.aspx.cs
@@ -1,3 +1,4 @@
+using Umbraco.Core.Services;
using System;
using System.Collections.Generic;
using System.Web.UI;
@@ -401,13 +402,13 @@ namespace umbraco.presentation.developer.packages
packageActions.Controls.Add(Pane4);
var pubs = TabView1.Menu.NewButton();
- pubs.Text = ui.Text("publish");
+ pubs.Text = Services.TextService.Localize("publish");
pubs.CommandName = "publish";
pubs.Command += new CommandEventHandler(saveOrPublish);
pubs.ID = "saveAndPublish";
var saves = TabView1.Menu.NewButton();
- saves.Text = ui.Text("save");
+ saves.Text = Services.TextService.Localize("save");
saves.CommandName = "save";
saves.Command += new CommandEventHandler(saveOrPublish);
saves.ButtonType = uicontrols.MenuButtonType.Primary;
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installer.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installer.aspx.cs
index 4009ad8ec0..b92cffe455 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installer.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Packages/installer.aspx.cs
@@ -284,7 +284,7 @@ namespace umbraco.presentation.developer.packages
bt_viewInstalledPackage.OnClientClick = "document.location = '" + packageViewUrl + "'; return false;";
if (!string.IsNullOrEmpty(url))
- lit_authorUrl.Text = " " + ui.Text("or") + " " + ui.Text("viewPackageWebsite") + "";
+ lit_authorUrl.Text = " " + Services.TextService.Localize("or") + " " + Services.TextService.Localize("viewPackageWebsite") + "";
pane_success.Visible = true;
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/EditRelationType.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/EditRelationType.aspx.cs
index 1cb2de4986..ebb4d6f2be 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/EditRelationType.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/EditRelationType.aspx.cs
@@ -196,7 +196,7 @@
// saveMenuImageButton.ToolTip = "save relation type";
// saveMenuImageButton.Click +=saveMenuImageButton_Click;
// saveMenuImageButton.CausesValidation = true;
-// saveMenuImageButton.Text = ui.Text("save");
+// saveMenuImageButton.Text = Services.TextService.Localize("save");
// saveMenuImageButton.ValidationGroup = "RelationType";
// var relationsTabPage = this.tabControl.NewTabPage("Relations");
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Xslt/editXslt.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Xslt/editXslt.aspx.cs
index 71043ac57a..32aee74725 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Xslt/editXslt.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/Xslt/editXslt.aspx.cs
@@ -1,16 +1,12 @@
-using System;
+using Umbraco.Core.Services;
+using System;
using System.Collections.Generic;
using System.IO;
-using System.Text.RegularExpressions;
-using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
-using System.Xml;
-using System.Xml.Xsl;
using Umbraco.Core;
using Umbraco.Core.IO;
using umbraco.uicontrols;
-using System.Net;
using umbraco.cms.presentation.Trees;
using Umbraco.Web.UI.Pages;
@@ -48,7 +44,7 @@ namespace umbraco.cms.presentation.developer
SaveButton = UmbracoPanel1.Menu.NewButton();
SaveButton.ToolTip = "Save Xslt File";
- SaveButton.Text = ui.Text("save");
+ SaveButton.Text = Services.TextService.Localize("save");
SaveButton.ButtonType = MenuButtonType.Primary;
SaveButton.ID = "save";
SaveButton.CssClass = "client-side";
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/AssignDomain.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/AssignDomain.aspx.cs
index 3469e65332..b20e7005c6 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/AssignDomain.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/AssignDomain.aspx.cs
@@ -97,10 +97,10 @@ namespace umbraco.dialogs
{
var name = d.Name.StartsWith("*") ? "*" : d.Name;
allDomains.Text += "
| " + name + " | (" + d.Language.CultureAlias + ") | " + ui.Text("edit") + " | " + Services.TextService.Localize("edit") + " | " + ui.Text("delete") + " |
";
+ "');\" style=\"color: red\">" + Services.TextService.Localize("delete") + "";
}
allDomains.Text += "";
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/cruds.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/cruds.aspx.cs
index c130331345..0b2401c20d 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/cruds.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/cruds.aspx.cs
@@ -1,12 +1,6 @@
-using System;
-using System.Collections;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
+using Umbraco.Core.Services;
+using System;
using System.Linq;
-using System.Web;
-using System.Web.SessionState;
-using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
@@ -34,7 +28,7 @@ namespace umbraco.dialogs
protected void Page_Load(object sender, EventArgs e)
{
- Button1.Text = ui.Text("update");
+ Button1.Text = Services.TextService.Localize("update");
pane_form.Text = "Set permissions for the page " + _node.Text;
}
@@ -161,9 +155,9 @@ namespace umbraco.dialogs
}
// Update feedback message
- //FeedBackMessage.Text = "" + ui.Text("rights") + " " + ui.Text("ok") + "
";
+ //FeedBackMessage.Text = "" + Services.TextService.Localize("rights") + " " + Services.TextService.Localize("ok") + "
";
feedback1.type = uicontrols.Feedback.feedbacktype.success;
- feedback1.Text = ui.Text("rights") + " " + ui.Text("ok");
+ feedback1.Text = Services.TextService.Localize("rights") + " " + Services.TextService.Localize("ok");
PlaceHolder1.Visible = false;
panel_buttons.Visible = false;
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/importDocumenttype.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/importDocumenttype.aspx.cs
index b65f905738..fd5b889678 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/importDocumenttype.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/importDocumenttype.aspx.cs
@@ -1,3 +1,4 @@
+using Umbraco.Core.Services;
using System;
using System.Linq;
using System.Web.UI.WebControls;
@@ -39,8 +40,8 @@ namespace umbraco.presentation.umbraco.dialogs
{
if (!IsPostBack)
{
- submit.Text = ui.Text("import");
- import.Text = ui.Text("import");
+ submit.Text = Services.TextService.Localize("import");
+ import.Text = Services.TextService.Localize("import");
}
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMacro.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMacro.aspx.cs
index 14d141ab82..ee755a62d0 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMacro.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMacro.aspx.cs
@@ -7,6 +7,7 @@ using System.Security;
using Umbraco.Core.IO;
using umbraco.DataLayer;
using Umbraco.Core;
+using Umbraco.Core.Services;
using Umbraco.Web;
namespace umbraco.dialogs
@@ -29,8 +30,8 @@ namespace umbraco.dialogs
protected void Page_Load(object sender, EventArgs e)
{
- pane_edit.Text = ui.Text("general", "edit",Security.CurrentUser) + " " + ui.Text("general", "macro",Security.CurrentUser);
- pane_insert.Text = ui.Text("general", "insert",Security.CurrentUser) + " " + ui.Text("general", "macro",Security.CurrentUser);
+ pane_edit.Text = Services.TextService.Localize("general/edit") + " " + Services.TextService.Localize("general/macro");
+ pane_insert.Text = Services.TextService.Localize("general/insert") + " " + Services.TextService.Localize("general/macro");
if (Request["macroID"] != null || Request["macroAlias"] != null)
{
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMasterpageContent.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMasterpageContent.aspx.cs
index 5c2399b105..5b3cf7b60a 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMasterpageContent.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMasterpageContent.aspx.cs
@@ -1,11 +1,6 @@
-using System;
-using System.Collections.Generic;
-using System.Web;
-using System.Web.UI;
+using Umbraco.Core.Services;
+using System;
using System.Web.UI.WebControls;
-using System.Text.RegularExpressions;
-using umbraco.BusinessLogic;
-using umbraco.cms.businesslogic;
using Umbraco.Core;
namespace umbraco.presentation.umbraco.dialogs
@@ -20,7 +15,7 @@ namespace umbraco.presentation.umbraco.dialogs
protected void Page_Load(object sender, EventArgs e)
{
//labels
- pp_placeholder.Text = ui.Text("placeHolderID");
+ pp_placeholder.Text = Services.TextService.Localize("placeHolderID");
//Add a default Item
var li = new ListItem("Choose ID...");
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMasterpagePlaceholder.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMasterpagePlaceholder.aspx.cs
index 501b755d72..49568f25a1 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMasterpagePlaceholder.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertMasterpagePlaceholder.aspx.cs
@@ -1,8 +1,5 @@
-using System;
-using System.Collections.Generic;
-using System.Web;
-using System.Web.UI;
-using System.Web.UI.WebControls;
+using Umbraco.Core.Services;
+using System;
using Umbraco.Core;
namespace umbraco.presentation.umbraco.dialogs {
@@ -14,7 +11,7 @@ namespace umbraco.presentation.umbraco.dialogs {
}
protected void Page_Load(object sender, EventArgs e) {
//labels
- pp_placeholder.Text = ui.Text("placeHolderID");
+ pp_placeholder.Text = Services.TextService.Localize("placeHolderID");
}
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs
index 6fef2368c4..7e845074df 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs
@@ -55,7 +55,7 @@ namespace umbraco.dialogs
//Load master types...
masterType.Attributes.Add("style", "width: 350px;");
- masterType.Items.Add(new ListItem(ui.Text("none") + "...", "0"));
+ masterType.Items.Add(new ListItem(Services.TextService.Localize("none") + "...", "0"));
foreach (var docT in Services.ContentTypeService.GetAllContentTypes().OrderBy(x => x.Name))
{
@@ -293,7 +293,7 @@ namespace umbraco.dialogs
Services.MediaService.Move(media, copyToId, UmbracoUser.Id);
}
- feedback.Text = ui.Text("moveOrCopy", "moveDone", nodes, UmbracoUser) + "" + ui.Text("closeThisWindow") + "";
+ feedback.Text = ui.Text("moveOrCopy", "moveDone", nodes, UmbracoUser) + "
" + Services.TextService.Localize("closeThisWindow") + "";
feedback.type = uicontrols.Feedback.feedbacktype.success;
// refresh tree
@@ -306,7 +306,7 @@ namespace umbraco.dialogs
var newContent = (IContent)currContent;
Services.ContentService.Copy(newContent, Request.GetItemAs("copyTo"), RelateDocuments.Checked, UmbracoUser.Id);
- feedback.Text = ui.Text("moveOrCopy", "copyDone", nodes, UmbracoUser) + "
" + ui.Text("closeThisWindow") + "";
+ feedback.Text = ui.Text("moveOrCopy", "copyDone", nodes, UmbracoUser) + "
" + Services.TextService.Localize("closeThisWindow") + "";
feedback.type = uicontrols.Feedback.feedbacktype.success;
// refresh tree
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs
index 95d495ae13..83fce8299c 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs
@@ -1,3 +1,4 @@
+using Umbraco.Core.Services;
using System;
using System.Collections;
using System.Web.UI;
@@ -28,7 +29,7 @@ namespace umbraco.dialogs
protected void Page_Load(object sender, EventArgs e)
{
- Button1.Text = ui.Text("update");
+ Button1.Text = Services.TextService.Localize("update");
pane_form.Text = ui.Text("notifications", "editNotifications", node.Text, Security.CurrentUser);
}
@@ -97,7 +98,7 @@ namespace umbraco.dialogs
UmbracoContext.UmbracoUser.initNotifications();
var feedback = new umbraco.uicontrols.Feedback();
- feedback.Text = ui.Text("notifications") + " " + ui.Text("ok") + "
" + ui.Text("closeThisWindow") + "";
+ feedback.Text = Services.TextService.Localize("notifications") + " " + Services.TextService.Localize("ok") + "
" + Services.TextService.Localize("closeThisWindow") + "";
feedback.type = umbraco.uicontrols.Feedback.feedbacktype.success;
pane_form.Controls.Clear();
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx.cs
index 8e59386a4a..6d3887141f 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/protectPage.aspx.cs
@@ -215,10 +215,10 @@ namespace umbraco.presentation.umbraco.dialogs
ph_errorpage.Controls.Add(errorPagePicker);
ph_loginpage.Controls.Add(loginPagePicker);
- pp_login.Text = ui.Text("login");
- pp_pass.Text = ui.Text("password");
- pp_loginPage.Text = ui.Text("paLoginPage");
- pp_errorPage.Text = ui.Text("paErrorPage");
+ pp_login.Text = Services.TextService.Localize("login");
+ pp_pass.Text = Services.TextService.Localize("password");
+ pp_loginPage.Text = Services.TextService.Localize("paLoginPage");
+ pp_errorPage.Text = Services.TextService.Localize("paErrorPage");
pane_chooseMode.Text = Services.TextService.Localize("publicAccess/paHowWould");
pane_pages.Text = Services.TextService.Localize("publicAccess/paSelectPages");
@@ -231,7 +231,7 @@ namespace umbraco.presentation.umbraco.dialogs
&& GetProtectionType(documentId) != ProtectionType.NotProtected)
{
bt_buttonRemoveProtection.Visible = true;
- bt_buttonRemoveProtection.Attributes.Add("onClick", "return confirm('" + ui.Text("areyousure") + "')");
+ bt_buttonRemoveProtection.Attributes.Add("onClick", "return confirm('" + Services.TextService.Localize("areyousure") + "')");
// Get login and error pages
int errorPage = GetErrorPage(documentObject.Path);
@@ -306,8 +306,8 @@ namespace umbraco.presentation.umbraco.dialogs
groupsSelector.Controls.Add(_memberGroups);
- bt_protect.Text = ui.Text("update");
- bt_buttonRemoveProtection.Text = ui.Text("paRemoveProtection");
+ bt_protect.Text = Services.TextService.Localize("update");
+ bt_buttonRemoveProtection.Text = Services.TextService.Localize("paRemoveProtection");
// Put user code to initialize the page here
}
@@ -412,7 +412,7 @@ namespace umbraco.presentation.umbraco.dialogs
}
}
- feedback.Text = ui.Text("publicAccess", "paIsProtected", new cms.businesslogic.CMSNode(pageId).Text) + "
" + ui.Text("closeThisWindow") + "";
+ feedback.Text = ui.Text("publicAccess", "paIsProtected", new cms.businesslogic.CMSNode(pageId).Text) + "
" + Services.TextService.Localize("closeThisWindow") + "";
p_buttons.Visible = false;
pane_advanced.Visible = false;
@@ -435,7 +435,7 @@ namespace umbraco.presentation.umbraco.dialogs
RemoveProtection(pageId);
- feedback.Text = ui.Text("publicAccess", "paIsRemoved", new cms.businesslogic.CMSNode(pageId).Text) + "
" + ui.Text("closeThisWindow") + "";
+ feedback.Text = ui.Text("publicAccess", "paIsRemoved", new cms.businesslogic.CMSNode(pageId).Text) + "
" + Services.TextService.Localize("closeThisWindow") + "";
var content = Services.ContentService.GetById(pageId);
//reloads the current node in the tree
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/republish.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/republish.aspx.cs
index ee4100a346..e79b8354b8 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/republish.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/republish.aspx.cs
@@ -60,7 +60,7 @@
// protected void Page_Load(object sender, System.EventArgs e)
// {
-// bt_go.Text = ui.Text("republish");
+// bt_go.Text = Services.TextService.Localize("republish");
// }
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs
index 0d931c467f..a070e50d4a 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs
@@ -158,7 +158,7 @@
// feedBackMsg.type = global::umbraco.uicontrols.Feedback.feedbacktype.success;
// string[] vars = {rollback.Text, rollback.VersionDate.ToLongDateString()};
-// feedBackMsg.Text = ui.Text("rollback", "documentRolledBack", vars, new global::umbraco.BusinessLogic.User(0)) + "
" + ui.Text("closeThisWindow") + "";
+// feedBackMsg.Text = ui.Text("rollback", "documentRolledBack", vars, new global::umbraco.BusinessLogic.User(0)) + "
" + Services.TextService.Localize("closeThisWindow") + "";
// diffPanel.Visible = false;
// pl_buttons.Visible = false;
// }
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs
index fa20514fc9..390a178801 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sendToTranslation.aspx.cs
@@ -29,10 +29,10 @@ namespace umbraco.presentation.dialogs
{
_currentPage = new CMSNode(Int32.Parse(Request.GetItemAsString("id")));
- pp_translator.Text = ui.Text("translation","translator", Security.CurrentUser);
- pp_language.Text = ui.Text("translation", "translateTo", Security.CurrentUser);
- pp_includeSubs.Text = ui.Text("translation","includeSubpages", Security.CurrentUser);
- pp_comment.Text = ui.Text("comment", Security.CurrentUser);
+ pp_translator.Text = Services.TextService.Localize("translation/translator");
+ pp_language.Text = Services.TextService.Localize("translation/translateTo");
+ pp_includeSubs.Text = Services.TextService.Localize("translation/includeSubpages");
+ pp_comment.Text = Services.TextService.Localize("comment");
pane_form.Text = ui.Text("translation", "sendToTranslate", _currentPage.Text, Security.CurrentUser);
@@ -45,15 +45,15 @@ namespace umbraco.presentation.dialogs
if (domains != null)
{
selectedLanguage = domains[0].Language.id;
- defaultLanguage.Text = ui.Text("defaultLanguageIs", Security.CurrentUser) + " " + domains[0].Language.FriendlyName;
+ defaultLanguage.Text = Services.TextService.Localize("defaultLanguageIs") + " " + domains[0].Language.FriendlyName;
}
else
{
- defaultLanguage.Text = ui.Text("defaultLanguageIsNotAssigned", Security.CurrentUser);
+ defaultLanguage.Text = Services.TextService.Localize("defaultLanguageIsNotAssigned");
}
// languages
- language.Items.Add(new ListItem(ui.Text("general", "choose", Security.CurrentUser), ""));
+ language.Items.Add(new ListItem(Services.TextService.Localize("general/choose"), ""));
foreach (var l in Language.getAll)
{
var li = new ListItem();
@@ -80,7 +80,7 @@ namespace umbraco.presentation.dialogs
}
// send button
- doTranslation.Text = ui.Text("general", "ok", Security.CurrentUser);
+ doTranslation.Text = Services.TextService.Localize("general/ok");
}
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/members/EditMemberGroup.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/members/EditMemberGroup.aspx.cs
index ae547b5a93..2e1eb58dae 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/members/EditMemberGroup.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/members/EditMemberGroup.aspx.cs
@@ -1,15 +1,5 @@
+using Umbraco.Core.Services;
using System;
-using System.Collections;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Web;
-using System.Web.SessionState;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-using System.Web.UI.HtmlControls;
-
-using System.Web.Security;
using umbraco.cms.businesslogic.member;
using umbraco.cms.presentation.Trees;
using umbraco.uicontrols;
@@ -69,7 +59,7 @@ namespace umbraco.presentation.members
_memberGroup.Text = NameTxt.Text;
memberGroupName.Value = NameTxt.Text;
_memberGroup.Save();
- this.ClientTools.ShowSpeechBubble(SpeechBubbleIcon.Save, ui.Text("speechBubbles", "editMemberGroupSaved", Security.CurrentUser),"");
+ this.ClientTools.ShowSpeechBubble(SpeechBubbleIcon.Save, Services.TextService.Localize("speechBubbles/editMemberGroupSaved"),"");
ClientTools
.RefreshTree(TreeDefinitionCollection.Instance.FindTree().Tree.Alias);
@@ -86,11 +76,11 @@ namespace umbraco.presentation.members
base.OnInit(e);
Panel1.hasMenu = true;
save = Panel1.Menu.NewButton();
- save.Text = ui.Text("save");
+ save.Text = Services.TextService.Localize("save");
save.Click += new EventHandler(save_click);
save.ButtonType = MenuButtonType.Primary;
- Panel1.Text = ui.Text("membergroup");
+ Panel1.Text = Services.TextService.Localize("membergroup");
}
///
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/members/MemberSearch.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/members/MemberSearch.ascx.cs
index d0ddd50772..167311b944 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/members/MemberSearch.ascx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/members/MemberSearch.ascx.cs
@@ -8,10 +8,12 @@ using Examine.SearchCriteria;
using umbraco.cms.businesslogic.member;
using System.Web.Security;
using Umbraco.Core.Security;
+using Umbraco.Core.Services;
+using Umbraco.Web.UI.Controls;
namespace umbraco.presentation.umbraco.members
{
- public partial class MemberSearch : UserControl
+ public partial class MemberSearch : UmbracoUserControl
{
protected void Page_Load(object sender, EventArgs e)
{
@@ -19,7 +21,7 @@ namespace umbraco.presentation.umbraco.members
if (provider.IsUmbracoMembershipProvider())
- ButtonSearch.Text = ui.Text("search");
+ ButtonSearch.Text = Services.TextService.Localize("search");
}
protected void ButtonSearch_Click(object sender, EventArgs e)
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/members/ViewMembers.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/members/ViewMembers.aspx.cs
index dfb993d724..a147c12295 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/members/ViewMembers.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/members/ViewMembers.aspx.cs
@@ -1,8 +1,6 @@
-using System;
-using System.Collections.Generic;
-using System.Web;
+using Umbraco.Core.Services;
+using System;
using System.Web.Security;
-using System.Web.UI;
using System.Web.UI.WebControls;
using Umbraco.Core;
using Umbraco.Core.Security;
@@ -19,7 +17,7 @@ namespace umbraco.presentation.members
protected void Page_Load(object sender, EventArgs e)
{
- panel1.Text = ui.Text("member");
+ panel1.Text = Services.TextService.Localize("member");
BindRp();
}
@@ -66,8 +64,8 @@ namespace umbraco.presentation.members
_email.Text = mem.Email;
_button.CommandArgument = mem.Id.ToString();
- _button.OnClientClick = "return confirm(\"" + ui.Text("confirmdelete") + "'" + mem.Text + "' ?\")";
- _button.Text = ui.Text("delete");
+ _button.OnClientClick = "return confirm(\"" + Services.TextService.Localize("confirmdelete") + "'" + mem.Text + "' ?\")";
+ _button.Text = Services.TextService.Localize("delete");
}
else
{
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.cs
index 33992a91e2..ca5363fb0e 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.cs
@@ -26,14 +26,14 @@ namespace umbraco.settings
// Put user code to initialize the page here
Panel1.hasMenu = true;
- Panel1.Text = ui.Text("editdictionary") + ": " + currentItem.key;
+ Panel1.Text = Services.TextService.Localize("editdictionary") + ": " + currentItem.key;
uicontrols.Pane p = new uicontrols.Pane();
var save = Panel1.Menu.NewButton();
- save.Text = ui.Text("save");
+ save.Text = Services.TextService.Localize("save");
save.Click += save_Click;
- save.ToolTip = ui.Text("save");
+ save.ToolTip = Services.TextService.Localize("save");
save.ID = "save";
save.ButtonType = uicontrols.MenuButtonType.Primary;
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.cs
index 63dffef5bc..561165f6a9 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editLanguage.aspx.cs
@@ -30,8 +30,8 @@ namespace umbraco.settings
// Put user code to initialize the page here
- Panel1.Text = ui.Text("editlanguage");
- pp_language.Text = ui.Text("language", "displayName", Security.CurrentUser);
+ Panel1.Text = Services.TextService.Localize("editlanguage");
+ pp_language.Text = Services.TextService.Localize("language/displayName");
if (!IsPostBack)
{
updateCultureList();
@@ -47,7 +47,7 @@ namespace umbraco.settings
{
SortedList sortedCultures = new SortedList();
Cultures.Items.Clear();
- Cultures.Items.Add(new ListItem(ui.Text("choose") + "...", ""));
+ Cultures.Items.Add(new ListItem(Services.TextService.Localize("choose") + "...", ""));
foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.AllCultures))
sortedCultures.Add(ci.DisplayName + "|||" + Guid.NewGuid().ToString(), ci.Name);
@@ -77,8 +77,8 @@ namespace umbraco.settings
Panel1.hasMenu = true;
var save = Panel1.Menu.NewButton();
save.Click += save_click;
- save.ToolTip = ui.Text("save");
- save.Text = ui.Text("save");
+ save.ToolTip = Services.TextService.Localize("save");
+ save.Text = Services.TextService.Localize("save");
save.ID = "save";
save.ButtonType = uicontrols.MenuButtonType.Primary;
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editTemplate.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editTemplate.aspx.cs
index 6045fa2692..2388a46243 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editTemplate.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/editTemplate.aspx.cs
@@ -45,7 +45,7 @@ namespace umbraco.cms.presentation.settings
if (!IsPostBack)
{
- MasterTemplate.Items.Add(new ListItem(ui.Text("none"), "0"));
+ MasterTemplate.Items.Add(new ListItem(Services.TextService.Localize("none"), "0"));
foreach (Template t in Template.GetAllAsList())
{
if (t.Id != _template.Id)
@@ -88,19 +88,19 @@ namespace umbraco.cms.presentation.settings
base.OnInit(e);
Panel1.hasMenu = true;
- var editor = Panel1.NewTabPage(ui.Text("template"));
+ var editor = Panel1.NewTabPage(Services.TextService.Localize("template"));
editor.Controls.Add(Pane8);
- var props = Panel1.NewTabPage(ui.Text("properties"));
+ var props = Panel1.NewTabPage(Services.TextService.Localize("properties"));
props.Controls.Add(Pane7);
SaveButton = Panel1.Menu.NewButton();
- SaveButton.Text = ui.Text("save");
+ SaveButton.Text = Services.TextService.Localize("save");
SaveButton.ButtonType = MenuButtonType.Primary;
SaveButton.ID = "save";
SaveButton.CssClass = "client-side";
- Panel1.Text = ui.Text("edittemplate");
+ Panel1.Text = Services.TextService.Localize("edittemplate");
pp_name.Text = ui.Text("name", UmbracoUser);
pp_alias.Text = ui.Text("alias", UmbracoUser);
pp_masterTemplate.Text = ui.Text("mastertemplate", UmbracoUser);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx.cs
index 6880a8e45d..d63c9b4d9c 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx.cs
@@ -58,9 +58,9 @@ namespace umbraco.cms.presentation.settings.scripts
// name derives from filename, clean for xss
NameTxt.Text = filename.CleanForXss('\\', '/');
- Panel1.Text = ui.Text("editscript", Security.CurrentUser);
- pp_name.Text = ui.Text("name", Security.CurrentUser);
- pp_path.Text = ui.Text("path", Security.CurrentUser);
+ Panel1.Text = Services.TextService.Localize("editscript");
+ pp_name.Text = Services.TextService.Localize("name");
+ pp_path.Text = Services.TextService.Localize("path");
if (IsPostBack == false)
{
@@ -86,12 +86,12 @@ namespace umbraco.cms.presentation.settings.scripts
var editor = Panel1.NewTabPage(Services.TextService.Localize("settings/script"));
editor.Controls.Add(Pane7);
- var props = Panel1.NewTabPage(ui.Text("properties"));
+ var props = Panel1.NewTabPage(Services.TextService.Localize("properties"));
props.Controls.Add(Pane8);
SaveButton = Panel1.Menu.NewButton();
- SaveButton.Text = ui.Text("save");
+ SaveButton.Text = Services.TextService.Localize("save");
SaveButton.ButtonType = MenuButtonType.Primary;
SaveButton.ID = "save";
SaveButton.CssClass = "client-side";
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/editstylesheet.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/editstylesheet.aspx.cs
index 05f042a989..425a467b22 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/editstylesheet.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/editstylesheet.aspx.cs
@@ -35,14 +35,14 @@ namespace umbraco.cms.presentation.settings.stylesheet
filename = Request.QueryString["id"].Replace('\\', '/').TrimStart('/');
- var editor = Panel1.NewTabPage(ui.Text("stylesheet"));
+ var editor = Panel1.NewTabPage(Services.TextService.Localize("stylesheet"));
editor.Controls.Add(Pane7);
- var props = Panel1.NewTabPage(ui.Text("properties"));
+ var props = Panel1.NewTabPage(Services.TextService.Localize("properties"));
props.Controls.Add(Pane8);
SaveButton = Panel1.Menu.NewButton();
- SaveButton.Text = ui.Text("save");
+ SaveButton.Text = Services.TextService.Localize("save");
SaveButton.ButtonType = MenuButtonType.Primary;
SaveButton.ID = "save";
SaveButton.CssClass = "client-side";
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.cs
index d60d6e3abf..eb284c5ea5 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/stylesheet/property/EditStyleSheetProperty.aspx.cs
@@ -54,8 +54,8 @@ namespace umbraco.cms.presentation.settings.stylesheet
var bt = Panel1.Menu.NewButton();
bt.Click += SaveClick;
- bt.Text = ui.Text("save");
- bt.ToolTip = ui.Text("save");
+ bt.Text = Services.TextService.Localize("save");
+ bt.ToolTip = Services.TextService.Localize("save");
bt.ButtonType = uicontrols.MenuButtonType.Primary;
bt.ID = "save";
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/translation/default.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/translation/default.aspx.cs
index 519cfc7325..7f62502d3c 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/translation/default.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/translation/default.aspx.cs
@@ -30,9 +30,9 @@ namespace umbraco.presentation.translation
tasks.Columns.Add("ReferingUser");
tasks.Columns.Add("Language");
- taskList.Columns[0].HeaderText = ui.Text("nodeName");
+ taskList.Columns[0].HeaderText = Services.TextService.Localize("nodeName");
taskList.Columns[1].HeaderText = Services.TextService.Localize("translation/taskAssignedBy");
- taskList.Columns[2].HeaderText = ui.Text("date");
+ taskList.Columns[2].HeaderText = Services.TextService.Localize("date");
((System.Web.UI.WebControls.HyperLinkField)taskList.Columns[3]).Text = Services.TextService.Localize("translation/details");
((System.Web.UI.WebControls.HyperLinkField)taskList.Columns[4]).Text = Services.TextService.Localize("translation/downloadTaskAsXml");
@@ -51,7 +51,7 @@ namespace umbraco.presentation.translation
Panel2.Text = Services.TextService.Localize("translation/assignedTasks");
}
- uploadFile.Text = ui.Text("upload");
+ uploadFile.Text = Services.TextService.Localize("upload");
pane_uploadFile.Text = Services.TextService.Localize("translation/uploadTranslationXml");
foreach (Task t in ts)
@@ -111,7 +111,7 @@ namespace umbraco.presentation.translation
foreach (Task translation in ImportTranslatationFile(translationFileXml.FullName))
{
- sb.Append("" + translation.Node.Text + " " + ui.Text("preview") + "");
+ sb.Append("" + translation.Node.Text + " " + Services.TextService.Localize("preview") + "");
}
}
catch (Exception ee)
@@ -137,14 +137,14 @@ namespace umbraco.presentation.translation
if (l.Count == 1)
{
feedback.type = global::umbraco.uicontrols.Feedback.feedbacktype.success;
- feedback.Text = "" + Services.TextService.Localize("translation/translationDone") + "
" + Services.TextService.Localize("translation/translationDoneHelp") + "
" + ui.Text("preview") + "
";
+ feedback.Text = "" + Services.TextService.Localize("translation/translationDone") + "
" + Services.TextService.Localize("translation/translationDoneHelp") + "
" + Services.TextService.Localize("preview") + "
";
}
else
{
foreach (Task t in l)
{
- sb.Append("" + t.Node.Text + " " + ui.Text("preview") + "");
+ sb.Append("" + t.Node.Text + " " + Services.TextService.Localize("preview") + "");
}
feedback.type = global::umbraco.uicontrols.Feedback.feedbacktype.success;
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/translation/details.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/translation/details.aspx.cs
index e3cfa6d505..d3a0165056 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/translation/details.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/translation/details.aspx.cs
@@ -51,10 +51,10 @@ namespace umbraco.presentation.umbraco.translation {
lt = new Literal();
lt.Text = library.ReplaceLineBreaks(t.Comment);
pp_comment.Controls.Add(lt);
- pp_comment.Text = ui.Text("comment");
+ pp_comment.Text = Services.TextService.Localize("comment");
lt = new Literal();
- lt.Text = "" + ui.Text("download") + "";
+ lt.Text = "" + Services.TextService.Localize("download") + "";
pp_xml.Controls.Add(lt);
pp_xml.Text = Services.TextService.Localize("translation/downloadTaskAsXml");
@@ -64,7 +64,7 @@ namespace umbraco.presentation.umbraco.translation {
pane_fields.Text = Services.TextService.Localize("translation/fields");
pane_tasks.Text = Services.TextService.Localize("translation/translationOptions");
lt = new Literal();
- lt.Text = "" + ui.Text("upload") + "";
+ lt.Text = "" + Services.TextService.Localize("upload") + "";
pp_upload.Controls.Add(lt);
pp_upload.Text = Services.TextService.Localize("translation/uploadTranslationXml");
@@ -72,25 +72,25 @@ namespace umbraco.presentation.umbraco.translation {
pp_closeTask.Visible = false;
else {
pp_closeTask.Text = Services.TextService.Localize("translation/closeTask");
- bt_close.Text = ui.Text("close");
+ bt_close.Text = Services.TextService.Localize("close");
}
//Bind page fields
DataTable pageTable = new DataTable();
- pageTable.Columns.Add(ui.Text("name"));
- pageTable.Columns.Add(ui.Text("value"));
+ pageTable.Columns.Add(Services.TextService.Localize("name"));
+ pageTable.Columns.Add(Services.TextService.Localize("value"));
DataRow pageRow = pageTable.NewRow();
- pageRow[ui.Text("name")] = ui.Text("nodeName");
- pageRow[ui.Text("value")] = page.Text;
+ pageRow[Services.TextService.Localize("name")] = Services.TextService.Localize("nodeName");
+ pageRow[Services.TextService.Localize("value")] = page.Text;
pageTable.Rows.Add(pageRow);
//TODO: Make this work again with correct APIs and angularized - so none of this code will exist anymore
//foreach (PropertyType pt in page.ContentType.PropertyTypes) {
// pageRow = pageTable.NewRow();
- // pageRow[ui.Text("name")] = pt.Name;
- // pageRow[ui.Text("value")] = page.getProperty(pt.Alias).Value;
+ // pageRow[Services.TextService.Localize("name")] = pt.Name;
+ // pageRow[Services.TextService.Localize("value")] = page.getProperty(pt.Alias).Value;
// pageTable.Rows.Add(pageRow);
//}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs
index ac5da7f655..b3826644d4 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs
@@ -199,8 +199,8 @@ namespace umbraco.cms.presentation.user
var save = userInfo.Menu.NewButton();
save.Click += SaveUser_Click;
save.ID = "save";
- save.ToolTip = ui.Text("save");
- save.Text = ui.Text("save");
+ save.ToolTip = Services.TextService.Localize("save");
+ save.Text = Services.TextService.Localize("save");
save.ButtonType = MenuButtonType.Primary;
sectionValidator.ServerValidate += new ServerValidateEventHandler(sectionValidator_ServerValidate);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUserType.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUserType.aspx.cs
index 3bb71b88cb..08872c2b36 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUserType.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUserType.aspx.cs
@@ -1,3 +1,4 @@
+using Umbraco.Core.Services;
using System;
using System.Web.UI.WebControls;
using System.Collections.Generic;
@@ -19,18 +20,18 @@ namespace umbraco.cms.presentation.user
}
protected void Page_Load(object sender, EventArgs e)
{
- pnlUmbraco.Text = umbraco.ui.Text("usertype", Security.CurrentUser);
+ pnlUmbraco.Text = Services.TextService.Localize("usertype");
var save = pnlUmbraco.Menu.NewButton();
save.Click += save_Click;
save.ID = "save";
- save.ToolTip = ui.Text("save");
- save.Text = ui.Text("save");
+ save.ToolTip = Services.TextService.Localize("save");
+ save.Text = Services.TextService.Localize("save");
- pp_alias.Text = umbraco.ui.Text("usertype", Security.CurrentUser) + " " + umbraco.ui.Text("alias", Security.CurrentUser);
- pp_name.Text = umbraco.ui.Text("usertype", Security.CurrentUser) + " " + umbraco.ui.Text("name", Security.CurrentUser);
+ pp_alias.Text = Services.TextService.Localize("usertype") + " " + Services.TextService.Localize("alias");
+ pp_name.Text = Services.TextService.Localize("usertype") + " " + Services.TextService.Localize("name");
- pp_rights.Text = umbraco.ui.Text("default", Security.CurrentUser) + " " + umbraco.ui.Text("rights", Security.CurrentUser);
+ pp_rights.Text = Services.TextService.Localize("default") + " " + Services.TextService.Localize("rights");
//ensure we have a query string
if (string.IsNullOrEmpty(Request.QueryString["id"]))
@@ -64,7 +65,7 @@ namespace umbraco.cms.presentation.user
userType.DefaultPermissions = actions;
userType.Save();
- ClientTools.ShowSpeechBubble(SpeechBubbleIcon.Save, ui.Text("speechBubbles", "editUserTypeSaved", Security.CurrentUser), "");
+ ClientTools.ShowSpeechBubble(SpeechBubbleIcon.Save, Services.TextService.Localize("speechBubbles/editUserTypeSaved"), "");
}
protected List CurrentUserTypeActions
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.cs
index b0e82d1b80..c53f1beffe 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/users/PermissionEditor.aspx.cs
@@ -41,8 +41,8 @@ namespace umbraco.cms.presentation.user
save.ID = "btnSave";
save.ButtonType = uicontrols.MenuButtonType.Primary;
save.OnClientClick = "SavePermissions(); return false;";
- save.Text = ui.Text("save");
- save.ToolTip = ui.Text("save");
+ save.Text = Services.TextService.Localize("save");
+ save.ToolTip = Services.TextService.Localize("save");
nodePermissions.UserID = Convert.ToInt32(Request.QueryString["id"]);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/codeEditorSave.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/codeEditorSave.asmx.cs
index c0478bc055..082b98a6b9 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/codeEditorSave.asmx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/codeEditorSave.asmx.cs
@@ -126,7 +126,7 @@ namespace umbraco.presentation.webservices
{
//errorMessage = Services.TextService.Localize("developer/xsltErrorNoNodesPublished");
File.Delete(tempFileName);
- //base.speechBubble(speechBubbleIcon.info, ui.Text("errors", "xsltErrorHeader", Security.CurrentUser), "Unable to validate xslt as no published content nodes exist.");
+ //base.speechBubble(speechBubbleIcon.info, Services.TextService.Localize("errors/xsltErrorHeader"), "Unable to validate xslt as no published content nodes exist.");
}
}
catch (Exception errorXslt)