From 465d7b7af5298056e481c53c412b51639a00dfba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20D=C5=82ugo=C5=82=C4=99cki?= Date: Fri, 12 Feb 2016 02:29:51 +0100 Subject: [PATCH] Translation and fix for editing project task --- .../Controllers/ProjectTasksController.cs | 8 +++--- Projects/Models/Metadata.cs | 28 +++++++++++-------- Projects/Views/ProjectTasks/Create.cshtml | 8 +++--- Projects/Views/ProjectTasks/Delete.cshtml | 12 ++++---- Projects/Views/ProjectTasks/Details.cshtml | 10 +++---- Projects/Views/ProjectTasks/Edit.cshtml | 10 +++---- Projects/Views/ProjectTasks/Index.cshtml | 12 ++++---- Projects/Views/Projects/Create.cshtml | 10 +++---- Projects/Views/Projects/Delete.cshtml | 12 ++++---- Projects/Views/Projects/Details.cshtml | 10 +++---- Projects/Views/Projects/Edit.cshtml | 10 +++---- Projects/Views/Projects/Index.cshtml | 8 +++--- 12 files changed, 72 insertions(+), 66 deletions(-) diff --git a/Projects/Controllers/ProjectTasksController.cs b/Projects/Controllers/ProjectTasksController.cs index d738edc..05d73ac 100644 --- a/Projects/Controllers/ProjectTasksController.cs +++ b/Projects/Controllers/ProjectTasksController.cs @@ -40,7 +40,7 @@ namespace Projects.Controllers public ActionResult Create() { ViewBag.project_id = new SelectList(db.Projects, "id", "name"); - ViewBag.task_status_id = new SelectList(db.TaskStatuses, "int", "status"); + ViewBag.task_status_id = new SelectList(db.TaskStatuses, "id", "status"); ViewBag.user_id = new SelectList(db.Users, "id", "login"); return View(); } @@ -60,7 +60,7 @@ namespace Projects.Controllers } ViewBag.project_id = new SelectList(db.Projects, "id", "name", projectTask.project_id); - ViewBag.task_status_id = new SelectList(db.TaskStatuses, "int", "status", projectTask.task_status_id); + ViewBag.task_status_id = new SelectList(db.TaskStatuses, "id", "status", projectTask.task_status_id); ViewBag.user_id = new SelectList(db.Users, "id", "login", projectTask.user_id); return View(projectTask); } @@ -78,7 +78,7 @@ namespace Projects.Controllers return HttpNotFound(); } ViewBag.project_id = new SelectList(db.Projects, "id", "name", projectTask.project_id); - ViewBag.task_status_id = new SelectList(db.TaskStatuses, "int", "status", projectTask.task_status_id); + ViewBag.task_status_id = new SelectList(db.TaskStatuses, "id", "status", projectTask.task_status_id); ViewBag.user_id = new SelectList(db.Users, "id", "login", projectTask.user_id); return View(projectTask); } @@ -97,7 +97,7 @@ namespace Projects.Controllers return RedirectToAction("Index"); } ViewBag.project_id = new SelectList(db.Projects, "id", "name", projectTask.project_id); - ViewBag.task_status_id = new SelectList(db.TaskStatuses, "int", "status", projectTask.task_status_id); + ViewBag.task_status_id = new SelectList(db.TaskStatuses, "id", "status", projectTask.task_status_id); ViewBag.user_id = new SelectList(db.Users, "id", "login", projectTask.user_id); return View(projectTask); } diff --git a/Projects/Models/Metadata.cs b/Projects/Models/Metadata.cs index 8009e99..a5bac9c 100644 --- a/Projects/Models/Metadata.cs +++ b/Projects/Models/Metadata.cs @@ -6,47 +6,53 @@ namespace Projects.Models public class ProjectMetadata { [StringLength(50)] - [Display(Name = "Name")] + [Display(Name = "Nazwa")] public string name; - [Display(Name = "Description")] + [Display(Name = "Opis")] public string description; - [Display(Name = "Creation Date")] + [Display(Name = "Data utworzenia")] public Nullable created_at; - [Display(Name = "Modification Date")] + [Display(Name = "Data edycji")] public Nullable updated_at; + + [Display(Name = "Właściciel projektu")] + public Nullable user_id; } public class ProjectTaskMetadata { [StringLength(50)] - [Display(Name = "Name")] + [Display(Name = "Nazwa")] public string name; - [Display(Name = "Description")] + [Display(Name = "Opis")] public string description; - [Display(Name = "Creation Date")] + [Display(Name = "Data utworzenia")] public Nullable created_at; - [Display(Name = "Modification Date")] + [Display(Name = "Data edycji")] public Nullable updated_at; + + [Display(Name = "Właściciel zadania")] + public Nullable user_id; } public class UserMetadata { - [Display(Name = "Login")] + [Display(Name = "Nazwa użytkownika")] public string login; - [Display(Name = "Password")] + [Display(Name = "Hasło")] public string password; } public class TaskStatusMetadata { - [Display(Name = "Status Name")] + [Display(Name = "Status")] public string status; } diff --git a/Projects/Views/ProjectTasks/Create.cshtml b/Projects/Views/ProjectTasks/Create.cshtml index 7e5bee6..82477af 100644 --- a/Projects/Views/ProjectTasks/Create.cshtml +++ b/Projects/Views/ProjectTasks/Create.cshtml @@ -4,7 +4,7 @@ ViewBag.Title = "Create"; } -

