trying to localize

This commit is contained in:
2019-06-16 01:10:52 +01:00
parent 66fe0e3fb9
commit c2327b07d7
32 changed files with 510 additions and 68 deletions

View File

@ -1,4 +1,7 @@
using System;
using System.Reflection;
namespace Yavsc.Attributes.Validation
{
public class YaRegularExpression : System.ComponentModel.DataAnnotations.RegularExpressionAttribute {
@ -9,7 +12,9 @@ namespace Yavsc.Attributes.Validation
public override string FormatErrorMessage(string name)
{
return ResourcesHelpers.GlobalLocalizer[this.ErrorMessageResourceName];
var prop = this.ErrorMessageResourceType.GetProperty(ErrorMessageResourceName);
return (string) prop.GetValue(null, BindingFlags.Static, null, null, System.Globalization.CultureInfo.CurrentUICulture);
}
}
}

View File

@ -10,13 +10,12 @@ namespace Yavsc.Attributes.Validation
/// Gets or sets a flag indicating whether the attribute should allow empty strings.
/// </summary>
public bool AllowEmptyStrings { get; set; }
public YaRequiredAttribute (string msg) : base()
public YaRequiredAttribute (string msg) : base(msg)
{
ErrorMessage = msg;
}
public YaRequiredAttribute ()
public YaRequiredAttribute () : base("RequiredField")
{
this.ErrorMessage = ResourcesHelpers.GlobalLocalizer["RequiredField"];
}
public override bool IsValid(object value) {

View File

@ -1,3 +1,5 @@
using System;
namespace Yavsc.Attributes.Validation
{
public class YaStringLength: YaValidationAttribute
@ -5,20 +7,22 @@ namespace Yavsc.Attributes.Validation
public long MinLen { get; set; } = -1;
private long maxLen;
public YaStringLength(long maxLen) : base(
()=>string.Format(
ResourcesHelpers.GlobalLocalizer["BadStringLength"],
maxLen))
()=>
"BadStringLength")
{
this.maxLen = maxLen;
}
private long excedent;
private long manquant;
private long excedent=0;
private long manquant=0;
public override bool IsValid(object value) {
if (value == null) {
return false;
}
Console.WriteLine("Validating string length for "+value.ToString());
string stringValue = value as string;
if (stringValue==null) return false;
if (MinLen>=0)
@ -38,21 +42,6 @@ namespace Yavsc.Attributes.Validation
}
return true;
}
public override string FormatErrorMessage(string name)
{
if (MinLen<0) {
// DetailledMaxStringLength
return string.Format(
ResourcesHelpers.GlobalLocalizer["DetailledMaxStringLength"],
maxLen,
excedent);
} else
return string.Format(
ResourcesHelpers.GlobalLocalizer["DetailledMinMaxStringLength"],
MinLen,
maxLen,
manquant,
excedent);
}
}
}

View File

@ -0,0 +1,32 @@
using System;
using System.Reflection;
namespace Yavsc.Attributes.Validation
{
public class YaValidationAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute
{
public YaValidationAttribute(string msg) : base(msg)
{
}
public YaValidationAttribute(Func<string> acr): base(acr)
{
}
public override string FormatErrorMessage(string name)
{
if (ErrorMessageResourceType == null) // failed :/
return name;
if (ErrorMessageResourceName == null) // re failed :/
return name;
var prop = this.ErrorMessageResourceType.GetProperty(ErrorMessageResourceName);
if (prop==null) // re re failed :/
return "noprop "+ErrorMessageResourceName+" in "+ErrorMessageResourceType.Name;
return (string) prop.GetValue(null, null);
}
}
}

View File

@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Yavsc.Attributes.Validation;
namespace Yavsc.ApiControllers
{
@ -7,7 +8,7 @@ namespace Yavsc.ApiControllers
public string ApiKey { get ; set; }
[Required]
public string Component { get ; set; }
[Required][StringLength(1024)]
[Required][YaStringLength(1024)]
public string ExceptionObjectJson { get ; set; }
}
}

View File

@ -1,22 +0,0 @@
using System;
namespace Yavsc.Attributes.Validation
{
public class YaValidationAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute
{
public YaValidationAttribute() : base(()=> ResourcesHelpers.GlobalLocalizer["validationError"])
{
}
public YaValidationAttribute(Func<string> acr): base(acr)
{
}
public override string FormatErrorMessage(string name)
{
return ResourcesHelpers.GlobalLocalizer[name];
}
}
}

