Commits

Clément Bourgeois committed 3891dab

Views localization

  • Participants
  • Parent commits 6f512a6

Comments (0)

Files changed (4)

File SQLServerBackupTool.Web/Views/Home/Index.cshtml

 @model IndexViewModel
 @{
-    ViewBag.Title = "Databases list";
+    ViewBag.Title = __("Databases list");
 
     var roles = Roles.GetRolesForUser();
 }
 <table class="table table-bordered table-striped table-vmiddle">
     <thead>
         <tr>
-            <th>Id</th>
-            <th>Database name</th>
-            <th>Size</th>
+            <th>@_("Id")</th>
+            <th>@_("Database name")</th>
+            <th>@_("Size")</th>
             <th style="width: 70px;"></th>
         </tr>
     </thead>
                     <td>
                         <div class="btn-group">
                             <a href="@Url.Action("Schema", new { id = di.Name })" class="btn">
-                                <i class="icon-eye-open"></i><span>&nbsp;Schema</span>
+                                <i class="icon-eye-open"></i><span>&nbsp;@_("Schema")</span>
                             </a>
                             <a class="btn btn-inverse backup-do" href="@Url.Action("Backup", new { id = di.Name })">
-                                <i class="icon-white icon-download"></i><span>&nbsp;Backup</span>
+                                <i class="icon-white icon-download"></i><span>&nbsp;@_("Backup")</span>
                             </a>
                         </div>
                     </td>
                 }
                 else
                 {
-                    <td colspan="2"><span class="muted">Offline</span></td>   
+                    <td colspan="2"><span class="muted">@_("Offline")</span></td>   
                 }
             </tr>
             }
         {
             <tr class="no-row">
                 <td colspan="3">
-                    <i>No available database for backup</i>
+                    <i>@_("No available database for backup")</i>
                 </td>
             </tr>
         }
         <thead>
             <tr>
                 <th>#</th>
-                <th>Database</th>
-                <th>User</th>
-                <th>Expiration</th>
-                <th style="width: 50px;">Size</th>
+                <th>@_("Database")</th>
+                <th>@_("User")</th>
+                <th>@_("Expiration")</th>
+                <th style="width: 50px;">@_("Size")</th>
                 <th style="width: 30px;"></th>
             </tr>
         </thead>
             else
             {
                 <tr class="no-row">
-                    <td colspan="6"><i>No available database backup</i></td>
+                    <td colspan="6"><i>@_("No available database backup")</i></td>
                 </tr>
             }
         </tbody>
                 <tr>
                     <td colspan="6">
                         <a id="backup-purge" href="@Url.Action("BackupsPurge")" onclick="return false;" class="btn btn-danger">
-                            <i class="icon-warning-sign icon-white"></i><span>&nbsp;Purge</span>
+                            <i class="icon-warning-sign icon-white"></i><span>&nbsp;@_("Purge")</span>
                         </a>
                     </td>
                 </tr>

File SQLServerBackupTool.Web/Views/Home/Schema.cshtml

 @model IEnumerable<SchemaInfo>
 
 @{
-    ViewBag.Title = string.Format("Schema of {0}", ViewBag.Database);
+    ViewBag.Title = string.Format(__("Schema of {0}"), ViewBag.Database);
 }
 
 <table class="table table-bordered">
     <thead>
         <tr>
-            <th>Table</th>
-            <th>Column</th>
-            <th>Data type</th>
-            <th>Row count</th>
+            <th>@_("Table")</th>
+            <th>@_("Column")</th>
+            <th>@_("Data type")</th>
+            <th>@_("Row count")</th>
         </tr>
     </thead>
-    @foreach (var t in Model.GroupBy(_ => _.Table))
+    @foreach (var t in Model.GroupBy(tt => tt.Table))
     {
         var cols = t.ToList();
         var f = cols.First();

File SQLServerBackupTool.Web/Views/Home/_BackupItem.cshtml

     <td>
         <div class="btn-group">
             <a class="btn" href="@Url.Action("Download", new { id=Model.Id })">
-                <i class="icon-download"></i><span>&nbsp;Download</span>
+                <i class="icon-download"></i><span>&nbsp;@_("Download")</span>
             </a>
             <a class="backup-delete btn btn-danger" href="@Url.Action("Delete", new { id = Model.Id })" onclick="return false;">
-                <i class="icon-white icon-trash"></i><span>&nbsp;Delete</span>
+                <i class="icon-white icon-trash"></i><span>&nbsp;@_("Delete")</span>
             </a>
         </div>
     </td>

File SQLServerBackupTool.Web/Views/Shared/_Layout.cshtml

             <div id="top-bar">
                 <ul id="nav" class="nav nav-pills pull-right">
                     <li class="@(ViewBag.ControllerName == "Home" ? "active" : null)">
-                        <a href="@Url.Action("Index", "Home")"><i class="icon-home"></i>&nbsp;Home</a>
+                        <a href="@Url.Action("Index", "Home")"><i class="icon-home"></i>&nbsp;@_("Home")</a>
                     </li>
                     @if (User.IsInRole("Admin"))
                     {
                         <li class="@(ViewBag.ControllerName == "Users" ? "active" : null)">
-                            <a href="@Url.Action("Index", "Users")"><i class="icon-user"></i>&nbsp;Users</a>
+                            <a href="@Url.Action("Index", "Users")"><i class="icon-user"></i>&nbsp;@_("Users")</a>
                         </li>
                     }
                 </ul>
     </div>
     <div id="footer">
         <div>
-            Baked with love by <a target="_blank" href="http://www.moonpyk.net">@@moonpyk</a> - ssbt.web | v@(VersionInfo.Version) (@VersionInfo.InformalVersion)
+            @_("Baked with love by") <a target="_blank" href="http://www.moonpyk.net">@@moonpyk</a> - ssbt.web | v@(VersionInfo.Version) (@VersionInfo.InformalVersion)
         </div>
     </div>
     @Scripts.Render("~/bundles/jquery", "~/bundles/ssbtw")