“I think you wanted to say ~”
No, no, please algorithms, don’t try to think for or with me, and let me design and play games quietly.
In the Inform 6 libraries, this sentence, from PunyInform, appears when the player enters an incomplete, vague or too long command. It is followed by an attempt by the algorithm to explain the bad syntax of it.
Is this really necessary for a library like PunyInform? If the sentence is misunderstood, just say it, and move on.
But above all, it is a nightmare to translate.
I don’t know whether it’s necessary in PunyInform, but this kind of error-with-suggestion is the best way to support IF newcomers without changing the classic parser experience.
(If you want to change the classic parser experience, that’s another matter.)
Hm, why not “Je pense que tu voulais dire…” ? Or the problem is that you have changed the input around so it’s more “informese” than French?
For the French translation, you could comment out the whole block of code printing what the parser thinks the player wanted to say, and just print “That didn’t make sense. Please try again.”
We certainly think it’s a good thing that the parser can explain what it expected, especially since, at least by default, it doesn’t try to automatically figure out which object you mean when you leave something out. So if you type “unlock chest” and the closest match in the grammar is “unlock noun with noun” then, without this code, the parser would just say it didn’t understand the sentence. I think it’s a lot more helpful if it tells you that you must have meant “unlock chest with something”.
I think it is good the default is the complicated solution. The game author can then delete the complicated parts from the files if they want something more simple. Of course, people without coding experience may find it hard to delete the complicated parts.
Just to help out if this is what you want to do. This is the code section in parser.h. Comment out everything before the last print statement, and change that print statement to an error message of your choice.
That’s what I’ve been doing while I’ve been waiting to take care of it, but it’s not a priority. In the meantime, I have a satisfactory answer: “Your command is incomplete, vague or too long.”
I have made good progress on the French translation.