Localizing CmdLet Help?

Coordinator
Nov 15, 2010 at 4:02 PM

Any Powershell experts out there willing to give me a hand? This is in reference to http://nuget.codeplex.com/workitem/375

We've written help for our PowerShell CmdLets and that file is located here: NuPack.Console\PowerShellHost\Scripts\NuGet.VisualStudio.dll-Help.xml

According to this documentation, the layout for localized files is:

<ModulePath>
         \SampleModule
               \<en-US>
                     \about_SampleModule.help.txt
                     \SampleModule.dll-help.xml
                     \SampleNestedModule.dll-help.xml
               \<fr-FR>
                     \about_SampleModule.help.txt
                     \SampleModule.dll-help.xml
                     \SampleNestedModule.dll-help.xml

So I assume that all I need to do is add the following to our current directory structure:

NuPack.Console\PowerShellHost\Scripts\
         \<en-US>
               \NuGet.VisualStudio.dll-Help.xml
         \<fr-FR>
                \NuGet.VisualStudio.dll-Help.xml
         \<es-ES>
                \NuGet.VisualStudio.dll-Help.xml
         \...

Does that make sense?

Nov 16, 2010 at 12:15 AM

Note that what matters is the location of help files inside the VSIX, (or more accurately the extension installation location). The current help file is linked to the NuGet.Tools project. So if you add localized files, you need to also link them to NuGet.Tools.

Coordinator
Nov 16, 2010 at 5:05 AM

Yeah, David and I figured it out. We didn't realize that the help file was a linked file in the NuGet.Tools project. That's where we need to add the loc folders. Out of curiosity, why is the file in the PowershellHost project, but linked to from the NuGet.Tools project and not just in the NuGet.Tools project?

 

Also, why are you answering emails? Aren't you on vacation?! ;)

Nov 16, 2010 at 8:52 AM

I just followed the convention that we already have with the other script files. NuGet.Tools is sort of a deployment project, and it pulls contents from the other projects.

Coordinator
Nov 16, 2010 at 3:47 PM

In this case though, aren't these help files purely deployment files? In other words, does the PowershellHost project make use of that file in any way? Would it work without the VSIX?

 

Nov 17, 2010 at 3:02 AM

The Powershell host project still works without the help files. I just find it more logical to put Powershell-related contents in that project. I don't feel strongly about it though. If you think it's more convenient to put the help files directly in NuGet.Tools, feel free to do so.

Coordinator
Nov 17, 2010 at 3:24 AM

I understand that the host works without the help files. The question is does the host project do anything with the help file in any way? That's what I'm trying to understand. If not, I think it would make sense to just move them into the VSIX project. Especially given we have 9 languages to loc and we'll need to link 9 files rather than just adding them to the right place.

Nov 17, 2010 at 5:05 AM

no, the host project doesn't do anything with the help file.