Translation and fix for editing project task
authorRafał Długołęcki <dlugolecki.rafal@gmail.com>
Fri, 12 Feb 2016 01:29:51 +0000 (02:29 +0100)
committerRafał Długołęcki <dlugolecki.rafal@gmail.com>
Fri, 12 Feb 2016 01:29:51 +0000 (02:29 +0100)
12 files changed:
Projects/Controllers/ProjectTasksController.cs
Projects/Models/Metadata.cs
Projects/Views/ProjectTasks/Create.cshtml
Projects/Views/ProjectTasks/Delete.cshtml
Projects/Views/ProjectTasks/Details.cshtml
Projects/Views/ProjectTasks/Edit.cshtml
Projects/Views/ProjectTasks/Index.cshtml
Projects/Views/Projects/Create.cshtml
Projects/Views/Projects/Delete.cshtml
Projects/Views/Projects/Details.cshtml
Projects/Views/Projects/Edit.cshtml
Projects/Views/Projects/Index.cshtml

index d738edc8e5d6691a565942f838797d4c9352b241..05d73ac97e2e681570c3328246de5c31c6159260 100644 (file)
@@ -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);
         }
index 8009e997f7dfd36a30b211c65f45d49b13e340ec..a5bac9cff26daed96b733f02dfc61d696be92c1c 100644 (file)
@@ -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<System.DateTime> created_at;
 
-        [Display(Name = "Modification Date")]
+        [Display(Name = "Data edycji")]
         public Nullable<System.DateTime> updated_at;
+
+        [Display(Name = "Właściciel projektu")]
+        public Nullable<int> 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<System.DateTime> created_at;
 
-        [Display(Name = "Modification Date")]
+        [Display(Name = "Data edycji")]
         public Nullable<System.DateTime> updated_at;
+
+        [Display(Name = "Właściciel zadania")]
+        public Nullable<int> 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;
     }
 
index 7e5bee646e771e083b691a18b9e5f812578d7702..82477afb0c8103cbce4aa64425e72e505c5a9a90 100644 (file)
@@ -4,7 +4,7 @@
     ViewBag.Title = "Create";
 }
 
-<h2>Create</h2>
+<h2>@ViewBag.Title</h2>
 
 
 @using (Html.BeginForm()) 
@@ -12,7 +12,7 @@
     @Html.AntiForgeryToken()
     
     <div class="form-horizontal">
-        <h4>ProjectTask</h4>
+        <h4>Zadanie</h4>
         <hr />
         @Html.ValidationSummary(true, "", new { @class = "text-danger" })
         <div class="form-group">
 
         <div class="form-group">
             <div class="col-md-offset-2 col-md-10">
-                <input type="submit" value="Create" class="btn btn-default" />
+                <input type="submit" value="Stwórz" class="btn btn-default" />
             </div>
         </div>
     </div>
 }
 
 <div>
-    @Html.ActionLink("Back to List", "Index")
+    @Html.ActionLink("Powrót do listy", "Index")
 </div>
 
 @section Scripts {
index e4fa4fa0f1f3417b08b778d27a802090e9877e05..8d352560e93cd51bfe798c2bcc0d8447f598fc10 100644 (file)
@@ -1,14 +1,14 @@
 @model Projects.Models.ProjectTask
 
 @{
-    ViewBag.Title = "Delete";
+    ViewBag.Title = "Usunięcie zadania";
 }
 
-<h2>Delete</h2>
+<h2>@ViewBag.Title</h2>
 
-<h3>Are you sure you want to delete this?</h3>
+<h3>Czy na pewno chcesz to usunąć?</h3>
 <div>
-    <h4>ProjectTask</h4>
+    <h4>Zadanie</h4>
     <hr />
     <dl class="dl-horizontal">
         <dt>
@@ -73,8 +73,8 @@
         @Html.AntiForgeryToken()
 
         <div class="form-actions no-color">
-            <input type="submit" value="Delete" class="btn btn-default" /> |
-            @Html.ActionLink("Back to List", "Index")
+            <input type="submit" value="Usuń" class="btn btn-default" /> |
+            @Html.ActionLink("Powrót do listy", "Index")
         </div>
     }
 </div>
