Create Working-on-it.py - #782
Open
Immaculate0606 wants to merge 2 commits into
Open
Conversation
- Add LocaleDisclaimerBundle type and loader with SHA-256 hash pinning - Support 5 locales: en-US, de-DE, fr-FR, ja-JP, es-ES - Per-locale header/footer templates and legal disclaimer text - Unsupported locales fall back to en-US with pdf_locale_fallback counter - Hash verification runs lazily on first bundle access with startup revalidation available - 66 tests covering locales, fallback, counter, and edge cases
|
@Immaculate0606 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #673
Summary
This PR adds locale-aware header/footer rendering for investor statement PDFs, enabling legal disclaimers to be displayed based on the recipient's locale. It introduces immutable, hash-pinned disclaimer bundles, extends the PDF layout with locale-specific templates, and ensures missing locale resources are handled safely with a fallback mechanism and telemetry.
Changes Made
Added a
LocaleDisclaimerBundletype and bundle loader for locale-specific legal disclaimers.Extended the investor statement PDF generator to support locale-scoped header and footer templates.
Implemented immutable, hash-pinned disclaimer resources for supported locales.
Added golden PDF fixtures for each supported locale to verify rendering consistency.
Added fallback behavior for unsupported or missing locales:
en-US.pdf.locale.fallbackcounter for observability.Updated configuration where necessary to support locale bundle loading.
Files Updated
src/services/(Investor statement PDF generation)src/config/env.tsTesting
en-USfor missing locales and verifiedpdf.locale.fallbackmetric emission.npm testsuccessfully with coverage meeting the project requirements (≥95%).Security & Reliability
en-USfallback path.Documentation
Checklist