make-pot: add subtract-and-merge flag - #267
Merged
Merged
Conversation
Member
Author
|
@ocean90 Would this solve the issue for dotorg? |
Contributor
As of https://meta.trac.wordpress.org/changeset/10063/ this is actually no issue anymore. My approach is also preserving any comments by using the |
Member
Author
|
Good suggestion with Are there chances that you would adopt this new |
Contributor
|
If if works the same as the current implementation, sure why not. Less code I have to maintain. 😅 |
schlessera
force-pushed
the
add/subtract-and-merge
branch
from
July 19, 2021 16:34
69d82ce to
008d139
Compare
swissspidy
enabled auto-merge
July 20, 2021 10:56
Member
Author
|
It should work the same way now and is ready for review. |
ocean90
suggested changes
Jul 20, 2021
Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>
schlessera
approved these changes
Jul 20, 2021
schlessera
pushed a commit
that referenced
this pull request
Jan 6, 2022
make-pot: add `subtract-and-merge` flag
bazza
pushed a commit
to WordPress/wordpress.org
that referenced
this pull request
May 2, 2022
See wp-cli/i18n-command#267. Props swissspidy. git-svn-id: https://meta.svn.wordpress.org/sites/trunk@11808 74240141-8908-4e6f-9713-ba540dce6ec7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new
--subtract-and-mergeflag to themake-potcommand, which can be used in combination with--subtract. When used, source code references from the generated POT file will instead be added to the POT file(s) passed to--subtractExample:
While I suggested adding dedicated commands for this feature a few years ago, in hindsight thats seems a bit overkill. It's quite the advanced configuration option that's probably only ever used for WordPress core, so just adding a flag feels like the better choice here.
Fixes #105