index 8b0e5938cafa9bdeddea0b57eb408cb0de7f704f..cd962d1097df0820c93e86a1d434491c6bb2fca8 100644 (file)
@@ -1,13 +1,13 @@
 @model Projects.Models.ProjectTask
 
 @{
-    ViewBag.Title = "Details";
+    ViewBag.Title = "Szczegóły zadania";
 }
 
-<h2>Details</h2>
+<h2>@ViewBag.Title</h2>
 
 <div>
-    <h4>ProjectTask</h4>
+    <h4>Zadanie</h4>
     <hr />
     <dl class="dl-horizontal">
         <dt>
@@ -69,6 +69,6 @@
     </dl>
 </div>
 <p>
-    @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")
 </p>
index 8aad30484690682e67b9c66f7b3046d71c7c5d24..7940148ceb8fe85d8ca628eff45769a3754e385c 100644 (file)
@@ -1,10 +1,10 @@
 @model Projects.Models.ProjectTask
 
 @{
-    ViewBag.Title = "Edit";
+    ViewBag.Title = "Edycja zadania";
 }
 
-<h2>Edit</h2>
+<h2>@ViewBag.Title</h2>
 
 
 @using (Html.BeginForm())
@@ -12,7 +12,7 @@
     @Html.AntiForgeryToken()
     
     <div class="form-horizontal">
-        <h4>ProjectTask</h4>
+        <h4>Zadanie</h4>
         <hr />
         @Html.ValidationSummary(true, "", new { @class = "text-danger" })
         @Html.HiddenFor(model => model.id)
 
         <div class="form-group">
             <div class="col-md-offset-2 col-md-10">
-                <input type="submit" value="Save" class="btn btn-default" />
+                <input type="submit" value="Zapisz" class="btn btn-default" />
             </div>
         </div>
     </div>
 }
 
 <div>
-    @Html.ActionLink("Back to List", "Index")
+    @Html.ActionLink("Powrót do listy", "Index")
 </div>
 
 @section Scripts {
index 787dfea0e98f5650724bc3a89a0940081278cd44..6907dee35148950b574fb5c30ac3ec787b02b6b6 100644 (file)
@@ -1,13 +1,13 @@
 @model IEnumerable<Projects.Models.ProjectTask>
 
 @{
-    ViewBag.Title = "Index";
+    ViewBag.Title = "Lista zadań";
 }
 
-<h2>Index</h2>
+<h2>@ViewBag.Title</h2>
 
 <p>
-    @Html.ActionLink("Create New", "Create")
+    @Html.ActionLink("Stwórz nowe zadanie", "Create")
 </p>
 <table class="table">
     <tr>
@@ -59,9 +59,9 @@
             @Html.DisplayFor(modelItem => item.User.login)
         </td>
         <td>
-            @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 })
         </td>
     </tr>
 }
index db06601cf6fef14bbd9a111c8e1d8b0f664036d0..0f4357a8d687ede2f10505be5d6f8972c774c007 100644 (file)
@@ -1,10 +1,10 @@
 @model Projects.Models.Project
 
 @{
-    ViewBag.Title = "Create";
+    ViewBag.Title = "Stwórz projekt";
 }
 
-<h2>Create</h2>
+<h2>@ViewBag.Title</h2>
 
 
 @using (Html.BeginForm()) 
@@ -12,7 +12,7 @@
     @Html.AntiForgeryToken()
     
     <div class="form-horizontal">
-        <h4>Project</h4>
+        <h4>Projekt</h4>
         <hr />
         @Html.ValidationSummary(true, "", new { @class = "text-danger" })
         <div class="form-group">
 
         <div class="form-group">
             <div class="col-md-offset-2 col-md-10">
