Blogging module localization improvements

pull/441/head
Yunus Emre Kalkan 7 years ago
parent e62cd146f1
commit 5d6fcd81c1

@ -5,18 +5,18 @@
"Menu:BlogManagement": "Blog Management", "Menu:BlogManagement": "Blog Management",
"Title": "Title", "Title": "Title",
"ContinueReading": "Continue Reading", "ContinueReading": "Continue Reading",
"DaysAgo": "days ago", "DaysAgo": "{0} days ago",
"YearsAgo": "years ago", "YearsAgo": "{0} years ago",
"MonthsAgo": "months ago", "MonthsAgo": "{0} months ago",
"WeeksAgo": "weeks ago", "WeeksAgo": "{0} weeks ago",
"MinutesAgo": "minutes ago", "MinutesAgo": "{0} minutes ago",
"SecondsAgo": "seconds ago", "SecondsAgo": "{0} seconds ago",
"HoursAgo": "hours ago", "HoursAgo": "{0} hours ago",
"Now": "now", "Now": "now",
"Content": "Content", "Content": "Content",
"SeeAll": "See All", "SeeAll": "See All",
"PopularTags": "Popular Tags", "PopularTags": "Popular Tags",
"Read": "Read", "Read": "{0} Read",
"LastPosts": "Last Posts", "LastPosts": "Last Posts",
"LeaveComment": "Leave Comment", "LeaveComment": "Leave Comment",
"TagsInThisArticle": "Tags in this article", "TagsInThisArticle": "Tags in this article",
@ -25,7 +25,7 @@
"CommentDeletionWarningMessage": "Comment will be deleted.", "CommentDeletionWarningMessage": "Comment will be deleted.",
"BlogDeletionWarningMessage": "Blog will be deleted.", "BlogDeletionWarningMessage": "Blog will be deleted.",
"AreYouSure": "Are you sure?", "AreYouSure": "Are you sure?",
"Comment": "Comment", "Comment": "{0} Comment",
"CoverImage": "Cover Image", "CoverImage": "Cover Image",
"CreateANewPost": "Create A New Post", "CreateANewPost": "Create A New Post",
"CreateANewBlog": "Create A New Blog", "CreateANewBlog": "Create A New Blog",

@ -5,18 +5,18 @@
"Title": "Başlık", "Title": "Başlık",
"Menu:BlogManagement": "Blog Yönetimi", "Menu:BlogManagement": "Blog Yönetimi",
"ContinueReading": "Devamı...", "ContinueReading": "Devamı...",
"DaysAgo": "Gün Önce", "DaysAgo": "{0} Gün Önce",
"YearsAgo": "yıl önce", "YearsAgo": "{0} yıl önce",
"MonthsAgo": "ay önce", "MonthsAgo": "{0} ay önce",
"WeeksAgo": "hafta önce", "WeeksAgo": "{0} hafta önce",
"MinutesAgo": "dakika önce", "MinutesAgo": "{0} dakika önce",
"SecondsAgo": "saniye önce", "SecondsAgo": "{0} saniye önce",
"HoursAgo": "saat önce", "HoursAgo": "{0} saat önce",
"Now": "şimdi", "Now": "şimdi",
"Content": "İçerik", "Content": "İçerik",
"SeeAll": "Hepsini Gör", "SeeAll": "Hepsini Gör",
"PopularTags": "Popüler Etiketler", "PopularTags": "Popüler Etiketler",
"Read": "Okunma", "ReadWithCount": "{0} Okunma",
"LastPosts": "Son Yazılar", "LastPosts": "Son Yazılar",
"LeaveComment": "Yorum Bırak", "LeaveComment": "Yorum Bırak",
"TagsInThisArticle": "Makalenin Etiketleri", "TagsInThisArticle": "Makalenin Etiketleri",
@ -25,7 +25,7 @@
"CommentDeletionWarningMessage": "Yorum silinecek.", "CommentDeletionWarningMessage": "Yorum silinecek.",
"BlogDeletionWarningMessage": "Blog silinecek.", "BlogDeletionWarningMessage": "Blog silinecek.",
"AreYouSure": "Emin misiniz?", "AreYouSure": "Emin misiniz?",
"Comment": "Yorum", "CommentWithCount": "{0} Yorum",
"CoverImage": "Kapak resmi", "CoverImage": "Kapak resmi",
"CreateANewPost": "Yeni Yazı oluştur", "CreateANewPost": "Yeni Yazı oluştur",
"CreateANewBlog": "Yeni Blog Ekle", "CreateANewBlog": "Yeni Blog Ekle",

