Language changes problem

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
User avatar
Argesilao2
Posts: 113
Joined: February 18th, 2020, 9:28 pm
Location: Piciule Patrie

Language changes problem

Post by Argesilao2 »

Using BfW 1.15.18 in Windows 10 Home

When I selected the Italian Language from the icon in the left-down of the main screen, the game ended without messages of any kind.

When I try to play again the game abruptely ended after the reading unit files

To play again I deleted the preferences file into My Games folder, and it works.
User avatar
Argesilao2
Posts: 113
Joined: February 18th, 2020, 9:28 pm
Location: Piciule Patrie

Re: Language changes problem

Post by Argesilao2 »

From the extraordinary interest that this post had I deduced that I expressed myself badly.

When I write 'it works' it means that only after deleting the 'preferences' file does the game work again, but it does not mean that it is possible to change the language.
User avatar
octalot
General Code Maintainer
Posts: 777
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Language changes problem

Post by octalot »

I tried to replicate the crash but couldn't (on Linux).

Do you have any add-ons installed, and if so, does the crash still happen if you remove all of them (and say no to the prompt about installing the ones that you had installed in 1.14)?
User avatar
Argesilao2
Posts: 113
Joined: February 18th, 2020, 9:28 pm
Location: Piciule Patrie

Re: Language changes problem

Post by Argesilao2 »

I tried to delete all the add-ons from the add-ons/data folder for BfW 1.15, then I put them back one at a time trying to change the language.

The problem arose with the following add-ons:
The Return of the Sea Hag
Tales of the Rubies
The Garardine Ascendancy

They are all campaigns created by me, they all have an Italian translation, they have been present in the folder for months, some of them for years, and they never gave any problems, even if I must say that I almost always use Wesnoth in English. I play with the italian language only to test my translations.

Another of my campaigns with the italian translation, The Reconquest of Heaven, doesn't give any problems.

The last time I changed something in a translation was been about a couple of month ago, I don't remember exactly, and everything worked.

I also did another test; instead of deleting the preferences file I changed a line in it, and I replaced locale="it_IT" line with locale="en_GB", and the game started running again.

My conclusions are: BOH!
gnombat
Posts: 671
Joined: June 10th, 2010, 8:49 pm

Re: Language changes problem

Post by gnombat »

Are there any error messages in your log file?
User avatar
Argesilao2
Posts: 113
Joined: February 18th, 2020, 9:28 pm
Location: Piciule Patrie

Re: Language changes problem

Post by Argesilao2 »

gnombat wrote: October 15th, 2021, 12:11 am Are there any error messages in your log file?
The log file was the first thing I see when the problem first arose, but I found nothing.
probably I saw the wrong log file, because now I found this:

20211014 20:20:34 error general: Invalid mo-format, encoding is not specified
Caught general 'St13runtime_error' exception:
Invalid mo-format, encoding is not specified

I'll try to check the mo format of the last files I changed, even if I used poedit like all the other times.

Thanks for the suggestion.
gnombat
Posts: 671
Joined: June 10th, 2010, 8:49 pm

Re: Language changes problem

Post by gnombat »

Note also that you do not need to use .mo files at all any more - since Wesnoth 1.14 was released, it can read .po files directly. That might make things simpler to maintain.

However, if you want to omit the .mo file, you will have to place the .po file in the new location, as documented here.

For example, you would need to move the file from here:

Code: Select all

Tales_of_the_Rubies/translations/it/LC_MESSAGES/wesnoth-totr.po
to here:

Code: Select all

Tales_of_the_Rubies/translations/wesnoth-totr/it.po
User avatar
octalot
General Code Maintainer
Posts: 777
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Language changes problem

Post by octalot »

I was able to reproduce it by corrupting a .mo file locally, and it's now logged as issue #6194.
User avatar
Argesilao2
Posts: 113
Joined: February 18th, 2020, 9:28 pm
Location: Piciule Patrie

Re: Language changes problem

Post by Argesilao2 »

gnombat wrote: October 15th, 2021, 8:02 am Note also that you do not need to use .mo files at all any more - since Wesnoth 1.14 was released, it can read .po files directly. That might make things simpler to maintain.

However, if you want to omit the .mo file, you will have to place the .po file in the new location, as documented here.

For example, you would need to move the file from here:

Code: Select all

Tales_of_the_Rubies/translations/it/LC_MESSAGES/wesnoth-totr.po
to here:

Code: Select all

Tales_of_the_Rubies/translations/wesnoth-totr/it.po
Thanks for the tips, but The Garardine Ascendancy translation uses eight different files .po, and The Return of the Sea Hag four. I think I'll wait for a better version of the game.
Post Reply