I was going to play around with translations (the plan is to add a translation)
But I’m stuck.
I managed to start the dev build, but that’s it.
I see some existing translations there, how do I change to one? The docs suggested to add something in Options.dinky. Where? As far as I can see, there is no in-game UI for changing languages right?
If I edit an existing translation, will I need to quit the game and relaunch it to see any changes?
My next question; can we add variables/placeholders to existing phrases?
In the game, it’s Talk to <name>, but I would likely need to have it the other way around, with the name first; <name> to talk … kind of. But in another language (surprise)
I did this 11823 Talk to $NOUN1$ Talk to $NOUN1$ VerbHelpers.dinky
But I am getting the feeling that this might not be possible using DeloresDev?
It’s hard to get grammar right when building sentences in such way, this may be true for a lot of non-English languages.
Also see this thread for other kind of language-related problems: Delores: Brazilian Portuguese translation
Sometimes you have to make a compromise and live with strange grammar in such games.
If there is an easy logic to this then maybe Ron can implement this by using some flag to switch the sentence structure kind per language.
Or maybe parameters are easier.
Note that using parameters will not work well for stuff which may be voiced later, but for such SCUMM-like interface texts it could be OK.
What language are we talking about? Japanese? How have been such games translated in the past?
Sorry, I see now that “Talk to” has no placeholder at all.
Unfortunately I’m on Linux now so I can’t play around, but looking at VerbsHelper.dinky (function _replaceObjectItem, line 281) it seems that if the translation contains placeholders, they’re automatically inserted. But it’s done only for inventory (UIHelpers.dinky, function dragInventory at line 204).
I think you can change the logic so that instead of doing name = (verb_name) ? (TR(verb_name)+" "+TR(name)) : TR(name) it calls _replaceObjectItem if the translation contains a placeholder.
name = (verb_name) ? strreplace(TR(verb_name), "$NOUN1$", TR(name)) : TR(name)
I guess doing disruptive edits like this would make all other languages having to edit their Talk to X line.
Also, this might break other translations that rely on _create_hover_name()… but it’s fun to play around.
Good job. I don’t know if @RonGilbert wants to do such change right now since he is preparing a new release, but it’s probably a good idea to do such change at some point.
I think it is a good change. It’s not hard to make, but it would mean the existing languages would need to add a few lines. I don’t think it would break anything once the lines were added. I’ll look at adding it.