feat(Documentation): Make code documentation readable for non-Chinese readers #7513
-
|
In order to engage more developers around the globe for this great toolkit it would be helpful to make the code documentation also available in English. Hereby I assume that non-Chinese speaking devs have a hard time to read the xml documentation tags (at least I do). I propose a bi-lingual solution with multiple paragraphs. See the example below: /// <summary>
/// <para lang="zh">ContextMenuItem 类</para>
/// <para lang="en">A type for items in a context menu.</para>
/// </summary>
public class ContextMenuItem : ComponentBase, IContextMenuItem, IDisposable
{
/// <summary>
/// <para lang="zh">获得/设置 显示文本</para>
/// <para lang="en">The text to display.</para>
/// </summary>
[Parameter]
public string? Text { get; set; }
/// <summary>
/// <para lang="zh">获得/设置 图标</para>
/// <para lang="en">The CSS class name that represents an icon (if any)</para>
/// </summary>
/// <example>
/// Icon="fa-solid fa-bookmark"
/// </example>
[Parameter]
public string? Icon { get; set; }
/// <summary>
/// <para lang="zh">获得/设置 是否被禁用 默认 false 优先级低于 <see cref="OnDisabledCallback"/></para>
/// <para lang="en">Flags whether this menu item is disabled. Default <lang word="false"/>. Priority is lower than <see cref="OnDisabledCallback"/>.</para>
/// </summary>
[Parameter]
public bool Disabled { get; set; }
// ... Other propertiesWhat do you think? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
@peereflits This is definitely a great suggestion; we can use AI tools to improve our existing component parameter annotation work. |
Beta Was this translation helpful? Give feedback.
-
|
linked #7530 |
Beta Was this translation helpful? Give feedback.
linked #7530