Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zadigus opened this issue Dec 17, 2020 · 0 comments
Open

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

zadigus opened this issue Dec 17, 2020 · 0 comments

Comments

@zadigus
Copy link

zadigus commented Dec 17, 2020

I have defined an options class like this:

public class FileOptions
{
    public FileOptions(IEnumerable<string> fileCouples)
    {
        this.FileCouples = fileCouples;
    }

    [Value(
       0,
        Min = 1,
        Max = 2,
        MetaName = "FileCoupleHelpName",
        HelpText = "FileCoupleHelpText",
        ResourceType = typeof(Resources))]
    public IEnumerable<string> FileCouples { get; }
}

It is written here 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?

hadiljr pushed a commit to hadiljr/commandline that referenced this issue Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant