Page 1 of 1

Language change from French to Spanish

Posted: 22 Jan 2021, 21:09
by antoineL
HI!
I hope this is the correct place to report a bug (actually what looks like one.)

TL;DR: missing line in languages/fr_FR_countries.txt.

Long version:
I started the program the first time in French. Then I made a few operations, over several sessions.
Then i am restarting from the beginning: select language. this time I selected Spanish.
Gestinux signaled it will create the lis of all countries in Spanish, this is fine with me (later I will check it :twisted: ).
However it was not able to complete the creation:

Code: Select all

La consulta a la base de datos ha fallado (SQL Error: Field 'CountryCodeId' doesn't have a default value)
There is something which triggered suspicion with the source code: while the languages/xx_XX_countries.ini files are generally 247 lines long, languages/fr_FR_countries.txt have only 246 (and while a quick lookup shows SOUDAN DU SUD is lacking, it neither appears in English or Spanish).
A look into the datebase shows there are one 246 registers in countrycodes tables, while there are 491 (=246+245) registers in countries. the culprit is then AFGHANISTAN; which is the first line of fr_FR_countries.txt (while it should really be "CountryName;CountryCode".)

Then the program is a bit stunned: the main menu and the title bar stays in French for example. I closed all the dialogs, entered again in languages to reconfirm Spanish, thereafter the actions changed to Spanish (but not the title bar, that one should be a small glitch).
I then quitted then restarted Gestinux. Seems to work, however when visiting the Países table, there are no country names in Spanish, all show as blank.
Then trying various ways to solve the problem (including adding the missing register), I got several exceptions, mainly

Code: Select all

La consulta a la base de datos ha fallado (SQL Error: Table 'tempcountries' already exists)
By the way I did not find where that table is stored, I guess some local storage but I could not guess which.
Obviously time to quit gestinux and MariaDB and restart them.
However I never found a way to retrigger the creation of the Spanish country names on that database.

Then I created a new database (in Spanish this time, obviously), and started the same dance but in the reverse way, changing to French. This time it went OK! :)
So I guess the only problem (besides missing South Soudan and now the "strange" XI pseudo-country) is the format of languages/fr_FR_countries.txt.

Re: Language change from French to Spanish

Posted: 22 Jan 2021, 22:36
by tintinux
Hi

The reported MySql error may occur in many places and is due to a new default behavior in recent versions. It can be solved by a small change in the mysql.ini configuration... I don't remember it and having no access to a server today, you must wait a little for me to document it here, or search yourself in the net...

The next release will need a large number of changes to work with the default configuration 😬

About the spannish translation it is possible they are not completed. They have been made some years ago for an old gestinux version and some keywords are certainly missing.

The country list is also possibly not completed. South Sudan is a recently created country and should be added in en and sp files.

If you can help in this area, you are welcome and I can give more explanations.

If you setup several languages it is normal that the new one is loaded and the old one retained in the database. Should work fine when no sql error occur during creation of a temporary table.

Regards

Re: Language change from French to Spanish

Posted: 23 Jan 2021, 12:05
by tintinux
Hi

Please see viewtopic.php?f=8&t=140 to avoid the Sql error.

This post can be improved and any feedback is welcome.

The other issues with country names and translations to spanish should not be a big problem.

Regards

Re: Language change from French to Spanish

Posted: 23 Jan 2021, 12:49
by tintinux
Hi
I have added the missing line in french countries, and added South Sudan in the 4 existing translations.
Done in 1.5 and trunk sources (SVN).

Of course, a new built have to be made and published to provide the binaries, but I think this can be delayed until more important changes.

Thanks to AntoineL for the feedback !

Regards

Re: Language change from French to Spanish

Posted: 23 Jan 2021, 16:57
by antoineL
OK, the change in configuration makes a lot of sense. I will apply it ASAP since indeed I am stumbling more than once on this error.

About Spanish translations, of course I should help when I encounter problem but I should say that for the moment, it works quite well. The only one I spotted so far seems to be the main menu caption, but in fact it happens to be a missing accent (it's Menú :D ). I probably would need to reorganize the various translation in a table or some sortable storage in order to spot missing entries, since plain (unsorted) .ini is NOT the obvious way for it.

Thanks a lot for the very quick handling of the issue!

Re: Language change from French to Spanish

Posted: 26 Jan 2021, 15:24
by tintinux
Hi

If you want to help in the translation, please read this page in the wiki or the english one.

You have no need to use directly the .ini files, Gestinux offers a simple way to translate and to check...

Let me know if you need more informations.

Regards