-                <input type="submit" value="Create" class="btn btn-default" />
+                <input type="submit" value="Stwórz" class="btn btn-default" />
             </div>
         </div>
     </div>
 }
 
 <div>
-    @Html.ActionLink("Back to List", "Index")
+    @Html.ActionLink("Powrót do listy", "Index")
 </div>
 
 @section Scripts {
index 50c66da767bbfe1744d5b5e1162ff6725adbad58..91688dd56d940ead48f0b258f73091d0d6f65436 100644 (file)
@@ -1,14 +1,14 @@
 @model Projects.Models.Project
 
 @{
-    ViewBag.Title = "Delete";
+    ViewBag.Title = "Usunięcie projektu";
 }
 
-<h2>Delete</h2>
+<h2>@ViewBag.Title</h2>
 
-<h3>Are you sure you want to delete this?</h3>
+<h3>Czy na pewno chcesz to usunąć?</h3>
 <div>
-    <h4>Project</h4>
+    <h4>Projekt</h4>
     <hr />
     <dl class="dl-horizontal">
         <dt>
@@ -57,8 +57,8 @@
         @Html.AntiForgeryToken()
 
         <div class="form-actions no-color">
-            <input type="submit" value="Delete" class="btn btn-default" /> |
-            @Html.ActionLink("Back to List", "Index")
+            <input type="submit" value="Usuń" class="btn btn-default" /> |
+            @Html.ActionLink("Powrót do listy", "Index")
         </div>
     }
 </div>
index 97e27723464b334ca0a12793622244390d5c2dab..5c6d2873f36b905bee044e535354d3b986fde1ab 100644 (file)
@@ -1,13 +1,13 @@
 @model Projects.Models.Project
 
 @{
-    ViewBag.Title = "Details";
+    ViewBag.Title = "Szczegóły projektu";
 }
 
-<h2>Details</h2>
+<h2>@ViewBag.Title</h2>
 
 <div>
-    <h4>Project</h4>
+    <h4>Projekt</h4>
     <hr />
     <dl class="dl-horizontal">
         <dt>
@@ -53,6 +53,6 @@
     </dl>
 </div>
 <p>
-    @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")
 </p>
index 3ed475bc8a2139db06c0ad39b84aae4facd2fa2e..991750af8cae7494b31c71ffd97a337d4224e729 100644 (file)
@@ -1,10 +1,10 @@
 @model Projects.Models.Project
 
 @{
-    ViewBag.Title = "Edit";
+    ViewBag.Title = "Edycja projektu";
 }
 
-<h2>Edit</h2>
+<h2>@ViewBag.Title</h2>
 
 
 @using (Html.BeginForm())
@@ -12,7 +12,7 @@
     @Html.AntiForgeryToken()
     
     <div class="form-horizontal">
-        <h4>Project</h4>
+        <h4>Projekt</h4>
         <hr />
         @Html.ValidationSummary(true, "", new { @class = "text-danger" })
         @Html.HiddenFor(model => model.id)
 
         <div class="form-group">
             <div class="col-md-offset-2 col-md-10">
-                <input type="submit" value="Save" class="btn btn-default" />
+                <input type="submit" value="Zapisz" class="btn btn-default" />
             </div>
         </div>
     </div>
 }
 
 <div>
-    @Html.ActionLink("Back to List", "Index")
+    @Html.ActionLink("Powrót do listy", "Index")
 </div>
 
 @section Scripts {
index 00a00d43dd0d0ee8285478193c2cc55cbe587150..a565ad1bc86eaa5de338f1f9358d2e8f1b48736b 100644 (file)
@@ -4,7 +4,7 @@
     ViewBag.Title = "Index";
 }
 
-<h2>Index</h2>
+<h2>@ViewBag.Title</h2>
 
 <p>
     @Html.ActionLink("Create New", "Create")
@@ -47,9 +47,9 @@
             @Html.DisplayFor(modelItem => item.User.login)
         </td>
         <td>
-            @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 })
         </td>
     </tr>
 }