Clean up fmt:setBundle calls#2408
Conversation
…, add script to cleanup tags
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request implements a project-wide cleanup of redundant <fmt:setBundle> tags within JSP files to improve code consistency and maintainability. It introduces two Python scripts, check_setbundle.py and cleanup_setbundle.py, to diagnose and automate the refactoring process by ensuring only a single resource bundle declaration exists at the top of each page. I have no feedback to provide.
|
Sorry, conflicts are definitely from one of these recently merged PR's: I can look to resolve these if you want @sebastian-j-ibanez |
|
Sure, if you don't mind and have a second. |
224 Reolved Conflicts (Resolved by taking incoming maintenance changes, and re-running fmt:setBundle cleanup script)
|
Sounds good, conflicts have been resolved |
There was a problem hiding this comment.
Looks good to me!
One thing to note is that it might be better to hold off on adding this to maintenance for a bit, since Carmen will most likely be creating a security related package towards OpenOSP soon, so it might be better to wait until that is created to merge this in - (if she decides on merging maintenance as a whole instead of merging individual security branches that have already been merged into maintenance at this point).
|
Yup, this PR can be parked until it's a good time to merge. |
Summary by cubic
Standardized JSTL i18n by placing a single <fmt:setBundle basename="oscarResources"/> near the top of each JSP and removing inline duplicates. After merging maintenance, re-ran the cleanup and expanded coverage across admin, appointment, billing (BC), PMmodule, apps, and administration pages.
Refactors
global.javascript.calendar, titles, headings).New Features
scripts/check_setbundle.py(reportsfmt:setBundleusage, supports--list-all) andscripts/cleanup_setbundle.py(auto-inserts a single bundle, removes duplicates; supports--diff,--dry-run), both with GPL headers.scripts/check_setbundle.pyto display OSErrors during scans for better diagnostics.Written for commit 255c433. Summary will update on new commits.