RMMV Another localization plugin - translate your game with PO files!

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
162
Reaction score
97
First Language
French
Primarily Uses
RMMV
Hey!
2 more questions today ^^'

Is there a way to detect which language is displayed with a scriptcall? It would allow me to modify my popup messages accordingly to it. Since I've only a few, I can do it manualy

When I put the SFG_Localization after the YEP_BattleEngineCore, it removes battle skill name displays and it's fixed when it's above. Is there any way to fix that ?

When I'm adding messaged or modyfing some of them in the editor, I export the main language again and it doesn't modify the game text file. I didn't find where this erreor came from.

thank you!
 
Last edited:

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
655
Reaction score
267
First Language
English
Primarily Uses
RMMV
Is there a way to detect which language is displayed with a scriptcall? It would allow me to modify my popup messages accordingly to it. Since I've only a few, I can do it manualy
I think ConfigManager.language is what you're looking for.
When I put the SFG_Localization after the YEP_BattleEngineCore, it removes battle skill name displays and it's fixed when it's above. Is there any way to fix that ?
I don't quite get the problem. If it works when it's above, why not just put it above?
When I'm adding messaged or modyfing some of them in the editor, I export the main language again and it doesn't modify the game text file. I didn't find where this erreor came from.
I'm not quite sure what you mean here.
 

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
162
Reaction score
97
First Language
French
Primarily Uses
RMMV
I think ConfigManager.language is what you're looking for.
Alright, I'll try that!

I don't quite get the problem. If it works when it's above, why not just put it above?
True.

I'm not quite sure what you mean here.
If we want to have the game.pot, we have to do F9, then export. Right?
If I modify something in the database or a dialogue OR if I add something, if I do again the F9 Export, it doesn't update the Game.pot
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
655
Reaction score
267
First Language
English
Primarily Uses
RMMV
Are you editing the game in the editor while the game is running? If that's the case, you need to save the game in the editor, then press F5 in the actual game before any changes will be noticed.

If that's not it, then I'm not sure what it could be.


Is there a way to detect which language is displayed with a scriptcall? It would allow me to modify my popup messages accordingly to it. Since I've only a few, I can do it manualy

For the record, I don't recommend actually doing this. There is likely a way to get those popup messages to be recognized by the plugin. I'd need to know more details of the situation to figure out how though.
 

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
162
Reaction score
97
First Language
French
Primarily Uses
RMMV
Are you editing the game in the editor while the game is running? If that's the case, you need to save the game in the editor, then press F5 in the actual game before any changes will be noticed.

If that's not it, then I'm not sure what it could be.
That's not the case.
Well, that's not a buig problem anyway, when I update my database I just delete my game.pot and I redo the export. Then, I edit the modified thing in the translation file.

For the record, I don't recommend actually doing this. There is likely a way to get those popup messages to be recognized by the plugin. I'd need to know more details of the situation to figure out how though.
alright


Another thing :
The translation of my actor description is creating a bug in the status window.
When it's in English (the main language), there's no problem
When I set the game in French (the translated language), it bugs if the character description is filled. If I leave it empty, I can open my status window but well... there's no description...

Here's the lines in the po file
Code:
#: data/Actors.json
#: $[1]['profile']
#: Database -> Actors
msgctxt "Characters"
msgid ""
"Elliot is a young man who grew up in Moonbright. Reserved and very smart, he wishes to become a great Mage."
"\nHe's often accompanied by his childhood friend, Noah, with whom he secretly trains. A strange mark is tattooed under his eye."
msgstr ""
"Elliot est un jeune homme qui a grandi à Moonbright. Réservé et très intelligent, il souhaite devenir un grand Mage."
"\nIl est souvent accompagné de son ami d'enfance, Noah, avec qui il s'entraîne secrètement. Une marque étrange est tatouée sous son œil."

and here's the error
erreur.PNG
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
655
Reaction score
267
First Language
English
Primarily Uses
RMMV
I can't see a way that this error could be caused by an interaction between SFG_Localization and YEP_MessageCore, though you seem to be using a different version of YEP_MessageCore than the one bundled in the dlc folder. So, my next guess would be that GALV_MessageStyles is the cause. Could you try disabling that and see if it fixes the crash?

Well, that's not a buig problem anyway, when I update my database I just delete my game.pot and I redo the export. Then, I edit the modified thing in the translation file.
If you happen to notice anything that you think might help me track down the issue though, don't hesitate to post it. It may not be a huge issue but it's still something that I'd like to fix if possible.
 

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
162
Reaction score
97
First Language
French
Primarily Uses
RMMV
I'm using YEP_Message_Core v1.19. The one in the dlc package is 1.11
I tried turning off GALV's plugin, modify its order in the plugin list, but nothing changed.

Yes sure thing. If I find more about this issue I'll let you know. This plugin is really great and I'd like to use it to translate my game.

Oh, and I have another error.
I tried to change language on the fly while ingame for the first time and I had this :
erreur2.PNG
erreur3.PNG
Maybe it will help to solve the first problem or just add a new one ^^'
 
Last edited:

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
655
Reaction score
267
First Language
English
Primarily Uses
RMMV
Okay… both errors are unfortunately missing any indication of what the erroneous item actually is. Do you think you could do some quick edits to the plugin?

In YEP_MessageCore, around line 701, between the line that says Window_Base.prototype.setWordWrap and the line that contains text.match, add the following line: console.log('wrapping text', text);

In SFG_Localization, around line 914, just after the line that contains jsonPathSingle, add the following line: console.log('jsonSetPath', p);

To be on the safe side, probably make sure you have a backup of both plugins first. Once you've made the edits, trigger each of the errors and show me what's in the console. There will probably be a lot of messages, but I only need the actual error message and a few lines above it.

I'm also curious about all those "Assertion failed" messages that I'm seeing in your console. That seems to indicate something's wrong as well. Perhaps it may help if you expand one of them so I can see the full error message?
 

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
162
Reaction score
97
First Language
French
Primarily Uses
RMMV
So.
I remade the error and did what you asked
erreur4.PNG

Note that, if I start the game in French and change the language in English on the fly, there's no crash. If I change it back to French, there's no crash as well. But if I start the game in English and switch to French, it crashes.

I made the changes you mentioned in the localization plugin
erreur5.PNG
and the message plugin
erreur6.PNG
I don't know if I did it right.


The crash when I switch language on the fly :
erreur7.PNG


The crash when I open the status window
erreur8.PNG

The console logs are here
Tell me if you can't open them or download them


Note that, commands 26, 27 and 28 have been added manually.
It's for a ring menu plugin made by tomoaky. It allows me to add more commands in this menu.
 
Last edited:

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
655
Reaction score
267
First Language
English
Primarily Uses
RMMV
Okay, so for the status window bug, it looks like your text log doesn't have enough information. This is the key section of the log:
Code:
YEP_MessageCore.js:709 wrapping text Objectcomment: ""note: ""plural: falsereferences: []string: "Elliot est un jeune homme qui a grandi à Moonbright. Réservé et très intelligent, il souhaite devenir un grand Mage.↵Il est souvent accompagné de son ami d'enfance, Noah, avec qui il s'entraîne secrètement. Une marque étrange est tatouée sous son œil."__proto__: Object
You see the word "Object" near the beginning? When you view this log directly in the console, I believe there should be a little triangle next to that word to expand it. Could you let me see what that gives?

EDIT: Hang on, I think I may have misinterpreted it. It looks like it's trying to wrap an internal "localization" object from my plugin, rather than the text itself. Now I just need to figure out why that is…

