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 parsing of `.js.map` files to improve reliability of JS translations #103
Adds a new
It will parse these using the existing
What about conflicts in comments between the different files. I guess the
Would there be other scenarios we need to take into account here?
I think at the core this isn't so much a problem in parsing map files but rather a more generic one.
What happens if I have the following PHP file?
// translators: %s is the name of the product. __( "Add %s", "my-domain" ); // translators: %s is the name of the post type. __( "Add %s", "my-domain" );
Which, in current behaviour would add both comments:
I think that behaviour is fine for map files as well. If the comment is already there then don't add it. If it's not then add it. If there happen to be two different comments there's really no way to automatically determine which one is more correct so the most sensible thing is to add both.