JoaoJandre opened a new pull request, #6326: URL: https://github.com/apache/cloudstack/pull/6326
### Description This PR builds on PR #6281, it aims to clean the UI label files by removing all labels that are no longer being used. There are more than three thousand labels on en.json; therefore, I used some scripts to help me with that. The following steps were used to determine which labels where unused: 1. The first script took each key from the English json and searched for that snippet in all the files in the UI folder, saving in another file all the keys that were used. 2. The second script took all the keys in en.json that weren't in the first script's output and saved them to another file. Which therefore contained all the keys that were not being used according to the first script. 3. The third script was made to ensure that all the keys discovered in the second script were not really being used, for that purpose it took each of the keys discovered in the second script and called `grep -r -l -i '<key>'`, saving in another file all the results found in JS, VUE and HTML files. 4. The fourth step was manual, I looked at the fourth script output file searching for keys that had some grep result (there were some). I mean, looking for keys that were being generated in runtime via string concatenation. 5. The fifth step was to create a last script to remove from the original json all keys that were verified that were not really being used and delete them. 6. I tested it, trying to navigate through all the parts of the UI to verify that everything was OK, I found two places that used labels implicitly and re-added them into the json. 7. Finally, after validating that all the used labels were there, I made a final simple script to remove any keys from the other languages' json that weren't in the updated English file. Ps: the `el_GR.json` file wasn't properly formatted (it had a space between every key and its ':'), so when it was loaded/dumped it was reformatted into right format. That's why it shows that every line in it was changed. ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [X] Cleanup (Code refactoring and cleanup, that may add test cases) ### Feature/Enhancement Scale or Bug Severity #### Feature/Enhancement Scale - [X] Major - [ ] Minor #### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [ ] Minor - [ ] Trivial ### Screenshots (if appropriate): ### How Has This Been Tested? This was tested in a local lab, by looking through all the UI and searching any missing labels that could have been mistakenly deleted. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
