Skip to content

Clean up fmt:setBundle calls#2408

Draft
sebastian-j-ibanez wants to merge 4 commits into
maintenancefrom
fmt-setbundle-cleanup
Draft

Clean up fmt:setBundle calls#2408
sebastian-j-ibanez wants to merge 4 commits into
maintenancefrom
fmt-setbundle-cleanup

Conversation

@sebastian-j-ibanez

@sebastian-j-ibanez sebastian-j-ibanez commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

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

    • Inserted one <fmt:setBundle basename="oscarResources"/> per JSP (after taglibs); removed inline fmt:setBundle/ and adjusted fmt:message/ across updated pages.
    • Cleaned i18n-dependent URLs and alerts to use fmt:message/ only (e.g., DataTables language JSON, calendar global.javascript.calendar, titles, headings).
  • New Features

    • Added scripts scripts/check_setbundle.py (reports fmt:setBundle usage, supports --list-all) and scripts/cleanup_setbundle.py (auto-inserts a single bundle, removes duplicates; supports --diff, --dry-run), both with GPL headers.
    • Improved scripts/check_setbundle.py to display OSErrors during scans for better diagnostics.

Written for commit 255c433. Summary will update on new commits.

@sebastian-j-ibanez sebastian-j-ibanez self-assigned this Apr 10, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 300 files, and this pull request has 636

@coderabbitai

coderabbitai Bot commented Apr 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 77575f04-bc4b-4cea-8f1b-c81d459f7cff

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fmt-setbundle-cleanup

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sebastian-j-ibanez sebastian-j-ibanez linked an issue Apr 10, 2026 that may be closed by this pull request
2 tasks

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@LiamStanziani

LiamStanziani commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator

Sorry, conflicts are definitely from one of these recently merged PR's:

I can look to resolve these if you want @sebastian-j-ibanez

@sebastian-j-ibanez

Copy link
Copy Markdown
Collaborator Author

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)
@LiamStanziani

Copy link
Copy Markdown
Collaborator

Sounds good, conflicts have been resolved

@LiamStanziani LiamStanziani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@sebastian-j-ibanez

Copy link
Copy Markdown
Collaborator Author

Yup, this PR can be parked until it's a good time to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Look to remove redundant fmt:setBundle calls

2 participants