start replacing ui.text calls... now gonna try some regex.

This commit is contained in:
Shannon
2016-03-11 15:14:31 +01:00
parent 6faa886362
commit 55301b9b6b
5 changed files with 19 additions and 37 deletions

View File

@@ -61,7 +61,7 @@
<cc1:ProgressBar ID="progbar" runat="server" Title="Please wait..." />
<br />
<span class="guiDialogTiny" id="statusLabel"><%=umbraco.ui.Text("deleting", UmbracoUser)%></span>
<span class="guiDialogTiny" id="statusLabel"><%=Services.TextService.Localize("deleting")%></span>
</div>
<div id="formDiv">

View File

@@ -1,7 +1,6 @@
<%@ Page Language="c#" MasterPageFile="../../../masterpages/umbracoPage.Master" CodeBehind="EditStyleSheetProperty.aspx.cs"
AutoEventWireup="True" Inherits="Umbraco.Web.UI.Umbraco.Settings.Stylesheet.Property.EditStyleSheetProperty"
ValidateRequest="False" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<asp:Content ContentPlaceHolderID="body" runat="server">
@@ -10,26 +9,26 @@
<table cellspacing="0" cellpadding="4" border="0">
<tr>
<th width="30%">
<%=umbraco.ui.Text("name", UmbracoUser)%>:
<%=Services.TextService.Localize("name")%>
</th>
<td class="propertyContent">
<asp:HiddenField runat="server" ID="OriginalName"/>
<asp:TextBox ID="NameTxt" Width="350px" runat="server" /><br />
<small><%=umbraco.ui.Text("stylesheet", "nameHelp", UmbracoUser)%></small>
<small><%=Services.TextService.Localize("stylesheet/nameHelp")%></small>
</td>
</tr>
<tr>
<th width="30%">
<%=umbraco.ui.Text("alias", UmbracoUser)%>:
<%=Services.TextService.Localize("alias")%>:
</th>
<td class="propertyContent">
<asp:TextBox ID="AliasTxt" Width="350px" runat="server" /><br />
<small><%=umbraco.ui.Text("stylesheet", "aliasHelp", UmbracoUser)%></small>
<small><%=Services.TextService.Localize("stylesheet/aliasHelp")%></small>
</td>
</tr>
<tr>
<th width="30%">
<%=umbraco.ui.Text("styles", UmbracoUser)%>:
<%=Services.TextService.Localize("styles")%>
</th>
<td class="propertyContent">
<asp:TextBox ID="Content" Style="width: 350px" TextMode="MultiLine" runat="server" />
@@ -39,7 +38,7 @@
</tr>
<tr>
<th width="30%">
<%=umbraco.ui.Text("preview", UmbracoUser)%>:
<%=Services.TextService.Localize("preview")%>
</th>
<td class="propertyContent">
<div id="preview" style="padding: 10px; border: 1px solid #ccc; width: 330px;">

View File

@@ -17,6 +17,7 @@ using Umbraco.Core;
using umbraco.uicontrols;
using Umbraco.Core.Configuration;
using Umbraco.Web.UI.Pages;
using Umbraco.Core.Services;
namespace Umbraco.Web.UI.Umbraco.Settings.Views
{
@@ -178,10 +179,10 @@ namespace Umbraco.Web.UI.Umbraco.Settings.Views
SaveButton.ID = "save";
SaveButton.CssClass = "client-side";
Panel1.Text = ui.Text("edittemplate");
pp_name.Text = ui.Text("name", UmbracoContext.UmbracoUser);
pp_alias.Text = ui.Text("alias", UmbracoContext.UmbracoUser);
pp_masterTemplate.Text = ui.Text("mastertemplate", UmbracoContext.UmbracoUser);
Panel1.Text = Services.TextService.Localize("edittemplate");
pp_name.Text = Services.TextService.Localize("name");
pp_alias.Text = Services.TextService.Localize("alias");
pp_masterTemplate.Text = Services.TextService.Localize("mastertemplate");
// Editing buttons
MenuIconI umbField = editorSource.Menu.NewIcon();
@@ -189,7 +190,7 @@ namespace Umbraco.Web.UI.Umbraco.Settings.Views
umbField.OnClickCommand =
ClientTools.Scripts.OpenModalWindow(
IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/dialogs/umbracoField.aspx?objectId=" +
editorSource.ClientID + "&tagName=UMBRACOGETDATA&mvcView=true", ui.Text("template", "insertPageField"), 640, 550);
editorSource.ClientID + "&tagName=UMBRACOGETDATA&mvcView=true", Services.TextService.Localize("template/insertPageField"), 640, 550);
umbField.AltText = ui.Text("template", "insertPageField");
@@ -199,7 +200,7 @@ namespace Umbraco.Web.UI.Umbraco.Settings.Views
umbDictionary.OnClickCommand =
ClientTools.Scripts.OpenModalWindow(
IOHelper.ResolveUrl(SystemDirectories.Umbraco) + "/dialogs/umbracoField.aspx?objectId=" +
editorSource.ClientID + "&tagName=UMBRACOGETDICTIONARY&mvcView=true", ui.Text("template", "insertDictionaryItem"),
editorSource.ClientID + "&tagName=UMBRACOGETDICTIONARY&mvcView=true", Services.TextService.Localize("template/insertDictionaryItem"),
640, 550);
umbDictionary.AltText = "Insert umbraco dictionary item";

View File

@@ -27,29 +27,8 @@ namespace umbraco
public class ui
{
private static readonly string UmbracoDefaultUiLanguage = Umbraco.Core.Configuration.GlobalSettings.DefaultUILanguage;
private static readonly string UmbracoPath = SystemDirectories.Umbraco;
private static readonly string UmbracoPath = SystemDirectories.Umbraco;
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Get the current culture/language from the currently logged in IUser, the IUser object is available on most Umbraco base classes and on the UmbracoContext")]
public static string Culture(User u)
{
if (ApplicationContext.Current == null) return string.Empty;
var found = UserExtensions.GetUserCulture(u.Language, ApplicationContext.Current.Services.TextService);
return found == null ? string.Empty : found.Name;
}
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Get the current culture/language from the currently logged in IUser, the IUser object is available on most Umbraco base classes and on the UmbracoContext")]
internal static string Culture(IUser u)
{
if (ApplicationContext.Current == null) return string.Empty;
var found = u.GetUserCulture(ApplicationContext.Current.Services.TextService);
return found == null ? string.Empty : found.Name;
}
private static string GetLanguage()
{
return "en-US";

View File

@@ -11,6 +11,7 @@ using umbraco.cms.businesslogic.web;
using Umbraco.Core.Models.Rdbms;
using umbraco.DataLayer;
using umbraco.interfaces;
using Umbraco.Core.Models;
namespace umbraco.cms.businesslogic.workflow
{
@@ -59,7 +60,9 @@ namespace umbraco.cms.businesslogic.workflow
{
if (u.Disabled == false && u.GetNotifications(node.Path).IndexOf(action.Letter.ToString(CultureInfo.InvariantCulture), StringComparison.Ordinal) > -1)
{
LogHelper.Debug<Notification>(string.Format("Notification about {0} sent to {1} ({2})", ui.Text(action.Alias, u), u.Name, u.Email));
LogHelper.Debug<Notification>(string.Format("Notification about {0} sent to {1} ({2})",
ApplicationContext.Current.Services.TextService.Localize("actions/" + action.Alias, u.UserEntity.GetUserCulture(ApplicationContext.Current.Services.TextService)),
u.Name, u.Email));
SendNotification(user, u, (Document)node, action);
}
}