Localization fixes
This commit is contained in:
Родитель
1ae3cb5ffc
Коммит
0cedc79614
|
@ -0,0 +1,13 @@
|
|||
namespace Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Helpers
|
||||
{
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
public static class HtmlHelperExtensions
|
||||
{
|
||||
public static IHtmlString JavaScriptString(this HtmlHelper htmlHelper, string message)
|
||||
{
|
||||
return htmlHelper.Raw(HttpUtility.JavaScriptStringEncode(message));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
@using GlobalResources
|
||||
@using Newtonsoft.Json;
|
||||
@using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Helpers
|
||||
@model Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Models.ActionPropertiesModel
|
||||
|
||||
@{
|
||||
|
@ -63,16 +64,16 @@
|
|||
"use strict";
|
||||
|
||||
var resources = {
|
||||
retry: '@Strings.Retry',
|
||||
serviceUnavailable: '@Strings.ServiceUnavailable',
|
||||
unableToRetrieveActionFromService: '@Strings.UnableToRetrieveActionFromService',
|
||||
disabled: '@Strings.Disabled',
|
||||
enabled: '@Strings.Enabled',
|
||||
failedToRetrieveActions: '@Strings.FailedToRetrieveActions',
|
||||
noActionSelected: '@Strings.NoActionSelectedLabel',
|
||||
failedToUpdateActionId: '@Strings.FailedToUpdateActionId',
|
||||
retry: '@Html.JavaScriptString(Strings.Retry)',
|
||||
serviceUnavailable: '@Html.JavaScriptString(Strings.ServiceUnavailable)',
|
||||
unableToRetrieveActionFromService: '@Html.JavaScriptString(Strings.UnableToRetrieveActionFromService)',
|
||||
disabled: '@Html.JavaScriptString(Strings.Disabled)',
|
||||
enabled: '@Html.JavaScriptString(Strings.Enabled)',
|
||||
failedToRetrieveActions: '@Html.JavaScriptString(Strings.FailedToRetrieveActions)',
|
||||
noActionSelected: '@Html.JavaScriptString(Strings.NoActionSelectedLabel)',
|
||||
failedToUpdateActionId: '@Html.JavaScriptString(Strings.FailedToUpdateActionId)',
|
||||
readonlyActions: '@Model.HasAssignActionPerm.ToString().ToLower()',
|
||||
actionsList: '@Strings.Actions'
|
||||
actionsList: '@Html.JavaScriptString(Strings.Actions)'
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@using GlobalResources
|
||||
@using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Helpers
|
||||
@model Microsoft.Azure.Devices.Applications.RemoteMonitoring.Common.Models.ApiRegistrationModel
|
||||
|
||||
<div class="advanced_left_column">
|
||||
|
@ -68,7 +69,7 @@
|
|||
function () {
|
||||
'use strict';
|
||||
var config = {
|
||||
subheadContent: '@Strings.ApiRegistrationTitle',
|
||||
subheadContent: '@Html.JavaScriptString(Strings.ApiRegistrationTitle)',
|
||||
goBackUrl: '@Url.Action("SelectAdvancedProcess")'
|
||||
};
|
||||
IoTApp.Advanced.initSubView(config);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@using GlobalResources
|
||||
@using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Helpers
|
||||
<div class="dashboardLeftColumn">
|
||||
@Html.Partial("_IccidAssociation")
|
||||
</div>
|
||||
|
@ -7,7 +8,7 @@
|
|||
function () {
|
||||
'use strict';
|
||||
var config = {
|
||||
subheadContent: '@Html.Raw(Strings.DeviceAssociationTitle)',
|
||||
subheadContent: '@Html.JavaScriptString(Strings.DeviceAssociationTitle)',
|
||||
goBackUrl: '@Url.Action("SelectAdvancedProcess")'
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@using GlobalResources
|
||||
@using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Helpers
|
||||
@if (ViewBag.HasRegistration)
|
||||
{
|
||||
<fieldset class="registration_content">
|
||||
|
@ -23,7 +24,7 @@
|
|||
<script>
|
||||
"use strict";
|
||||
var resources = {
|
||||
simAssociationSucceeded: '@Strings.SimAssociationSucceeded'
|
||||
simAssociationSucceeded: '@Html.JavaScriptString(Strings.SimAssociationSucceeded)'
|
||||
};
|
||||
</script>
|
||||
}
|
||||
|
|
|
@ -13,20 +13,20 @@
|
|||
'use strict';
|
||||
|
||||
var resources = {
|
||||
active: '@Strings.Active',
|
||||
alarm: '@Strings.Alarm',
|
||||
alarmHistory: '@Strings.AlarmHistory',
|
||||
active: '@Html.JavaScriptString(Strings.Active)',
|
||||
alarm: '@Html.JavaScriptString(Strings.Alarm)',
|
||||
alarmHistory: '@Html.JavaScriptString(Strings.AlarmHistory)',
|
||||
allClearStatusIcon: '/Content/img/icon_status_all_clear.svg',
|
||||
cautionStatusIcon: '/Content/img/icon_status_caution.svg',
|
||||
closed: '@Strings.Closed',
|
||||
closed: '@Html.JavaScriptString(Strings.Closed)',
|
||||
criticalStatusIcon: '/Content/img/icon_status_critical.svg',
|
||||
humidity: '@Strings.Humidity',
|
||||
information: '@Strings.Information',
|
||||
telemetryGaugeNumericFormat: '@Strings.TelemetryGaugeNumericFormat',
|
||||
temperature: '@Strings.Temperature',
|
||||
humidity: '@Html.JavaScriptString(Strings.Humidity)',
|
||||
information: '@Html.JavaScriptString(Strings.Information)',
|
||||
telemetryGaugeNumericFormat: '@Html.JavaScriptString(Strings.TelemetryGaugeNumericFormat)',
|
||||
temperature: '@Html.JavaScriptString(Strings.Temperature)',
|
||||
alertHistoryType: '',
|
||||
unableToRetrieveAlertsHistoryFromService: '@Strings.UnableToRetrieveAlertsHistoryFromService',
|
||||
unableToRetrieveDeviceTelemetryFromService: '@Strings.UnableToRetrieveDeviceTelemetryFromService'
|
||||
unableToRetrieveAlertsHistoryFromService: '@Html.JavaScriptString(Strings.UnableToRetrieveAlertsHistoryFromService)',
|
||||
unableToRetrieveDeviceTelemetryFromService: '@Html.JavaScriptString(Strings.UnableToRetrieveDeviceTelemetryFromService)'
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@using GlobalResources
|
||||
@using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Helpers
|
||||
@{
|
||||
ViewBag.Title = "Add a Device";
|
||||
}
|
||||
|
@ -24,8 +25,8 @@
|
|||
"use strict";
|
||||
|
||||
var addDeviceResources = {
|
||||
addDevice: '@Strings.AddDevice',
|
||||
stepOneHeader: '@Strings.StepOneHeader',
|
||||
addDevice: '@Html.JavaScriptString(Strings.AddDevice)',
|
||||
stepOneHeader: '@Html.JavaScriptString(Strings.StepOneHeader)',
|
||||
redirectToIndexUrl: '@Url.Action("Index", "Device")',
|
||||
deviceDetailDeviceId: '@ViewBag.DeviceId'
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@using GlobalResources
|
||||
@using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Helpers
|
||||
@{
|
||||
ViewBag.Title = "Index";
|
||||
}
|
||||
|
@ -155,22 +156,22 @@
|
|||
"use strict";
|
||||
|
||||
var resources = {
|
||||
retry: '@Strings.Retry',
|
||||
serviceUnavailable: '@Strings.ServiceUnavailable',
|
||||
deactivateDevice: '@Strings.DisableDevice',
|
||||
activateDevice: '@Strings.EnableDevice',
|
||||
unableToRetrieveDeviceFromService: '@Strings.UnableToRetrieveDeviceFromService',
|
||||
errorWhileRetrievingKeys: '@Strings.ErrorWhileRetrievingKeys',
|
||||
failedToUpdateDeviceStatus: '@Strings.FailedToUpdateDeviceStatus',
|
||||
disabled: '@Strings.Disabled',
|
||||
pending: '@Strings.Pending',
|
||||
running: '@Strings.Running',
|
||||
failedToRetrieveDevices: '@Strings.FailedToRetrieveDevices',
|
||||
noDeviceSelected: '@Strings.NoDeviceSelectedLabel',
|
||||
deviceList: '@Strings.DeviceList',
|
||||
nextPage: '@Strings.Next',
|
||||
previousPage: '@Strings.Previous',
|
||||
infoFiltered: '@Strings.FilterInfo'
|
||||
retry: '@Html.JavaScriptString(Strings.Retry)',
|
||||
serviceUnavailable: '@Html.JavaScriptString(Strings.ServiceUnavailable)',
|
||||
deactivateDevice: '@Html.JavaScriptString(Strings.DisableDevice)',
|
||||
activateDevice: '@Html.JavaScriptString(Strings.EnableDevice)',
|
||||
unableToRetrieveDeviceFromService: '@Html.JavaScriptString(Strings.UnableToRetrieveDeviceFromService)',
|
||||
errorWhileRetrievingKeys: '@Html.JavaScriptString(Strings.ErrorWhileRetrievingKeys)',
|
||||
failedToUpdateDeviceStatus: '@Html.JavaScriptString(Strings.FailedToUpdateDeviceStatus)',
|
||||
disabled: '@Html.JavaScriptString(Strings.Disabled)',
|
||||
pending: '@Html.JavaScriptString(Strings.Pending)',
|
||||
running: '@Html.JavaScriptString(Strings.Running)',
|
||||
failedToRetrieveDevices: '@Html.JavaScriptString(Strings.FailedToRetrieveDevices)',
|
||||
noDeviceSelected: '@Html.JavaScriptString(Strings.NoDeviceSelectedLabel)',
|
||||
deviceList: '@Html.JavaScriptString(Strings.DeviceList)',
|
||||
nextPage: '@Html.JavaScriptString(Strings.Next)',
|
||||
previousPage: '@Html.JavaScriptString(Strings.Previous)',
|
||||
infoFiltered: '@Html.JavaScriptString(Strings.FilterInfo)'
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@using GlobalResources
|
||||
@using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Helpers
|
||||
@model Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Models.RegisteredDeviceModel
|
||||
|
||||
@{
|
||||
|
@ -54,7 +55,7 @@
|
|||
|
||||
var resources = {
|
||||
redirectToIndexUrl: '@Url.Action("Index", "Device")',
|
||||
errorRemoveDevice: '@Strings.ErrorRemoveDevice'
|
||||
errorRemoveDevice: '@Html.JavaScriptString(Strings.ErrorRemoveDevice)'
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@using GlobalResources
|
||||
@using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Helpers
|
||||
@model Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Models.RegisteredDeviceModel
|
||||
|
||||
|
||||
|
@ -51,7 +52,7 @@ else
|
|||
<div class="content_instructions">
|
||||
|
||||
<h3>
|
||||
<a href="@Model.InstructionsUrl" target="_blank">@String.Format(@Strings.InstructionsForYourDeviceFormatted, @Model.DeviceType.Name)</a>
|
||||
<a href="@Model.InstructionsUrl" target="_blank">@String.Format(Strings.InstructionsForYourDeviceFormatted, Model.DeviceType.Name)</a>
|
||||
@Strings.OpensInNewTab
|
||||
</h3>
|
||||
|
||||
|
@ -60,8 +61,8 @@ else
|
|||
|
||||
<script type="text/javascript">
|
||||
var resources = {
|
||||
addDevice: '@String.Format(@Strings.AddADeviceFormatted, @Model.DeviceType.Name)',
|
||||
stepThree: '@Strings.StepThreeHeader'
|
||||
addDevice: '@String.Format(Strings.AddADeviceFormatted, Model.DeviceType.Name)',
|
||||
stepThree: '@Html.JavaScriptString(Strings.StepThreeHeader)'
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" src="~/Scripts/Views/Device/AddDeviceCopy.js"></script>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
@using System.Collections
|
||||
@using GlobalResources
|
||||
@using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Helpers
|
||||
@model Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Models.UnregisteredDeviceModel
|
||||
|
||||
@using (Ajax.BeginForm("AddDeviceCreate", "Device",
|
||||
|
@ -88,11 +89,11 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
var resources = {
|
||||
addDevice: '@String.Format(@Strings.AddADeviceFormatted, @Model.DeviceType.Name)',
|
||||
addDevice: '@Html.JavaScriptString(string.Format(Strings.AddADeviceFormatted, Model.DeviceType.Name))',
|
||||
redirectToIndexUrl: '@Url.Action("AddDevice", "Device")',
|
||||
stepTwoHeader: '@Strings.StepTwoHeader',
|
||||
enterDeviceId: '@Strings.EnterDeviceId',
|
||||
createDeviceError: '@Strings.DeviceAddError',
|
||||
stepTwoHeader: '@Html.JavaScriptString(Strings.StepTwoHeader)',
|
||||
enterDeviceId: '@Html.JavaScriptString(Strings.EnterDeviceId)',
|
||||
createDeviceError: '@Html.JavaScriptString(Strings.DeviceAddError)',
|
||||
canHaveIccid: '@ViewBag.CanHaveIccid'
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@using GlobalResources
|
||||
@using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Helpers
|
||||
@model List<Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Infrastructure.Models.DeviceType>
|
||||
|
||||
<div id="test">
|
||||
|
@ -37,9 +38,9 @@
|
|||
</div>
|
||||
<script type="text/javascript">
|
||||
var resources = {
|
||||
addDevice: '@Strings.AddDevice',
|
||||
stepOneHeader: '@Strings.StepOneHeader',
|
||||
selectDeviceTypeError: '@Strings.DeviceAddSelectTypeError'
|
||||
addDevice: '@Html.JavaScriptString(Strings.AddDevice)',
|
||||
stepOneHeader: '@Html.JavaScriptString(Strings.StepOneHeader)',
|
||||
selectDeviceTypeError: '@Html.JavaScriptString(Strings.DeviceAddSelectTypeError)'
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" src="~/Scripts/Views/Device/DeviceSelectType.js"></script>
|
|
@ -119,9 +119,9 @@
|
|||
commands: '@Html.Raw(Model.CommandsJson)',
|
||||
deviceId: '@Model.DeviceId',
|
||||
deviceIsEnabled: '@Model.DeviceIsEnabled.ToString().ToLower()',
|
||||
commandError: '@Strings.CommandError',
|
||||
commandSendError: '@Strings.CommandSendError',
|
||||
resendCommandError: '@Strings.ResendCommandError'
|
||||
commandError: '@Html.JavaScriptString(Strings.CommandError)',
|
||||
commandSendError: '@Html.JavaScriptString(Strings.CommandSendError)',
|
||||
resendCommandError: '@Html.JavaScriptString(Strings.ResendCommandError)'
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
@using System.Web.Mvc.Html
|
||||
@using GlobalResources
|
||||
@using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Helpers
|
||||
@model Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Models.EditDeviceRuleModel
|
||||
|
||||
@{
|
||||
|
@ -84,9 +85,9 @@
|
|||
|
||||
var resources = {
|
||||
redirectUrl: '@Url.Action("Index", "DeviceRules")',
|
||||
ruleUpdateError: '@Strings.RuleUpdateError',
|
||||
enabledString: '@Strings.Enabled',
|
||||
disabledString: '@Strings.Disabled'
|
||||
ruleUpdateError: '@Html.JavaScriptString(Strings.RuleUpdateError)',
|
||||
enabledString: '@Html.JavaScriptString(Strings.Enabled)',
|
||||
disabledString: '@Html.JavaScriptString(Strings.Disabled)'
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@using GlobalResources
|
||||
@using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Helpers
|
||||
@model Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Models.EditDeviceRuleModel
|
||||
|
||||
@{
|
||||
|
@ -70,17 +71,17 @@
|
|||
"use strict";
|
||||
|
||||
var resources = {
|
||||
retry: '@Strings.Retry',
|
||||
serviceUnavailable: '@Strings.ServiceUnavailable',
|
||||
unableToRetrieveRuleFromService: '@Strings.UnableToRetrieveRuleFromService',
|
||||
disabled: '@Strings.Disabled',
|
||||
enabled: '@Strings.Enabled',
|
||||
failedToRetrieveRules: '@Strings.FailedToRetrieveRules',
|
||||
noRuleSelected: '@Strings.NoRuleSelectedLabel',
|
||||
ruleUpdateError: '@Strings.RuleUpdateError',
|
||||
rulesList: '@Strings.Rules',
|
||||
nextPage: '@Strings.Next',
|
||||
previousPage: '@Strings.Previous'
|
||||
retry: '@Html.JavaScriptString(Strings.Retry)',
|
||||
serviceUnavailable: '@Html.JavaScriptString(Strings.ServiceUnavailable)',
|
||||
unableToRetrieveRuleFromService: '@Html.JavaScriptString(Strings.UnableToRetrieveRuleFromService)',
|
||||
disabled: '@Html.JavaScriptString(Strings.Disabled)',
|
||||
enabled: '@Html.JavaScriptString(Strings.Enabled)',
|
||||
failedToRetrieveRules: '@Html.JavaScriptString(Strings.FailedToRetrieveRules)',
|
||||
noRuleSelected: '@Html.JavaScriptString(Strings.NoRuleSelectedLabel)',
|
||||
ruleUpdateError: '@Html.JavaScriptString(Strings.RuleUpdateError)',
|
||||
rulesList: '@Html.JavaScriptString(Strings.Rules)',
|
||||
nextPage: '@Html.JavaScriptString(Strings.Next)',
|
||||
previousPage: '@Html.JavaScriptString(Strings.Previous)'
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@using GlobalResources
|
||||
@using Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Helpers
|
||||
@model Microsoft.Azure.Devices.Applications.RemoteMonitoring.DeviceAdmin.Web.Models.EditDeviceRuleModel
|
||||
|
||||
@{
|
||||
|
@ -54,7 +55,7 @@
|
|||
|
||||
var resources = {
|
||||
redirectToIndexUrl: '@Url.Action("Index", "DeviceRules")',
|
||||
errorRemoveRule: '@Strings.ErrorRemoveRule'
|
||||
errorRemoveRule: '@Html.JavaScriptString(Strings.ErrorRemoveRule)'
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
var cultureInfoShort = '@Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName'
|
||||
|
||||
var baseLayoutResources = {
|
||||
commandCToCopy: '@Strings.CommandCToCopy',
|
||||
controlCToCopy: '@Strings.ControlCToCopy',
|
||||
clickToSelectAll: '@Strings.ClickToSelectAll'
|
||||
commandCToCopy: '@Html.JavaScriptString(Strings.CommandCToCopy)',
|
||||
controlCToCopy: '@Html.JavaScriptString(Strings.ControlCToCopy)',
|
||||
clickToSelectAll: '@Html.JavaScriptString(Strings.ClickToSelectAll)'
|
||||
};
|
||||
</script>
|
||||
@Scripts.Render("~/bundles/powerbi-visuals")
|
||||
|
|
|
@ -277,6 +277,7 @@
|
|||
<Compile Include="DataTables\SortColumn.cs" />
|
||||
<Compile Include="Extensions\EnumExtensions.cs" />
|
||||
<Compile Include="Helpers\CultureHelper.cs" />
|
||||
<Compile Include="Helpers\HtmlHelperExtensions.cs" />
|
||||
<Compile Include="Helpers\JasperCredentialsProvider.cs" />
|
||||
<Compile Include="Filters\ErrorHandlingFilter.cs" />
|
||||
<Compile Include="Helpers\CellularExtensions.cs" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче