 Welcome back to the channel. In this video I'm going to show you how you can maintain your code so that when you translate a string and let's say you miss the text domain, this is fixed for you. So it could be that you may be made an error and you forgot to add your text domain, this will be fixed for you. Now let's jump into the code and see how this GitHub action is actually triggered for us. So I'm going to begin by creating a new repo right here and once this is done I'm going to go and click on the actions page right here. Now here we have a number of actions that are available for us to just use like you can automate so that when someone contributes your repo for the first time they get a little greeting that you've added or you can push labels to particular pull requests and so on or you can check on your still issues and pull requests. Now the whole point of GitHub actions is to automate the processes that we go through every day. For example, like I've shared about greetings you might want to make your new contributors feel welcome so you can automate a thank you for the pull request we're going to review it and get back to you. Now similarly I've done a search on WordPress and what actions are available to see what's in space for us and there are so many there are those that can help you to deploy to the WordPress repo, there are those that can help you check the version of WordPress to see whether what you're saying you're testing against is actually true, there are those that can help you to fix the translation files or even the text domains. Now these are the two that we shall begin from and then in the subsequent videos I'll show you how to make other actions or how to use other actions inside the WordPress repo. Let's start off by adding some text domains inside our repo so let me click on this action. I've started this because it's been really helpful and you can see from here they tell you what's going to happen. Now we're giving an example of a workflow file here and basically we're going to add this inside our own repo. Now when we come back to our repo all we need to do is go to the actions panel and click set up this workflow. Of course GitHub knows where this file belongs and where it should be seated so it makes for us a provision by adding the sub directory of .github slash workflows slash and then if we put in the blank file. Now this blank file shows us what a basic workflow should look like so we have the name right here for example then we have what triggers this action run on so on you can have it on push you can have it on pull request you can have it on a number of other triggers that GitHub has now on push you can then add on which branches you want this to run for example you might want it to run on the main or you might want it to run on your dev branch or whatever other name you've given your branch or you might want it to run on two different triggers and that's why we have this here now then you have the jobs that set what should be done in this continuous development we have the server that we've set up so we want it to run on Ubuntu which is the latest version and these are the steps that it should take and it can relate to any of the other actions that are available now of course you can search for the different actions right here like I can choose to look for the word press text domain and if I click on it I get a sample of the code that should be here but this code is relatively different from what we had copied before so let me paste in the right one and say text dash domain and that's going to be our yaml file and I'm going to paste in the right code so in here we want to add the missing text domain or I can make it short for add missing text domain and then we want it to be done on when we push to the branches and the branch that we want is the dev branch now our workflow is such that we always make our commits to the dev branch and then once everything is working on the dev branch we can then push it to master for storage or for making our particular releases so we'll have it running on Ubuntu it's going to use the github actions and it's going to use a github action that is from Varun I find this name very hard to read but that's where the action is going to come from and the text domain that we're going to be adding to our code is the one that is specific to our particular repo now text domains are supposed to match the slag of that particular repo so I'm just going to paste our wp dash github dash action here I'm going to add a token onto our repo which we shall call repo token so I'm going to do this and then hit commit and this will create for us the new file and we're almost ready to roll now the next thing we need to do is create our token on our github repo so I'll go to settings on our repo and I'm going to add secrets and in the secret we're going to create a new secret which we're going to call repo token now it requires a value that we have to set up as a developer so I'm going to go into my on page and then go inside the settings of my profile and then I'm going to go to developer settings I'll go to personal access tokens then I'll click generate new token and I'll call this repo token now I'm going to assign all the rights that I can on my repo known that they are all needed you basically need to just have the right packages on you need to be able to add the workflow actions on it but I'm going to add all the rights so that when I use this for any other action it will be useful to me so I'm going to copy this particular code that has been given or I can use this little icon to copy it then I'll paste it in here and then we'll click add secret now once I'm done with this and I go back to my actions our action is set we have one action which is add missing text domain and it will only run if we commit some code to our dev branch so I'm going to create a dev branch right here click create dev branch and inside our dev branch I am going to add a new file so the new file that we're going to have here is we're going to call it text dash domain dash example dash action dot php I'm going to paste some code and our code is just the php line it has a comment it has an action that gets the title and then using this function we are able to modify whatever the title is so we have loosely translated our string which is hello is the right word but let's say we forgot to add the comma and then add the text domain so because we have this action running at setup if I commit to our dev branch or if I use another branch to make a pull request so I'll just commit directly to this branch if I commit to it and we'll see that we have a notice here telling us that we can make a pull request to the to the other branches and there's a little orange circle bulb here showing us that the commit we've just made still has some things that are running so I'm going to reload this and you will see that now that everything is done we have this GitHub bot that tells us that there was something triggered at that particular moment and that if we go and view this file we're going to find that it has made our text translatable by adding the text domain here and adding the comma now this action would be smart if it helps you add the text domain if you have someone who always forgets them or you just don't want to write them it's repetitive for you in your head so this will help you to do the right thing but if you're always committing the right code then this action will probably not be useful for you so thank you for watching this video I hope it was helpful to you give it a thumbs up if you think this is something that you will use let me know in the comments if you're using any other actions and don't forget to subscribe to get more content that is as good as probably this one otherwise enjoy your day