Tool Translator++ 4.9.28 Standard Version / Developer Version

5.00 star(s) 1 Vote

Shisaye

Engaged Member
Modder
Dec 29, 2017
3,000
5,357
Hi,How can I show the position of line breaks in the imported text?And how are you handling those text line breaks?
Please elaborate. What do you want to do with them?

Using Javascript (or the regex option in the search menu) you can address line breaks in Translator++ using "\n".
 
Last edited:

Bard11

Member
Apr 18, 2022
142
69
Please elaborate. What do you want to do with them?

Using Javascript (or the regex option in the search menu) you can address line breaks in Translator++ using "\n".
To avoid automatic line breaks that result in too many lines!
Do you have a Javascript script that checks for line breaks?
 

Shisaye

Engaged Member
Modder
Dec 29, 2017
3,000
5,357
To avoid automatic line breaks that result in too many lines!
Do you have a Javascript script that checks for line breaks?
I don't understand the question.
What kind of automatic line breaks?
If your word wrapping results in too many lines why not just increase the amount of characters each line?
If your text box cuts off the 4. line or something like that, why not edit the text box instead?
And "Do you have a Javascript script that checks for line breaks?" can't be the full question.
What do you want to check? How many there are?
What is the goal here?

Edit: If you just want to remove all linebreaks to rewrap or something like that you can do:
JavaScript:
if (!this.cells[1]) return;
this.cells[1] = this.cells[1].replaceAll(/\n/g, "");
//Executed on "Row Level" this removes all linebreaks from the "Initial" row.
//Change to "this.cells[2]" for "Machine Translation", "this.cells[3]" for "Better Translation", etc.
 
Last edited:

Bard11

Member
Apr 18, 2022
142
69
I don't understand the question.
What kind of automatic line breaks?
If your word wrapping results in too many lines why not just increase the amount of characters each line?
If your text box cuts off the 4. line or something like that, why not edit the text box instead?
And "Do you have a Javascript script that checks for line breaks?" can't be the full question.
What do you want to check? How many there are?
What is the goal here?

Edit: If you just want to remove all linebreaks to rewrap or something like that you can do:
JavaScript:
if (!this.cells[1]) return;
this.cells[1] = this.cells[1].replaceAll(/\n/g, "");
//Executed on "Row Level" this removes all linebreaks from the "Initial" row.
//Change to "this.cells[2]" for "Machine Translation", "this.cells[3]" for "Better Translation", etc.
I mean is there any way to detect the number of line breaks in the text in the current MAP, there is no way to see the line breaks in the software.
 

Bard11

Member
Apr 18, 2022
142
69
I don't understand the question.
What kind of automatic line breaks?
If your word wrapping results in too many lines why not just increase the amount of characters each line?
If your text box cuts off the 4. line or something like that, why not edit the text box instead?
And "Do you have a Javascript script that checks for line breaks?" can't be the full question.
What do you want to check? How many there are?
What is the goal here?

Edit: If you just want to remove all linebreaks to rewrap or something like that you can do:
JavaScript:
if (!this.cells[1]) return;
this.cells[1] = this.cells[1].replaceAll(/\n/g, "");
//Executed on "Row Level" this removes all linebreaks from the "Initial" row.
//Change to "this.cells[2]" for "Machine Translation", "this.cells[3]" for "Better Translation", etc.
I used the Warp Project function in the software and some of the text was getting more and more line breaks, causing the text to be lost in the game. So I'm asking how you solved the line breaks problem.
 

Shisaye

Engaged Member
Modder
Dec 29, 2017
3,000
5,357
I mean is there any way to detect the number of line breaks in the text in the current MAP, there is no way to see the line breaks in the software.
I used the Warp Project function in the software and some of the text was getting more and more line breaks, causing the text to be lost in the game. So I'm asking how you solved the line breaks problem.
You must be talking about some really obscure engine that doesn't even allow Translator++ to handle linebreaks, or I don't really know what you mean.
The only thing I can come up with is that you have "word wrapping and explicit white spaces" turned on, if so, please toggle it off, I have no idea why that stupid option even exists.
turnoff.png
Then text will be formatted with the actual linebreaks.
unwrapped.png
But after a MTL some text would escape the screen because there's way too much in one line, and that's when you use the wrap option.
The number of characters per line depends on the setup of the dialogue box the font and the font size. There's no one fits all.
wrap1.png
And after wrapping the linebreaks in RPGM text look like this:
wrap2.png
 

Bard11

Member
Apr 18, 2022
142
69
You must be talking about some really obscure engine that doesn't even allow Translator++ to handle linebreaks, or I don't really know what you mean.
The only thing I can come up with is that you have "word wrapping and explicit white spaces" turned on, if so, please toggle it off, I have no idea why that stupid option even exists.
View attachment 2979554
Then text will be formatted with the actual linebreaks.
View attachment 2979555
But after a MTL some text would escape the screen because there's way too much in one line, and that's when you use the wrap option.
The number of characters per line depends on the setup of the dialogue box the font and the font size. There's no one fits all.
View attachment 2979560
And after wrapping the linebreaks in RPGM text look like this:
View attachment 2979559
Yes, I turned on "auto line feed."
 