Create

+

@ViewBag.Title

@using (Html.BeginForm()) @@ -12,7 +12,7 @@ @Html.AntiForgeryToken()
-

ProjectTask

+

Zadanie


@Html.ValidationSummary(true, "", new { @class = "text-danger" })
@@ -73,14 +73,14 @@
- +
}
- @Html.ActionLink("Back to List", "Index") + @Html.ActionLink("Powrót do listy", "Index")
@section Scripts { diff --git a/Projects/Views/ProjectTasks/Delete.cshtml b/Projects/Views/ProjectTasks/Delete.cshtml index e4fa4fa..8d35256 100644 --- a/Projects/Views/ProjectTasks/Delete.cshtml +++ b/Projects/Views/ProjectTasks/Delete.cshtml @@ -1,14 +1,14 @@ @model Projects.Models.ProjectTask @{ - ViewBag.Title = "Delete"; + ViewBag.Title = "Usunięcie zadania"; } -

Delete

+

@ViewBag.Title

-

Are you sure you want to delete this?

+

Czy na pewno chcesz to usunąć?

-

ProjectTask

+

Zadanie


@@ -73,8 +73,8 @@ @Html.AntiForgeryToken()
- | - @Html.ActionLink("Back to List", "Index") + | + @Html.ActionLink("Powrót do listy", "Index")
}
diff --git a/Projects/Views/ProjectTasks/Details.cshtml b/Projects/Views/ProjectTasks/Details.cshtml index 8b0e593..cd962d1 100644 --- a/Projects/Views/ProjectTasks/Details.cshtml +++ b/Projects/Views/ProjectTasks/Details.cshtml @@ -1,13 +1,13 @@ @model Projects.Models.ProjectTask @{ - ViewBag.Title = "Details"; + ViewBag.Title = "Szczegóły zadania"; } -

Details

+

@ViewBag.Title

-

ProjectTask

+

Zadanie


@@ -69,6 +69,6 @@

- @Html.ActionLink("Edit", "Edit", new { id = Model.id }) | - @Html.ActionLink("Back to List", "Index") + @Html.ActionLink("Edytuj", "Edit", new { id = Model.id }) | + @Html.ActionLink("Powrót do listy", "Index")

diff --git a/Projects/Views/ProjectTasks/Edit.cshtml b/Projects/Views/ProjectTasks/Edit.cshtml index 8aad304..7940148 100644 --- a/Projects/Views/ProjectTasks/Edit.cshtml +++ b/Projects/Views/ProjectTasks/Edit.cshtml @@ -1,10 +1,10 @@ @model Projects.Models.ProjectTask @{ - ViewBag.Title = "Edit"; + ViewBag.Title = "Edycja zadania"; } -

Edit

+

@ViewBag.Title

@using (Html.BeginForm()) @@ -12,7 +12,7 @@ @Html.AntiForgeryToken()
-

ProjectTask

+

Zadanie


@Html.ValidationSummary(true, "", new { @class = "text-danger" }) @Html.HiddenFor(model => model.id) @@ -75,14 +75,14 @@
- +
}
- @Html.ActionLink("Back to List", "Index") + @Html.ActionLink("Powrót do listy", "Index")
@section Scripts { diff --git a/Projects/Views/ProjectTasks/Index.cshtml b/Projects/Views/ProjectTasks/Index.cshtml index 787dfea..6907dee 100644 --- a/Projects/Views/ProjectTasks/Index.cshtml +++ b/Projects/Views/ProjectTasks/Index.cshtml @@ -1,13 +1,13 @@ @model IEnumerable @{ - ViewBag.Title = "Index"; + ViewBag.Title = "Lista zadań"; } -

Index

+

@ViewBag.Title

- @Html.ActionLink("Create New", "Create") + @Html.ActionLink("Stwórz nowe zadanie", "Create")

@@ -59,9 +59,9 @@ @Html.DisplayFor(modelItem => item.User.login) } diff --git a/Projects/Views/Projects/Create.cshtml b/Projects/Views/Projects/Create.cshtml index db06601..0f4357a 100644 --- a/Projects/Views/Projects/Create.cshtml +++ b/Projects/Views/Projects/Create.cshtml @@ -1,10 +1,10 @@ @model Projects.Models.Project @{ - ViewBag.Title = "Create"; + ViewBag.Title = "Stwórz projekt"; } -

