Forum: Multi-Language Add-In for Visual Studio

Strange class addition with dotnetbar

I know you discussed this earlier in a post but this keeps reoccurring in my VB project. Lots of controls in the project and not all have any text component at all. All are however DotNetbar controls. Generates code in the Designer section on any change to any control in the system. Any ideas. Examples
Me.GroupPanel4.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007
Errors...
Me.GroupPanel4.Style.Class = Global.MyProj.MultiLang_ja._293
Me.GroupPanel4.StyleMouseDown.Class = Global.MyProj.MultiLang_ja._293
Me.GroupPanel4.StyleMouseOver.Class = Global.MyProj.MultiLang_ja._293
VS2008, latest Dotnetbar and ML
I tried the ideas in the post of UnexpectedUseOfResources but no luck. These are null strings but not associated with translations.

Maybe a clue - the class BEFORE the errors are triggered are as follows
Me.GroupPanel4.Style.Class = ""
Me.GroupPanel4.StyleMouseDown.Class = ""
Me.GroupPanel4.StyleMouseOver.Class = ""

Problem work around: Further working with the source. I replaced all of the "Global.MyProj.MultiLang_ja._293" with "" and this cleared the errors. However, even though fixed, any changes made to the form reset all the errors. Naturally since the null string was still present. Therefore I replaced all of the incidences in the frmMyForm.designer.vb of "Global.MyProj.MultiLang_ja._293" with " ". Success - error gone and does note repeat.

Only remaining issue was a call to a web browser control which was a child of one of the dotnetbar group panels. Seems that the web.url cannot take a " " as the url string so I replaced it with a {http: \ \ w w w . x x x . x x x } address (with no spaces). btw - I used the Properties Window to do this. Since this changes in code anyway no issues. All now OK and error does not repeat for this form. I then fixed for other forms in the project with the same issue the same way.

Germany

Hi,

I'm glad that you found a workaround.

This error seems to occur if Visual Studio finds an empty resources string in any global resource file. I thought that this would be limited to resources in the original language, but in your case, it appears to have picked up a Japanese resources. I'm sure that resources _293 in Multilang.ja.resx is an empty string.

I want to make some changes to the Add-In to prevent this kind of error. The simplest change that occurs to me, is to write a single space into any string, which would otherwise be empty.

In addition, I think I should make it harder to select an empty string for translation, or to enter an empty text.

Phil

Germany

Hi,

I have made this trivial change in version 4.7x.0066. Instead of writing an empty string, the Add-In will not write a single space into the files MultiLang.resx and the localized versions of that file.

If you use the latest version and select the command regenerate resources
Image
then there should be no more empty strings in those files.

If my understanding is correct, then Visual Studio will no longer generate the incorrect code.

Phil