View File

@ -13,7 +13,7 @@ namespace Yavsc.Models.Blog
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[YaStringLength(1024)]
[StringLength(1024)]
public string Content { get; set; }
[ForeignKeyAttribute("PostId")][JsonIgnore]

View File

@ -9,10 +9,10 @@ namespace Yavsc.Models.IT.Evolution
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[YaStringLength(256,MinLen=3)]
[StringLength(256)]
public string ShortName { get; set; }
[YaStringLength(10*1024,MinLen=3)]
[StringLength(10*1024)]
public string Description { get; set; }
public FeatureStatus Status { get; set; }

View File

@ -11,7 +11,7 @@ namespace Yavsc.ViewModels.Account
[YaRegularExpression(Constants.UserNameRegExp)]
public string UserName { get; set; }
[YaRequired()]
[Required()]
// [EmailAddress]
[Display(Name = "Email")]
public string Email { get; set; }

View File

@ -26,8 +26,8 @@
"userSecretsId": "aspnet5-YavscWeb-a0dadd21-2ced-43d3-96f9-7e504345102f",
"buildOptions": {
"debugType": "full",
"emitEntryPoint": true,
"outputName": "Yavsc",
"emitEntryPoint": false,
"outputName": "Yavsc.Server",
"compile": {
"include": "*.cs",
"exclude": [
@ -38,8 +38,10 @@
]
},
"embed": [
"Resources/**/*.resx"
]
"Resources/**/*.resx"
],
"publicSign": false,
"keyFile": "../../../sgKey.snk"
},
"tooling": {
"defaultNamespace": "Yavsc"

View File

@ -70,6 +70,8 @@ namespace Yavsc.Controllers
await _context.SaveChangesAsync();
return RedirectToAction("Index");
}
ViewBag.Features = Features(_context);
ViewBag.Statuses = Statuses(default(BugStatus));
return View(bug);
}

View File

