Translation & Localisation initialisation
This commit is contained in:
parent
1815d5e088
commit
9f10962dd0
23 changed files with 3797 additions and 310 deletions
7
Yavsc.Server/Interfaces/ITranslator.cs
Normal file
7
Yavsc.Server/Interfaces/ITranslator.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
namespace Yavsc.Server
|
||||
{
|
||||
public interface ITranslator
|
||||
{
|
||||
string[] Translate (string slang, string dlang, string[] text);
|
||||
}
|
||||
}
|
||||
|
|
@ -23,6 +23,9 @@ namespace Yavsc.Models.Blog
|
|||
[Display(Name="Photo")][StringLength(1024)]
|
||||
public string Photo { get; set; }
|
||||
|
||||
[StringLength(8)]
|
||||
public string Lang { get; set; }
|
||||
|
||||
[Display(Name="Indice de qualité")]
|
||||
public int Rate { get; set; }
|
||||
|
||||
|
|
|
|||
26
Yavsc.Server/Models/Blog/BlogTrad.cs
Normal file
26
Yavsc.Server/Models/Blog/BlogTrad.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Server.Models.Blog
|
||||
{
|
||||
public class BlogTrad
|
||||
{
|
||||
[Required]
|
||||
public long PostId { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Lang { get; set; }
|
||||
|
||||
public string Title { get; set; }
|
||||
|
||||
public string Body { get; set; }
|
||||
|
||||
public string TraducerId { get; set; }
|
||||
|
||||
[ForeignKey("TraducerId"),JsonIgnore]
|
||||
public ApplicationUser Traducer { set; get; }
|
||||
|
||||
}
|
||||
}
|
||||
7
Yavsc.Server/Services/TranslationService.cs
Normal file
7
Yavsc.Server/Services/TranslationService.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
namespace Yavsc.Server.Services
|
||||
{
|
||||
public class TranslationService
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
namespace Yavsc.ViewModels.Blogspot
|
||||
{
|
||||
public class BlogIndexKey
|
||||
{
|
||||
public string AuthorId { get; set; }
|
||||
public string Title { get; set; }
|
||||
// override object.Equals
|
||||
public override bool Equals (object obj)
|
||||
{
|
||||
//
|
||||
// See the full list of guidelines at
|
||||
// http://go.microsoft.com/fwlink/?LinkID=85237
|
||||
// and also the guidance for operator== at
|
||||
// http://go.microsoft.com/fwlink/?LinkId=85238
|
||||
//
|
||||
|
||||
if (obj == null || GetType() != obj.GetType())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var blogindexkey = (BlogIndexKey)obj;
|
||||
return Title == blogindexkey.Title && AuthorId == blogindexkey.AuthorId;
|
||||
}
|
||||
|
||||
// override object.GetHashCode
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Title.GetHashCode() * AuthorId.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue