Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add ability to merge with existing POT file #31
I tried to look through the code to see what is missing for:
I wonder though what header data would be considered the correct one if you merge two files.
So, when using the
Here's what a general header would look like:
Here's my first guess at how headers would be handled then, provided that we can assume we're always working on the same "Project":
Does the above make sense?
That probably depends on what you want to do with the two files.
If you just want a simple POT file that can be imported into GlotPress, I don't think GlotPress checks the headers at all.
I think the main use case for merging strings would be the one I mentioned in #29: generating a POT file from JS strings and then extracting strings from PHP afterwards.
I'm not sure
I'd suggest not adding such a requirement for now (or max. a warning) and see how that goes.
The date should be the current date in both cases, I think. It's a new POT file with new strings after all.
I think so! :-)
Right now, the command creates a new POT file and first adds the strings from the existing POT file to it. Now, I just need to add some tests to check for the POT headers.
After that, we can iterate from there and perhaps add more strict checks in separate PRs etc.