I wanted to add some easy option for players to help me proofread the text in game.
I have a simple script in LUA, like this:
if npc==1 then
picture("wizard.png");
title("Thargiul","Master of LUA");
print("Hello!");
end
So, basically there is some code plus 2 functions that contain text print() and title(). The first have always 1 and the second always 2 parameters, so it's totally trivial at that front. In some very rare cases it can have \" inside a string (but that's a problem I can ignore, so handling these is a bonus).
Now, I wanted to extract the text from it and make, I don't know, maybe CSV file? So it would look like this "Thargiul","Master of LUA","Hello!". Then someone would take the file, correct it and send it back to me. Then I would integrate it back with the main file containing both text and code.
The question is, how to approach this? Both extracting the file and then reintegrating?
Technically I know the answer how I could do it so it's more like a question how to handle this the best way (I would not want to spend too much time coding this). Also I could consider options like using some tool (only if not overly complex) to do it instead of coding the solution.
I'm not interested in the gettext style solution (file parsed and then made into a database and then the game reads from the database, I want a solution where the corrected text is integrated back with the script).