Browse Source

blogging module localization

pull/441/head
Yunus Emre Kalkan 8 years ago
parent
commit
e4caec1cd8
  1. 4
      modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs
  2. 3
      modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/en.json
  3. 5
      modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/tr.json
  4. 2
      modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml
  5. 1
      modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Index.cshtml

4
modules/blogging/src/Volo.Blogging.Application/Volo/Blogging/Posts/PostAppService.cs

@ -161,6 +161,10 @@ namespace Volo.Blogging.Posts
private List<string> SplitTags(string tags) private List<string> SplitTags(string tags)
{ {
if (tags.IsNullOrWhiteSpace())
{
return new List<string>();
}
return new List<string>(tags.Split(",").Select(t=>t.Trim())); return new List<string>(tags.Split(",").Select(t=>t.Trim()));
} }
} }

3
modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/en.json

@ -10,7 +10,10 @@
"PopularTags": "Popular Tags", "PopularTags": "Popular Tags",
"Read": "Read", "Read": "Read",
"LastPosts": "Last Posts", "LastPosts": "Last Posts",
"LeaveComment": "Leave Comment",
"TagsInThisArticle": "Tags in this article",
"Posts": "Posts", "Posts": "Posts",
"Edit": "Edit",
"Comment": "Comment", "Comment": "Comment",
"WhatIsNew": "What is new?" "WhatIsNew": "What is new?"
} }

5
modules/blogging/src/Volo.Blogging.Web/Localization/Resources/Blogging/Web/tr.json

@ -3,14 +3,17 @@
"texts": { "texts": {
"Menu:Blogs": "Blog", "Menu:Blogs": "Blog",
"Title": "Başlık", "Title": "Başlık",
"ContinueReading": "Okumaya Devam", "ContinueReading": "Devamı...",
"DaysAgo": "Gün Önce", "DaysAgo": "Gün Önce",
"Content": "İçerik", "Content": "İçerik",
"SeeAll": "Hepsini Gör", "SeeAll": "Hepsini Gör",
"PopularTags": "Popüler Etiketler", "PopularTags": "Popüler Etiketler",
"Read": "Okunma", "Read": "Okunma",
"LastPosts": "Son Yazılar", "LastPosts": "Son Yazılar",
"LeaveComment": "Yorum Bırak",
"TagsInThisArticle": "Makalenin Etiketleri",
"Posts": "Yazılar", "Posts": "Yazılar",
"Edit": "Düzelt",
"Comment": "Yorum", "Comment": "Yorum",
"WhatIsNew": "Yeniler" "WhatIsNew": "Yeniler"
} }

2
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Detail.cshtml

@ -96,7 +96,7 @@
<div class="row"> <div class="row">
<div class="col-md-8 mx-auto"> <div class="col-md-8 mx-auto">
<div class="tags"> <div class="tags">
<h5>Tags in this article</h5> <h5>@L["TagsInThisArticle"]</h5>
@foreach (var tag in Model.Post.Tags) @foreach (var tag in Model.Post.Tags)
{ {
<a asp-page="/Blog/Tags/Posts" asp-route-blogShortName="@Model.BlogShortName" asp-route-tagName="@tag.Name" class="tag">@tag.Name</a> <a asp-page="/Blog/Tags/Posts" asp-route-blogShortName="@Model.BlogShortName" asp-route-tagName="@tag.Name" class="tag">@tag.Name</a>

1
modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Index.cshtml

@ -1,6 +1,5 @@
@page @page
@inherits Volo.Blogging.Pages.Blog.BloggingPage @inherits Volo.Blogging.Pages.Blog.BloggingPage
@using System.Net
@using Microsoft.AspNetCore.Authorization @using Microsoft.AspNetCore.Authorization
@using Volo.Blogging @using Volo.Blogging
@using Volo.Blogging.Pages.Blog.Posts @using Volo.Blogging.Pages.Blog.Posts

Loading…
Cancel
Save