[Release] GodHand - Japanese Game Translator

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by Insight2k, May 28, 2017.

  1. Insight2k
    OP

    Insight2k GBAtemp Regular

    Member
    205
    165
    Jun 1, 2013
    Germany
    GodHand
    A tool for translating the japanese language to romaji and english language. This tool is meant for editing (3ds games) files.

    What does the program offer to you?
    This tool lets you analyze and edit (3ds) files. To be specific, sort of .dat files. It reads japanese characters like hiragana, katakana, kanjis and kana. I have added two inbuild translators which lets you translate it to romaji and english. It shall help you to locate the japanese words / sentences and offer you a first rough translation. You don't have to rely on this feature, but it can help you.

    Additionally, you can analyze common pictures formats and let an OCR do the translations.

    For the mentioned translation projects, you can really create projects. So called project spaces allow you to manage your translations without touching the original fils. If you think, you are finished with the translation, you can release your project folder to the community and let them apply your changes.

    How does it work?
    The application is divided in several areas. Everything is managed via the title bar and the tab-control. There are static tab-items like File and OCR. Others are dynamic and can be created on your will.

    Tab File
    You can select a single file and edit it like you want. Everything you save here will be directly written to the file!

    How to use
    The usage is simple. You click "SelectFile" and select your desired file. When a file has been selected, you click "Open File" and the tool loads all words / sentences it can find to the result table. Additionally, you can set up the starting offset in "Start Offset" and the length of the offset, "Offset Length". For really big files, this option does make senses. Otherwise stick to "-1", which tells the tool to read the whole file. If the tool find just one japanese char, it will be added to the result table. In that case, some entries might look akward. You should ignore those.

    You will find following columns:

    • Current Value: It will show you the current word / sentence the tool has found
    • Length: It tells you, how long the the byte-array is for the current value
    • New Value: You can enter your own value here. It accepts only typical UTF-8 letters.
    • New Length: This is an important column. It displays the length of the new value. If this length exceeds the "Current Length", then the file may break the target application / game. Be careful. Every entered UTF-8 letter in "New Value" is an additional char which adds up to the length. I have created a mechanism for not accepting values which are greater.
    • Changes?: If you changed a row, you need to check the checkbox or the change won't be written to the file. Automatically set if current and new value are different.
    If you click on a row, a detailed row will be shown with the following content

    • Romaji Translation: Depending on the content of "Current Value", it tries to translate it to romaji. I am not sure about whole sentences. Translation is started when selected row changes.
    • Google English Translation: It tries to translate it to english via the google api. Translation is started when selected row changes.
    • Jisho Translation: Jisho will provide you with some additional information which the other two translators can't provide. Like english definitions, parts of speech, restriction ... .Translation is started when selected row changes.
    Tab OCR
    You can select a single picture file and let run the OCR over your desired selection for a direct translation. The success depends on the quality of your chosen picture!

    How to use
    This is quite straight forwarded. You click on "Load Image" and select your japanese image file you want to translate. If the image has been loaded, you can create a rectangle with your mouse (button down) on that image. If you have marked your text, let your mouse button go and wait a few seconds to load the Capture2Text result in the "Input" textbox. It will automaticall try to translate via google api into english. You might need to redo the steps for a good result.

    Encoder
    You can now use a custom encoder. In the root subfolder encoding, you can place any .txt file which contains the format {HexValue;Output Character}.

    Support is currently limited to max 3 bytes.

    For example

    • E44E1E;丞 => 3 bytes
    • E015;ガ => 2 bytes
    • 01;0 => 1 byte
    It is still an alpha version. It needs to be tested for stable release. Please feel free to test it and giving feedback. You can use the feature on "Tab File" and the project workspace.

    Settings
    You can change some settings for the tool like enabling translation (romaji, english) at all or how you would like to have your romaji translation. Click on the title bar for activation.

    Projects
    Project Management
    Project management allows you to create project spaces for your work. You can add, edit or delete projects.

    • Add => Creates a project with a certain name and a root path to your files you want to edit
    • Edit => Choose an existing project and change its name or rootpath
    • Delete => Deletes a project
    If you create a project, a folder will be created in the subfolder "projects".

    Project Workspaces
    If you have created your project, you can select it from the titlebar and if you click on it, a tabitem will be added with the project name. In this workspace, you will have on the left side a navigator for the underlying folder and file structures of your selected rootpath.On the right side is the result table where you can act like in the Tab "File". You have to double click on the selected file to open the file.

    You have an additional column on your result table which is called "PatchValue". If you edited the file before and saved your results, you can see your/the changes from before. These changes are saved under the projects folder as a .ghp (GodHandPatch)

    Patching
    Patching allows you your or from another user / team to use their translations. You need to set the target folder (where your game is extracted) and the patch path (project path).

    Be aware: The folder structure have to be the same in order for applying successful the patch.

    Pre-Requisites
    You need Windows with .NET Framework 4.5.2. Then you are set to go.

    Possible Tasks
    • Custom encoding-tables (Alpha Version) (Done)
    • OCR-support? (Done)
    • Adding other translations APIs
    • Creating a project folder structure (Done)
    • Adding a release patch management functionality (Done)
    Thanks
    @linguanostra for providing the .NET wrapper for the KAKASI tool which is doing the romaji translation for you

    Links
    Kasaki Wrapper -> https://github.com/linguanostra/Kakasi.NET

    Capture2Text -> http://capture2text.sourceforge.net/

    Screenshots
    • unitbase.dat - File from Inazuma Eleven 1-2-3 Legend of Endou Mamoru; contains the player names
      upload_2017-5-31_10-47-7.png

      Encoding version
      upload_2017-5-31_10-48-22.png
    • OCR Picture Test
      upload_2017-5-31_10-49-25.png

    • blogpost.dat - File from Inazuma Eleven 1-2-3 Legend of Endou Mamoru; contains whole sentences from the ingame blog
      upload_2017-5-31_10-50-1.png

    • Settings
      upload_2017-6-1_1-32-2.png

    • Project Management
      upload_2017-6-1_1-31-47.png

    • Project Workspace
      upload_2017-6-1_18-34-38.png

    • Patching
      upload_2017-6-1_18-35-22.png

    If you have any additional questions, feel free to ask.
    Hopefully this tool can serve you in a way where you can get faster to your goal => translating games :)

    Download
    https://github.com/Insighter2k/GodHand/releases/

    Updates
    1.3
    Added Jisho Wrapper
    Added Jisho Translation to the detail rows.
    Added to settings "Enable Jisho Translation"
    1.2
    Removed old files for "Flyouts". Will not be implemented as of now.

    Implemented now the full ProjectWorkspace. Changes will be saved in a separate file without changing the original file. This file is a patchfile which can be distributed.

    Added Tab "Patching".
    It is possible with an imported project (from other users e.g.) to apply patches. (Patch distribution)

    1.1
    Added Window-Title Bar Navigation:
    - Click on Settings will add the tabitem with its content. Clicking on Settings again will close the window

    Added Projekt Management functionality:
    - You can add, edit and delete projects
    => Name / Fullpath
    It lets you create in the subfolder "projects" a project folder for future use for translations.
    - Same clicking mechanism like Settings

    You can select from the title bar the current project, clicking on it lets it add to the tabs.
    This item is from type "ProjectWorkspace" It enables you to browse through the directories and files which you have configured via rootpath.

    Made a fix for the encoding tables where \r \n were not correctly translated.

    Added in the "ProjectWorkspace" standard option like encoding table, offset and displaying the results in the datagrid via double click on the filebrowser.

    Fixed SaveButton bug for saving edited values.

    Optimizations

    1.0
    Removed Filesize and Last Write UI-Element in Tab "File".
    Added UI-Element "Encoder" in Tab "File".
    Added functionality for custom encoders (alpha version) with max length of 3 bytes.
    Added for "Saving File" a file backup dialog.
    0.9
    Added TabControl for navigating between file and ocr analyzer.
    Added OCR functionality with Capture2Text 4.2.0

    7z is now required to high data load. Compressed it to a good amount.

    0.8
    Optimized code
    Added google translate api
    Added xml read / write support for classes
    Added settings with logic
    Added DetailsRow for visualization and translation purposes
    0.7
    Renamed Columns for better view experience:
    Current Length -> Length
    New Value Length -> New Length

    Added Validation for "New Value" -> If the entered "value" is greater than bytevalue, value cannot be stored.

    Changes will be automatically checked, if current and entered value are different.
     
    Last edited by Insight2k, Jun 4, 2017
    Greymane, telon22, RypaFire and 20 others like this.


  2. scionae

    scionae Official Trap Lover

    Member
    172
    48
    Dec 28, 2016
    Italy
    This is amazing for translators, nice work!
     
  3. Ericjwg

    Ericjwg Good

    Member
    2,864
    693
    Jul 2, 2015
    Canada
    cool
     
  4. saijm4444

    saijm4444 Member

    Newcomer
    10
    1
    May 11, 2017
    India
    We have to extract the .dat from cias right? Sorry I'm new to this but I'd still like to give it a try.
     
  5. Insight2k
    OP

    Insight2k GBAtemp Regular

    Member
    205
    165
    Jun 1, 2013
    Germany
    To be on the safe side, extract your favourite game and edit your game file by file. This goes for .cia and .3ds
     
    saijm4444 likes this.
  6. Ericjwg

    Ericjwg Good

    Member
    2,864
    693
    Jul 2, 2015
    Canada
    it can be any type of file. .dat is just one of them.
     
    saijm4444 likes this.
  7. Misledz

    Misledz GBAtemp Advanced Fan

    Member
    925
    401
    Sep 3, 2015
    just so you know I loved this game on PS2. Best game ever. My right arm was strengthened by non fap purposes because of GodHand lol
     
  8. pikatsu

    pikatsu GBAtemp Advanced Fan

    Member
    724
    125
    Apr 16, 2014
    Argentina
    Is it possible to add option to select online translation engines and a new column with the translation result?
     
  9. Insight2k
    OP

    Insight2k GBAtemp Regular

    Member
    205
    165
    Jun 1, 2013
    Germany
    @Misledz GodHand was taken from the anime Inazuma Eleven as a technique ^_^

    @pikatsu hm, i think so, if they have a free api which can be used via c#. You mean that the romaji is being translated to the target language, e.g. english?
     
  10. Hakuniwa

    Hakuniwa Newbie

    Newcomer
    1
    0
    Apr 16, 2017
    I don't understand why is it called "translator" when its function is to romanize. Good work anyways, tools like this are always appreciated.
     
  11. linuxares

    linuxares GBAtemp Psycho!

    Member
    3,167
    1,299
    Aug 5, 2007
    Duuuude... this shouldn't be a homebrew. It should be an official tool through the Eshop. Damn nice work.
     
    Insight2k and ZiggityZeke like this.
  12. ZiggityZeke

    ZiggityZeke Newbie

    Newcomer
    2
    1
    May 28, 2017
    United States
    Btw, E.X. Troopers is japan only, and it looks amazing. Think it's possible to translate it with this tool? (Great name for it btw)
     
    Insight2k likes this.
  13. Insight2k
    OP

    Insight2k GBAtemp Regular

    Member
    205
    165
    Jun 1, 2013
    Germany
    @Hakuniwa you are right. Translator might be a bit too much, but it goes in the direction of translating ... things ^^"

    @ZiggityZeke That might be possible. Since the tool is not perfect and has it flaws by design (/technic), you should be able to analyse some data at least. I am thinking about testing it further with inazuma eleven, but the problem is, I can't really read and understand any japanese. Translations experts should take a look and tell us if the tool goes in the right direction.
     
  14. ZiggityZeke

    ZiggityZeke Newbie

    Newcomer
    2
    1
    May 28, 2017
    United States
    Sounds good! I sadly don't know any japanese (not a big enough weeb) but I guess this tool makes translating a hell of a lot easier. See if you can find some people who know Kanji/Hiragana/Katakana IRL that would give you critical feedback on this program, might be more useful than just people on a forum. Good Luck!
     
  15. South Cape

    South Cape Newbie

    Newcomer
    5
    1
    Jun 27, 2010
    Japan
    I want to preface what I'm about to say with, I don't want to discourage the creation of any tools because I think making anything is awesome. I'm sure this took time and effort and I respect that, especially as someone who can't code or program in any way shape or form. In that respect, good job.

    But... what exactly is the purpose of this tool? Basically, romanizing Japanese text serves absolutely no purpose in translation. In fact, if someone who knew Japanese (as I assume most people looking to translate do) used this tool to romanize a text, it would actually make it HARDER to translate, not easier. I'm not amazing at Japanese or anything, but I can read intermediate texts with kana/kanji, and I have to tell you that I have an incredibly tough time reading Japanese when it's transliterated in the roman alphabet. Kanji provides context for what two words that sound the same actually are. For example: 昨日 and 機能 are both romanized the same, as "kinou" but one means yesterday and the other means function/feature. The only way to tell which is which is their kanji. If you take the kanji out of the equation, they sound the same and can't be translated accurately. And Japanese has countless words like this where kanji is the only way to differentiate between multiple words (sometimes 5 or more) that sound exactly the same

    I guarantee you that no good translation has ever relied on romanization of a text. It doesn't even make words any easier to look up in a dictionary because you mostly can't look up grammatical conjugations, most of which change a word by attaching at the end of the basic form of a word, without dictionaries getting confused. So even then, if you could somehow not read kana or kanji, you would STILL have to have decent knowledge of Japanese grammar in order to even look up words in the first place because words are almost never presented in a dictionary-researchable form.

    So again, I respect the development of tools greatly, and I respect the amount of time that goes into making anything like this. But I have to tell you as someone who knows some Japanese, this tool likely wouldn't be helpful to anyone outside of perhaps people who know absolutely zero Japanese wanting to translate basic menu information for themselves.
     
    Insight2k likes this.
  16. pikatsu

    pikatsu GBAtemp Advanced Fan

    Member
    724
    125
    Apr 16, 2014
    Argentina
    Yes somethink like that. An option to select between translation engines like google or jisho then select a phrase or all text and an option to translate them in english
     
  17. Insight2k
    OP

    Insight2k GBAtemp Regular

    Member
    205
    165
    Jun 1, 2013
    Germany

    Thank you for your detailed first sight on things.
    I was and won't be aware of such things as you have described. That is why I am asking people like you what benefit I could create to make translations easier.
    As far as i understood, translating it to romaji doesn't help experienced translators that much. In my case, it did help me for example for editing the character names. This is extremely helpful (for a noob like me :D).
    If you think, there is another possible solution to expand the tool in functionality, please tell me what would you liked to see.

    @pikatsu
    Ok, thank you for the suggestion. I will think about it and check whats possible.

    @pikatsu / @South Cape
    Is this something you want to have as a function?
    upload_2017-5-29_13-42-47.png
     
    Last edited by Insight2k, May 29, 2017
  18. pikatsu

    pikatsu GBAtemp Advanced Fan

    Member
    724
    125
    Apr 16, 2014
    Argentina
    It seems nice but if you could make a select bar with the best japanese <=> English translation Apis to take the best translation in every case and to compare the cases it would be great
     
  19. Insight2k
    OP

    Insight2k GBAtemp Regular

    Member
    205
    165
    Jun 1, 2013
    Germany
    I am using currently the Google Translate API (free). The other good ones cost money and jisho is far away of a good working API and it doesn't support currently sentences :/ Nonetheless I support that idea.

    By the way, I can't compare the translations, since I don't know if the semantic and syntax is correct. The only option would be to offer you the results.
     
    Last edited by Insight2k, May 29, 2017
  20. pikatsu

    pikatsu GBAtemp Advanced Fan

    Member
    724
    125
    Apr 16, 2014
    Argentina