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:
parent
b9a75b71b8
commit
9501ee1f16
13 changed files with 342 additions and 44 deletions
27
src/Yavsc.Server/Models/IT/Fixing/Bug.cs
Normal file
27
src/Yavsc.Server/Models/IT/Fixing/Bug.cs
Normal 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; }
|
||||
|
||||
}
|
||||
}
|
||||
17
src/Yavsc.Server/Models/IT/Fixing/BugStatus.cs
Normal file
17
src/Yavsc.Server/Models/IT/Fixing/BugStatus.cs
Normal 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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue