Skip to content

Commit

Permalink
feat(Disqus): localization texts
Browse files Browse the repository at this point in the history
  • Loading branch information
bkapustik committed Apr 10, 2024
1 parent c580a4f commit 184c37b
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@ public class DisqusWidgetProperties : IWidgetProperties
/// <summary>
/// The CSS class(es) added to the Disqus widget's containing DIV.
/// </summary>
[TextInputComponent(Label = "{$DisqusResources.Admin_Disqus_Properties_CssClass_Label$}", ExplanationText = "{$DisqusResources.Admin_Disqus_Properties_CssClass_ExplanationText$}")]
[TextInputComponent(Label = "{$admin.disqus.properties.cssClass.label$}", ExplanationText = "{$admin.disqus.properties.cssClass.explanationText$}")]
public string? CssClass { get; set; } = "disqus-thread";


/// <summary>
/// An unique string identifying the current page. If empty, it will be generated based on the page's WebPageItemID.
/// </summary>
[TextInputComponent(Label = "{$DisqusResources.Admin_Disqus_Properties_PageIdentifier_Label$}", ExplanationText = "{$DisqusResources.Admin_Disqus_Properties_PageIdentifier_ExplanationText$}")]
[TextInputComponent(Label = "{$admin.disqus.properties.pageIdentifier.label$}", ExplanationText = "{$admin.disqus.properties.pageIdentifier.explanationText$}")]
public string? PageIdentifier { get; set; }


/// <summary>
/// A custom title for the created Disqus thread.
/// </summary>
[TextInputComponent(Label = "{$DisqusResources.Admin_Disqus_Properties_Title_Label$}", ExplanationText = "{$DisqusResources.Admin_Disqus_Properties_Title_ExplanationText$}")]
[TextInputComponent(Label = "{$admin.disqus.properties.title.label$}", ExplanationText = "{$admin.disqus.properties.title.explanationText$}")]
public string? Title { get; set; }


/// <summary>
/// Option to use disqus comment counts.
/// </summary>
[CheckBoxComponent(Label = "{$DisqusResources.Admin_Disqus_Properties_DisplayCommentCount_Label$}", ExplanationText = "{$DisqusResources.Admin_Disqus_Properties_DisplayCommentCount_ExplanationText$}")]
[CheckBoxComponent(Label = "{$admin.disqus.properties.displayCommentCount.label$}", ExplanationText = "{$admin.disqus.properties.displayCommentCount.explanationText$}")]
public bool DisplayCommentCount { get; set; }
}
8 changes: 8 additions & 0 deletions src/Kentico.Xperience.Disqus/Kentico.Xperience.Disqus.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
<InternalsVisibleTo Include="$(AssemblyName).Tests" />
</ItemGroup>

<ItemGroup>
<Compile Update="Resources\DisqusResources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>DisqusResources.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<Content Update="Components\Widgets\DisqusWidget\_DisqusWidget.cshtml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
135 changes: 135 additions & 0 deletions src/Kentico.Xperience.Disqus/Resources/DisqusResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Kentico.Xperience.Disqus/Resources/DisqusResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Kentico.Xperience.Disqus.Resources
{
internal class DisqusResources
internal partial class DisqusResources
{
}
}
16 changes: 8 additions & 8 deletions src/Kentico.Xperience.Disqus/Resources/DisqusResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,28 +117,28 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Admin.Disqus.Properties.CssClass.ExplanationText" xml:space="preserve">
<data name="admin.disqus.properties.cssclass.explanationText" xml:space="preserve">
<value>Enter any number of CSS classes to apply to the Disqus thread, e.g. 'comments blue'</value>
</data>
<data name="Admin.Disqus.Properties.CssClass.Label" xml:space="preserve">
<data name="admin.disqus.properties.cssclass.label" xml:space="preserve">
<value>Css classes</value>
</data>
<data name="Admin.Disqus.Properties.DisplayCommentCount.ExplanationText" xml:space="preserve">
<data name="admin.disqus.properties.displayCommentCount.explanationText" xml:space="preserve">
<value>Choose whether you want to add Disqus comment counts. You will need to add '#disqus_thread' to your article URLs. See Disqus documentation for this.</value>
</data>
<data name="Admin.Disqus.Properties.DisplayCommentCount.Label" xml:space="preserve">
<data name="admin.disqus.properties.displayCommentCount.label" xml:space="preserve">
<value>Display disqus comment count</value>
</data>
<data name="Admin.Disqus.Properties.PageIdentifier.ExplanationText" xml:space="preserve">
<data name="admin.disqus.properties.pageIdentifier.explanationText" xml:space="preserve">
<value>An unique string identifying the current page. If empty, it will be generated based on the page's WebPageItemID.</value>
</data>
<data name="Admin.Disqus.Properties.PageIdentifier.Label" xml:space="preserve">
<data name="admin.disqus.properties.pageIdentifier.label" xml:space="preserve">
<value>Disqus page identifier</value>
</data>
<data name="Admin.Disqus.Properties.Title.ExplanationText" xml:space="preserve">
<data name="admin.disqus.properties.title.explanationText" xml:space="preserve">
<value>A custom title for the created Disqus thread.</value>
</data>
<data name="Admin.Disqus.Properties.Title.Label" xml:space="preserve">
<data name="admin.disqus.properties.title.label" xml:space="preserve">
<value>Disqus title</value>
</data>
</root>

0 comments on commit 184c37b

Please sign in to comment.