RooieDirk / Deviation_pi

GNU General Public License v3.0
1 stars 6 forks source link

Repeated Issues of internationalization with Raspi and 0.1.60 #25

Open Corsair-63 opened 3 months ago

Corsair-63 commented 3 months ago

Raspberry Pi 5 8Gb & NvMe SSD 256 Gb - Bookworm 64 O beta 5.9.2 (installed straight with o.s.)

Raspi configured as Spanish (Spain) when started the plugin the reading of the compass is correct with decimal "." but all data to be entered must be done with decimal "," and program crashes.

this is extremely easy to fix in windows because you can tell to use "." as decimal separator and "," as thousand separators.

as usual with Raspberry it's complicated to exchange such behavior without fix the entire system to English but we want to remain in Spanish settings with only these two changes as should be.

If would be of some help what I did, now I'll have to test on board. (I could test the exchange the data format at home with a RPi4 and worked)

gone to: /usr/share/i18n/locales and edited file es_ES exchanged in LC_NUMERIC & LC_MONETARY ---> thousand separator "." by "," and decimal separator "," by "." take care that in both section you do the same exchange. saved and closed, will ask to save as root, so, enter the password. this step I don't know if necessary but I did sudo raspi-config and re-entered the language set as Spanish (es_ES), and apply it reboot the system and double check that exchanges have taken place. sudo local -k LC_NUMERIC and it must show that you have the decimal separator as "." and thousand separators as ","

I'll let you know when tested on board if the plugin doesn't crash the program.

Corsair-63 commented 3 months ago

done above procedure on board, the step of: sudo raspi-config must be done re-entering your language (in this case es_ES) before that you should exchange the permission of the file, because in this system doesn't allow me to save as 'root'. open a command window and:

sudo su
cd /usr/share/i8n/locales
sudo chmod 777 es_ES
exit

and now edit the local configuration es_ES (that will depend of your text editor) save configuration after restarting (sudo reboot now):

sudo locale -k LC_NUMERIC
decimal_point="."
thousands_sep=","
grouping=3;3
numeric-decimal-point-wc=46
numeric-thousands-sep-wc=44
numeric-codeset="UTF-8"

the plugin doesn't crash because you can enter the data all in decimal "."

but the problem is that all deviation are registered while O session is active but after re-start O there is no records of deviations done, the screen of deviations is empty. where the plugin stores the deviation data? bearing in mind that this is Debian bookworm :-(

Corsair-63 commented 3 months ago

the problem of recording deviation solved. still puzzling me this bookworm about permission, etc.

found in /home/XXXX/.opencpn/plugins/deviation_pi

the file with data: deviation_data.xml

the file content at least one deviation line, but the plugin doesn't show any value, just blank. suspecting about the "hell" system about permission, etc. done as "su" sudo chmod 777 deviation_data.xml no success, plugin not showing the content line of the file. I brought a copy of the deviation file from one computer at home with the proper data, but I decided to do something else just in case. deleted from the folder deviation_data.xml and started O and deviation plugin, given the initial preferences, and entered one deviation step, closed the plugin, checked in the folder /home/XXXX/.opencpn/plugins/deviation_pi and found fresh new deviation_data.xml file. edited the file and added the lines of my pendrive file, closed and saved. now open the plugin again and I was able to see all compass adjusting lines. done a test of deleting one line and intro a new one, closed the plugin and check again in the file that exchanges have been taken place and are recorded with positive result.

now I can add new compass adjusting situations and I'll be able to be recorded and saved.

still some string not translated either sometimes showing another string that cause quit of plugin and program. very strange this debian bookworm o.s.