Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: mustieles on Wed 29/05/2019 20:50:42

Title: New languages don't show in language dropdown after compiling translation files
Post by: mustieles on Wed 29/05/2019 20:50:42
Hello!

I'm trying to add translations to my game, but I'm stuck. I was following the manual; I created new translation files, added the lines in the new language, saved, and compiled them. The new language does appear in the dropdown menu in the Default Setup screen in the editor, but changing the language there doesn't do anything. When I run the game from the editor it still shows the original language text. In the compiled version of the game, however, when I click on winsetup.exe and look at the "Game language" dropdown, the only option is Game Default.

I've used Atom and the default Linux text editor to edit the files (I'm using AGS through Wine, but it hasn't given me any problems for now), and as far as I can tell, I've done everything the manual says. Am I missing some step? Is it some encoding issue? I don't even know where to look for a solution, and googling hasn't helped at all.

Thank you.
Title: Re: New languages don't show in language dropdown after compiling translation files
Post by: Crimson Wizard on Wed 29/05/2019 22:37:06
Quote from: mustieles on Wed 29/05/2019 20:50:42The new language does appear in the dropdown menu in the Default Setup screen in the editor, but changing the language there doesn't do anything. When I run the game from the editor it still shows the original language text.

Anything you set up in "Default Setup" changes only the default config file in Compiled folder. Meanwhile there's user config file written to user documents (location is system dependent) which is changed anytime you save settings in winsetup + in case of language (and few other settings) it is also written by game itself when player quits, in case language was changed in game by a script command. This user config file overrides default config. This may be the possible reason you don't see changes you did in Default Setup.
User config locations are noted here: https://github.com/adventuregamestudio/ags/blob/master/OPTIONS.md#configuration-file-locations
If you want to test how does your Default Setup work, delete the user config from that location. Or call Run -> Run setup program from the editor and change language there (assuming it's in the list).

Quote from: mustieles on Wed 29/05/2019 20:50:42
In the compiled version of the game, however, when I click on winsetup.exe and look at the "Game language" dropdown, the only option is Game Default.

To double check, do you have corresponding *.tra files near your compiled game when you run winsetup?
Title: Re: New languages don't show in language dropdown after compiling translation files
Post by: mustieles on Thu 30/05/2019 10:48:24
Thank you for answering. I tried deleting the file but it didn't do anything. Calling Run -> Run setup from the editor had the same issue as the editor from winsetup.exe, i.e., the dropdown only had the Game default option. The .tra files are indeed in the Compiled/Data folder.

The only thing that I can think of that may have caused some kind of error is that I changed the name of the game before I started working on the translations. Now I see two folders in the Saved Games folder (original name, which has the acsteup.cfg file, and new name, which is completely empty), but the game still compiles to the same folder with the old name.



Title: Re: New languages don't show in language dropdown after compiling translation files
Post by: Khris on Thu 30/05/2019 11:43:03
Try this:

1. delete the Compiled folder
2. in the editor, select Rebuild -> Rebuild all files, then press F7 for good measure
3. start winsetup from the Compiled folder
Title: Re: New languages don't show in language dropdown after compiling translation files
Post by: Crimson Wizard on Thu 30/05/2019 12:09:53
Quote from: mustieles on Thu 30/05/2019 10:48:24
The .tra files are indeed in the Compiled/Data folder.

tra files should end up in Compiled/Windows if you are building Windows "target", or Compiled/Linux if you are building linux "target" (or rather Compiled/Linux/data).
If you run winsetup.exe I assume you are running Windows version of the game from Compiled/Windows? It will only "see" tra files from same folder, not Compiled/Data. Compiled/Data is just an intermediate place where Editor gathers stuff.

Which "Build targets" do you have set in the General Settings?

Also, I forgot to ask, which version of AGS are you using?
Title: Re: New languages don't show in language dropdown after compiling translation files
Post by: mustieles on Thu 30/05/2019 12:31:05
Quote from: Khris on Thu 30/05/2019 11:43:03
Try this:

1. delete the Compiled folder
2. in the editor, select Rebuild -> Rebuild all files, then press F7 for good measure
3. start winsetup from the Compiled folder

I tried that, didn't change anything. The compiled folder is still inside the old_name folder, and if I delete that the editor throws an error when I try to rebuild.

Quote from: Crimson Wizard on Thu 30/05/2019 12:09:53
Quote from: mustieles on Thu 30/05/2019 10:48:24
The .tra files are indeed in the Compiled/Data folder.

tra files should end up in Compiled/Windows if you are building Windows "target", or Compiled/Linux if you are building linux "target" (or rather Compiled/Linux/data).
If you run winsetup.exe I assume you are running Windows version of the game from Compiled/Windows? It will only "see" tra files from same folder, not Compiled/Data. Compiled/Data is just an intermediate place where Editor gathers stuff.

Which "Build targets" do you have set in the General Settings?

Also, I forgot to ask, which version of AGS are you using?

Thanks for the info! I moved the .tra files to the Compiled/Windows folder and now it works! For completeness sake, I'm using the latest version of AGS (3.4.1.15), and the build target platforms field is defined as Windows, Linux (not that it does anything, mind you, the linux file it generates doesn't really work, but I still haven't read up on that so maybe I just missed something). The only thing that is non-standard about my setup is that I'm using AGS through Wine on a laptop running Ubuntu, so maybe that's that?

Anyway, for now I guess I'm content with moving the .tra files to the right folder if it works.
Title: Re: New languages don't show in language dropdown after compiling translation files
Post by: Crimson Wizard on Thu 30/05/2019 13:37:23
So, the question is, why did not AGS move them into Compiled/Windows on its own.

Can you try updating to AGS 3.4.3.1 ? I think I fixed some related problem there.
https://www.adventuregamestudio.co.uk/forums/index.php?topic=56887.0
Quote- Fixed translations were not updated or available at all for the test run unless the game was fully rebuilt.
not sure if it's same thing.
Title: Re: New languages don't show in language dropdown after compiling translation files
Post by: mustieles on Thu 30/05/2019 14:27:40
I tried updating but this new version doesn't seem to work on Wine; at least not in my case. If you need me to provide any sort of additional info for bug fixing or whatever reason I'll be happy to oblige, otherwise I'll make do with the previous version and the copy-pasting method, cause I'm a bit busy fixing my game and whatnot.
Title: Re: New languages don't show in language dropdown after compiling translation files
Post by: Crimson Wizard on Thu 30/05/2019 14:29:57
Quote from: mustieles on Thu 30/05/2019 14:27:40
I tried updating but this new version doesn't seem to work on Wine; at least not in my case. If you need me to provide any sort of additional info for bug fixing or whatever reason I'll be happy to oblige

Hmm, yes, if you can give any details please do. That's not urgent because there are other people who may test on Wine too, but may be helpful.
Personally I don't use Wine so know little about it, but few other developers may do.
Title: Re: New languages don't show in language dropdown after compiling translation files
Post by: mustieles on Thu 30/05/2019 19:17:40
Sure. Here's my setup:

- Ubuntu 18.04
- Cinnamon 3.6.7
- Wine 3.0
- Winetricks 20180217 (I was using it for something but I couldn't tell how it's set up, tbh).
- AGS 3.4.1.15 is working, AGS 3.4.3 can be installed but gets stuck at the loading window.

If someone needs more info, please ask.
Title: Re: New languages don't show in language dropdown after compiling translation files
Post by: eri0o on Thu 30/05/2019 23:58:10
Which .NET versions have you installed on Wine? What errors are you getting in 3.4.3.1?