@ -71,7 +71,7 @@ namespace Volo.Blogging.Pages.Blog
return CommonMarkConverter.Convert(utf8Content); return CommonMarkConverter.Convert(utf8Content);
} }
public string ConvertDatetimeToTimeAgo(DateTime dt) public LocalizedHtmlString ConvertDatetimeToTimeAgo(DateTime dt)
{ {
var timeDiff = DateTime.Now - dt; var timeDiff = DateTime.Now - dt;
@ -79,37 +79,37 @@ namespace Volo.Blogging.Pages.Blog
if (diffInDays >= 365) if (diffInDays >= 365)
{ {
return diffInDays / 365 + L["YearsAgo"].Value; return L["YearsAgo", diffInDays / 365];
} }
if (diffInDays >= 30) if (diffInDays >= 30)
{ {
return diffInDays / 30 + L["MonthsAgo"].Value; return L["MonthsAgo", diffInDays / 30];
} }
if (diffInDays >= 7) if (diffInDays >= 7)
{ {
return diffInDays / 7 + L["WeeksAgo"].Value; return L["WeeksAgo", diffInDays / 7];
} }
if (diffInDays >= 1) if (diffInDays >= 1)
{ {
return diffInDays + L["DaysAgo"].Value; return L["DaysAgo", diffInDays];
} }
var diffInSeconds = (int) timeDiff.TotalSeconds; var diffInSeconds = (int) timeDiff.TotalSeconds;
if (diffInSeconds >= 3600) if (diffInSeconds >= 3600)
{ {
return diffInSeconds / 3600 + L["HoursAgo"].Value; return L["HoursAgo", diffInSeconds / 3600];
} }
if (diffInSeconds >= 60) if (diffInSeconds >= 60)
{ {
return diffInSeconds / 60 + L["MinutesAgo"].Value; return L["MinutesAgo", diffInSeconds];
} }
if (diffInSeconds >= 1) if (diffInSeconds >= 1)
{ {
return diffInSeconds + L["SecondsAgo"].Value; return L["SecondsAgo", diffInSeconds];
} }
return L["Now"].Value; return L["Now"];
} }
} }
} }

@ -43,11 +43,11 @@
</a> </a>
<span class="seperator">|</span> <span class="seperator">|</span>
<a href="#"> <a href="#">
<i class="fa fa-eye"></i> @Model.Post.ReadCount @L["Read"] <i class="fa fa-eye"></i> @L["ReadWithCount", @Model.Post.ReadCount]
</a> </a>
<span class="seperator">|</span> <span class="seperator">|</span>
<a href="#"> <a href="#">
<i class="fa fa-comment"></i> @Model.CommentCount @L["Comment"] <i class="fa fa-comment"></i> @L["CommentWithCount", @Model.CommentCount]
</a> </a>
@ -110,11 +110,11 @@
</a> </a>
<span class="vs-seperator">|</span> <span class="vs-seperator">|</span>
<a href="#"> <a href="#">
<i class="fa fa-eye"></i> @Model.Post.ReadCount @L["Read"] <i class="fa fa-eye"></i> @L["ReadWithCount", @Model.Post.ReadCount]
</a> </a>
<span class="vs-seperator">|</span> <span class="vs-seperator">|</span>
<a href="#"> <a href="#">
<i class="fa fa-comment"></i> @Model.CommentCount @L["Comment"] <i class="fa fa-comment"></i> @L["CommentWithCount", @Model.CommentCount]
</a> </a>

@ -97,11 +97,11 @@
</a> </a>
<span class="vs-seperator">|</span> <span class="vs-seperator">|</span>
<a> <a>
<i class="fa fa-eye"></i> @post.ReadCount @L["Read"] <i class="fa fa-eye"></i> @L["ReadWithCount", post.ReadCount]
</a> </a>
<span class="vs-seperator">|</span> <span class="vs-seperator">|</span>
<a> <a>
<i class="fa fa-comment"></i> @post.CommentCount @L["Comment"] <i class="fa fa-comment"></i> @L["CommentWithCount", @post.CommentCount]
</a> </a>
</div> </div>
</div> </div>

Loading…
Cancel
Save