Translator++ 3.10.26 - Custom Parser (Patreon)
Content
Hello everyone,
Thank you for your continuous support for Translator++.
This month I am very busy with my work. But I'm trying my best to deliver progress to all of you.
I've always wanted Translator++ to support as many Game Engine types as possible. That's why I had a plan to create a custom parser that can be used to parse anything freely. Initially I set this as a goal when the patrons reached 550 people. But somehow… lately I've been more focused on fixing bugs in existing features, I … kind of forgot about this until some member reminded me, truly apologize about that.
So without further ado I present to you the Custom Parser.
Have you ever wanted to translate a game from a niche engine but no tools were available?
What if there is one tool that could be used to translate all of those games?
Meet Custom Parser! The swiss army knife of game translation project.
Custom Parser
Custom Parser will allow us to translate any script file by declaring a set of rules. The rules can be a regular expression or a javaScript function.
This module also comes with a tool (Parser Model Creator) to create, edit and test the rules.
I've made a video demonstrating the fully working proof of concept of the Custom Parser in the previous post.
You’re only required to do 2 things to create your own simple rule:
The first is declaring what kind of file you wish to work with. For example: *.py; *.ks etc.
And the second is providing Regular Expressions or a javascript function.
You may have more than one pattern for one file type.
The Parser Model Creator, a tool to create rules for the custom parser.
For example, one rule for grabbing primitive strings encapsulated by quote marks, and the others are for grabbing heredocs.
You can also declare regular expression patterns as a mask. Instead of grabbing the text, the mask will hide the portion of files from being processed. This is useful for handling note tags.
Parser Model Creator
Parser Model Creator is a tool to help us create a set of rules for the Custom Parser.
Usually heavy coding sessions are required to produce a single parser for a specific file. But with this tool, that process is a lot easier and faster.
The tool can be accessed through the project creation dialog box or through main menu
Open Parser Model Creator through menu: Main Menu → Tools → Create Custom Parser Model
These are the highlighted features of Parser Model Creator :
You can go codeless with RegEx, or be super creative with javascript function (don't worry, you're thoroughly guided)
In depth explanation and sample code in JavaScript function mode
Easy debugging with instant Testing tab
You can debug with debugger console (F12) if you want. But this Testing section is super helpful
Get an instant preview of the result of your rules with the convenient Testing pane.
I hope this tool can be useful for professional translators and hobbyists who want to translate games from niche engines.
Please see further guide at:
https://dreamsavior.net/docs/translator/parser-model-creator/
I'm currently in the process of writing more tutorials on Custom Parser and Parser Model Creator.
Custom Parser is available in Translator++ 3.10.17 or greater.
Translator++ Ver. 3.10.26 changelog
- Update : Custom Parser Ver. 0.2
- Add : Syntax highlights on custom escaper field
- Fix : Bug on custom escaper tester
- Fix : Better text editor for custom escaper tester
- Fix : Attempt to fix the bug that caused grid's misalignment
- Fix : Batch translate windows showing initial column name after column name has changed
- Add : Keyword history for search and replace
- Fix : RMRGSS wrong offset assignment
- Add : RGSS Snippet viewer for RPG Maker XP, VX, ACE
- Add : Parser Model Creator : Hook system
- Add : Parser Model Creator : Live translation preview
- Add : Parser Model Creator : Capture-then-Mask action
Translator++ Ver. 3.10.26 is available through auto-update.
Cheers,
Dreamsavior.