From 4e5783a5eaa461d7eca6f6029631da93528cb535 Mon Sep 17 00:00:00 2001 From: Thomas Hounsell Date: Mon, 27 Jul 2015 09:34:32 +0100 Subject: [PATCH] Lots more localisation changes --- BuildFeed/BuildFeed.csproj | 37 +-- BuildFeed/Code/DisplayHelpers.cs | 13 +- BuildFeed/Local/Common.Designer.cs | 2 +- BuildFeed/Local/Front.Designer.cs | 2 +- BuildFeed/Local/Model.Designer.cs | 2 +- BuildFeed/Local/Support.Designer.cs | 225 ++++++++++++++++++ BuildFeed/Local/Support.resx | 174 ++++++++++++++ BuildFeed/Models/ViewModel/ChangePassword.cs | 13 +- BuildFeed/Models/ViewModel/LoginUser.cs | 14 +- .../Models/ViewModel/RegistrationUser.cs | 15 +- BuildFeed/Scripts/typings/jquery/jquery.d.ts | 4 + BuildFeed/Views/front/index.cshtml | 4 +- BuildFeed/Views/front/viewBuild.cshtml | 2 +- BuildFeed/Views/front/viewGroup.cshtml | 4 +- BuildFeed/Views/front/viewLab.cshtml | 4 +- BuildFeed/Views/front/viewSource.cshtml | 4 +- BuildFeed/Views/front/viewVersion.cshtml | 4 +- BuildFeed/Views/front/viewYear.cshtml | 4 +- BuildFeed/Views/support/login.cshtml | 8 +- BuildFeed/Views/support/password.cshtml | 6 +- BuildFeed/Views/support/register.cshtml | 6 +- BuildFeed/Views/support/rss.cshtml | 22 +- BuildFeed/Views/support/sitemap.cshtml | 23 +- BuildFeed/Views/support/stats.cshtml | 4 +- .../Views/support/thanks_register.cshtml | 6 +- BuildFeed/Web.config | 8 +- BuildFeed/packages.config | 66 ++--- RedisAuth/RedisAuth.csproj | 2 +- RedisAuth/packages.config | 6 +- 29 files changed, 550 insertions(+), 134 deletions(-) create mode 100644 BuildFeed/Local/Support.Designer.cs create mode 100644 BuildFeed/Local/Support.resx diff --git a/BuildFeed/BuildFeed.csproj b/BuildFeed/BuildFeed.csproj index 7aa5a4a..9bbef10 100644 --- a/BuildFeed/BuildFeed.csproj +++ b/BuildFeed/BuildFeed.csproj @@ -14,7 +14,7 @@ Properties BuildFeed BuildFeed - v4.5.2 + v4.6 false true @@ -55,29 +55,29 @@ ..\packages\Humanizer.1.37.0\lib\portable-win+net40+sl50+wp8+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Humanizer.dll True - - ..\packages\Microsoft.ApplicationInsights.1.0.0\lib\net45\Microsoft.ApplicationInsights.dll + + ..\packages\Microsoft.ApplicationInsights.1.1.0\lib\net45\Microsoft.ApplicationInsights.dll True - - ..\packages\Microsoft.ApplicationInsights.DependencyCollector.1.0.0\lib\net45\Microsoft.ApplicationInsights.Extensibility.DependencyCollector.dll + + ..\packages\Microsoft.ApplicationInsights.DependencyCollector.1.1.0\lib\net45\Microsoft.ApplicationInsights.Extensibility.DependencyCollector.dll True - - ..\packages\Microsoft.ApplicationInsights.PerfCounterCollector.1.0.0\lib\net45\Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.dll + + ..\packages\Microsoft.ApplicationInsights.PerfCounterCollector.1.1.0\lib\net45\Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.dll True - - ..\packages\Microsoft.ApplicationInsights.Web.1.0.0\lib\net45\Microsoft.ApplicationInsights.Extensibility.Web.dll + + ..\packages\Microsoft.ApplicationInsights.Web.1.1.0\lib\net45\Microsoft.ApplicationInsights.Extensibility.Web.dll True - - ..\packages\Microsoft.ApplicationInsights.Web.TelemetryChannel.1.0.0\lib\net45\Microsoft.ApplicationInsights.Web.TelemetryChannel.dll + + ..\packages\Microsoft.ApplicationInsights.Web.TelemetryChannel.1.1.0\lib\net45\Microsoft.ApplicationInsights.Web.TelemetryChannel.dll True - - ..\packages\Microsoft.ApplicationInsights.Agent.Intercept.0.17.0\lib\net45\Microsoft.Diagnostics.Instrumentation.Extensions.Intercept.dll + + ..\packages\Microsoft.ApplicationInsights.Agent.Intercept.1.0.0\lib\net45\Microsoft.Diagnostics.Instrumentation.Extensions.Intercept.dll True @@ -236,6 +236,11 @@ True Model.resx + + True + True + Support.resx + @@ -421,6 +426,10 @@ Model.Designer.cs Designer + + PublicResXFileCodeGenerator + Support.Designer.cs + 10.0 @@ -458,9 +467,7 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Every account is validated by an Administrator, so be patient and check again later. + + + Change your password + + + Confirm new password + + + Confirm password + + + Email address + + + Enter current password + + + Enter new password + + + Enter password + + + Highest version + + + Log in + + + Password + + + Recently added + + + Recently compiled + + + Recently leaked + + + Register + + + Remember me + + + Thank you for registering + + + Username + + \ No newline at end of file diff --git a/BuildFeed/Models/ViewModel/ChangePassword.cs b/BuildFeed/Models/ViewModel/ChangePassword.cs index d5a3410..f2d3877 100644 --- a/BuildFeed/Models/ViewModel/ChangePassword.cs +++ b/BuildFeed/Models/ViewModel/ChangePassword.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; +using System.ComponentModel; using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Web; +using BuildFeed.Local; namespace BuildFeed.Models.ViewModel { @@ -11,17 +8,17 @@ public class ChangePassword { [Required] [MinLength(12)] - [DisplayName("Enter current password")] + [Display(ResourceType = typeof(Support), Name = "EnterCurrentPassword")] public string OldPassword { get; set; } [Required] [MinLength(12)] - [DisplayName("Enter new password")] + [Display(ResourceType = typeof(Support), Name = "EnterNewPassword")] public string NewPassword { get; set; } [Required] [MinLength(12)] - [DisplayName("Confirm new password")] + [Display(ResourceType = typeof(Support), Name = "ConfirmNewPassword")] [Compare("NewPassword")] public string ConfirmNewPassword { get; set; } } diff --git a/BuildFeed/Models/ViewModel/LoginUser.cs b/BuildFeed/Models/ViewModel/LoginUser.cs index 0a1e7d4..0cba83a 100644 --- a/BuildFeed/Models/ViewModel/LoginUser.cs +++ b/BuildFeed/Models/ViewModel/LoginUser.cs @@ -1,23 +1,19 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Web; +using System.ComponentModel.DataAnnotations; +using BuildFeed.Local; namespace BuildFeed.Models.ViewModel { public class LoginUser { [Required] - [DisplayName("Username")] + [Display(ResourceType = typeof(Support), Name = "UserName")] public string UserName { get; set; } [Required] - [DisplayName("Password")] + [Display(ResourceType = typeof(Support), Name = "Password")] public string Password { get; set; } - [DisplayName("Remember me")] + [Display(ResourceType = typeof(Support), Name = "RememberMe")] public bool RememberMe { get; set; } } } \ No newline at end of file diff --git a/BuildFeed/Models/ViewModel/RegistrationUser.cs b/BuildFeed/Models/ViewModel/RegistrationUser.cs index 59dc7b7..5407054 100644 --- a/BuildFeed/Models/ViewModel/RegistrationUser.cs +++ b/BuildFeed/Models/ViewModel/RegistrationUser.cs @@ -1,32 +1,29 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; +using System.ComponentModel; using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Web; +using BuildFeed.Local; namespace BuildFeed.Models.ViewModel { public class RegistrationUser { [Required] - [DisplayName("Username")] + [Display(ResourceType = typeof(Support), Name ="UserName")] public string UserName { get; set; } [Required] [MinLength(12)] - [DisplayName("Enter password")] + [Display(ResourceType = typeof(Support), Name = "EnterPassword")] public string Password { get; set; } [Required] [MinLength(12)] - [DisplayName("Confirm password")] + [Display(ResourceType = typeof(Support), Name = "ConfirmPassword")] [Compare("Password")] public string ConfirmPassword { get; set; } [Required] [EmailAddress] - [DisplayName("Email address")] + [Display(ResourceType = typeof(Support), Name = "EmailAddress")] public string EmailAddress { get; set; } } } \ No newline at end of file diff --git a/BuildFeed/Scripts/typings/jquery/jquery.d.ts b/BuildFeed/Scripts/typings/jquery/jquery.d.ts index 4653239..dc5c4eb 100644 --- a/BuildFeed/Scripts/typings/jquery/jquery.d.ts +++ b/BuildFeed/Scripts/typings/jquery/jquery.d.ts @@ -105,6 +105,10 @@ interface JQueryAjaxSettings { * Specify the callback function name for a JSONP request. This value will be used instead of the random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling. You may want to specify the callback when you want to enable better browser caching of GET requests. As of jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback is set to the return value of that function. */ jsonpCallback?: any; + /** + * The HTTP method to use for the request (e.g. "POST", "GET", "PUT"). (version added: 1.9.0) + */ + method?: string; /** * A mime type to override the XHR mime type. (version added: 1.5.1) */ diff --git a/BuildFeed/Views/front/index.cshtml b/BuildFeed/Views/front/index.cshtml index 8aa5c13..4b89c55 100644 --- a/BuildFeed/Views/front/index.cshtml +++ b/BuildFeed/Views/front/index.cshtml @@ -26,11 +26,11 @@ var maxDate = group.LastBuild.Value; if (maxDate.AddDays(28) > DateTime.Now) { - @maxDate.Humanize()
+ @maxDate.Humanize()
} else { - @maxDate.ToString("d MMMM yyyy")
+ @maxDate.ToLongDateWithoutDay()
} } @group.BuildCount @BuildFeed.Local.Front.xBuilds diff --git a/BuildFeed/Views/front/viewBuild.cshtml b/BuildFeed/Views/front/viewBuild.cshtml index deab370..53a1cb9 100644 --- a/BuildFeed/Views/front/viewBuild.cshtml +++ b/BuildFeed/Views/front/viewBuild.cshtml @@ -15,7 +15,7 @@ @{ - string metaDesc = Model.BuildTime.HasValue ? string.Format(BuildFeed.Local.Front.BuildMetaDate, Model.Number, Model.Lab, Model.BuildTime.Value.ToString("d MMMM yyyy")) : string.Format(BuildFeed.Local.Front.BuildMetaNoDate, Model.Number, Model.Lab); + string metaDesc = Model.BuildTime.HasValue ? string.Format(BuildFeed.Local.Front.BuildMetaDate, Model.Number, Model.Lab, Model.BuildTime.Value.ToLongDateWithoutDay()) : string.Format(BuildFeed.Local.Front.BuildMetaNoDate, Model.Number, Model.Lab); } diff --git a/BuildFeed/Views/front/viewGroup.cshtml b/BuildFeed/Views/front/viewGroup.cshtml index 3d4a9ba..5593404 100644 --- a/BuildFeed/Views/front/viewGroup.cshtml +++ b/BuildFeed/Views/front/viewGroup.cshtml @@ -24,8 +24,8 @@

@if (build.BuildTime.HasValue) { - @build.BuildTime.Value.ToString("d MMMM yyyy")
- @build.BuildTime.Value.ToString("h:mm tt") + @build.BuildTime.Value.ToLongDateWithoutDay()
+ @build.BuildTime.Value.ToShortTimeString() }

diff --git a/BuildFeed/Views/front/viewLab.cshtml b/BuildFeed/Views/front/viewLab.cshtml index 32601e8..ba8b7a1 100644 --- a/BuildFeed/Views/front/viewLab.cshtml +++ b/BuildFeed/Views/front/viewLab.cshtml @@ -51,8 +51,8 @@

@if (build.BuildTime.HasValue) { - @build.BuildTime.Value.ToString("d MMMM yyyy")
- @build.BuildTime.Value.ToString("h:mm tt")
+ @build.BuildTime.Value.ToLongDateWithoutDay()
+ @build.BuildTime.Value.ToShortTimeString()
}

diff --git a/BuildFeed/Views/front/viewSource.cshtml b/BuildFeed/Views/front/viewSource.cshtml index 76b0b8e..6028416 100644 --- a/BuildFeed/Views/front/viewSource.cshtml +++ b/BuildFeed/Views/front/viewSource.cshtml @@ -49,8 +49,8 @@ } @if (build.BuildTime.HasValue) { - @build.BuildTime.Value.ToString("d MMMM yyyy")
- @build.BuildTime.Value.ToString("h:mm tt")
+ @build.BuildTime.Value.ToLongDateWithoutDay()
+ @build.BuildTime.Value.ToShortTimeString()
}