Create

+

@ViewBag.Title

@using (Html.BeginForm()) @@ -12,7 +12,7 @@ @Html.AntiForgeryToken()
-

Project

+

Projekt


@Html.ValidationSummary(true, "", new { @class = "text-danger" })
@@ -57,14 +57,14 @@
- +
}
- @Html.ActionLink("Back to List", "Index") + @Html.ActionLink("Powrót do listy", "Index")
@section Scripts { diff --git a/Projects/Views/Projects/Delete.cshtml b/Projects/Views/Projects/Delete.cshtml index 50c66da..91688dd 100644 --- a/Projects/Views/Projects/Delete.cshtml +++ b/Projects/Views/Projects/Delete.cshtml @@ -1,14 +1,14 @@ @model Projects.Models.Project @{ - ViewBag.Title = "Delete"; + ViewBag.Title = "Usunięcie projektu"; } -

Delete

+

@ViewBag.Title

-

Are you sure you want to delete this?

+

Czy na pewno chcesz to usunąć?

-

Project

+

Projekt


@@ -57,8 +57,8 @@ @Html.AntiForgeryToken()
- | - @Html.ActionLink("Back to List", "Index") + | + @Html.ActionLink("Powrót do listy", "Index")
}
diff --git a/Projects/Views/Projects/Details.cshtml b/Projects/Views/Projects/Details.cshtml index 97e2772..5c6d287 100644 --- a/Projects/Views/Projects/Details.cshtml +++ b/Projects/Views/Projects/Details.cshtml @@ -1,13 +1,13 @@ @model Projects.Models.Project @{ - ViewBag.Title = "Details"; + ViewBag.Title = "Szczegóły projektu"; } -

Details

+

@ViewBag.Title

-

Project

+

Projekt


@@ -53,6 +53,6 @@

- @Html.ActionLink("Edit", "Edit", new { id = Model.id }) | - @Html.ActionLink("Back to List", "Index") + @Html.ActionLink("Edytuj", "Edit", new { id = Model.id }) | + @Html.ActionLink("Powrót do listy", "Index")

diff --git a/Projects/Views/Projects/Edit.cshtml b/Projects/Views/Projects/Edit.cshtml index 3ed475b..991750a 100644 --- a/Projects/Views/Projects/Edit.cshtml +++ b/Projects/Views/Projects/Edit.cshtml @@ -1,10 +1,10 @@ @model Projects.Models.Project @{ - ViewBag.Title = "Edit"; + ViewBag.Title = "Edycja projektu"; } -

Edit

+

@ViewBag.Title

@using (Html.BeginForm()) @@ -12,7 +12,7 @@ @Html.AntiForgeryToken()
-

Project

+

Projekt


@Html.ValidationSummary(true, "", new { @class = "text-danger" }) @Html.HiddenFor(model => model.id) @@ -59,14 +59,14 @@
- +
}
- @Html.ActionLink("Back to List", "Index") + @Html.ActionLink("Powrót do listy", "Index")
@section Scripts { diff --git a/Projects/Views/Projects/Index.cshtml b/Projects/Views/Projects/Index.cshtml index 00a00d4..a565ad1 100644 --- a/Projects/Views/Projects/Index.cshtml +++ b/Projects/Views/Projects/Index.cshtml @@ -4,7 +4,7 @@ ViewBag.Title = "Index"; } -

Index

+

@ViewBag.Title

@Html.ActionLink("Create New", "Create") @@ -47,9 +47,9 @@ @Html.DisplayFor(modelItem => item.User.login)

} -- 2.30.2
- @Html.ActionLink("Edit", "Edit", new { id=item.id }) | - @Html.ActionLink("Details", "Details", new { id=item.id }) | - @Html.ActionLink("Delete", "Delete", new { id=item.id }) + @Html.ActionLink("Edycja", "Edit", new { id=item.id }) | + @Html.ActionLink("Szczegóły", "Details", new { id=item.id }) | + @Html.ActionLink("Usuń", "Delete", new { id=item.id })
- @Html.ActionLink("Edit", "Edit", new { id=item.id }) | - @Html.ActionLink("Details", "Details", new { id=item.id }) | - @Html.ActionLink("Delete", "Delete", new { id=item.id }) + @Html.ActionLink("Edycja", "Edit", new { id=item.id }) | + @Html.ActionLink("Szczegóły", "Details", new { id=item.id }) | + @Html.ActionLink("Usuń", "Delete", new { id=item.id })