I've generated pseudo-localized versions of an app's resource files (for example Order Summary and Payment is localized as [[[[[Òŕd̂ër̊ S̀úm̂m̈år̀ý ân̈d̊ P̀áŷm̈e̊ǹt́]]]]]) so that we can test for localizability bugs ahead of getting actual translations.
I have named them using the qps-ploc resource identifier to match the existing pseudo-locale identifier, e.g. my pseudo-localized version of Details.resx is named Details.qps-ploc.resx.
However when I add these resx files to the project, Visual Studio ignores them. If I rename them using a "real" language code (such as Details.fr-FR.resx) then Visual Studio does create a subfolder named with this language code and builds the satellite assembly.
So it looks to me like Visual Studio rejects qps-ploc (without even a build warning). Am I missing something or can anyone suggest a way to get these qps-ploc resources built as part of my Visual Studio project?
The qps- locales work fine in my ASP.NET web application with .resx files (not compiled resource dll), however, I did find this MS article on enabling pseudo locales in the registry. Perhaps it will help.
Using Pseudo-Locales for Localization Testing
Additionally, you may wish to create custom locales, as given in this MS article:
How to: Create Custom Cultures
Best regards.
Related
I am using Visual Studio 2012 to create a class library project that will also include a number of TypeScript (.ts) files, as well as their generated .js and .js.map files. All of these files need to be included in the assembly as embedded resources, so that they can be exposed to a consuming ASP.NET MVC application via a custom VirtualPathProvider.
Note: although only the generated JavaScript files are essential for the production environment, the .ts and .js.map files must also be accessible to the web application, for debugging.
This presents a conflict, since TypeScript files are usually assigned the TypeScriptCompile build action but I also need them to be assigned EmbeddedResource.
Is there any way to assign multiple build actions to a VisualStudio project component? Alternatively, is there another way to get TypeScript to compile files that are not explicitly marked as TypeScriptCompile or to get Visual Studio to embed files that are not marked as EmbeddedResource?
Thanks for your suggestions,
Tim
If you had a TypeScript file that referenced all of the others, only it would need to have the TypeScriptCompile type as the compiler should walk all the dependencies and compile all the rest too.
So creating a file that acts as the compilation target and that references all of your other files might allow you to change all the rest to EmbeddedResource.
I can't figure out why some activities in the WF designer do not expand.
Looking at the sample documentation for the WizardActivityPack activities:
But when I try to open the same file in Visual Studio 2010's WF designer:
If I look at the file using the XML editor I can see all the activities are in the file, but the designer only shows me the one box and I cannot click into or expand it.
You have to place the *.design.dll somewhere that visual studio can find it. Like in the %programfiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies.
VS looks for designers by convention; if the activities are in an assembly called Activity.dll, VS looks for its design classes in an assembly called Activity.Design.dll under VS' codebase (and subdirectories) or (I believe) in the GAC.
This fact is important to know when creating your own activities/designers! The reason behind this is so that your Activity assembly doesn't need to reference the Designers dll; you can deliver the Activity assembly by itself to production while leaving the Designers dll on the design machine.
(If you reference the *.Design.dll from your Activities assembly, or if they exist in the same assembly, this doesn't apply. The recommended pattern is to separate the two and allow VS to load them via convention. For an example of this, see this sample.)
add this line
new DesignerMetadata().Register();
to WPF presentation
I am new to Visual Studio Extensibility and want to make an addin/extension which shall do the following:
It should read all the files with a specific file extension (assume "*.ump").
It should process the text/code/whatever in the files.
It should create new Class/Code file with some code in it. [The code will be produced in step 2, just need to know how to do it?]
Yet, I have been racking my brains through extensibility, saw the single file generators .... and addins which go through ProjectItems and can detect the file extension,
BUT I HAVE NOT BEEN ABLE TO FIND a complete tutorial, guide or explanation as to how or what to do!!
Please help...
You don't want to read all files with a specific file extension in Visual C++ project nor standard Visual C# project. You may do that with hand-made MSBuild project (included in the solution).
In Visual C++ projects, there is a way to define custom tools. They are run as separate processes, so you can implement them in anything you want. Studio will ask you whether you want to define a tool (they are defined in special xml files; studio has dialog for editing them) when you add a file with extension unknown to it. In Visual C# projects, just manually write a MSBuild tasks and insert them into the project.
Do whatever you want. IIRC the generated files will have to be included in the project though. Well, for MSBuild, just tweak the project to your heart's desire, but in Visual C++ they have to.
You can combine MSBuild (csproj,vbproj) and VisualC++ projects in a single solution, so I recommend using separate.
If you ever find out you need to compile for different target where you can't use Visual Studio, you'll be glad that you have stand-alone tool you were just calling from Studio and not something that embeds in it.
I have a certain project that has a resource directory with a .resx for each language supported in the product.
Right now I am adding these strings by hand using the visual studio 2010 IDE, but because there are a large number of strings, this manual management of these resources can get tricky, and something can easily get omitted in perhaps just 1 .resx file.
Do you get a good resource addon for visual studio 2010, that will allow you to sync and validate a group of resx files? The built in functionality for handling resx seems the same as it was in 2008, and requires a lot of manual effort.
I guess what would be nice would be to have the ability to define all resources in the main language, then have these strings carried across to the remaining languages automatically.
Does such functionality exist? Even a good codeplex project perhaps?
For those of you guys with the same problem I found this - http://zetaresourceeditor.codeplex.com/, seems very good.
Visual Localizer is free, supports snychronization of resource files (among other things) and works in Visual Studio 2010 (also in 2008 and 2012).
I've updated my default templates in Visual Studio for classes, interfaces, code files, etc. I removed the default namespaces and added a copyright header blurb.
Is there a way to use a variable or something in the template so I don't have to zip/unzip and re-run the vs installer to change the copyright header? (I'm a consultant, the code-owner isn't always me or my company).
Yes, you can. The documentation for this sort of thing is part of the Visual Studio SDK. There are already many variables you can use.
If you find you want to get fancy, look into the Guidance Automation Toolkit. A template using GAT can accept user input as well as information from the project and environment, can unfold one or more templates, filling in placeholders with the data gathered, and then can execute various actions against the unfolded templates, the project, or whatever.
You can get the complete example implemented here: Multi-Project Templates with Wizard: Visual Studio 2010 Sample