Shisaye

Engaged Member
Modder
Dec 29, 2017
3,000
5,357
Yes, I turned on "auto line feed."
If you want to see the actual linebreaks in your cells you need to turn it OFF.
"Word wrapping and explicit white spaces" is only a visual thing inside the editor, it does not change the output.
 

Bard11

Member
Apr 18, 2022
142
69
If you want to see the actual linebreaks in your cells you need to turn it OFF.
"Word wrapping and explicit white spaces" is only a visual thing inside the editor, it does not change the output.
So how do I see the actual line breaks in the cells, does that function show them?
 

shillk

New Member
Feb 13, 2022
3
1
First, to whomever that can edit this thread, it's perhaps better to mention that author has , while the latest version in this thread is still 4.9.28

===============================

Then, I just found out a rather obscured mistake I made and think should share it here.
From some time ago whenever I uses the RPG maker parser V2, there's a high probability that it would get stuck at parsing commonEvents.json or some other relatively large data file. This has prevented me from working on many rpgm titles.

Today I decided to try my luck sniffing around its log file, and found a barrage of error:
Error: EMFILE: too many open files, open 'data/logs/trans.log'

so, it's stuck because for every log entry translator++ tries to open the log file without closing its previous handler opened during the last log attempt. when the file being parsed generates sufficiently large amount of log, it crashes the js node.

go to options -> general -> Log & debugging, disable 'Log to file'. Works like a charm.
 
  • Like
Reactions: archedio

archedio

Active Member
Modder
Apr 18, 2019
948
2,939
First, to whomever that can edit this thread, it's perhaps better to mention that author has , while the latest version in this thread is still 4.9.28

===============================

Then, I just found out a rather obscured mistake I made and think should share it here.
From some time ago whenever I uses the RPG maker parser V2, there's a high probability that it would get stuck at parsing commonEvents.json or some other relatively large data file. This has prevented me from working on many rpgm titles.

Today I decided to try my luck sniffing around its log file, and found a barrage of error:
Error: EMFILE: too many open files, open 'data/logs/trans.log'

so, it's stuck because for every log entry translator++ tries to open the log file without closing its previous handler opened during the last log attempt. when the file being parsed generates sufficiently large amount of log, it crashes the js node.

go to options -> general -> Log & debugging, disable 'Log to file'. Works like a charm.
It's off by default though. (I've been using v5.3.31B for a while now)
But I'm still stuck at CommonEvents at this game RJ356908.
Maybe because it has almost 8MB worth of text?
 

shillk

New Member
Feb 13, 2022
3
1
It's off by default though. (I've been using v5.3.31B for a while now)
But I'm still stuck at CommonEvents at this game RJ356908.
Maybe because it has almost 8MB worth of text?
I must have turned it on a long time ago when working on a much earlier version of translator, trying to debug a game crash caused by including js script handling. Back then there's no parser V2. That config passed over to new versions that has the parser V2.

About RJ356908, (mine is v1.211213, could be relevant) it parsed just fine on my end. However after that, only data file starting from map023 is present in the project. File Actors.rvdata2 to map022.rvdata2 is missing.
Tried it on some other rmvxace based game, same story. Successful parsing, correct staging file, but the first few dozen data files are not in the generated project file.

The missing files do exist in the staging folder in plain text format, but not in the project file.
 
Last edited:

shillk

New Member
Feb 13, 2022
3
1
ok. The remaining mapxxx.rvdata that survived this process are largely in alphabetic order but not exactly, also with strange gaps in it. In the screenshot of my last post its 28 25 29 31 32 33 23 30 36

which resembles multiple threads working concurrently then merged, but one or several of the threads didn't make it to the merge.

So I disabled multi-threading from options->general (previously I set it to 3). Problem solved.
 
Last edited:

mario6714

Member
Jun 22, 2020
343
215
So which version do you recommend? right now I installed the 5.3.31b from the Russians page, is that the good one or another? the version I found has all the addons and much more, but I do not know if it has a crack or something but if it is functional so far I have tried it although I am new I have not used very complex functions. and what is the function of the run translator?
Can you share the link for this version "right now I installed the 5.3.31b from the Russians page", thanks
 

Anmkwqnmdwqnm

New Member
Aug 22, 2018
14
3
Anybody has a version newer than 4.9.28 and with access to pyLivemaker?
For some reason on version 4.9.28 it doesn't work.
Well, more precisely, it pulls game files from .exe, but then when creating a project not completed at all.
 
Last edited:
5.00 star(s) 1 Vote