Twine: warn when possible passage name?
Issue #4
resolved
Sometimes you get << stuff "string">> where the string is a passage. Since we dont change passage names, that string shouldn't be translated; if it is, we end up with 'error passage doesnt exist' in the game
Enhancement: add a comment in the po file for each string that is inside a <, to say it could be a passage name (and so be careful)? Can we detect them without implementing an interpreter?
Comments (2)
-
reporter -
reporter - changed status to resolved
Twine: the .po file now has warnings for strings that may be passage names and as such shouldnt be translated. (Fix bug 4)
→ <<cset ddedb82c3e7c>>
- Log in to comment
How many strings appear somewhere between << >> ? Are they only passage names? Or are there some fancier ones ?
Digging in Twine wiki: there are regular strings (print, if with strings, etc) as well as passage names (either, visited, visitedTag, tags). So it's not really possible without fully interpreting the language!
New idea: at some other point (maybe at the beginning?) open the file and grab all the 'tiddler=""' to make the list of all the passage names. Then reopen the file and go through the procedure, but when you are about to add a string that matches exactly a passage name to the dictionary, add it, but put in the comments of the .po file "This is very likely to be a passage name ; we advise you to leave it untouched. Hopefully we're not wrong!" This is less coarse and more accurate than saying "this string was in << >> so be careful".