For the other crash, I can see the path is null. It's not very helpful but it does give me a bit more information… I'll see if I can figure something out. It might also be helpful if you moved the console.log one line up (above the jsonPathSingle) and send me the log again. (You did do it correctly the first time; this'll just potentially give different but still useful information.)

By the way, were you planning to release your game for free?
 
Last edited:

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
162
Reaction score
97
First Language
French
Primarily Uses
RMMV
So, I modified the plugin like this
erreur9.PNG


For the switch language on the fly issue :
erreur10.PNG

Console log in the same drive here


The demo is free but the game will go commercial. I still need at least a couple years of development though
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
655
Reaction score
267
First Language
English
Primarily Uses
RMMV
Hmm. It looks like the crash and the assertion message are the same error… but there's still not enough information to track down the exact issue. My suspicion is that it could have been caused by reducing the number of things in the database (for example, if you had 900 items and changed it to 800) or by deleting an event on the map or even by editing parameters for a plugin, but obviously my plugin does need to handle such things… that's still just speculation though. There could be some other bug that's real.

Your latest log does reveal that the failing path is $[807]['name']. You may be able to find a clue to the cause if you search for that string in Language.json, although I'm pretty sure it's not formatted to be human-readable so that might be a little tough if you don't use an IDE.

By the way, did you try re-exporting the pot file and/or re-importing the po file?

The demo is free but the game will go commercial. I still need at least a couple years of development though


Okay. Just keep in mind what my opening post says about terms, which may mean we need to negotiate something at some point.
 

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
162
Reaction score
97
First Language
French
Primarily Uses
RMMV
It seems this is the problem yes
I have 2 $[807]['name'] entries in the language.json which shouldn't be.

I remade this export.

When I export the main language, I have one $[807]['name'] entry in the language.json
When I switch to the 2nd language, a second $[807]['name'] entry is created. It's not really created, it's a duplication of the $[2]['name'] entry in my armor database
That second entry which is created is an armor while the first is an item. I don't even have 807 entries in my armor database

In my game.pot file and in the fr.po file, there's only one $[807]['name'] entry.


Okay. Just keep in mind what my opening post says about terms, which may mean we need to negotiate something at some point.
Yes of course. I don't mind paying if your plugin works as I need to. Especially when I see how much help you provide me. It's by far the most efficient translation plugin I've seen, but I just can't make it work, unfirtunately.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
655
Reaction score
267
First Language
English
Primarily Uses
RMMV
It seems this is the problem yes
I have 2 $[807]['name'] entries in the language.json which shouldn't be.

I remade this export.

When I export the main language, I have one $[807]['name'] entry in the language.json
When I switch to the 2nd language, a second $[807]['name'] entry is created. It's not really created, it's a duplication of the $[2]['name'] entry in my armor database
That second entry which is created is an armor while the first is an item. I don't even have 807 entries in my armor database

In my game.pot file and in the fr.po file, there's only one $[807]['name'] entry.
Okay, so let me make sure I 100% understand the situation.

  1. If you make sure the language is set to English, then delete the Language.json and run the game again, it should regenerate the Language.json. At that point, it has only one $[807]['name'] entry, right?
  2. Exporting to game.pot. Now does it have one or two $[807]['name'] entries?
  3. Importing from fr.po. Now does it have one $[807]['name'] entries?
  4. Then switch to French in the options menu and check one more time.
This will let me know which step I need to investigate to find the error. It sounds like it's a bug in the switch language step but I'd like to be sure before I start searching for something that might not even be there.

The other thing I'm wondering is, why would it be choosing to duplicate the second armour piece specifically? Is there something special about it? Where is it used? Does it have unusual properties that the other armour pieces don't have? I think it's unlikely that there's something in the armour itself that could cause this, but it can't hurt to check - if there is something unusual, it could be a clue. (Or it could be a red herring.)
 

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
162
Reaction score
97
First Language
French
Primarily Uses
RMMV
Here's what I've done and checked step by step

  1. I've deleted the language.json and the translation folder
  2. I've started my game
  3. I've exported my game which is in English. It has created the translation folder with the game.pot file and the language.json in the data folder
  4. I've checked both files : there's only one entry for $[807]['name']
  5. I've played the game. Everything works fine and I obviously can't switch language yet.
  6. I've double checked language.json and game.pot. at that point and a second entry has been created in the languagae.json file.
here's all the code concerning that item in the language.json
Code:
"Cotton Shirt":{"references":[{"file":"data/Armors.json","location":"$[2]['name']","description":"Database -> Armors"},{"file":"data/Armors.json","location":"$[801]['name']","description":"Database -> Armors"},{"file":"data/Armors.json","location":"$[802]['name']","description":"Database -> Armors"},{"file":"data/Armors.json","location":"$[807]['name']","description":"Database -> Armors"}],"comment":"","plural":false,"fuzzy":false,"string":"Cotton Shirt","formatString":false,"note":""},"A shirt made with cotton.":{"references":[{"file":"data/Armors.json","location":"$[2]['description']","description":"Database -> Armors"},{"file":"data/Armors.json","location":"$[801]['description']","description":"Database -> Armors"},{"file":"data/Armors.json","location":"$[802]['description']","description":"Database -> Armors"},{"file":"data/Armors.json","location":"$[807]['description']","description":"Database -> Armors"}],"comment":"","plural":false,"fuzzy":false,"string":"A shirt made with cotton.","formatString":false,"note":""},
Note that I only have 199 entries in my armor database

I've once again deleted the language.json file and the translation folder, and started the game without exporting the game language. The false entry has been created in the language.json
When I start the game and stay in the game menu, there's one entry. If I click on new game, the second entry is created.

I've once again deleted everything, started the game, exported the main language, imported the French language and switched to it and hitted the new game button
I've checked the language.json and only one entry was there.
I've tried to open the menu and it crashed at that point, but there's still one entry in the language.json

That item has nothing special as you can see in the code. My main characted is just starting the game with it.
 
Last edited:

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
655
Reaction score
267
First Language
English
Primarily Uses
RMMV
Okay, so the extra entry seems to be created when you start a new game… that's interesting.

Is there anything that you do have 807 of? Either something in the database, or maps?

I've tried to open the menu and it crashed at that point, but there's still one entry in the language.json
Eh? Is this the same crash or a different one?
 

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
162
Reaction score
97
First Language
French
Primarily Uses
RMMV
Yes, I have an item in my item database.

I can't check right now but I think it's a new one. Nothing has changed though so I don't know what happened.
I'll give you more information in a couple hours. I'll edit that post.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
655
Reaction score
267
First Language
English
Primarily Uses
RMMV
Hmm, just having more items than armours clearly isn't enough to trigger the bug in the demo project… it might have been a long shot, but I was hoping.
 

Latest Threads

Latest Posts

Latest Profile Posts

Haven't been on here actively in awhile, project is going strong my biggest issue is the STORY, i'm refining the plot and learning so much i decided to take a writers class to improve even more but the programming and functionality of the game is stepping up nicely!
Hi everyone! Here's what I'm working on today! It's one of the dorms on campus. I know I said I wouldn't use assets but I reused a few things from the cafeteria hehe.
FCuxBOMXMAICK5e
I added a little squish effect when characters change direction to try and make things a bit more lively. Though it's a bit hard to see on the fast moving guys.
2f4fiuy.gif
I just discovered this game exists; the premise itself is ****ing hilarious. https://www.humblebundle.com/store/kill-it-with-fire
Can't wait for next update! :)

Forum statistics

Threads
116,123
Messages
1,095,950
Members
151,532
Latest member
evilonemvp
Top