Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Hiya. I'm getting the following when trying to localize a label control. I have embedded the exported XML files for the message store, but still looks like the key is being searched into the database. Before embedding, I've tried to deploy it via DDT, and the same was happening. a LocalizationKeyNotFoundException The specified key [teste1] was not found within the localization database. KeyNotFoundException The message key [teste1] could not be found in the localization data. Source : MicroFour StrataFrame Base Stack Trace: at MicroFour.StrataFrame.UI.Localization.ThrowKeyNotFoundException(String Key) at MicroFour.StrataFrame.UI.Localization.GetKeyRowFromXml(String Key) at MicroFour.StrataFrame.UI.Localization.RetrieveTextValue(String TextValueKey) at MicroFour.StrataFrame.UI.Localization.SetLocalizationOnControl(ILocalizable ControlToSet) at MicroFour.StrataFrame.UI.Windows.Forms.Label.InitializeObject() at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.InitializeFormLoadObjects() at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WmShowWindow(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) Thanks for any help.
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Is there a size limit for the path ? MicroFour.StrataFrame.UI.Localization.RegisterEmbeddedXmlFile(Reflection.Assembly.GetExecutingAssembly(), "C:\ProFilme.NET\ClientDotNET\ProFilmeNETSolution\ProFilmeNET\Localization Files\Message_Languages.xml")MicroFour.StrataFrame.UI.Localization.RegisterEmbeddedXmlFile(Reflection.Assembly.GetExecutingAssembly(), "C:\ProFilme.NET\ClientDotNET\ProFilmeNETSolution\ProFilmeNET\Localization Files\Messages_1046.xml")
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
Oh...this is your problem here...it is expecting the internal path to the XML files... how it is referenced within the assembly. This command should give you an array with all of your resource names as they appear within the assembly: Reflection.Assembly.GetExecutingAssembly.GetManifestResourceNames() Find the name of your localization files in there and then replace your paths.
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
 Sorry for the trouble Trent. I thought it was the address. Now it worked fine! But only the labels. I'm trying to send a localized message for deletion, for example. So I created a message key in the Common Repository and set the AutoDeleteMessageKey to it. This one isn't showing up.
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
Is it not in the XML file that was created? If not, I will have to take a look at the common repository. You do have your project including the repository...correct? 
Please let me know if the repository items are not showing up and I will get it fixed for you
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
No, it is there, I open the .XML file and the message is there.
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
So did you set the message to use on the form? You have to set the AutoDeleteMessageKey on the SF form...which from the sounds of it, you have already done....correct? To check and see if it is still using the AutoDeleteTitle property instead of the key, change the AutoDeleteTitle property to "Testing" ... you should never see testing....it should show the AutoDeleteMessageKey message.
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
So did you set the message to use on the form? You have to set the AutoDeleteMessageKey on the SF form...which from the sounds of it, you have already done....correct? Correct. To check and see if it is still using the AutoDeleteTitle property instead of the key, change the AutoDeleteTitle property to "Testing" ... you should never see testing....it should show the AutoDeleteMessageKey message. Did it. It shows "Testing".
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
OK....I will have to look into this then. Thanks for the info.
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Thank you, Trent. And don't worry, we know it's Ben's fault.
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
 Well at least you guys are learning
|
|
|
Ivan George Borges
|
|
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
|
Hi Trent. I found out what Ben did ...   I was using a "Message" key, where it should be a "Text Value" key. But one thing I still think is funny, when you have a Common Repository, the XML generated gets a bit mixed up. But I might find another Ben's mistake here ... hauhauhauhauhauhauhauhauhauha
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
Well...it is important that you keep Ben in line...(even though I wrote that editor...he must have gone in and put in a gremlin or two ha ha  ) He'll be back in the office on Monday so I will have to quit blaming him
|
|
|