diff --git a/BuildFeed/Views/front/viewVersion.cshtml b/BuildFeed/Views/front/viewVersion.cshtml index 3db7329..c64a3c3 100644 --- a/BuildFeed/Views/front/viewVersion.cshtml +++ b/BuildFeed/Views/front/viewVersion.cshtml @@ -49,8 +49,8 @@ } @if (build.BuildTime.HasValue) { - @build.BuildTime.Value.ToString("d MMMM yyyy")
- @build.BuildTime.Value.ToString("h:mm tt")
+ @build.BuildTime.Value.ToLongDateWithoutDay()
+ @build.BuildTime.Value.ToShortTimeString()
}

diff --git a/BuildFeed/Views/front/viewYear.cshtml b/BuildFeed/Views/front/viewYear.cshtml index 307a5ba..95a4b90 100644 --- a/BuildFeed/Views/front/viewYear.cshtml +++ b/BuildFeed/Views/front/viewYear.cshtml @@ -55,8 +55,8 @@ } @if (build.BuildTime.HasValue) { - @build.BuildTime.Value.ToString("d MMMM yyyy")
- @build.BuildTime.Value.ToString("h:mm tt")
+ @build.BuildTime.Value.ToLongDateWithoutDay()
+ @build.BuildTime.Value.ToShortTimeString()
}

