From 50fb3a1d5e90b50070e4af24584ac7dadeadb017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Chy=C5=BCy?= Date: Tue, 17 Apr 2018 16:52:46 +0200 Subject: [PATCH] Make Recruit Data page multilanguage --- .../Recruit/Data/Data.Designer.cs | 423 ++++++++++++++++++ .../Recruit/Data/Data.en.resx | 354 +++++++++++---- .../App_LocalResources/Recruit/Data/Data.resx | 354 +++++++++++---- .../Recruit/Models/RecruitDataViewModel.cs | 59 +-- RSystem/Areas/Recruit/Views/Home/Data.cshtml | 48 +- 5 files changed, 991 insertions(+), 247 deletions(-) diff --git a/RSystem/App_LocalResources/Recruit/Data/Data.Designer.cs b/RSystem/App_LocalResources/Recruit/Data/Data.Designer.cs index 9eeff65..226568d 100644 --- a/RSystem/App_LocalResources/Recruit/Data/Data.Designer.cs +++ b/RSystem/App_LocalResources/Recruit/Data/Data.Designer.cs @@ -59,5 +59,428 @@ namespace RSystem.App_LocalResources.Recruit.Data { resourceCulture = value; } } + + /// + /// Looks up a localized string similar to Adres zamieszkania. + /// + public static string Address { + get { + return ResourceManager.GetString("Address", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Miejsce urodzenia. + /// + public static string BirthCity { + get { + return ResourceManager.GetString("BirthCity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Kraj urodzenia. + /// + public static string BirthCountry { + get { + return ResourceManager.GetString("BirthCountry", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Anuluj. + /// + public static string Cancel { + get { + return ResourceManager.GetString("Cancel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Obywatelstwo. + /// + public static string Citizenship { + get { + return ResourceManager.GetString("Citizenship", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Miasto. + /// + public static string City { + get { + return ResourceManager.GetString("City", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dane kontaktowe. + /// + public static string Contact { + get { + return ResourceManager.GetString("Contact", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Adres do korespondencji. + /// + public static string CorespondentAddress { + get { + return ResourceManager.GetString("CorespondentAddress", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Adres do korespondencji taki sam jak adres zamieszkania. + /// + public static string CorespondentAdressSameAsResidence { + get { + return ResourceManager.GetString("CorespondentAdressSameAsResidence", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Miasto. + /// + public static string CorespondentCity { + get { + return ResourceManager.GetString("CorespondentCity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Kraj. + /// + public static string CorespondentCountry { + get { + return ResourceManager.GetString("CorespondentCountry", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Numer mieszkania. + /// + public static string CorespondentFlat { + get { + return ResourceManager.GetString("CorespondentFlat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Numer domu. + /// + public static string CorespondentHouse { + get { + return ResourceManager.GetString("CorespondentHouse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Kod pocztowy. + /// + public static string CorespondentPostalCode { + get { + return ResourceManager.GetString("CorespondentPostalCode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ulica. + /// + public static string CorespondentStreet { + get { + return ResourceManager.GetString("CorespondentStreet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Kraj. + /// + public static string Country { + get { + return ResourceManager.GetString("Country", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Data i miejsce urodzenia. + /// + public static string DateAndPlaceOfBirth { + get { + return ResourceManager.GetString("DateAndPlaceOfBirth", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Data urodzenia. + /// + public static string DayOfBirth { + get { + return ResourceManager.GetString("DayOfBirth", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Niepełnosprawność. + /// + public static string Disablility { + get { + return ResourceManager.GetString("Disablility", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dokument potwierdzający tożsamość. + /// + public static string DocumentType { + get { + return ResourceManager.GetString("DocumentType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Twój adress E-mail nie wygląda na poprawny. + /// + public static string EmailValidationError { + get { + return ResourceManager.GetString("EmailValidationError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Imię ojca. + /// + public static string FathersName { + get { + return ResourceManager.GetString("FathersName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Kobieta. + /// + public static string Female { + get { + return ResourceManager.GetString("Female", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Imię. + /// + public static string Firstname { + get { + return ResourceManager.GetString("Firstname", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Numer mieszkania. + /// + public static string Flat { + get { + return ResourceManager.GetString("Flat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Numer domu. + /// + public static string House { + get { + return ResourceManager.GetString("House", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dowód Osobisty. + /// + public static string IDCard { + get { + return ResourceManager.GetString("IDCard", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Tożsamość. + /// + public static string Identity { + get { + return ResourceManager.GetString("Identity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Osoba niepełnosprawna. + /// + public static string IsDisabled { + get { + return ResourceManager.GetString("IsDisabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Nazwisko. + /// + public static string LastName { + get { + return ResourceManager.GetString("LastName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Mężczyzna. + /// + public static string Male { + get { + return ResourceManager.GetString("Male", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Wojsko. + /// + public static string Military { + get { + return ResourceManager.GetString("Military", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Status wojskowy. + /// + public static string MilitaryAttitude { + get { + return ResourceManager.GetString("MilitaryAttitude", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Imię matki. + /// + public static string MothersName { + get { + return ResourceManager.GetString("MothersName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Nie. + /// + public static string No { + get { + return ResourceManager.GetString("No", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Numer Dowodu Osobistego. + /// + public static string NumberOfIDCard { + get { + return ResourceManager.GetString("NumberOfIDCard", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Numer Paszportu. + /// + public static string NumberOfPass { + get { + return ResourceManager.GetString("NumberOfPass", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Rodzice. + /// + public static string Parents { + get { + return ResourceManager.GetString("Parents", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Paszport. + /// + public static string Passport { + get { + return ResourceManager.GetString("Passport", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dane osobowe. + /// + public static string PersonalData { + get { + return ResourceManager.GetString("PersonalData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Numer telefonu. + /// + public static string Phone { + get { + return ResourceManager.GetString("Phone", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Kod pocztowy. + /// + public static string PostalCode { + get { + return ResourceManager.GetString("PostalCode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Zapisz. + /// + public static string Save { + get { + return ResourceManager.GetString("Save", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Drugie imie. + /// + public static string SecondName { + get { + return ResourceManager.GetString("SecondName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Płeć. + /// + public static string Sex { + get { + return ResourceManager.GetString("Sex", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ulica. + /// + public static string Street { + get { + return ResourceManager.GetString("Street", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Tak. + /// + public static string Yes { + get { + return ResourceManager.GetString("Yes", resourceCulture); + } + } } } diff --git a/RSystem/App_LocalResources/Recruit/Data/Data.en.resx b/RSystem/App_LocalResources/Recruit/Data/Data.en.resx index 4fdb1b6..b4c7528 100644 --- a/RSystem/App_LocalResources/Recruit/Data/Data.en.resx +++ b/RSystem/App_LocalResources/Recruit/Data/Data.en.resx @@ -1,101 +1,261 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Address + + + City of birth + + + Country of birth + + + Cancel + + + Citizenship + + + City + + + Contact data + + + Corespondent address + + + Corespondent adress same as residence + + + City + + + Country + + + Flat no. + + + House no. + + + Postal code + + + Street + + + Country + + + Date and place of birth + + + Day of birth + + + Disablility + + + Identity document + + + Your E-mail does't seem to valid address + + + Father's name + + + Female + + + First name + + + Flat no. + + + House no. + + + ID Card + + + Identity + + + Disabled person + + + Last name + + + Male + + + Military + + + Militaty status + + + Mother's name + + + No + + + Number of ID Card + + + Number of Passport + + + Parents + + + Passport + + + Personal data + + + Phone number + + + Postal code + + + Save + + + Second name + + + Sex + + + Street + + + Yes + \ No newline at end of file diff --git a/RSystem/App_LocalResources/Recruit/Data/Data.resx b/RSystem/App_LocalResources/Recruit/Data/Data.resx index 4fdb1b6..99949a1 100644 --- a/RSystem/App_LocalResources/Recruit/Data/Data.resx +++ b/RSystem/App_LocalResources/Recruit/Data/Data.resx @@ -1,101 +1,261 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 1.3 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Adres zamieszkania + + + Miejsce urodzenia + + + Kraj urodzenia + + + Anuluj + + + Obywatelstwo + + + Miasto + + + Dane kontaktowe + + + Adres do korespondencji + + + Adres do korespondencji taki sam jak adres zamieszkania + + + Miasto + + + Kraj + + + Numer mieszkania + + + Numer domu + + + Kod pocztowy + + + Ulica + + + Kraj + + + Data i miejsce urodzenia + + + Data urodzenia + + + Niepełnosprawność + + + Dokument potwierdzający tożsamość + + + Twój adress E-mail nie wygląda na poprawny + + + Imię ojca + + + Kobieta + + + Imię + + + Numer mieszkania + + + Numer domu + + + Dowód Osobisty + + + Tożsamość + + + Osoba niepełnosprawna + + + Nazwisko + + + Mężczyzna + + + Wojsko + + + Status wojskowy + + + Imię matki + + + Nie + + + Numer Dowodu Osobistego + + + Numer Paszportu + + + Rodzice + + + Paszport + + + Dane osobowe + + + Numer telefonu + + + Kod pocztowy + + + Zapisz + + + Drugie imie + + + Płeć + + + Ulica + + + Tak + \ No newline at end of file diff --git a/RSystem/Areas/Recruit/Models/RecruitDataViewModel.cs b/RSystem/Areas/Recruit/Models/RecruitDataViewModel.cs index 2c69fd4..73d4767 100644 --- a/RSystem/Areas/Recruit/Models/RecruitDataViewModel.cs +++ b/RSystem/Areas/Recruit/Models/RecruitDataViewModel.cs @@ -5,8 +5,10 @@ using System.Web; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Runtime.InteropServices; +using System.Security.AccessControl; using System.Web.Mvc; using RSystem.Models; +using RSystem.App_LocalResources.Recruit.Data; namespace RSystem.ViewModels { @@ -18,82 +20,81 @@ namespace RSystem.ViewModels public int RecruitDataId { get; set; } //Recruit Data - [Display(Name = "Imię")] + [Display(Name = "Firstname",ResourceType = typeof(Data))] public string FirstName { get; set; } - [Display(Name = "Drugie imię")] + [Display(Name = "SecondName",ResourceType = typeof(Data))] public string SecondName { get; set; } - [Display(Name = "Nazwisko")] + [Display(Name = "LastName",ResourceType = typeof(Data))] public string LastName { get; set; } - [Display(Name = "Płeć")] + [Display(Name = "Sex",ResourceType = typeof(Data))] public Sex Sex { get; set; } //Identity - [Display(Name = "Obywatelstwo")] + [Display(Name = "Citizenship", ResourceType = typeof(Data))] public string Citizenship { get; set; } - [Display(Name = "Dokument Potwierdzający tożsamość")] + [Display(Name = "DocumentType",ResourceType = typeof(Data))] public DocumentType DocumentType { get; set; } public string DocumentNumber { get; set; } //Adress - [Display(Name = "Ulica")] + [Display(Name = "Street", ResourceType = typeof(Data))] public string Street { get; set; } - [Display(Name = "Numer domu")] + [Display(Name = "House", ResourceType = typeof(Data))] public string House { get; set; } - [Display(Name = "Numer mieszkania")] + [Display(Name = "Flat", ResourceType = typeof(Data))] public string Flat { get; set; } - [Display(Name = "Kod pocztowy")] + [Display(Name = "PostalCode", ResourceType = typeof(Data))] public string PostalCode { get; set; } - [Display(Name = "Miasto")] + [Display(Name = "City", ResourceType = typeof(Data))] public string City { get; set; } - [Display(Name = "Kraj")] + [Display(Name = "Country", ResourceType = typeof(Data))] public string Country { get; set; } //Corespondent Adress - [Display(Name = "Adres do korespondencji taki sam jak adres zamieszkania")] + [Display(Name = "CorespondentAdressSameAsResidence", ResourceType = typeof(Data))] public bool CorespondentAdressSameAsResidence { get; set; } - [Display(Name = "Ulica")] + [Display(Name = "CorespondentStreet", ResourceType = typeof(Data))] public string CorespondentStreet { get; set; } - [Display(Name = "Numer domu")] + [Display(Name = "CorespondentHouse", ResourceType = typeof(Data))] public string CorespondentHouse { get; set; } - [Display(Name = "Numer Mieszkania")] + [Display(Name = "CorespondentFlat",ResourceType = typeof(Data))] public string CorespondentFlat { get; set; } - [Display(Name = "Kod pocztowy")] + [Display(Name = "CorespondentPostalCode", ResourceType = typeof(Data))] public string CorespondentPostalCode { get; set; } - [Display(Name = "Miasto")] + [Display(Name = "CorespondentCity", ResourceType = typeof(Data))] public string CorespondentCity { get; set; } - [Display(Name = "Kraj")] + [Display(Name = "CorespondentCountry", ResourceType = typeof(Data))] public string CorespondentCountry { get; set; } - + //E adress [EmailAddress(ErrorMessage = "Adress email wygląda na niepoprawny")] [Display(Name = "Adres E-mail")] public string Email { get; set; } - [Display(Name = "Numer telefonu")] + [Display(Name = "Phone",ResourceType = typeof(Data))] public string Phone { get; set; } //Disability - [Display(Name = "Osoba niepełnosprawna")] + [Display(Name = "IsDisabled", ResourceType = typeof(Data))] public bool IsDisabled { get; set; } - //parents - [Display(Name = "Imię ojca")] + [Display(Name = "FathersName", ResourceType = typeof(Data))] public string FathersName { get; set; } - [Display(Name = "Imię Matki")] + [Display(Name = "MothersName", ResourceType = typeof(Data))] public string MothersName { get; set; } //Place and date of birth [DataType(DataType.Date)] [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)] - [Display(Name = "Data urodzenia")] + [Display(Name = "DayOfBirth", ResourceType = typeof(Data))] public DateTime DayOfBirth { get; set; } - [Display(Name = "Miejsce urodzenia")] + [Display(Name = "BirthCity", ResourceType = typeof(Data))] public string BirthCity { get; set; } - [Display(Name = "Kraj urodzenia")] + [Display(Name = "Country",ResourceType = typeof(Data))] public string BirthCountry { get; set; } //Military - [Display(Name = "Status wojskowy")] + [Display(Name = "MilitaryAttitude", ResourceType = typeof(Data))] public MilitaryAttitude MilitaryAttitude { get; set; } } diff --git a/RSystem/Areas/Recruit/Views/Home/Data.cshtml b/RSystem/Areas/Recruit/Views/Home/Data.cshtml index c1a5b70..e9851b6 100644 --- a/RSystem/Areas/Recruit/Views/Home/Data.cshtml +++ b/RSystem/Areas/Recruit/Views/Home/Data.cshtml @@ -1,8 +1,9 @@  @using RSystem.Models @model RSystem.ViewModels.RecruitDataViewModel +@using RSystem.App_LocalResources.Recruit.Data @{ - ViewBag.Title = "Dane Osobowe"; + ViewBag.Title = Data.PersonalData; } @using (Html.BeginForm()) @@ -12,7 +13,7 @@
-
Dane Osobowe
+
@Data.PersonalData
@Html.LabelFor(model => model.FirstName ,new { @class = "label-form required" }) @@ -29,16 +30,16 @@
@Html.LabelFor(model => model.Sex, new { @class = "label-form required" })
- +
- +
-
Rodzice
+
@Data.Parents
@Html.LabelFor(model => model.FathersName, new { @class = "label-form required" }) @@ -51,7 +52,7 @@
-
Data i miejsce urodzenia
+
@Data.DateAndPlaceOfBirth
@Html.LabelFor(model => model.DayOfBirth, new { @class = "label-form required" }) @@ -64,7 +65,6 @@
@Html.LabelFor(model => model.BirthCountry, new { @class = "label-form required" }) @Html.DropDownListFor(model=>model.BirthCountry,Model.Countries ,new { @class = "form-control" } ) -
@@ -73,7 +73,7 @@
-
Tożsamość
+
@Data.Identity
@Html.LabelFor(model => model.Citizenship, new { @class = "label-form required" }) @@ -82,34 +82,34 @@
@Html.LabelFor(model => model.DocumentType, new { @class = "label-form required" })
- +
- +
- @Html.LabelFor(model => model.DocumentNumber,"Numer dowodu osobistego" ,new { @class = "label-form required", id="DocumentTypeId"}) + @Html.LabelFor(model => model.DocumentNumber,Data.NumberOfIDCard ,new { @class = "label-form required", id="DocumentTypeId"}) @Html.EditorFor(model => model.DocumentNumber, new { htmlAttributes = new { @class = "form-control" } })
-
Niepełnosprawność
+
@Data.Disablility
@Html.LabelFor(model => model.IsDisabled, new { @class = "label-form required" })
- +
- +
-
Dane kontaktowe
+
@Data.Contact
@Html.LabelFor(model => model.Email, new { @class = "label-form required" }) @@ -126,7 +126,7 @@
-
Adres zamieszkania
+
@Data.Address
@Html.LabelFor(model => model.Street, new { @class = "label-form required" }) @@ -161,15 +161,15 @@
-
Adres do korespondencji
+
@Data.CorespondentAddress
@Html.LabelFor(model => model.CorespondentAdressSameAsResidence, new { @class = "label-form required" })
- +
- +
-
Wojsko
+
@Data.Military
@Html.LabelFor(model => model.MilitaryAttitude, new { @class = "label-form required" }) @@ -219,8 +219,8 @@
- - @Html.ActionLink("Anuluj","Index","Home",new {@class="form-cancel form-btn"}) + + @Html.ActionLink(Data.Cancel,"Index","Home",new {@class="form-cancel form-btn"})
} @@ -240,14 +240,14 @@ $("#ID-Card").click(function () { var handler = $("#DocumentTypeId"); - handler.text('Numer dowodu osobistego'); + handler.text('@Data.NumberOfIDCard'); handler.prepend(''); }); $("#Passport").click(function () { var hander=$("#DocumentTypeId"); - hander.text('Numer paszportu'); + hander.text('@Data.NumberOfPass'); hander.prepend(''); });