Localization
This commit is contained in:
parent
89cf80e707
commit
313ba449e7
29 changed files with 1140 additions and 65 deletions
|
|
@ -8,6 +8,7 @@ using Microsoft.AspNet.Razor.TagHelpers;
|
|||
|
||||
namespace Yavsc.TagHelpers
|
||||
{
|
||||
|
||||
[HtmlTargetElement("div", Attributes = MarkdownContentAttributeName)]
|
||||
[HtmlTargetElement("h1", Attributes = MarkdownContentAttributeName)]
|
||||
[HtmlTargetElement("h2", Attributes = MarkdownContentAttributeName)]
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@ HOSTADMIN=root
|
|||
ASPNET_LOG_LEVEL=debug
|
||||
SOURCE_DIR=$(HOME)/workspace/yavsc
|
||||
MAKEFILE_DIR=$(SOURCE_DIR)/scripts/build/make
|
||||
BASERESX=Resources/Yavsc.ChatHub.resx Resources/Yavsc.ViewComponents.CommentViewComponent.resx Resources/Yavsc.ViewModels.FrontOffice.PerformerProfileViewModel.resx Resources/Yavsc.YavscLocalisation.resx
|
||||
BASERESX= Resources/Yavsc.ChatHub.resx\
|
||||
Resources/Yavsc.ViewComponents.CommentViewComponent.resx\
|
||||
Resources/Yavsc.ViewModels.FrontOffice.PerformerProfileViewModel.resx\
|
||||
Resources/Yavsc.YavscLocalisation.resx
|
||||
BASERESXGEN=$(BASERESX:.resx=.Designer.cs)
|
||||
|
||||
include $(MAKEFILE_DIR)/versioning.mk
|
||||
|
|
@ -74,5 +77,14 @@ minCss: $(MINCSS)
|
|||
|
||||
minify: minCss minJs
|
||||
|
||||
$(BINTARGETPATH): $(BASERESXGEN)
|
||||
prepare_mvc_templates: $(SOURCE_DIR)/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Create.cshtml \
|
||||
$(SOURCE_DIR)/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Delete.cshtml \
|
||||
$(SOURCE_DIR)/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Edit.cshtml \
|
||||
$(SOURCE_DIR)/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/List.cshtml \
|
||||
$(SOURCE_DIR)/scripts/configure/tools/mvc-code-generators/new-templates/ViewGenerator/Details.cshtml
|
||||
cp $^ $(SOURCE_DIR)/packages/Microsoft.Extensions.CodeGenerators.Mvc/1.0.0-rc1-final/Templates/ViewGenerator/
|
||||
|
||||
project.lock.json: project.json ../Yavsc.Abstract/project.lock.json ../Yavsc.Server/project.lock.json ../OAuth.AspNet.Token/project.lock.json ../OAuth.AspNet.AuthServer/project.lock.json
|
||||
|
||||
$(BINTARGETPATH): $(BASERESXGEN) project.lock.json
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
// ------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a tool.
|
||||
// Mono Runtime Version: 4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
namespace Yavsc.ViewComponents {
|
||||
using System;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
// ------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a tool.
|
||||
// Mono Runtime Version: 4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
namespace Yavsc.ViewModels.FrontOffice {
|
||||
using System;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
// ------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a tool.
|
||||
// Mono Runtime Version: 4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
namespace Yavsc {
|
||||
using System;
|
||||
|
|
|
|||
|
|
@ -439,7 +439,7 @@
|
|||
<value>new instrument</value>
|
||||
</data>
|
||||
<data name="UserName">
|
||||
<value>New display name</value>
|
||||
<value>Display name</value>
|
||||
</data>
|
||||
<data name="New user name">
|
||||
<value>New display name</value>
|
||||
|
|
|
|||
|
|
@ -1,28 +1,42 @@
|
|||
@model Yavsc.Models.Relationship.HyperLink
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
ViewData["Title"] = @SR["Create"];
|
||||
}
|
||||
|
||||
<h2>Create</h2>
|
||||
<h2>@SR["Create"]</h2>
|
||||
|
||||
<form asp-action="Create">
|
||||
<div class="form-horizontal">
|
||||
<h4>HyperLink</h4>
|
||||
<h4>@SR["HyperLink"]</h4>
|
||||
<hr />
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<div class="form-group">
|
||||
<label asp-for="HRef" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="HRef" class="form-control" />
|
||||
<span asp-validation-for="HRef" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Method" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Method" class="form-control" />
|
||||
<span asp-validation-for="Method" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ContentType" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ContentType" class="form-control" />
|
||||
<span asp-validation-for="ContentType" class="text-danger" />
|
||||
<span asp-validation-for="ContentType" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Rel" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Rel" class="form-control" />
|
||||
<span asp-validation-for="Rel" class="text-danger" />
|
||||
<span asp-validation-for="Rel" class="text-danger" ></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
@ -34,6 +48,6 @@
|
|||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
<a asp-action="Index">@SR["Back to List"]</a>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
@model Yavsc.Models.Relationship.HyperLink
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
ViewData["Title"] = @SR["Delete"];
|
||||
}
|
||||
|
||||
<h2>Delete</h2>
|
||||
<h2>@SR["Delete"]</h2>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
<form asp-action="Delete">
|
||||
<div class="form-actions no-color">
|
||||
<input type="submit" value="Delete" class="btn btn-default" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
<a asp-action="Index">@SR["Back to List"]</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,27 @@
|
|||
@model Yavsc.Models.Relationship.HyperLink
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
ViewData["Title"] = @SR["Details"];
|
||||
}
|
||||
|
||||
<h2>Details</h2>
|
||||
<h2>@SR["Details"]</h2>
|
||||
|
||||
<div>
|
||||
<h4>HyperLink</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.HRef)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Href)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Method)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Method)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.ContentType)
|
||||
</dt>
|
||||
|
|
@ -26,5 +38,5 @@
|
|||
</div>
|
||||
<p>
|
||||
@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
<a asp-action="Index">@SR["Back to List"]</a>
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,29 @@
|
|||
@model Yavsc.Models.Relationship.HyperLink
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
ViewData["Title"] = @SR["Edit"];
|
||||
}
|
||||
|
||||
<h2>Edit</h2>
|
||||
<h2>@SR["Edit"]</h2>
|
||||
|
||||
<form asp-action="Edit">
|
||||
<div class="form-horizontal">
|
||||
<h4>HyperLink</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.HRef)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Href)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Method)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Method)
|
||||
</dd>
|
||||
</dl>
|
||||
<div asp-validation-summary="ValidationSummary.ModelOnly" class="text-danger"></div>
|
||||
<input type="hidden" asp-for="HRef" />
|
||||
<input type="hidden" asp-for="Method" />
|
||||
|
|
@ -17,14 +31,14 @@
|
|||
<label asp-for="ContentType" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="ContentType" class="form-control" />
|
||||
<span asp-validation-for="ContentType" class="text-danger" />
|
||||
<span asp-validation-for="ContentType" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Rel" class="col-md-2 control-label"></label>
|
||||
<div class="col-md-10">
|
||||
<input asp-for="Rel" class="form-control" />
|
||||
<span asp-validation-for="Rel" class="text-danger" />
|
||||
<span asp-validation-for="Rel" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
@ -36,6 +50,6 @@
|
|||
</form>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
<a asp-action="Index">@SR["Back to List"]</a>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,22 @@
|
|||
@model IEnumerable<Yavsc.Models.Relationship.HyperLink>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
ViewData["Title"] = @SR["Index"];
|
||||
}
|
||||
|
||||
<h2>Index</h2>
|
||||
<h2>@SR["Index"]</h2>
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
<a asp-action="Create">@SR["Create New"]</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.HRef)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Method)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ContentType)
|
||||
</th>
|
||||
|
|
@ -22,6 +28,12 @@
|
|||
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.HRef)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Method)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ContentType)
|
||||
</td>
|
||||
|
|
@ -29,9 +41,9 @@
|
|||
@Html.DisplayFor(modelItem => item.Rel)
|
||||
</td>
|
||||
<td>
|
||||
@Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
|
||||
@Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
|
||||
@Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
|
||||
@Html.ActionLink("Edit", SR["Edit"], new { /* id=item.PrimaryKey */ }) |
|
||||
@Html.ActionLink("Details", SR["Details"], new { /* id=item.PrimaryKey */ }) |
|
||||
@Html.ActionLink("Delete", SR["Delete"], new { /* id=item.PrimaryKey */ })
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,7 +177,9 @@
|
|||
]
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": "make minify"
|
||||
"prepublish": "make minify",
|
||||
"prepare": "make prepare_code",
|
||||
"postrestore": "make prepare_mvc_templates"
|
||||
},
|
||||
"embed": "Views/**/*.cshtml"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue