Dialog editor destroys language resource strings

I created a script dialog in base language "deutsch" with the dialog editor. I then created a new language overlay "english, copy of deutsch", translated the strings (static, group, edit, checkbox and combo-box(edit) controls) and saved it. Going back to the main editor window, the deutsch-dialog shows up completely or partly in english. The language strings were also mixed-up in the english version when testing the resulting dialogs. Looking into the Resource-xml (part of the script) several language strings were not or not correctly written. I had to manually repair the lines to get the dialog language versions working correctly because it's not possible to get the editor save the language overlay without destroying the resource. This happens every time I use the language overlay part of the dialog editor.

This reminds me of a similar issue I had several years ago, perhaps the similar situation happened again so maybe this Leo's conclusion may be helpful to GPsoft again: String resources data loss - #5 by Leo

1 Like

Doesn't seem to be the same as the old bug. So far I can't reproduce the problem either.

Kundal, what does your resource XML look like?

Actually, don't worry, I think I see the problem in the code. We'll make a change for the next beta. Please let us know if there's still a problem after that.

As a workaround until the new beta:

  • When creating a new dialog, set the dialog's base language property to the language you define everything in first (e.g. "deutsch").

  • For existing dialogs, make sure their lang="..." attribute is set to the proper base language. It may be blank, or "english", incorrectly.

The fix in v13.0.50 doesn't work here. After a simple change (add an entry to a combo box) and save in the language overlay the german language (default language of the dialog) is completely gone. All "<control.../>" lines are english only.

Before the fatal edit, the working version:

	<resource name="Main_Dialog" type="dialog">
		<dialog fontsize="10" height="159" lang="deutsch" standard_buttons="ok,cancel" width="360">
			<languages>
				<language height="159" lang="english" width="360" />
			</languages>
			<control halign="left" height="11" name="static_name" title="Name des Iconsets" type="static" valign="center" width="61" x="34" y="20">
				<languages>
					<language height="11" lang="english" title="Iconset name" width="61" x="34" y="20" />
				</languages>

After:

	<resource name="Main_Dialog" type="dialog">
		<dialog fontsize="10" height="159" lang="deutsch" standard_buttons="ok,cancel" width="360">
			<languages>
				<language height="159" lang="english" width="360" />
			</languages>
			<control halign="left" height="11" name="static_name" title="Iconset name" type="static" valign="center" width="61" x="34" y="20" />

I can't reproduce that here, would you be able to give more detailed instructions?

The XML you pasted above also seems to be incomplete, perhaps if you provide the full XML we'll be able to reproduce it.

Here's the complete Resources-part of the script, working and destroyed versions. In the working code all english strings for controls are enclosed by "languages"-nodes. After saving the script with the editor all default (german) strings and "languages"-nodes were deleted (accept the first one I already provided). Only the english strings were saved.
Resources.zip (3.7 KB)

I've sent the complete script via mail to greg@gpsoft.com.au because I don't want to publish it here at the moment.

Thanks for that, this should be fixed in the next beta.

1 Like

On a quick test it seems to work now as it should. Thanks for fixing that.

3 Likes