Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Suggestion: Comments in strings.txt #8

Open
henning77 opened this issue Mar 27, 2012 · 3 comments
Open

Feature Suggestion: Comments in strings.txt #8

henning77 opened this issue Mar 27, 2012 · 3 comments

Comments

@henning77
Copy link

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]]

@scelis
Copy link
Owner

scelis commented Mar 28, 2012

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.

@jcampbell05
Copy link

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.

@EmperiorEric
Copy link

+2 for general comments! Maybe I'll find some time to contribute for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants