ham-radio-software / D-Rats

D-Rats program for D-Star Ham Radios
https://iz2lxi.jimdofree.com/
Other
41 stars 12 forks source link

wb8tyw Italian localization #254

Closed wb8tyw closed 9 months ago

wb8tyw commented 9 months ago

This replaces PR-218.

The LC_ALL environment variable will now set the default Language for D-Rats until a language is set as a configuration option.

Changing the language requires a restart of D-RATS for the names that are in the glade files. Those translations are read in when the glade file is first read in only.

I did not take the time to put a note about that in the configuration panel, that will need to wait until I can give the config subsystem a very badly needed refactoring.

For setting a language, you also need to specify a country.

So now a new python package is needed for all of this to work. It is known as python3-pycountry on Anti-X linux and on Msys2. Other packages may name it differently. If this package is missing should not break existing installations, but changing the locale may end up being ignored.

The setting of the language, will enable a choice of countries for that language based on what UTF-8 locales that are installed on the system.

After this PR is merged in, the translations will need an update for new text that has been added.

maurizioandreotti commented 9 months ago

At first execution , with existing config file, I get this pop-up:

Traceback (most recent call last):

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/mainwindow.py", line 289, in _activate_prefs saved = self._config.show(parent=self._window) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 2838, in show drats_ui = DratsConfigUI(self, parent) ^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 2648, in init self.build_ui()

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 2731, in build_ui prefs = addpanel(DratsPrefsPanel, "prefs", ("Preferences"), None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 2709, in add_panel panel = c_arg(self.config, *args) ^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 1283, in init country_list = get_countries(my_language) ^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 1265, in get_countries return drats_languages[language_code]['countries']



KeyError: 'en'
maurizioandreotti commented 9 months ago

after installing pycountry package, when i go into preferences, I get this error (and there is no way to edit preferences as the pop-up is not showing up):

Traceback (most recent call last):

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/mainwindow.py", line 289, in _activate_prefs saved = self._config.show(parent=self._window) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 2838, in show drats_ui = DratsConfigUI(self, parent) ^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 2648, in init self.build_ui()

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 2731, in build_ui prefs = addpanel(DratsPrefsPanel, "prefs", ("Preferences"), None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 2709, in add_panel panel = c_arg(self.config, *args) ^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 1283, in init country_list = get_countries(my_language) ^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 1265, in get_countries return drats_languages[language_code]['countries']



KeyError: 'it'
wb8tyw commented 9 months ago

For diagnostics issue commands:

locale -a
find /etc -name 'en_US*'
# and your local language, example:
find /etc -name 'en_IT*'

For a locale to be used, it needs to show up in the "locale -a" command with a ".utf8" extension.

The default locale that is installed on a system is selected when the operating system is installed, and installing additional locales is operating system specific.

I will be pushing a fix to stop the crash.

maurizioandreotti commented 9 months ago

so with locale -a |grep "IT" I see:

it_IT

it_IT.UTF-8

it_IT.ISO8859-1

it_IT.ISO8859-15

But with the finds you suggest it doesn't find anything (i am on the mac)

Other test, if of any help:

Il giorno dom 8 ott 2023 alle ore 14:49 John E. Malmberg < @.***> ha scritto:

For diagnostics issue commands:

locale -a find /etc -name 'en_US'# and your local language, example: find /etc -name 'en_IT'

For a locale to be used, it needs to show up in the "locale -a" command with a ".utf8" extension.

The default locale that is installed on a system is selected when the operating system is installed, and installing additional locales is operating system specific.

I will be pushing a fix to stop the crash.

— Reply to this email directly, view it on GitHub https://github.com/ham-radio-software/D-Rats/pull/254#issuecomment-1752020298, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2W7OU35A6ATYARTJTSM4LX6KOMHAVCNFSM6AAAAAA5XG2X2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGAZDAMRZHA . You are receiving this because you commented.Message ID: @.***>

wb8tyw commented 9 months ago

The internationalization_test.py has some of the new d-rats code in that may help with diagnosing locale code.

wb8tyw commented 9 months ago

Feature creep. It turns out that the D-Rats XON/XOFF handling had a serious data loss bug, and the fastest solution was to simply disable the buggy code and use the Serial Driver XON/XOFF handling instead. This was not a python3 conversion bug and is present in the 0.3 code.

No idea why the serial driver XON/XOFF handling was specifically disabled previously, so maybe this will not fully solve things.

This may explain many of the reports of issues with d-rats transfers over the radio in the mailing list.

maurizioandreotti commented 9 months ago

Test on Mac (Sonoma Os): I can now open D-rats and get to the config, but In the config window I cannnot select anything different from United States as Country and English as language. i.e. the combo boxes only have that option.

If I open it with another D-Rats version and force language to italian, and then exit and open PR, I see Italian and United States.

If I edit the config and put language = Italian and country = Italy I see in the console: 10/08/2023 19:13:56:INFO:MainApp:_refresh_lang: Setting language to: Italian 10/08/2023 19:13:56:INFO:MainApp:_refresh_lang: OS Locale set to: it_IT.UTF-8

but the UI was still in english until I moved the .mo file into a folder named "it_IT.UTF-8" instead of only IT.

maurizioandreotti commented 9 months ago

Now that I have D-Rats UI in italia, If I now open the config, I get this error message:

Traceback (most recent call last):

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/mainwindow.py", line 289, in _activate_prefs saved = self._config.show(parent=self._window) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 2843, in show drats_ui = DratsConfigUI(self, parent) ^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 2653, in init self.build_ui()

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 2736, in build_ui prefs = addpanel(DratsPrefsPanel, "prefs", ("Preferences"), None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 2714, in add_panel panel = c_arg(self.config, *args) ^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/maurizio/Virtualenvs/d-rats4/D-Rats-PR/d_rats/config.py", line 1224, in init language_name = language.name ^^^^^^^^^^^^^

AttributeError: 'NoneType' object has no attribute 'name'

wb8tyw commented 9 months ago

The environment variable "export LC_ALL=it_IT.UTF-8" is the first thing to try if the desired options are not available in the configuration menu. We will need make that prominent in the announcement of the next release.

If no options are in the configuration file, the LC_ALL environment variable will be used.

if the pycountry package is not installed, the configuration options will attempt to work, but will likely not do anything useful, and will leave D-Rats using the default locale for the system.

To reduce end user issues, I chose to make pycountry optional in that it missing, it would not stop D-Rats from running, but with it missing the config option is going to be more limited.

Only the pycountry package knows how to convert the language names and country names to the two character codes that are needed for D-Rats to change the locale. With out that information the config code attempts to fall back to using the two character codes from the default locale.

D-Rats also needs the output of "locale -a" in order to find out that two letter codes for countries and languages are available for config to set. D-Rats will not allow the configuration of any locale that is not in the output of 'locale -a".

Manually editing the config file, other than removing the current values for Country and Language is not likely to work. The config code know how to sanity check the data that it has, and a manual edit will not go through those checks.

Moving the mo file is not a viable solution, and I am surprised that it worked. If that is needed for a platform, we will need to look at how to setup symbolic links post install.

On my system there is only one country option for the Italian language. For German, there are 4 country options. For Dutch, there are 2 country options. For English, there are 6 country options For Spanish, there are 12 country options.

I will push a fix avoid a crash that you saw at line current config.py line 1224. It was caused by pycountry not being able to lookup the two letter country code in its database.

Once that is pushed: "export LC_ALL=it_IT.UTF-8" will be the locale used until configuration menu is opened and saved. If the configuration file is edited, with values that can not be validated by pycountry and "locale -a", all bets are off on what will result. Best thing to do for fallback is to have those values missing from the file, then the configuration program will use the 2 letter codes from LC_ALL and save those.

wb8tyw commented 9 months ago

For now, the config language selection will only work if all the lookups work, otherwise the LC_ALL enironment variable can be tried.

The entire config.py module needs a major refactor and re-write, and I started on that over a month ago, but that work is now worthless because of higher priority fixes made changes to the config environment.

One the config.py module is refactor, we can put in a country and language selection dialog with explanations of the limitations and work arounds.

wb8tyw commented 9 months ago

Ah, locale -a on the mac has a different output than on Linux Why did they do that?

wb8tyw commented 9 months ago

Unfortunately the "locale -a" is the only command that we have that will list the locales installed on a system. Latest push has a fix that will work with the reported Mac OS.

maurizioandreotti commented 9 months ago

so... it is almost there.

I removed the additional folder IT_utf8 and now it starts without errors, i can see the combo boxes correctly populated with italian as language and then italy and switzerland as country -- btw, fyi, this last country has 4 official languages: italian, french, german and ladino

now i got it working but,.... if I run the PR I did (on the right) in the menu I get some more translations vs the one you did (on the left)....

image
wb8tyw commented 9 months ago

Your original PR hardcoded the languages that you provided the translation for.

My PR looks up the languages and countries that locale -a displays with UTF-8 encoding and only provides the languages that there is a language code match in the locale -a list.

So if a language or country is missing, we need to see if it is the locale -a list. It may be an additional package that needs to be installed to provide it.

pycountry is used to translate the language codes and country codes into the actual names. If pycountry is not installed, configure defaults to using the 2 letter codes from locale -a

Note when testing a PR, you need to run the build_pot.sh after switching to that branch to make sure that the mo files are properly generated. Anything that is in the glade file will not get translated until a restart of d-rats.

ka5mye commented 9 months ago

I am using an M1 chip MacBook Pro, running Ventura, and python 3.11.

First I installed and switched to the wb8tyw_italian_localazation branch. Next, I did: conda install pycountry. Then I ran the build_pot.sh program that gave a fair amount of screen output. (I have that in a text file if needed).

Running: python internationalization_test.py gave the following: INFO:language test:defaults language code: e, encoding: n, language None INFO:language test:Language found Italian INFO:language test:Language found Dutch INFO:language test:Language found German INFO:language test:Language found Spanish INFO:language test:Language found English Ciao mondo WARNING:language test:DEFAULT_NOT_IMPL: Valori di default non implementati! INFO:language test:UNIT_TEST1: UNIT TEST in corso.

Then started D-Rats, which started normally. Went to Preferences and in the language box the down arrowed showed the languages above. The country box arrow worked as well. Selected Italian and saved, and the Italian language was being used in D-Rats. Returned to English with no problems.

I can approve this if there are no other things to test. Just let me know.

73,

Rod


Rodney Whitaker KA5MYE @.***

On Oct 8, 2023, at 6:02 PM, John E. Malmberg @.***> wrote:

Your original PR hardcoded the languages that you provided the translation for.

My PR looks up the languages and countries that locale -a displays with UTF-8 encoding and only provides the languages that there is a language code match in the locale -a list.

So if a language or country is missing, we need to see if it is the locale -a list. It may be an additional package that needs to be installed to provide it.

pycountry is used to translate the language codes and country codes into the actual names. If pycountry is not installed, configure defaults to using the 2 letter codes from locale -a

Note when testing a PR, you need to run the build_pot.sh after switching to that branch to make sure that the mo files are properly generated. Anything that is in the glade file will not get translated until a restart of d-rats.

— Reply to this email directly, view it on GitHub https://github.com/ham-radio-software/D-Rats/pull/254#issuecomment-1752198811, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYQ2LJIEGT5HM2LQT6KBY4DX6M5IHAVCNFSM6AAAAAA5XG2X2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGE4TQOBRGE. You are receiving this because your review was requested.

maurizioandreotti commented 9 months ago

Thanks John. I saw what you did, both loading the locale and the script to generete the .mo files. I used that, and its great. What i was concentrating was about the fact that some labels in the menu were not being loaded from the mo files.

I haven't hardcoded the translations in the code, what I tried forcing the re-load of the value from the .mo file as they were not properly applied. (and I did that after spending some time to understand why they were not - unsuccessfully)

The .mo file of your PR already contains the values to use, this below was my original code, the labels were these. I just reapplied the function "underscore" (which was already defined in the code to perform the gettext) to reload them from the .mo file e.g. (_("Tools")) should be shown as "Strumenti"

I don't think that the issue is in the values of the translations for these labels, as there is no special char or anything, and I wasn't able to see any difference for these labels in the glade file as the "translatable" attribute is there for these as for the other labels. But maybe I missed something.

    # Reapply gettect configuration to have UI labels translated
    gettext.bindtextdomain('D-RATS', "locale")
    gettext.textdomain('D-RATS')
    _ = gettext.gettext

    self._application = application
    self._window = self._wtree.get_object("mainwindow")

    # Retrieve other translatable objects and set their text
    self.logger.info(" Forcing UI labels translation:")

    label_from_builder = wtree.get_object("mnu_tools")
    label_from_builder.set_label(_("Tools"))
    label_from_builder = wtree.get_object("main_menu_importmsg")
    label_from_builder.set_label(_("Import Message"))
    label_from_builder = wtree.get_object("main_menu_exportmsg")
    label_from_builder.set_label(_("Export Message"))
    label_from_builder = wtree.get_object("main_menu_msgtemplates")

Il lun 9 ott 2023, 02:02 John E. Malmberg @.***> ha scritto:

Your original PR hardcoded the languages that you provided the translation for.

My PR looks up the languages and countries that locale -a displays with UTF-8 encoding and only provides the languages that there is a language code match in the locale -a list.

So if a language or country is missing, we need to see if it is the locale -a list. It may be an additional package that needs to be installed to provide it.

pycountry is used to translate the language codes and country codes into the actual names. If pycountry is not installed, configure defaults to using the 2 letter codes from locale -a

Note when testing a PR, you need to run the build_pot.sh after switching to that branch to make sure that the mo files are properly generated. Anything that is in the glade file will not get translated until a restart of d-rats.

— Reply to this email directly, view it on GitHub https://github.com/ham-radio-software/D-Rats/pull/254#issuecomment-1752198811, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2W7OUKY44NRHHV7UXW3MLX6M5IHAVCNFSM6AAAAAA5XG2X2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGE4TQOBRGE . You are receiving this because you commented.Message ID: @.***>

maurizioandreotti commented 9 months ago

Just to not be misunderstood: I just want to hightligh that the translation is still shown partially. I guess users can live with this, but still it is something broken. I do not mean that my proposed code is the solution, as a matter of fact it is a workaround for a root cause i wasnt able to sort out.

wb8tyw commented 9 months ago

I will check again.

What I found before is that any text that is in the glade file will not get changed when a language is changed in D-Rats will not get updated until D-Rats is restarted. Re-writing the labels over the glade file is a work around for that, but I think we can live with just having that a case where D-Rats needs to be restarted.

The one exception to that is the Notebook tabs. For some reason they can not be marked as translatable in the glade file, so I did have to change the code to have D-Rats replace them with translated text where those notebook tabs are initialized.

maurizioandreotti commented 9 months ago

On Win10 with Eglish and Italian languages installed MSYS Just installed packages updated ad per $ ./msys2_packages.sh present in PR locales created as per $ ./build_pot.sh

==> configured D-Rats with it/Italy & restarted -->

Some details

image

internationalization_test.py

INFO:language test:defaults language code: e, encoding: n, language None
INFO:language test:Language found German
INFO:language test:Language found English
INFO:language test:Language found Spanish
INFO:language test:Language found Italian
INFO:language test:Language found Dutch
Ciao mondo
WARNING:language test:DEFAULT_NOT_IMPL: Valori di default non implementati!
INFO:language test:UNIT_TEST1: UNIT TEST in corso.

image

in console I see: 10/10/2023 14:42:06:INFO:MainApp:_refresh_lang: Setting language to: Italian 10/10/2023 14:42:06:INFO:MainApp:_refresh_lang: Unable to set OS locale to it_IT.UTF-8

wb8tyw commented 9 months ago

10/10/2023 14:42:06:INFO:MainApp:_refresh_lang: Unable to set OS locale to it_IT.UTF-8

When you see that, the output of "locale -a | grep it" needs to be looked at. The error message is stating that that specific locale is not visible to D-Rats. There may be an additonal Msys2 package that needs to be installed.

D-Rats uses MSYS2 installed locales, not Microsoft Windows installed locales.

maurizioandreotti commented 9 months ago

can it be related to lowercase/uppercase naming? asking as I see this:

mauri@Mao-X240 MINGW64 ~/PRs/PR-254
$ locale -a | grep it
it_CH
it_CH.utf8
it_IT
it_IT.utf8
it_IT@euro
italian
lithuanian

forcing msys2 locale to be It_IT.UT8 with: echo "export LANG=it_IT.UTF-8" > /etc/profile.d/english.sh

and close-restart msys2, I now get a nice system console with Italian language:

$ test-unexisting command
-bash: test-unexisting: comando non trovato

but if I now try to start d-rats, I get:

$ ./d-rats.py
Traceback (most recent call last):
  File "C:/msys64/home/mauri/D-Rats-PR-254/d-rats.py", line 60, in <module>
    spell.get_spell().test()
  File "C:/msys64/home/mauri/D-Rats-PR-254/d_rats/spell.py", line 145, in test
    spell = self.lookup_word("speling")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:/msys64/home/mauri/D-Rats-PR-254/d_rats/spell.py", line 117, in lookup_word
    self.__pipe.stdin.write("%s%s" %(wiq, os.linesep))
OSError: [Errno 22] Invalid argument

while with internationalization_test.py I see:

$ ./internationalization_test.py
INFO:language test:defaults language code: i, encoding: t, language None
INFO:language test:Language found German
INFO:language test:Language found English
INFO:language test:Language found Spanish
INFO:language test:Language found Italian
INFO:language test:Language found Dutch
Ciao mondo
WARNING:language test:DEFAULT_NOT_IMPL: Valori di default non implementati!
INFO:language test:UNIT_TEST1: UNIT TEST in corso.
wb8tyw commented 9 months ago

With latest push, improved the setting of locales / languages, now trying 3 different ways of specifying the locale in hopes one will work.

There are text translations that are missing from the language po files which result in fallbacks to English. What is missed may be different for each language. Those can be fixed in a followup PR.

Some more feature creep: Correctly fixed the repeater logging error. Fixed connection for remote file server from creating a directory in the wrong place that it did not use. Suppressed a windows exception that can occur when looking for serial ports.

KP4AJ commented 9 months ago

Hi John: Maybe my git functionality ignorance but I see this message:

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

https://github.com/ham-radio-software/D-Rats/tree/9bc32c7ac0f10ef6ba6f551e79e4c818a6c1be56

Thanks for your extraordinary work with D-Rats!

Edfel KP4AJ

maurizioandreotti commented 9 months ago

Hi John just tested again on win10 , and I am sorry to say that the UI keeps showing in english regardless of how i configure it D-Rats.

I see a number of messages like: 10/15/2023 18:08:16:INFO:MainApp:set_locale: Unable to set OS locale to it_IT

I report here the full console log:

$ ./d-rats.py
10/15/2023 18:08:15:INFO:D-Rats:main: re-config option found -- Reconfigure D-rats
10/15/2023 18:08:15:INFO:D-Rats:main: args.config = C:/Users/mauri/AppData/Roaming/D-RATS-EV
10/15/2023 18:08:15:INFO:Mainapp:Enabled debug log for Win32 systems
10/15/2023 18:08:15:INFO:QST:FeedParser not available
10/15/2023 18:08:16:INFO:DratsConfig:File C:/Users/mauri/AppData/Roaming/D-RATS-EV/d-rats.config
10/15/2023 18:08:16:INFO:MainApp:_refresh_lang: Setting language to: Italian
10/15/2023 18:08:16:INFO:MainApp:set_locale: Unable to set OS locale to it_IT
10/15/2023 18:08:16:INFO:MainApp:D-RATS v0.4.1.dev45-g9bc32c7-dirty starting at Sun Oct 15 18:08:16 2023 on Platform Win32Platform:
  configuration:       C:/Users/mauri/AppData/Roaming/D-RATS-EV
  system_data: C:/msys64/home/mauri/PRs/PR-254
  OS version: Windows 10 (10, 0, 19045, 2, '')
10/15/2023 18:08:16:INFO:MainApp:load position from config file
10/15/2023 18:08:16:INFO:MainApp:_static_gps: Configuring the Static position: 45.802020,9.430000
10/15/2023 18:08:16:INFO:MainApp:_static_gps: Mapserver not active: False, call: IZ2LXI-W
10/15/2023 18:08:16:INFO:StaticGPSSource:StaticGPSPosition: UNKNOWN reporting 45.8020,9.4300@0 ft at 18:08:16
10/15/2023 18:08:16:INFO:D-Rats:main: reloading app

10/15/2023 18:08:16:INFO:MainApp:_refresh_lang: Setting language to: Italian
10/15/2023 18:08:16:INFO:MainApp:set_locale: Unable to set OS locale to it_IT
10/15/2023 18:08:16:INFO:MainApp:load the main window
10/15/2023 18:08:17:INFO:MainApp:load main window with self config
10/15/2023 18:08:18:INFO:LocalFileV:refresh: Adding local file `C:\Users\mauri\Desktop\D-RATS Shared/d-rats_repeater.service.txt'
10/15/2023 18:08:18:INFO:LocalFileV:refresh: Adding local file `C:\Users\mauri\Desktop\D-RATS Shared/Hello.txt'
10/15/2023 18:08:18:INFO:LocalFileV:refresh: Adding local file `C:\Users\mauri\Desktop\D-RATS Shared/Main.txt'
10/15/2023 18:08:18:INFO:LocalFileV:refresh: Adding local file `C:\Users\mauri\Desktop\D-RATS Shared/one Com two programs.jpg'
10/15/2023 18:08:18:INFO:LocalFileV:refresh: Adding local file `C:\Users\mauri\Desktop\D-RATS Shared/QST-Announce-D-Rats0.3.6.txt'
10/15/2023 18:08:18:INFO:LocalFileV:refresh: Adding local file `C:\Users\mauri\Desktop\D-RATS Shared/QST-Announce-D-Rats0.3.6candidate'
10/15/2023 18:08:18:INFO:LocalFileV:refresh: Adding local file `C:\Users\mauri\Desktop\D-RATS Shared/_Quick set-up.txt'

(d-rats.py:9764): Gtk-WARNING **: 18:08:18.326: Attempting to add a widget with type GtkBox to a GtkMenuItem, but as a GtkBin subclass a GtkMenuIt
em can only contain one widget at a time; it already contains a widget of type GtkAccelLabel
10/15/2023 18:08:18:INFO:DRatsPluginServer:Started serve_forever() thread
10/15/2023 18:08:18:INFO:MessageRouter:_route_via_station: Starting message router thread
10/15/2023 18:08:18:INFO:MainApp:connect main window
10/15/2023 18:08:18:INFO:MainApp:connect tabs
10/15/2023 18:08:18:INFO:MainApp:going online
10/15/2023 18:08:18:INFO:MainApp:create map window object-----
10/15/2023 18:08:18:INFO:MapWindow:init MapWindow
10/15/2023 18:08:18:INFO:MessageRouter:_run_one: Station list was empty
10/15/2023 18:08:18:INFO:emailgw:validate_access:No match found
10/15/2023 18:08:18:INFO:MessageRouter:_route_msg: No route for station maurizio.iz2lxi@gmail.com
10/15/2023 18:08:18:INFO:MessageRouter:_run_one: unlocking message C:/Users/mauri/AppData/Roaming/D-RATS-EV/messages/Outbox/form_07142020_084245.x
ml
10/15/2023 18:08:19:INFO:emailgw:validate_access:No match found
10/15/2023 18:08:19:INFO:MessageRouter:_route_msg: No route for station Fabrizio Ingaglia <fabrizioingaglia@gmail.com>
10/15/2023 18:08:19:INFO:MessageRouter:_run_one: unlocking message C:/Users/mauri/AppData/Roaming/D-RATS-EV/messages/Outbox/form_07142020_085837.x
ml
10/15/2023 18:08:19:INFO:MainApp:create map window object: connect object-----
10/15/2023 18:08:19:INFO:MainApp:query local gps device to see our current position
10/15/2023 18:08:19:INFO:MainApp:invoke config refresh
10/15/2023 18:08:19:INFO:MainApp:Refreshing config...
10/15/2023 18:08:19:INFO:gps:set_units: Set GPS units to Metric
10/15/2023 18:08:19:INFO:MainApp:refresh comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_0
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_1
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_2
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_3
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_4
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_5
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_6
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_7
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_8
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_9
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_10
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_11
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_12
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_13
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_14
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_15
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_16
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_17
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_18
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_19
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_20
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_21
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_22
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_23
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_24
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_25
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_26
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_27
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:start_comms: Starting port ports_27 (USA St. Tammany Parish Ratflector & Maildrop)
10/15/2023 18:08:19:INFO:SocketDataPath:connection to StTammany.ratflector.com 9000
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_28
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_29
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_30
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_31
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_32
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_33
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_34
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_35
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_36
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_37
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:_refresh_comms: Re-Starting ports_38
10/15/2023 18:08:19:INFO:MainApp:Starting Comms
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Ports expected to be already started:
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: USA St. Tammany Parish Ratflector & Maildrop
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Checking all Ports from config:
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_0
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port APRS (on Localhost) not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_1
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port com3 not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_2
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port com4 not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_3
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port EUROPE Netherlands not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_4
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port IC2820 ttyUSB0 not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_5
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port MEXICO not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_6
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port My RAT flector (on localhost) not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_7
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port New Englad not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_8
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port North Carolina ARES not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_9
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port PAULDIN not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_10
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port raspberrypi not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_11
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port RAT not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_12
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port SE WX Net not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_13
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port THAILAND Bangkok not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_14
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA ALABAMA not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_15
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA Alabama Statewide ARES not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_16
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA Central Florida not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_17
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA EL PASO not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_18
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA Federal Way WA not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_19
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA GAARES not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_20
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA Georgia Statewide ARES not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_21
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA Gwinnett Co ARES not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_22
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA NEW MEXICO Albuquerque not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_23
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA Northern Florida not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_24
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA NW GA ARES not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_25
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA Philadelphia Digital Radio Association (PDRA) K3PDR not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_26
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA Spokane Washington Digital Radio Enthusiasts not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_27
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA St. Tammany Parish Ratflector & Maildrop already started!
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_28
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA TENESSEE not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_29
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA Texas - Big Spring not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_30
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA TEXAS (W5AW) not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_31
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA TEXAS El Paso not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_32
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA Utah Salt Lake County not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_33
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port USA WASHINGTON not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_34
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port UTAH not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_35
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port W5SF not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_36
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port WX - n1rcw not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_37
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port WX dcs007 not started
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: portid ports_38
10/15/2023 18:08:19:INFO:MainApp:check_comms_status: Port XLX - wa7dre not started
10/15/2023 18:08:19:INFO:MainApp:_refresh_gps : GPS: False on @4800
10/15/2023 18:08:19:INFO:MainApp:_static_gps: Configuring the Static position: 45.802020,9.430000
10/15/2023 18:08:19:INFO:MainApp:_static_gps: Mapserver not active: False, call: IZ2LXI-W
10/15/2023 18:08:19:INFO:StaticGPSSource:StaticGPSPosition: UNKNOWN reporting 45.8020,9.4300@0 m at 18:08:19
10/15/2023 18:08:19:INFO:MainApp:_refresh_map: reconfigure Mapwindow with new map
10/15/2023 18:08:19:INFO:MainApp:_refresh_map: reconfigured mapurl to: http://tile.thunderforest.com/cycle/
10/15/2023 18:08:19:INFO:MainApp:_refresh_map: reconfigured mapkey to: ?apikey=5a1a4a79354244a38707d83969fd88a1

**10/15/2023 18:08:19:INFO:MainApp:_refresh_lang: Setting language to: Italian
10/15/2023 18:08:19:INFO:MainApp:set_locale: Unable to set OS locale to it_IT**

10/15/2023 18:08:19:INFO:SocketDataPath:getline: Host does not require authentication
10/15/2023 18:08:36:INFO:StationsList:_menu_handler: executing ping all
10/15/2023 18:08:36:INFO:StationsList:_menu_handler: Doing CQCQCQ ping on port USA St. Tammany Parish Ratflector & Maildrop
10/15/2023 18:08:36:INFO:Transporter:send_frames: [NET StTammany.ratflector.com:9000-IZ2LXI-W] Waiting 1.6 sec before transmitting
10/15/2023 18:08:38:INFO:Transporter:send_frames: [NET StTammany.ratflector.com:9000-IZ2LXI-W] Sending warm-up: DDT2-: 0:0:254 !->! (...[8])
10/15/2023 18:08:40:INFO:SessionManager:incoming: Received block 0:2 for session `chat'
10/15/2023 18:08:40:INFO:SessionManager:incoming: Received block 0:5 for session `chat'
10/15/2023 18:08:41:INFO:SessionManager:incoming: Received block 0:2 for session `chat'
10/15/2023 18:08:41:INFO:SessionManager:incoming: Received block 0:5 for session `chat'
10/15/2023 18:08:42:INFO:SessionManager:incoming: Received block 0:2 for session `chat'
10/15/2023 18:08:42:INFO:SessionManager:incoming: Received block 0:5 for session `chat'
10/15/2023 18:08:45:INFO:SessionManager:incoming: Received block 0:2 for session `chat'
10/15/2023 18:08:45:INFO:SessionManager:incoming: Received block 0:5 for session `chat'
maurizioandreotti commented 9 months ago

Still on -Win10 PC, with the same PR, after "ping all the stations" on a ratflector, I see:


(d-rats.py:9764): Gtk-WARNING **: 18:09:32.526: Failed to set text 'Station <b>WX4QZ</b> last seen at <i>6:08:42 PM 10/15/2023</i>
Port: <b>USA St. Tammany Parish Ratflector & Maildrop</b>
Status: <b>Unattended</b> (<i>b'Online (D-RATS)'</i>)' from markup due to error parsing markup: Error on line 2: Entity did not end with a semicol
on; most likely you used an ampersand character without intending to start an entity ÔÇö escape ampersand as &amp;

(d-rats.py:9764): Gtk-WARNING **: 18:09:32.529: Failed to set text 'Station <b>WX4QZ</b> last seen at <i>6:08:42 PM 10/15/2023</i>
Port: <b>USA St. Tammany Parish Ratflector & Maildrop</b>
Status: <b>Unattended</b> (<i>b'Online (D-RATS)'</i>)' from markup due to error parsing markup: Error on line 2: Entity did not end with a semicol
on; most likely you used an ampersand character without intending to start an entity ÔÇö escape ampersand as &amp;

(d-rats.py:9764): Gtk-WARNING **: 18:09:32.536: Failed to set text 'Station <b>WX4QZ</b> last seen at <i>6:08:42 PM 10/15/2023</i>
Port: <b>USA St. Tammany Parish Ratflector & Maildrop</b>
Status: <b>Unattended</b> (<i>b'Online (D-RATS)'</i>)' from markup due to error parsing markup: Error on line 2: Entity did not end with a semicol
on; most likely you used an ampersand character without intending to start an entity ÔÇö escape ampersand as &amp;

(d-rats.py:9764): Gtk-WARNING **: 18:09:36.267: Failed to set text 'Station <b>CT1EBQ</b> last seen at <i>6:08:40 PM 10/15/2023</i>
Port: <b>USA St. Tammany Parish Ratflector & Maildrop</b>
Status: <b>Unattended</b> (<i>b'Online (D-RATS)'</i>)' from markup due to error parsing markup: Error on line 2: Entity did not end with a semicol
on; most likely you used an ampersand character without intending to start an entity ÔÇö escape ampersand as &amp;

(d-rats.py:9764): Gtk-WARNING **: 18:09:36.296: Failed to set text 'Station <b>KE8BZW</b> last seen at <i>6:08:41 PM 10/15/2023</i>
Port: <b>USA St. Tammany Parish Ratflector & Maildrop</b>
Status: <b>Online</b> (<i>b'Online (D-RATS)'</i>)' from markup due to error parsing markup: Error on line 2: Entity did not end with a semicolon;
most likely you used an ampersand character without intending to start an entity ÔÇö escape ampersand as &amp;

(d-rats.py:9764): Gtk-WARNING **: 18:09:36.326: Failed to set text 'Station <b>KG5CEN-1</b> last seen at <i>6:08:45 PM 10/15/2023</i>
Port: <b>USA St. Tammany Parish Ratflector & Maildrop</b>
Status: <b>Unattended</b> (<i>b'Online sttammany.ratflector.com(D-RATS)'</i>)' from markup due to error parsing markup: Error on line 2: Entity di
d not end with a semicolon; most likely you used an ampersand character without intending to start an entity ÔÇö escape ampersand as &amp;

(d-rats.py:9764): Gtk-WARNING **: 18:09:36.337: Failed to set text 'Station <b>KG5CEN-1</b> last seen at <i>6:08:45 PM 10/15/2023</i>
Port: <b>USA St. Tammany Parish Ratflector & Maildrop</b>
Status: <b>Unattended</b> (<i>b'Online sttammany.ratflector.com(D-RATS)'</i>)' from markup due to error parsing markup: Error on line 2: Entity di
d not end with a semicolon; most likely you used an ampersand character without intending to start an entity ÔÇö escape ampersand as &amp;

(d-rats.py:9764): Gtk-WARNING **: 18:09:38.086: Failed to set text 'Station <b>KG5CEN-1</b> last seen at <i>6:08:45 PM 10/15/2023</i>
Port: <b>USA St. Tammany Parish Ratflector & Maildrop</b>
Status: <b>Unattended</b> (<i>b'Online sttammany.ratflector.com(D-RATS)'</i>)' from markup due to error parsing markup: Error on line 2: Entity di
d not end with a semicolon; most likely you used an ampersand character without intending to start an entity ÔÇö escape ampersand as &amp;

which doesnt happen on the same pc with master

wb8tyw commented 9 months ago

I do not know of any code in this PR that could possibly affect how the response to the ping all stations is handled. Those messages are HTML formatting messages.

I can not reproduce this using Anti-X Linux with either the en_US.UTF-8 or it_IT.UTF-8 locale set.

Note that there are envronment variables that are usually not set that can create additional GTK diagnostic messages to show up.

Debugging locales on msys2 or actually any platform: The bash command "locale -a" from the msys2 command prompt is needed to show what locales are possible to set on a system. Piping through grep can reduce the list.

The bash command 'LC_ALL=it_EN.UTF-8' a non-existent locale, should produce an error message. This tells you that the LC_ALL command works.

On my msys2 system, the commands "LC_ALL=it_IT.UTF-8" or LC_ALL=it_IT.utf8 or LC_ALL=it_IT all work.

Each time you pull down an update to the PR, you may need to rebuild the mo files as they are not part of the PR with the build_pot.sh command, or the .mo files will not be there.

Trying to setup to attempt to reproduce this on my Windows 7 msys2 setup, resulted in it triggering a full update of msys2. Still waiting for it to complete, it is taking a very long time.

maurizioandreotti commented 9 months ago

Hi John,

about the unxpected folder related to download, I confirm it doesn't show up anymore.

about the localized UI - I have the same situation on both my win10 PCs. I didn't wrote, but, yes I run the build_po.  (and also did an additional test deleting the PR foder and recreating  from scratch the git and the PR to be absolutely sure to have a clean code.)


$ locale -a |grep it
it_CH
it_CH.utf8
it_IT
it_IT.utf8
it_IT@euro
italian
lithuanian

while internationalization_test shows:


$ ./internationalization_test.py
INFO:language test:defaults language code: e, encoding: n, language None
INFO:language test:Language found German
INFO:language test:Language found English
INFO:language test:Language found Spanish
INFO:language test:Language found Italian
INFO:language test:Language found Dutch
Ciao mondo
WARNING:language test:DEFAULT_NOT_IMPL: Valori di default non implementati!
INFO:language test:UNIT_TEST1: UNIT TEST in corso

and testing locale to setup a unexistent locale I get the expected error:

mauri@Mao-IdeaPad-500 MINGW64 ~/D-Rats-PR-254
$ LC_ALL=it_IT.utf8

mauri@Mao-IdeaPad-500 MINGW64 ~/D-Rats-PR-254
$ LC_ALL=it_IT.UTF-8

mauri@Mao-IdeaPad-500 MINGW64 ~/D-Rats-PR-254
$ LC_ALL=it_IT

mauri@Mao-IdeaPad-500 MINGW64 ~/D-Rats-PR-254
$ LC_ALL=it_EN.uft8
-bash: attenzione: setlocale: LC_ALL: impossibile cambiare la localizzazione (it_EN.uft8)
wb8tyw commented 9 months ago

I no longer have a working D-Rats on Windows 7 configuration. The upgrade of msys2 to add the pycountry item upgraded Msys2 so that many components no longer work on the Windows 7 system.

Until I can get a Windows 10 or 11 system setup, I will not be able to test on Windows anymore.

If you set the LC_ALL environment variable, if D-Rats can not configure the locale, it should fall back to the using the LC_ALL specification.

If the value in the configuration file can not be set, it should fall back to the LC_ALL environment variable.

wb8tyw commented 9 months ago

First attempt to run D-Rats on Windows 10 system failed because git was not installed in msys2 yet. FileNotFoundError: [WinError 2] The system cannot find the file specified

This should not have been fatal.

wb8tyw commented 9 months ago

Ok, got a msys2 on D-rats setup and D-rats started.

10/15/2023 14:10:06:INFO:MainApp:_refresh_lang: Setting language to: English
10/15/2023 14:10:06:INFO:MainApp:set_locale: Unable to set OS locale to en_US

Note at this point English is in the default locale, so not sure what is wrong, but at least now I am getting a similar result as you have.

Got options for language Italian of Italy and Switzerland. Restart and it claims it can not set the locale to it_IT. Again consistent with your report.

Exited D-Rats.

And just realized I forgot something important in the previous instructions for testing a workaround. A shell variable change must be "exported" for it to be seen by the application program. Changing LC_ALL by it self just makes sure that it can be set. Need to export it.

export LC_ALL=it_IT.UTF-8
./d-rats.py

And now all the menu items we have translations for are showing up in Italian.

So need to push a fix for d_rats/version.py to work properly on Windows with out Git. And since the internationalization_test works, need to find out why the locale setting is failing on Windows 10.

maurizioandreotti commented 9 months ago

Definetely it's a progress: exporting the variable on win10 I now I get the same menu translation which I see on the Mac.

As on the Mac the issue is that it's still 100% complete (but this is not new, right?): image

Do you see this part translated in italian? or in english as in my picture? (I am sure it's not due to labels missing in po/mo as I tried running both your PR and mine with the same locales, and I get half menu with yours and full menu with mine).

wb8tyw commented 9 months ago

Good news / bad news. The python locale module or something that it depends on is broken in the Msys2 environment. The setting of the OS environment variable does seem to work in place of using what should be the official API. Locally I can now change the language in config, restart and that language is in effect regardless of the lc_all content.

Now there is a country option of O2 showing up in the English language list as the first or default item and it does not work, nor does it show up as a valid country code. Spanish has a country option of 41 showing up.

Found a bug in the country selection algorithm and will fix in next push.

It looks like some of the translations for some labels are being ignored on all platforms. We may want to see if we can reproduce that with a simpler program and file a bug with GTK about that. I am not planning on addressing those in this PR. I do not think we will get total perfection.

We also have a new GTK warning:

(d-rats.py:18064): Gtk-WARNING **: 14:46:19.359: Attempting to add a widget with type GtkBox to a Gt
kMenuItem, but as a GtkBin subclass a GtkMenuItem can only contain one widget at a time; it already
contains a widget of type GtkAccelLabel

Not planning on addressing that in this PR. These Gtk-Warnings are typically hard to chase down.

maurizioandreotti commented 9 months ago

why not moving the setting of the locale out of d-Rats?

I mean launching d-rats via a bash script which first setup the variable and then launch the python?

maurizioandreotti commented 9 months ago

Can we close this PR and move forward in the meantime?

wb8tyw commented 9 months ago

I think this last set of fixes are enough that it should be good enough to squash and merge.

The current behavior is that it if the language and country are invalid in the configuration file, it will fall back to the LC_ALL exported value. In a future PR we can change config option to have a checkbox to always use the default locale and make that the default for new installs.

In addition to the locale handling, this PR has some important bug fixes for issues that we discovered while debugging it.

  1. Version fallback processing not working when git is not present.
  2. Extra directory being created in what could be a read-only location.
  3. XON/XOFF handling was totally broken for serial devices.
  4. Repeater connection logging broken on some systems.
wb8tyw commented 9 months ago

If you think it is good, you can mark it approved. You do not need to be on the list of the reviewers to mark a review approved. I forgot to reset your setting from the last review that you made.