@ -9,10 +9,13 @@ namespace Yavsc.Controllers
{
using Models;
using Models.IT.Evolution;
using Yavsc.Server.Helpers;
public class FeatureController : Controller
{
private ApplicationDbContext _context;
IEnumerable<SelectListItem> Statuses(FeatureStatus ?status) =>
typeof(FeatureStatus).CreateSelectListItems(status);
public FeatureController(ApplicationDbContext context)
{
_context = context;
@ -44,6 +47,7 @@ namespace Yavsc.Controllers
// GET: Feature/Create
public IActionResult Create()
{
ViewBag.FeatureStatus = Statuses(default(FeatureStatus));
return View();
}
@ -58,6 +62,7 @@ namespace Yavsc.Controllers
await _context.SaveChangesAsync();
return RedirectToAction("Index");
}
ViewBag.FeatureStatus = Statuses(default(FeatureStatus));
return View(feature);
}

View File

@ -15,7 +15,7 @@ namespace Yavsc.Models.IT.Fixing
public long? FeatureId { get; set; }
[YaStringLength(1024)]
[YaStringLength(240, ErrorMessageResourceType=typeof(BugResources), ErrorMessageResourceName="TitleTooLong")]
public string Title { get; set; }
[YaStringLength(4096)]

View File

@ -0,0 +1,35 @@
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
namespace Yavsc.Models.IT.Fixing {
using System;
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
public class BugResources {
private static IStringLocalizer _localizer=null;
static IStringLocalizer Localizer {
get {
if (_localizer != null) return _localizer;
var scope = Startup.Services.GetRequiredService<IServiceScopeFactory>().CreateScope();
var stringLocFactory = scope.ServiceProvider.GetService<IStringLocalizerFactory>();
_localizer = stringLocFactory.Create(typeof(BugResources));
return _localizer;
}
}
public static string TitleTooLong {
get {
return Localizer["TitleTooLong"];
}
}
}
}

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<!--
route name for the api controller used to tag the 'BlogPost' entity
-->
<data name="TitleTooLong"><value>Le titre est trop long</value></data>
</root>

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<!--
route name for the api controller used to tag the 'BlogPost' entity
-->
<data name="TitleTooLong"><value>Le titre est trop long</value></data>
</root>

View File

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Yavsc.Resources {
using System;
using System.Reflection;
using System.Resources;
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class ChatHub {
private static System.Resources.ResourceManager resourceMan;
private static System.Globalization.CultureInfo resourceCulture;
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal ChatHub() {
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public static System.Resources.ResourceManager ResourceManager {
get {
if (object.Equals(null, resourceMan)) {
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Yavsc.ChatHub", typeof(ChatHub).GetTypeInfo().Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public static System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
public static string Authenticated_chat_user {
get {
return ResourceManager.GetString("Authenticated chat user", resourceCulture);
}
}
public static string LabnoJoinNoSend {
get {
return ResourceManager.GetString("LabnoJoinNoSend", resourceCulture);
}
}
}
}

View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<!--
route name for the api controller used to tag the 'BlogPost' entity
-->
<data name="Authenticated chat user"><value>Utilisateur de chat authentifié</value></data>
<data name="LabnoJoinNoSend"><value>Envoi impossible: vous devez joindre le canal pour y contribuer.</value></data>
</root>

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<!--
route name for the api controller used to tag the 'BlogPost' entity
-->
<data name="TitleTooLong"><value>Le titre est trop long</value></data>
</root>

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<!--
route name for the api controller used to tag the 'BlogPost' entity
-->
<data name="TitleTooLong"><value>Le titre est trop long</value></data>
</root>

View File

@ -465,7 +465,7 @@ Pour ce faire, suivez le lien suivant : &lt;{1}&gt;.
{0} - {2} &lt;{3}&gt;</value></data>
<data name="BadStringLength"><value>Taille maximale: {0} caractère.</value></data>
<data name="DetailledMinMaxStringLength"><value>Ce champ est
d'au moins {0} et d'au plus {1} caractère(s). </value></data>
d'au moins {0} et d'au plus {1} caractère(s) (manquent {2}) ou ({3} en trop).</value></data>
<data name="DetailledMaxStringLength"><value>Ce champ est
d'au plus {0} caractère(s) ({1} en excès). </value></data>
<data name="EmailSentToPerformer"><value>Un message éléctronique a été envoyé à {0}.</value></data>

View File

@ -15,7 +15,7 @@
<label asp-for="Title" class="col-md-2 control-label">@SR["Title"]</label>
<div class="col-md-10">
<input asp-for="Title" class="form-control" />
<span asp-validation-for="Title" class="text-danger" />
<span asp-validation-for="Title" class="text-danger" ></span>
</div>
</div>
<div class="form-group">
@ -23,21 +23,21 @@
<div class="col-md-10">
<textarea asp-for="Description" class="form-control" >
</textarea>
<span asp-validation-for="Description" class="text-danger" />
<span asp-validation-for="Description" class="text-danger" ></span>
</div>
</div>
<div class="form-group">
<label asp-for="FeatureId" class="col-md-2 control-label">@SR["Feature"]</label>
<div class="col-md-10">
<select asp-for="FeatureId" asp-items="@ViewBag.Features" ></select>
<span asp-validation-for="FeatureId" class="text-danger" />
<span asp-validation-for="FeatureId" class="text-danger" ></span>
</div>
</div>
<div class="form-group">
<label asp-for="Status" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Status" class="form-control" asp-items="@ViewBag.Statuses"></select>
<span asp-validation-for="Status" class="text-danger" />
<span asp-validation-for="Status" class="text-danger" ></span>
</div>
</div>
<div class="form-group">

View File

@ -15,21 +15,21 @@
<label asp-for="Description" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="Description" class="form-control" />
<span asp-validation-for="Description" class="text-danger" />
<span asp-validation-for="Description" class="text-danger" ></span>
</div>
</div>
<div class="form-group">
<label asp-for="ShortName" class="col-md-2 control-label"></label>
<div class="col-md-10">
<input asp-for="ShortName" class="form-control" />
<span asp-validation-for="ShortName" class="text-danger" />
<span asp-validation-for="ShortName" class="text-danger" ></span>
</div>
</div>
<div class="form-group">
<label asp-for="Status" class="col-md-2 control-label"></label>
<div class="col-md-10">
<select asp-for="Status" class="form-control"></select>
<span asp-validation-for="Status" class="text-danger" />
<select asp-for="Status" class="form-control" asp-items="@ViewBag.FeatureStatus"></select>
<span asp-validation-for="Status" class="text-danger" ></span>
</div>
</div>
<div class="form-group">

View File

@ -35,7 +35,13 @@
"emitEntryPoint": true,
"outputName": "Yavsc",
"compile": {
"include": "*.cs"
"include": "*.cs",
"exclude": [
"wwwroot",
"node_modules",
"bower_components",
"contrib"
]
},
"embed": [
"Resources/**/*.resx"