New CPS 2023 09 13

OpenGD77CPS
VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: New CPS 2023 09 13

Post by VK3KYY » Sat Sep 16, 2023 9:30 am

OK2MOP wrote:
Sat Sep 16, 2023 8:03 am
I am reporting an issue which is not limited to this version but was there at least since first September CPS, if I try to export (existing, or even a newly created empty codeplug) to CSV in Czech Windows, I get following exception:

Code: Select all

System.Collections.Generic.KeyNotFoundException: Daný klíč není ve slovníku k dispozici.
   v System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   v DMR.CSVEML.ExportCSV()
   v DMR.MainForm.tsbtnExportCSV_Click(Object sender, EventArgs e)
   v System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   v System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   v System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   v System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   v System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   v System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   v System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   v System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   v System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   v System.Windows.Forms.Control.WndProc(Message& m)
   v System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   v System.Windows.Forms.ToolStrip.WndProc(Message& m)
   v System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   v System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   v System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   v System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The translation of the exception text would be something like "Given key is not available in the dictionary". Is anybody experiencing the same issues? I do not have English version of Windows available to me right now to check.
I can't replicate the problem even if I change the CPS to Czech language

Does the problem occur if you change the language in the menu in the CPS to English ?

OK2MOP
Posts: 61
Joined: Sat Jun 17, 2023 1:21 pm

Re: New CPS 2023 09 13

Post by OK2MOP » Sat Sep 16, 2023 10:57 am

VK3KYY wrote:
Sat Sep 16, 2023 9:30 am
I can't replicate the problem even if I change the CPS to Czech language

Does the problem occur if you change the language in the menu in the CPS to English ?
Actually, yes and no. I found out if you just change the language when the CPS is running, it does not influence the error. If I close the CPS and start it again, then the problem is influenced. So to summarize:
  • Started with Czech, switched to English in runtime - directory selection window is not displayed, crashes with abovementioned exception
  • Started with English, switched to Czech in runtime or English is kept - OK
  • Switched to English, restarted - OK
I suppose it has something to do with culture info or Czech labels?

Anyway I have only tried to switch the language in runtime first without restart, I will just keep it in English.

VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: New CPS 2023 09 13

Post by VK3KYY » Sat Sep 16, 2023 11:06 am

I found the bug.

Some texts are missing from the czech.xml language file

Code: Select all

			<Item Id="Please_select_a_folder_to_contain_the_.csv_files" Text="Please select a folder to contain the .csv files" />
			<Item Id="Please_select_a_folder_containing_the_.csv_files" Text="Please select a folder containing the .csv files" />
			<Item Id="Are_You_Sure_CSV" Text="Are You sure that you want to import the CSV files? All current data will be replaced." />
at the end of

Code: Select all

<CSVEML Text="CSV Utility">
		<Commons>
			<Item Id="CSVs_Created_in" Text="CSVs Created in" />
			<Item Id="Imported" Text="Imported" />
			<Item Id="Appended" Text="Appended" />
			<Item Id="ERROR:-_Could_not_open" Text="ERROR:- Could not open" />
			<Item Id="May_be_in_use_by_another_program" Text="May be in use by another program" />
			<Item Id="Format_error_in" Text="Format error in"  />
			<Item Id="Not_enough_columns_in_line" Text="Not enough columns in line" />
			<Item Id="Line" Text="Line" />
			<Item Id="is_not_valid_in" Text="is not valid in" />
			<Item Id="and_will_be_skipped" Text="and will be skipped" />
			<Item Id="Contacts" Text="Contacts" />
			<Item Id="TG_Lists" Text="TG Lists" />
			<Item Id="Channels" Text="Channels" />
			<Item Id="Zones" Text="Zones" />
			<Item Id="DTMF_Contacts" Text="DTMF Contacts" />
			<Item Id="Codeplug_contains" Text="Codeplug contains" />
			<Item Id="Codeplug_now_contains" Text="Codeplug now contains" />
			
       		        <Item Id="Please_select_a_folder_to_contain_the_.csv_files" Text="Please select a folder to contain the .csv files" />
			<Item Id="Please_select_a_folder_containing_the_.csv_files" Text="Please select a folder containing the .csv files" />
			<Item Id="Are_You_Sure_CSV" Text="Are You sure that you want to import the CSV files? All current data will be replaced." />
		</Commons>
	</CSVEML>
If you update this part of the czech.xml file in the CPS install location, it will fix this

OK2MOP
Posts: 61
Joined: Sat Jun 17, 2023 1:21 pm

Re: New CPS 2023 09 13

Post by OK2MOP » Sat Sep 16, 2023 2:08 pm

Hello,
I can confirm that the fix works, the strings were already present in the file, but in wrong section (OpenGD77 Support form?)

Thanks!

VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: New CPS 2023 09 13

Post by VK3KYY » Sat Sep 16, 2023 8:37 pm

OK2MOP wrote:
Sat Sep 16, 2023 2:08 pm
Hello,
I can confirm that the fix works, the strings were already present in the file, but in wrong section (OpenGD77 Support form?)

Thanks!
Ok.

About 3 months ago the functionality was moved to the File menu, but somehow for Czech those strings did not get moved or were subsequently deleted. I checked all other languages and they had the strings in the correct location in the file

VK3KYY
Posts: 7590
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: New CPS 2023 09 13

Post by VK3KYY » Sun Sep 17, 2023 12:02 am


Locked