Skip to content

feat: Add new locales (fr-CA, pt-BR, sw) and CSP violation reporting - #338

Merged
kilodesodiq-arch merged 7 commits into
ChainForgee:mainfrom
abimbolaalabi:feat/swahili
Jul 17, 2026
Merged

feat: Add new locales (fr-CA, pt-BR, sw) and CSP violation reporting#338
kilodesodiq-arch merged 7 commits into
ChainForgee:mainfrom
abimbolaalabi:feat/swahili

Conversation

@abimbolaalabi

@abimbolaalabi abimbolaalabi commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Closes #291

feat: Add new locales (fr-CA, pt-BR, sw) and CSP violation reporting

Frontend Locales

  • Add fr-CA (French Canadian), pt-BR (Brazilian Portuguese), sw (Swahili) to supported locales
  • Create new translation files for each locale
  • Update LanguageSelector component to include new locales in dropdown
  • Update i18n.ts to import and use new translation files
  • Locales now available: en, es, fr, fr-CA, pt-BR, sw

Backend CSP Report

  • Add CspReportController that logs CSP violations to LoggerService at warn level
  • Controller has @public decorator to allow unauthenticated access
  • Endpoint path: /api/v1/csp-report
  • Update SecurityModule to register CspReportController
  • Add reportUri to Helmet CSP directives pointing to /api/v1/csp-report

## Frontend Locales
- Add fr-CA (French Canadian), pt-BR (Brazilian Portuguese), sw (Swahili) to supported locales
- Create new translation files for each locale
- Update LanguageSelector component to include new locales in dropdown
- Update i18n.ts to import and use new translation files
- Locales now available: en, es, fr, fr-CA, pt-BR, sw

## Backend CSP Report
- Add CspReportController that logs CSP violations to LoggerService at warn level
- Controller has @public decorator to allow unauthenticated access
- Endpoint path: /api/v1/csp-report
- Update SecurityModule to register CspReportController
- Add reportUri to Helmet CSP directives pointing to /api/v1/csp-report
The LoggerService.warn method expects (message, context, meta), not (meta, message, context).

Copy link
Copy Markdown
Contributor

Awesome work on this! Thanks for the contribution 🚀 Merging now.

Copy link
Copy Markdown
Contributor

Hi 👋 Thanks for this PR! There are some merge conflicts with the current main. Could you rebase onto main and push when you have a moment? Once it's clean we'll get it merged 🚀

@abimbolaalabi

Copy link
Copy Markdown
Contributor Author

@kilodesodiq-arch Thank you. All checks have passed.

@kilodesodiq-arch
kilodesodiq-arch merged commit f92dbe1 into ChainForgee:main Jul 17, 2026
5 checks passed
ifygreg01-best pushed a commit to ifygreg01-best/ChainForge that referenced this pull request Jul 23, 2026
…hainForgee#338)

* feat: Add new locales (fr-CA, pt-BR, sw) and CSP violation reporting

## Frontend Locales
- Add fr-CA (French Canadian), pt-BR (Brazilian Portuguese), sw (Swahili) to supported locales
- Create new translation files for each locale
- Update LanguageSelector component to include new locales in dropdown
- Update i18n.ts to import and use new translation files
- Locales now available: en, es, fr, fr-CA, pt-BR, sw

## Backend CSP Report
- Add CspReportController that logs CSP violations to LoggerService at warn level
- Controller has @public decorator to allow unauthenticated access
- Endpoint path: /api/v1/csp-report
- Update SecurityModule to register CspReportController
- Add reportUri to Helmet CSP directives pointing to /api/v1/csp-report

* fix: Correct LoggerService argument order in CspReportController

The LoggerService.warn method expects (message, context, meta), not (meta, message, context).

* chore: update pnpm lockfile

* fix: import LoggerModule into SecurityModule

* chore: update openapi.json with csp-report endpoint

* fix: remove trailing comma in package.json scripts block
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.

Add next-intl locale coverage for fr-CA, pt-BR, sw (Swahili)

2 participants