-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add ability to switch textdomains #22
Comments
The The best bet may be to allow one or more old text domains to be specified as an option that should be updated. Something like: addtextdomain: {
options: {
textdomain: 'newdomain',
updateDomains: [ 'olddomain1', 'olddomain2' ]
}
} |
That's what it does, yes. |
Looks like https://github.com/stephenharris/grunt-checktextdomain has a feature than can correct (not just append) text domains. |
Aside from the stuff necessary for passing the parameters from Grunt to PHP, this is really all that was needed to get this working. Anyone up for testing it out or have any feedback on its usefulness? |
^^^ in the Replace with:
when finished. I think the most obvious usefulness is when creating a new theme out of a starter theme. The current updating works well. Updating textdomain 'foo' with textdomain 'foo' didn't cause any problems. Developing it further I'd like to see:
|
Thanks for the feedback, Gary, as well as the detailed instructions for testing. I should really get that incorporated in some documentation somewhere. The |
These changes were released in v0.4.7 |
I ran into this recently where a project was changing names (this can happen for many reasons, but I would imagine the most common is when doing an official fork).
So, I needed to change all the references to 'original-textdomain' to 'new-textdomain'. But as far as I could tell, if a string already has a textomain, it gets ignored, even if the textdomain it has doesn't match the one in package.json.
So, I had to do a manual search and replace to get all the strings switched to the new textdomain.
Is there any way to have this grunt tool do a replacement, either with a new task, or make it the default behavior of
addtextdomain
?The text was updated successfully, but these errors were encountered: