AGS Support > AGS Engine & Editor Releases

AGS 3.6.0 WIP (Alpha 21) - SDL2-based engine + Unicode support

<< < (42/42)

Stranga:
@Crimson Wizard

The error code is something new as I loaded a backup on 3.6.0.17 and the dialogue navigation works fine, however, the text is still not being translated in list boxes and dialogue, everything else works fine (labels, buttons e.c.t).
Example of labels working fine:
Spoiler: ShowHide
My text box is a label.

UTF-8 Encoding has been  set in the TRS file, I also tested it with another font but it still shows the same symbols

Example:
Spoiler: ShowHide

@eri0o I'll get to work on a small build for you to test soon :)

Crimson Wizard:
The temp build with a keyboard fix may be downloaded here:
https://cirrus-ci.com/task/5721016642043904

please tell if it fixes the key input.

But i don't yet know what is wrong with translations. I'll have to think more about it, or wait for your small test game.


--- Quote ---I loaded a backup on 3.6.0.17 and the dialogue navigation works fine, however, the text is still not being translated in list boxes and dialogue
--- End quote ---
So, if I understand correctly, translation in dialog options did not work in 3.6.0.17 too?

I remember that previously you had issue with some languages, but they were fixed?
https://www.adventuregamestudio.co.uk/forums/index.php?topic=58976.msg636644048#msg636644048

Do you use same font as on labels there, or a different one?

Stranga:
Ok, temp build fixes keyboard issue, great! :)

Strangely when I started a fresh empty game and make a list box and a dialogue both with translated lines they worked. However, when I made a game out of a template they didn't work, I compared both versions' TRS files and didn't find any differences, both had UTF-8 encoding on them. Strangely I changed the Text Format under general settings to UTF8 and it worked?
Screenshot:
Spoiler: ShowHide

However, this didn't work on my game, only on the test game so there's isn't much for debugging.


--- Quote ---So, if I understand correctly, translation in dialog options did not work in 3.6.0.17 too?
--- End quote ---
That's correct, it didn't work on that version either


--- Quote ---I remember that previously you had issues with some languages, but they were fixed?
https://www.adventuregamestudio.co.uk/forums/index.php?topic=58976.msg636644048#msg636644048
--- End quote ---

I thought that would've been the case but it seems to still show those symbols when I applied that particular fix to this problem.


--- Quote ---Do you use the same font as on labels there, or a different one?
--- End quote ---
Yes, everything has the same fonts.

Something is telling me that it may be an issue with my scripting somewhere. I'll look into it further but here's the test build I quickly made: http://www.fileconvoy.com/dfl.php?id=gd863cb389b33e2171000418743282b849981e52b80

EDIT:
--- Quote ---Strangely I changed the Text Format under general settings to ASCII then back to UTF8 and it worked?
--- End quote ---
Only the dialogue worked not the listbox

BREAKTHROUGH: I think I found the problem, the list box fonts are not changing when I change translations

I'm using this script to change all fonts in game but it seems to be missing listboxes:
Spoiler: ShowHide
--- Code: Adventure Game Studio ---function ReplaceFontOnAllGUIs(int old_font, int new_font){  int i = 0;  while (i < Game.GUICount)  {    ReplaceFontOnGUI(gui[i], old_font, new_font);    i++;  }} 

Yep! That's definitely the problem! Still not sure how to fix it, unfortunately.
Found it:
Spoiler: ShowHide
--- Code: Adventure Game Studio ---function ReplaceFontOnGUI(GUI *g, int old_font, int new_font){  int i = 0;  while (i < g.ControlCount)  {    Button *b = g.Controls[i].AsButton;    if (b != null)    {      if (b.Font == old_font)        b.Font = new_font;    }    Label *l = g.Controls[i].AsLabel;    if (l != null)    {      if (l.Font == old_font)        l.Font = new_font;    }    ListBox *lb = g.Controls[i].AsListBox; //HERE!    if (lb != null)    {      if (lb.Font == old_font)        lb.Font = new_font;    }    i++;  }} 

Crimson Wizard:

--- Quote from: Stranga on 19 Mar 2022, 04:24 ---Strangely when I started a fresh empty game and make a list box and a dialogue both with translated lines they worked. However, when I made a game out of a template they didn't work, I compared both versions' TRS files and didn't find any differences, both had UTF-8 encoding on them. Strangely I changed the Text Format under general settings to UTF8 and it worked?

--- End quote ---

According to the plan, the game should switch to UTF-8 mode if active translation is UTF-8, even if the game itself has the Text Format set to ascii.
I will double check that this works.

EDIT: Ok I found and fixed two more recent bugs...
1. if game was ASCII, but translation UTF-8, then the translation keys were incorrectly loaded, so translation could not be performed
2. winsetup did not list translation names properly (did not cut ".tra" extensions from them)

Temp build with fixes will be available here when the building process is complete (about 20-30 mins after me posting):
https://cirrus-ci.com/task/4630726241943552

Crimson Wizard:
@Stranga, i opened a 3.6.0 Beta thread: https://www.adventuregamestudio.co.uk/forums/index.php?topic=59842.0
let's continue discussing problem there (i will lock this thread soon).

Navigation

[0] Message Index

[*] Previous page

Go to full version