diff --git a/BuildFeed/Views/support/login.cshtml b/BuildFeed/Views/support/login.cshtml index cab8426..e1d84c9 100644 --- a/BuildFeed/Views/support/login.cshtml +++ b/BuildFeed/Views/support/login.cshtml @@ -1,12 +1,12 @@ @model BuildFeed.Models.ViewModel.LoginUser @{ - ViewBag.Title = "Login | BuildFeed"; + ViewBag.Title = string.Format("{0} | {1}", BuildFeed.Local.Support.Login, BuildFeed.Local.Common.SiteName); Html.EnableClientValidation(); Html.EnableUnobtrusiveJavaScript(); } -

Login to BuildFeed

+

@BuildFeed.Local.Support.Login

@using (Html.BeginForm()) { @@ -56,8 +56,8 @@
- - @Html.ActionLink("Register...", "register", new { controller = "support" }, new { @class = "btn btn-default" }) + + @Html.ActionLink(BuildFeed.Local.Support.Register, "register", new { controller = "support" }, new { @class = "btn btn-default" })
diff --git a/BuildFeed/Views/support/password.cshtml b/BuildFeed/Views/support/password.cshtml index 1ee5b7b..8acfe6f 100644 --- a/BuildFeed/Views/support/password.cshtml +++ b/BuildFeed/Views/support/password.cshtml @@ -1,12 +1,12 @@ @model BuildFeed.Models.ViewModel.ChangePassword @{ - ViewBag.Title = "Change your password | BuildFeed"; + ViewBag.Title = string.Format("{0} | {1}", BuildFeed.Local.Support.ChangePassword, BuildFeed.Local.Common.SiteName); Html.EnableClientValidation(); Html.EnableUnobtrusiveJavaScript(); } -

Change your password

+

@BuildFeed.Local.Support.ChangePassword

@using (Html.BeginForm()) { @@ -58,7 +58,7 @@
- +
diff --git a/BuildFeed/Views/support/register.cshtml b/BuildFeed/Views/support/register.cshtml index b2946ca..2162bda 100644 --- a/BuildFeed/Views/support/register.cshtml +++ b/BuildFeed/Views/support/register.cshtml @@ -1,12 +1,12 @@ @model BuildFeed.Models.ViewModel.RegistrationUser @{ - ViewBag.Title = "Register for an account | BuildFeed"; + ViewBag.Title = string.Format("{0} | {1}", BuildFeed.Local.Support.Register, BuildFeed.Local.Common.SiteName); Html.EnableClientValidation(); Html.EnableUnobtrusiveJavaScript(); } -

Register for an account

+

@BuildFeed.Local.Support.Register

@using (Html.BeginForm()) { @@ -70,7 +70,7 @@
- +
diff --git a/BuildFeed/Views/support/rss.cshtml b/BuildFeed/Views/support/rss.cshtml index cf090d0..be904c7 100644 --- a/BuildFeed/Views/support/rss.cshtml +++ b/BuildFeed/Views/support/rss.cshtml @@ -1,24 +1,24 @@ @{ - ViewBag.Title = "RSS Feeds"; + ViewBag.Title = string.Format("{0} | {1}", BuildFeed.Local.Common.RssFeeds, BuildFeed.Local.Common.SiteName); } -

RSS Feeds

+

@BuildFeed.Local.Common.RssFeeds