This week, I got started with my new task – Moving GUI to U32Strings.
Before I tell more about it, some miscellaneous things that happened this week:
A team-member of ScummVM had previously worked on adding the achievements for some Wintermute games. He was very nice to offer me a game copy to test out the achievements for my task, but I had some steam credit so I thought there was finally a use for them! This way, I have bought my first ever steam game! I have run out of games – pre-2011 – that I can play on potato pc, so I never really bought anything from Steam. I have yet to try out the game, maybe sometime soon!
While cleaning up the history and adding more code, I came across a merge conflict. Previously, I would just find a way around them, but this time I tried to solve it following step-by-step. This way, I learned how to solve merge conflicts! It was quite simple (at least for my small changes), and not as complicated as I thought it would be. I will try to solve more small issues with merge conflicts now.
Another member of the community is testing out new things and making some improvement patches for my previous task – “RTL GUI”. He has written very clean and minimal code compared to the original code for Editables (widgets to type in) and Tabs. It was also a very great improvement over my code. It was very interesting to see how much a specific piece of code could be improved.
The new task:
_(“Message”)
and I get my translated piece of string (if any present) as type const char *. Because translations are used everywhere in the project, I can’t just change the return type here, because that will break too many things at 1 time and become a pain to solve each one without seeing any progress. So, after changing the label for one specific widget, I simply followed errors and converted the strings to U32Strings on a temporary basis like:
…, convertToU32(_(“Message”)), …
Firstly I decided to focus on the small issues with nullptr and my previous temp code. Finally, my shell-scripting classes came to see real use! I was a little rusty and unsure because I haven’t really used it in a project of this big size. But after some careful commits and checking, I was able to wipe these errors (~350-400) in a short period of time with minimal other side-effects.
Afterward, I manually went through the remaining to solve them out one-by-one. I found a lot of missing places where drawable text could be made as U32Strings.
I succeeded in solving all of them, but there was a small problem with a formatting function, which caused runtime exceptions when I tried to change the languages. Below is the result, with most things working properly! Now it is not broken compared to the previous image, which is nice!
I’m thinking by next week, I will be polishing up this task! I’m happy that this task also has a good little progress.