Localize using strongly typed resources:

generated Class with

     strotygen -p -t Yavsc.Models.IT.Fixing.Bug.resx

must be modified :

* prefix with 'Yavsc.Server.Resources.'  the baseName
  in call to new System.Resources.ResourceManager
* remove the internal ctor

additionally, the generated class must be or unique or partial
This commit is contained in:
2019-06-16 13:10:14 +01:00
parent c2327b07d7
commit fb35d9b772
13 changed files with 342 additions and 44 deletions

View File

@ -0,0 +1,27 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Attributes.Validation;
using Yavsc.Models.IT.Evolution;
namespace Yavsc.Models.IT.Fixing
{
public partial class Bug
{
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[ForeignKey("FeatureId")]
public virtual Feature False { get; set; }
public long? FeatureId { get; set; }
[StringLength(240, ErrorMessageResourceType=typeof(Yavsc.Models.IT.Fixing.Bug), ErrorMessageResourceName="TitleTooLong")]
public string Title { get; set; }
[StringLength(4096)]
public string Description { get; set; }
public BugStatus Status { get; set; }
}
}

View File

@ -0,0 +1,17 @@
namespace Yavsc.Models.IT.Fixing
{
/// <summary>
/// Bug status:
/// * Inserted -> Confirmed|FeatureRequest|Feature|Rejected
/// * Confirmed -> Fixed
/// * FeatureRequest -> Implemented
/// </summary>
public enum BugStatus : int
{
Inserted,
Confirmed,
Rejected,
Feature,
Fixed
}
}