wolftrans icon indicating copy to clipboard operation
wolftrans copied to clipboard

Compatibility fixes with some games and ability to translate database references for translated database entries

Open N1nj4R4bb1D opened this issue 9 years ago • 9 comments

N1nj4R4bb1D avatar Jan 02 '16 22:01 N1nj4R4bb1D

Oh, thank you so much for this! Kinda caught me off guard that someone noticed this project. I'll take a look and merge these changes soon.

elizagamedev avatar Jan 05 '16 01:01 elizagamedev

I'm very thankful for this projects existence! Translating games using Wolf RPG Editor (without proper translation for Wolf RPG Editor itself) is a nightmare and even if there were a properly translated up to date version of Wolf RPG Editor, translating games using such tools such as this and RPGMaker Trans is much more productive (you don't have to dissect the game to translate it).

N1nj4R4bb1D avatar Jan 05 '16 03:01 N1nj4R4bb1D

I squashed/edited a few of your commits, added some changes of my own on the end, and pushed to testing. Can you verify that it works before I merge it into master? The patch files generated by your commits are most likely not going to work with this new version, as it forces the patch files to be UTF-8 and replaces / in context entries with _.

elizagamedev avatar Jan 06 '16 20:01 elizagamedev

@mathewv Do those changes also replace / with _ in database name entries!? If so it would be a bad idea because Wolf RPG accesses variables in databases using names if you replace any name in database you also have to replace every reference in scripts (learned it the hard way). You can examine this if you check WolfRpg::Command::Database command arguments this is one one of the reasons you must translate every reference if you translate database entry. I'll give these changes a few test runs and let you know what i find.

N1nj4R4bb1D avatar Jan 07 '16 18:01 N1nj4R4bb1D

It doesn't change the actual entries, just changes / to _ in the > CONTEXT lines. The integers in the square brackets are what are actually used to compare context entries. The names are just there to make it easier (for humans) to interpret the data.

elizagamedev avatar Jan 07 '16 18:01 elizagamedev

@mathewv Yes i already ran some tests and noticed that entries stay the way they are. I'm testing the testing branch right now and have noticed few problems already! I got this one right away (with the one game that i had it before):

patch_text.rb:256:in `block (2 levels) in process_patch_file': incompatible character encodings: UTF-8 and Windows-31J (Encoding::CompatibilityError)

Somehow without that rescue it does not work with that game, encoding gets messed up somewhere along the way. Also multi-level sud-directories are not working anymore e.g.

Data/EV/00 Data/EV/01 Data/EV/02 ...

they are ignored by Wolf Trans (some games have pretty deep nested directory structures thats why i made those changes to patch_data.rb:~342 and util.rb:~14 to account for that).

N1nj4R4bb1D avatar Jan 07 '16 19:01 N1nj4R4bb1D

Hmm, seems I'll have to be even more strict about the string encoding so this works on Windows. Last question about that, what version of Ruby are you using? And I'll reimplement the subdirectories again. I didn't mean to exclude it but I forgot to ask about it and wanted to implement it differently.

elizagamedev avatar Jan 07 '16 20:01 elizagamedev

@mathewv This is what ruby -v gives me:

ruby 2.2.3p173 (2015-08-18 revision 51636) [x64-mingw32]

Yeah most of my additions/changes were more like Band-Aid solutions for immediate results (for problems that came up). I'll comment here if i find any more problems. In meantime i'll update my fork with combination of your testing branch and some of my changes so i have a working version for the time being (so i can work on translating stuff).

About that

patch_text.rb:256:in `block (2 levels) in process_patch_file': incompatible character encodings: UTF-8 and Windows-31J (Encoding::CompatibilityError)

interesting is that fact that it only comes up with one game, for now had no time to dig deeper in for the why.

N1nj4R4bb1D avatar Jan 07 '16 20:01 N1nj4R4bb1D

And this one is also back with current testing branch:

patch_data.rb:346:in `block (2 levels) in copy_data_files': incompatible character encodings: Windows-31J and UTF-8 (Encoding::CompatibilityError)

My current solution: patch_data.rb:127 Dir.entries(@game_data_dir, encoding: __ENCODING__).each do |entry| or Dir.entries(@game_data_dir, encoding: "UTF-8").each do |entry|

N1nj4R4bb1D avatar Jan 07 '16 21:01 N1nj4R4bb1D