Localisation

This commit is contained in:
Paul Schneider 2018-03-26 23:18:48 +02:00
commit 757c5ca2ea
23 changed files with 26 additions and 39 deletions

View file

@ -22,10 +22,8 @@ namespace Yavsc.Models.Haircut
// Bill description
public override string GetDescription()
{
string type = ResourcesHelpers.DefaultResourceManager
.GetString(this.GetType().Name);
string gender = ResourcesHelpers.DefaultResourceManager
.GetString(this.Prestation.Gender.ToString());
string type = ResourcesHelpers.GlobalLocalizer[this.GetType().Name];
string gender = ResourcesHelpers.GlobalLocalizer[this.Prestation.Gender.ToString()];
return $"{type} ({gender})";
}
@ -88,8 +86,7 @@ namespace Yavsc.Models.Haircut
Name = "Coupe",
Description = $"Coupe "+
ResourcesHelpers.DefaultResourceManager
.GetString(Prestation.Gender.ToString())+ " "+
ResourcesHelpers.GlobalLocalizer[Prestation.Gender.ToString()]+ " "+
(Prestation.Gender == HairCutGenders.Women ?
Prestation.Length == HairLength.Long ? longhairsuffix :
Prestation.Length == HairLength.HalfLong ? halflonghairsuffix :

View file

@ -16,8 +16,7 @@ namespace Yavsc.Models.Haircut
public string CreateBoby()
{
return string.Format(ResourcesHelpers.DefaultResourceManager
.GetString("RdvToPerf"), Client.UserName,
return string.Format(ResourcesHelpers.GlobalLocalizer["RdvToPerf"], Client.UserName,
EventDate?.ToString("dddd dd/MM/yyyy à HH:mm"),
Location.Address,
ActivityCode);

View file

@ -50,7 +50,7 @@ using Interfaces.Workflow;
public string CreateBody()
{
return string.Format(
ResourcesHelpers.DefaultResourceManager.GetString("RdvToPerf"),
ResourcesHelpers.GlobalLocalizer["RdvToPerf"],
Client.UserName,
EventDate?.ToString("dddd dd/MM/yyyy à HH:mm"),
Location.Address,