-
Notifications
You must be signed in to change notification settings - Fork 57
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
Keep order in po files #58
Comments
Hola @xavivars, Yes this happens because of implementation details made to ensure consistent ordering of Po files. This also means that after your first MR, al consequent should be straightforward. I'd say, if you're working with Po files as an editor, you may better leverage GNU gettext tools available for that. Sorry I can't help further on this one. |
Yeah, that's the problem... I don't really work with the files as an editor, but instead I'm trying to automate some of those editings... |
I'm afraid you'll need to write your own file exporter for this use case. Maybe as part of your script, instead of calling |
I was hoping to avoid string manipulation at all (reason why I started using Thanks! |
I'm using the library to apply some changes to some existing PO files (from some open source projects), but due to how the library keeps the PO file internally, it's pretty hard to be able to use it:
When "writing back" the po file to text, it reorders all translations, which makes it impractical to later submit an MR to the upstream project.
This simple code (with input and output files attached) demonstrates the problem.
in.po.txt
out.po.txt
Is there any way to "reconstruct" the pofile to how it was before parsing it?
The text was updated successfully, but these errors were encountered: