Skip to content

Commit

Permalink
rename RssItemCount to FeedItemCount
Browse files Browse the repository at this point in the history
  • Loading branch information
EdiWang committed May 7, 2024
1 parent 31074c8 commit 92b31e2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/Moonglade.Configuration/FeedSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ namespace Moonglade.Configuration;

public class FeedSettings : IBlogSettings
{
[Display(Name = "RSS items")]
public int RssItemCount { get; set; }
[Display(Name = "Feed items")]
public int FeedItemCount { get; set; }

[Display(Name = "Use full blog post content instead of abstract")]
public bool UseFullContent { get; set; }

[JsonIgnore]
public static FeedSettings DefaultValue => new()
{
RssItemCount = 20,
FeedItemCount = 20,
UseFullContent = false
};
}
4 changes: 2 additions & 2 deletions src/Moonglade.Syndication/SyndicationDataSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public async Task<List<FeedEntry>> GetFeedDataAsync(string catSlug = null)
private async Task<List<FeedEntry>> GetFeedEntriesAsync(Guid? catId = null)
{
int? top = null;
if (_blogConfig.FeedSettings.RssItemCount != 0)
if (_blogConfig.FeedSettings.FeedItemCount != 0)
{
top = _blogConfig.FeedSettings.RssItemCount;
top = _blogConfig.FeedSettings.FeedItemCount;
}

var postSpec = new PostByCatSpec(catId, top);
Expand Down
6 changes: 3 additions & 3 deletions src/Moonglade.Web/Pages/Settings/Subscription.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
<i class="bi-list-ol settings-entry-icon"></i>
</div>
<div class="col">
<label asp-for="@settings.RssItemCount"></label>
<div class="form-text">@SharedLocalizer["The number of entries to include in RSS feed."]</div>
<label asp-for="@settings.FeedItemCount"></label>
<div class="form-text">@SharedLocalizer["The number of entries to include in RSS/ATOM feed."]</div>
</div>
<div class="col-md-5">
<input asp-for="@settings.RssItemCount" class="form-control" required />
<input asp-for="@settings.FeedItemCount" class="form-control" required />
</div>
</div>

Expand Down
8 changes: 4 additions & 4 deletions src/Moonglade.Web/Resources/Program.zh-Hans.resx
Original file line number Diff line number Diff line change
Expand Up @@ -663,8 +663,8 @@
<data name="Route Name" xml:space="preserve">
<value>路由名称</value>
</data>
<data name="RSS Items" xml:space="preserve">
<value>RSS条目数量</value>
<data name="Feed Items" xml:space="preserve">
<value>订阅条目数量</value>
</data>
<data name="Save" xml:space="preserve">
<value>保存</value>
Expand Down Expand Up @@ -756,8 +756,8 @@
<data name="The first {0} character(s) will be used as abstract if you leave this field blank." xml:space="preserve">
<value>留空自动选取文章前 {0} 字符作为摘要</value>
</data>
<data name="The number of entries to include in RSS feed." xml:space="preserve">
<value>RSS中包含的条目数量</value>
<data name="The number of entries to include in RSS/ATOM feed." xml:space="preserve">
<value>RSS/ATOM 中包含的条目数量</value>
</data>
<data name="Theme" xml:space="preserve">
<value>主题</value>
Expand Down
6 changes: 3 additions & 3 deletions src/Moonglade.Web/Resources/Program.zh-Hant.resx
Original file line number Diff line number Diff line change
Expand Up @@ -643,8 +643,8 @@
<data name="Route Name" xml:space="preserve">
<value>路由名稱</value>
</data>
<data name="RSS Items" xml:space="preserve">
<value>RSS條目數量</value>
<data name="Feed Items" xml:space="preserve">
<value>訂閱條目數量</value>
</data>
<data name="Save" xml:space="preserve">
<value>保存</value>
Expand Down Expand Up @@ -737,7 +737,7 @@
<value>留空自動選取文章前 {0} 字元作為摘要</value>
</data>
<data name="The number of entries to include in RSS feed." xml:space="preserve">
<value>RSS中包含的條目數量</value>
<value>RSS/ATOM 中包含的條目數量</value>
</data>
<data name="Theme" xml:space="preserve">
<value>主題</value>
Expand Down

0 comments on commit 92b31e2

Please sign in to comment.