commandlineparser / commandlineparser/commandline

Value.HelpText can be localized, but not Value.MetaName?

オープン
#728 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
4.8k
フォーク
478
PR マージ指標
30日以内にマージされた PR はありません

説明

I have defined an options class like this:
```cs
public class FileOptions
{
public FileOptions(IEnumerable fileCouples)
{
this.FileCouples = fileCouples;
}

[Value(
0,
Min = 1,
Max = 2,
MetaName = "FileCoupleHelpName",
HelpText = "FileCoupleHelpText",
ResourceType = typeof(Resources))]
public IEnumerable FileCouples { get; }
}
```
It is written [here](https://github.com/commandlineparser/commandline/wiki/Help-Localization) that the `HelpText` can be localized when we specify the `ResourceType` and give `HelpText` the name of the string in the Resources file. While that works for the `HelpText`, it doesn't for the `MetaName`, which is a bit unfortunate in my opinion. Indeed, the help generated with the above options class gets its help text translated, but not the meta name, which also appears in the help.

Is there a way to make it happen?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。