[Tools] SLR Translator - Offline JP to EN Translation for RPG Maker VX, VX Ace, MV, and MZ

Shisaye

Moderator
Moderator
Elite Member
Aug 17, 2016
116
30
doodle.png

Overview:
SLR Translator is a tool I've been developing over the past few years to translate RPGM games at a high enough standard to be able to finish them without getting stuck, without being dependent on online services.
If you've ever used Translator++ before, then the tool will immediately feel familiar, because I am using it's UI licensed under GPLv3.
But the actual translation process is very different from Dreamsavior's stuff.
Most outside credit there actually goes to Reddo9999, his code helped me a lot.
(We don't know each other, but his code is also licensed under GPLv3.)


Important Notes:
Press F1 with the tool open for tutorials on how to use this.
This tool will only function if you have a working SugoiV4 server running locally on port 14366.
(The standard setting.)
You can visit https://sugoitoolkit.com/ to find out more about Sugoi.
The V9-V9.4 Toolkits are not compatible with SLR, but 9.5 works again.


Developer: Shisaye
Version: 1.99
System Requirements: Windows (64bit), At least 8GB of RAM, Decent cooling.

Installation:
Extract the tool and launch it using the SLR Translator executable.
If you have problems extracting, please update your 7zip to the latest version.
After launching the tool, please press F1 to get to the help page explaining all basic stuff.
Changelog:
1.99
Fixed a bug that was duplicating the title.
It will now attempt to place linebreaks in front of \< so those cells look less bad.
Removed some obsolete text.

1.98
Fixed bugs adding unwanted spaces, $1$2, and duplicated version numbers.
Added better entries for the scripts to remove apostrophes.
Fixed a wrong vocab entry.

1.97
Changed placeholders again this time to @@1@ because that works better for whatever reason.
Added a much more extensive script for recovering placeholders.
It will now attempt to remove all ' from translations of red and yellow cells, if the fix cells and check for errors button is pressed.
Cleaned obsolete entries from the cache.
Changed how some RPGM commands are escaped to prevent Sugoi from being fed empty input.

1.96
Changed placeholders again this time to @@@1 @@@2 etc.
Changed how placeholders are recovered, again.
Added a warning to the batch translator whenever it's recovering in a not ideal way and may have fucked up.
Fixed a bunch of patterns in the escaper.

1.95
Changed placeholders to @1@ @2@ etc.
Changed how placeholders are recovered.
Added a lot of new dictionary entries.
Fixed a bunch of patterns in the escaper.

1.94
Started building infrastructure to allow multiple models to be used with individual wrappers in SLR.
Revamped the system to reduce excessive repeating in the translation and made the output more varied.
Significantly improved the accuracy of the UNUSUALLYSHORT (Sugoi has crashed) error code.
Added some more entries to the dictionary.
The Fix Cells and Check for Errors process will no longer touch a cell if another cell would overwrite it anyway.

1.93
Fixed some punctuation patterns still putting wrong spaces.

1.92
Fixed patterns meant to fix punctuation and spacing.

1.91
Changed almost every escaper pattern.
Changed placeholders to #1 #2 #3 etc.
Added a bunch of new predefined translations.
Fixed unnecessary spaces around names.

1.90
Added patterns to better try to detect font and other files in the plugins and tag them red.
It will now always escape lines that include a filename, or common font name.
Protected file endings are: png, jpg, txt, ini, otf, woff, ttf, rvdata, rvdata2, rgssad, rgssa1, rgssa2, mp3, mp4, wav, ogg, json, js.
Added some more pre-defined translations.

1.89
Fixed an issue preventing the pre-defined translations of vocab entries to work.
Fixed names that are just question marks.
Fixed the "modified with SLR Translator" entry being duplicated if you press the fix cells button.

1.88
Added version identifiers to exported "plugins.js" and "Game.ini" files.

1.087
Fixed a "yawn" type sound not being translated in very specific contexts.
Fixed a bunch of typos and descriptions in the UI.

1.086
Changed general placeholders to #?1, #?2, #?3, etc.
Made new escaping and error reporting for general RPGM placeholders. (#%@)
Added new errors to the error documentation.
I've reset the cache and filled it with 30MB of fresh data.

1.085
Changed general placeholders to @#1, @#2, etc.
When reading that placeholder type it now allows an additional character between@# and the number.
Made pattern to fix RPGM placeholders.
Made several new errors to detect wrong or missing placeholders.
Added a a pre-defined translation for something requiring money.

1.084
Fixed the command catchall pattern not grabbing double escaped commands.
Excluded a certain Quest plugin from automatic word wrapping.
Added a new red tag for an untranslatable cell in plugins.

1.083
Introduced a failsafe script that looks for wrong formatting in cells enclosed in '' or "".
Introduced a new cell error as a failsafe to the failsafe.
Made the game title script more accurate so it really only touches those entries.
Added 2 new errors to the errorlist explanation.

1.082
Added popup for detection of the "Sideview" plugin.
"Name" cells in the "Weapons" object will be tagged yellow if the "enc_lv2d" is detected.
Added a popup for detection of the "enc_lv2d" plugin.
Fixed a typo in the MV/MZ parser.

1.081
Fixed regex checkbox not showing up in the replace tab of the find menu and added regex101 links to it.

1.080
Fixed \FW escaping.
Changed the catchall command escaper to also consider special symbols.
Fixed a cell in plugins being wrongly translated as game title text.
Improved the section for getting rid of leftover <unk> placeholders so it does not delete anything else.
Removed some unnecessary leftover bits in the find menu.
Fixed the main.js using a wrong name.
Added some more pre-defined translations.
Made some errors more accurate.
Fixed some typos.
Fixed colors of the tag menu in the find menu being inverted.

1.079
When wrapping, if Initial Corrections are not empty, they will be wrapped instead of Initial Translations, and I've made the code more efficient.
Fixed a bug destroying \. commands.
It will no longer always view a sentence as ended if it sees a \.
Made ESCAPEDBACKSLASH error more accurate.
Fixed a bug that caused D_Text entries with defined font size to have duplicate numbers or unnecessary spacing.
Added a few more pre-defined translations.

1.078
Removed escaping of wavedash punctuation again.
Changed the \$ error to say ODDUSAGE.DOLLAR instead because apparently you can actually use it on its own in very specific cases.
Added a missing character in the pattern for escaping brackets.

1.077
Added new patterns to fix punctuation.
Symbols and Japanese wavedash punctuation will now be escaped when followed by different punctuation.

1.076
Added patterns to the sentence ending block to safely remove unnecessary spaces at the end of dialogue.
Added more entries to the dictionary system.

1.075
The patterns mentioned in 1.074 will not be applied to non dialogue if there's special and normal character pairs in the original text.
Fixed font size entries for D_Text and info: entries getting lost.

1.074
Improved pattern for fixing sentence endings.
The patterns for improving translation special character consistency now also apply to non dialogue.
Added more pre-defined translations.
Added red tags for templatelLst and mapTemplateList plugin contexts.

1.073
I've added new pre-defined translation entries to the escaper and dictionary.

1.072
Improved Potential File Name error detection.
Introduced new error reporting for eaten lines. (When Sugoi just ignored parts of the input).

1.071
Added a check whether or not speech bubble characters have been eaten during batch translation.
They will now automatically be recovered from the original text.
The potential filename error check will now only mark _ cells if it doesn't touch a Japanese character.

1.070
Changed order of operation so Splitting happens before Cutting. (Much better.)
Added new error codes and expanded old ones to be more accurate.
Added tons of new patterns and pre-defined stuff.

1.069
Changed command error reporting so that it only reports unknown commands, that actually matter to a normal user.
Added some new MV plugins to green tags and escaped them.

1.068
Improved escaping of commands. It will now escape everything that even vaguely smells like a command as long as it doesn't have any Japanese in it. But unknown commands will still be tagged as errors in post, so you are aware that the system has no idea what they're doing.

1.067
Fixed \nw[] stuff not being escaped properly especially when it had other commands in front of it.
Added a new error check that tries to detect when the escaper fucked up and sent whitespace to Sugoi crashing it.

1.066
Apparently I introduced the possibility of 2 different kinds of red tags at some point one of which is not recognized as red by the batch translator. It will now replace certain contexts with the correct red to make sure it works as intended.

1.065
Fixed a problem that caused %1 MV Placeholders to be detected as error.
Found niche cases in which cells with duplicated isolated sections crashed the escaper. They will now be tagged yellow until I find out what's going on there.

1.064
Fixed the function that determines the error popup. It will now only show once, and not once for every error.
Changed the error codes in the tutorial menu to fit the new ones. (There's still some missing though.)

1.063
Changed escaper patterns to be more specific and added some "catchall" ones for lonely commands.
Changed the way error detection works and how they are displayed. Affected cells will now have their contents with the error messages put in "Initial Corrections" cells instead of overwriting them in the "Initial translations" cells.
Changed Error names to be more compact and have non breaking spaces around them. (Not reflected in the help menu, yet.)
Changed the way the popup works so it causes less unnecessary load.
Changed a check in the register string function of parserbase to a try catch operation so it crashing no longer kills all parsing.

1.062
Lines including \n<.> 2 times will now be flagged yellow. (Breaks the escaper, and is most likely a dev fuckup.)
Fixed tagging of _ lines in plugins.
Tag colors in the Find menu will now be displayed correctly.

1.061
Added more pre-defined stuff for Ace Scripts.
Fixed some typos.

1.060
Added more variations for vocab entries.
Made some regex patterns more efficient.
Added some more pre-defined translations.

1.059:
Improved escaping of \n and\nw stuff.
Changed placeholders to %1 %2 %3[...] instead of %A %B %C[...].
Placeholders now get padded with spaces.

1.058:
Improved patterns to remove excessive character repeats.
Added to a bunch of pre-defined translations to work better in some niche cases.

1.057
Removed a large amount of unnecessary regex patterns from the escaper.
Fixed some broken patterns and added a few more.
Removed the "Remove linebreaks" option from the options menu because in tests it didn't actually do anything.
Changed the extraction notice for packed games to be more clear.

1.056
Doubled up escaping of scripts so hopefully nothing slips through anymore.
Made new automation for \AA[] keys.
Properly escaped \# .

1.055:
Disabled the development copy option. It just caused problems for little benefit.
Extracting VX/Ace containers is no longer optional, it will now detect in case you forgot and remind you.
Beautifying jsons is now turned on by default.
Fixed some typos.

1.054:
Significantly changed the way text is being fed to Sugoi to provide better translation quality for multi-line plugins and dialogue boxes with multiple people talking.
Changed the way spaces are placed to make the translation more tidy.
Added several new pre-defined translations.
Added a new green tag and automation for a RMMV achievement plugin.
Changed the way scripts are escaped, making them much less likely to break.
Removed 2 broken option menu buttons.
Fixed some typos.

1.053:
Fixed some typos.
Removed a lot of overlapping regex patterns that didn't do anything except take time to process.
Added some new pre-defined translations.
_ABL plugin stuff will no longer be flagged as an error.

1.052:
Single cells that have more than 5000 characters will no longer be sent to Sugoi. (Just crashes.)
Made regex patterns for around 100 pre-defined translations more specific so they don't loose the original meaning.

1.051:
Fixed \ac \MCD and \WSR eating the first character of a sentence.
Fixed [FFFF] and similar things being reported as Sugoi error.
Fixed some wrongly placed heart emoji in some pre-defined translations.
Plugins lines with sPictures or sbActionPictures entries will now be tagged red.

1.050:
Made automation several very old VX plugins.
Improved the error detection system.
Changed default Sugoi server settings to use more resources for the sake of speed to fit an average PC.
If you still have an old "Appdata/Local/SLR Translator" profile folder you need to either delete it, or adjust the settings yourself.

1.049:
Fixed a pattern block meant to keep Latin characters safe.
It was causing some pretty awful translations when translating Japanese that has Latin characters inside it.

1.048:
Spaces in "info:" plugin entries will now be replaced with _ because that plugin is so bad it doesn't accept non breaking spaces either.
Added a failsafe that will restore lost font size numbers at the end of D_TEXT entries.
Significantly improved detection of empty objects, it will now work and remove them, regardless if you just made a new project, have already edited cells, loaded an old project, or changed row count.
If it fails to remove something it will now actually tell you what it was in a popup.

1.047:
I had a typo in an elseif statement saying "!=" instead of "==", as a result doing the opposite of what it was supposed to do.

1.046:
Cells with the script context will now be tagged green if they include standard text effects like \C[n], \N[n], etc., but only if they pass the _ checks.
Improved the regex pattern for detecting unapproved _ cells.
Fixed some checks using || instead of &&, which were potentially tagging stuff wrong.
Loads of small changes to the tagging in general that make no sense to list because my code is so bad they make no sense out of context.

1.045:
Fixed a bug of the D_TEXT addon using numbers at the end as font size even when part of a text effect.
Numbers at the end that are in () [] {} "" or '' will now trigger the entire line to get non breaking spaces except the space directly after D_TEXT.
Fixed green tagged cells including the word "file" in context being falsely tagged red.
Added another manual translation for a string crashing Sugoi.

1.044:
The core parser will no longer fetch Commonevents, State, and Map "name" entries.
Fixed some typos.

1.043:
Cells with the "commonevents names" context will no longer be removed by default, but are tagged red instead.
Cells with the "Show Choices" context will now be tagged green to overwrite potential red tags.
Fixed a long "Nnnghh!"" sound crashing Sugoi by replacing it with a manual translation.
Cells in the "plugins.js" object with the "/File" context will now be tagged red.

1.042:
First Public Release. (I didn't keep a proper changelog, and who cares if nobody has an earlier version anyway.)
FAQ:
Q: A game is not working correctly after translation, or the translator has problems during the translation of a game, what do I do?
A: Please post the DLsite code of the game (or it's full name), a screenshot of the problem, and a description when exactly the problem occured. If appropriate please also include a save file to reproduce the issue in-game.
Please do not include any rule breaking content in your post.

Q: So this is just another way to run Sugoi on a game?
A: No, Sugoi is only used for basic dialogue. Most scripts, noises, menu buttons, etc., have pre-defined translations from a dictionary I've built. There's also hundreds of regex patterns fixing common quirks and issues with Sugoi.

Q: Translator++ is terrible and constantly crashes stuff, so this does the same?
A: This is not using T++ parsing or converting. I'm just using its UI. Even old VX/Ace converts and exports correctly in SLR Translator, and as a result this does not have the crashing issues T++ has.

Q: When I use SLR on a cell why do some parts remain Japanese?
A: That means those parts have preset translations. Just click the "Fix cells and check for errors" button and the Japanese will be replaced. (Only works in the Initial Translations column to prevent it from touching manual edits.)

DOWNLOAD
SLR Translator:​
To see this hidden content, you must react with one of the following reactions : Like Like
To see this hidden content, you must react with one of the following reactions : Like Like
SHA-256 of the archive:
5b3d9b63faf5d2d33d340142a5cb7804f6bf767f787b595280ae9114e6a96f2d


Additional Tools:
(Extractors, Editors, etc. Also includes a minimalist Sugoi Repack.)
(I did not make any of these.)​
To see this hidden content, you must react with one of the following reactions : Like Like
SHA-256 of the archive:
19d999dca2947e3a234306fc0f9655e837a01e08ededa254ae4716144f274e76
 
Last edited:
Best mascot ever.

Edit:
SLR Translator has a lot of optimizations based around Japanese to English translation + the Sugoi Offline Translator v4.0 NMT model. The Sugoi Offline Translator v4 NMT model is included in Sugoi Toolkit v6-v9+.

Using SLR Translator in its intended configuration requires:
1) The Sugoi Offline Translator v4.0 model in either PyTorch/Fairseq format or in CTranslate2 format.
2) Software that can run that model on either the CPU or GPU.

The PyTorch/Fairseq/original version of the model and a small flask server to run it are available from the Official Toolkit (~6.5+ GB), but FOSS alternatives are also available here for convenience, reduced size, better performance, improved compatibility, added cache, added UI, transparency, stability, etc.

I went ahead and bundled everything together in a Sugoi-Repackage to bootstrap the Sugoi Offline Translator v4.0 NMT model + SLR Translator as fast, as clearly, and as reliably as possible. The Sugoi-Repackage is already included under AdditionalTools.7z\apps\Sugoi-Repackage-CPU in the OP. Just double click on the .bat to set up the software and then add the CTranslate2 format model to the correct folder to begin using SLR Translator right away.

1. Most users should use the Sugoi-Repackage-CPU (32MB -> ~900 MB after setup) if just starting out.
- This is already included under AdditionalTools.7z\apps\Sugoi-Repackage-CPU in the OP.
- CUDA users should download one of the CUDA versions.
- The CUDA version supports both CPU and CUDA. CUDA is faster, but it requires an Nvidia GPU and takes a lot more space (~5 GB+).
2. Double click on the .bat to setup the local server software.
- It will download, install, and configure CTranslate2/PyTorch into an isolated Python environment.
3. CPU users should download the model in the CTranslate2 format (+1 GB).
- CUDA users should download the model in PyTorch/Fairseq format (+1 GB).
4. If using CTranslate2, copy the CTranslate2 model to Sugoi-Repackage\sugoi_v4model_ctranslate2.
- If using the PyTorch/fairseq model, copy the model to Sugoi-Repackage\sugoi_v4model_fairseq.

For more detailed notes on the Sugoi-Repackage, see the main thread and expand the small summary below.

Disclaimer: I did not write most of the information. I just copied it for everyone else's documentation and bundled the work of other people together to make their software easier to use.

Summary: The default software that Sugoi Offline Translator v4.0 uses to run the model is an old version of Facebook/Meta's fairseq project + a small flask server. Issues:

- This old unupdated version of Fairseq used is very slow.
- It does not release memory properly after use which means the system will eventually run out of memory while using it.
- Due to the platform specific nature of the toolkit, this software does not reliably work on other operating systems due to configuration limitations especially when using Nvidia CUDA on Windows 7, 8, Linux, Mac OSX. Even though PyTorch and CTranslate2, the software that runs the model, supports these configurations, the toolkit does not.
- It is complicated to switch between the different PyTorch and CTranslate2 models and configurations (CPU, CUDA, DirectML).
- Translations are not cached.
- Early versions of Sugoi Toolkit v9 dropped support for T++/SLR Translator (unofficially). The developer, MingShiba, may re-add support at some point.

Basically, the Sugoi Toolkit is the worst option to run the Sugoi Offline Translator v4 NMT model because it has the least compatibility, the slowest performance, and the most bugs. The software is just that bad, especially the non-existent technical documentation. The Sugoi-Repackage fixes all of the above problems and uses py3translationServer as the server software since they had the best documentation, cache, and it also includes a UI at http://localhost:8501 for those who want to use the model directly.

This thread is to discuss SLR Translator. To discuss the repackage, please use the repackage main thread.
 
Last edited:
If you have downloaded SLR Translator before, please upgrade to v1.91 v1.92.
There was a serious issue with the escaper that could potentially cause errors and crashes.

Edit: I screwed up a regex pattern and it was putting random spaces in the text and deleting dots at the end. Please use v1.92.

Edit: Found another annoying bug, please just keep checking regularly if there was an update and upgrade your version...
I only really push updates if I fixed something substantial.
 
Last edited:

Users who are viewing this thread

Latest profile posts

Pabloescobar49 wrote on Esan's profile.
Hello can u reupload

[190927][BISHOP] 家属~母と姉妹の嬌声

yuuri69 wrote on Ryzen111's profile.
Hello!
Could you please upload the update for this? S2 is out. Tysm as always! https://www.anime-sharing.com/threads/☄️release☄️-240219-アブラカダブラ-blood-domination.1452672/
ybz378938171 wrote on Otokonoko's profile.
would you please re-upload RJ01132789 RJ01129278 RJ01129241 RJ01114376 RJ01133512 RJ01133397 in mexa ? thx
Timurama wrote on Lebedev's profile.
Hello, may i ask you to reup dame zettai games at your leisure, please? even rapidgator links are expired already
ann10 wrote on Otokonoko's profile.
Could you reupload the latest version of Happy Saint Sheol ( v1.1.1) ?