You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The strings.txt file format allows comments for string items, by using comment=...
I need some kind of comments which are not related to string items. My use case is a file header where I put project information as well as guidelines on how to format string keys in the specific file.
e.g. like in the INI file format:
; This is a comment
[[MyGroup]]
The text was updated successfully, but these errors were encountered:
This is a good idea, but a little tricky. Since twine needs to be able to both read and write the strings.txt file, in order to preserve comments the parser has to parse and save any comments like that which it comes across.
I'd be happy to merge any pull requests that implement this functionality. I may look into it myself at some point, but for now this feature request has a fairly low priority.
I would imagine you would need to implement some sort of document tree system.
You would need a class which would handle the ini file a lot like an XMLDocument Class may work.
This class would need to handle requests to alter comments for translations (i.e fr = Hello ;this is an ini comment) and would be able to find it in its document tree. It would also be able to preserve comment blocks as it would have them in its document tree.
Then when exporting it, it can just dump the document tree out as an ini file.
The strings.txt file format allows comments for string items, by using comment=...
I need some kind of comments which are not related to string items. My use case is a file header where I put project information as well as guidelines on how to format string keys in the specific file.
e.g. like in the INI file format:
; This is a comment
[[MyGroup]]
The text was updated successfully, but these errors were encountered: