turquoiseowl / i18n

Smart internationalization for ASP.NET
Other
556 stars 155 forks source link

Exclude directories from POT generation (i18n.DirectoriesToSkip) #221

Closed krisztianb closed 9 years ago

krisztianb commented 9 years ago

Hi there. It's been a longer time since I showed up here. It's nice to see how the project has evolved. Good job. We are still using this module for several of our web applications and it does a great job. I updated to the latest version.

My question: Is there a way to exclude directories from POT generation?

Our web.config currently has the following entries for this:

<add key="i18n.DirectoriesToScan" value="." />
<add key="i18n.WhiteList" value="*.cs;*.cshtml;*.aspx;*.ascx;*.html;*.js" />

I would like the POT generator to look for all subfolders (there are a lot of them), but not a specific one (.\js\kendo) that includes kendo UI JavaScript files which unfortunately contain the [[[ and ]]] markings.

I can't find such an option in the docs.

Something like this would be nice:

<add key="i18n.DirectoriesToSkip" value=".\js\kendo|.\js\angular" />

I would suggest using pipes to seperate the entries, since that char is not allowed in file or folder names across the OSs I know. What do you think?

krisztianb commented 9 years ago

Nevermind. I look at the code and this is already possible using:

<add key="i18n.BlackList" value=".\js\kendo;.\js\angular" />

Maybe you can add it to the doc page. :-)

turquoiseowl commented 9 years ago

Thanks for the pointer. I've updated the readme.

I'm pleased to hear the library is working for you.