Skip to content

Comments

Internationalize csv upload #1571

Open
skhaterina wants to merge 1 commit intoOpenEnergyDashboard:developmentfrom
skhaterina:internationalize-csv-upload
Open

Internationalize csv upload #1571
skhaterina wants to merge 1 commit intoOpenEnergyDashboard:developmentfrom
skhaterina:internationalize-csv-upload

Conversation

@skhaterina
Copy link
Contributor

@skhaterina

Description

This PR fixes the internationalization bug where CSV upload messages (success, error, warning) were always displayed in English regardless of the user's language preference. Now all messages display correctly in English, French, and Spanish.

Changes Made:

  • Created server-side translation infrastructure (translate.js, data.js) with 50+ translation keys
  • Modified CSV upload pipeline to pass language preference through the full chain
  • Fixed missing language parameter in loadCsvInput.js
  • Enhanced React components to send Accept-Language headers
  • Enhanced Express routes to parse language from headers

Testing:

  • Manually tested CSV uploads in English, French, and Spanish
  • Verified all success/error/warning messages display in the correct language
  • Ran npm run check - passed

Fixes #703

Type of change

  • Note merging this changes the database configuration.
  • This change requires a documentation update

Checklist

  • I have followed the OED pull request ideas
  • I have removed text in ( ) from the issue request
  • You acknowledge that every person contributing to this work has signed the OED Contributing License Agreement and each author is listed in the Description section.

Limitations

n/a - feature is complete and working as expected. Technical debug instructions remain in English.

@huss
Copy link
Member

huss commented Feb 6, 2026

@skhaterina Thank you for another contribution. This PR is showing 65 changed files. When I looked quickly it seems likely many are not related to the issue you were addressing. There are also files with merge conflicts. A number of files seem associated with the OED work for time-varying conversions that is not yet part of the development branch. Is there any chance this work includes those changes? Please let me know if I can help, answer any questions or you have information to help me understand what I am seeing.

- Created server-side translation infrastructure (translate.js, data.js)
- Added translations for English, French, and Spanish (50+ message keys)
- Modified CSV upload pipeline to pass language preference from client to server
- Fixed missing language parameter in loadCsvInput.js
- All CSV upload success/error/warning messages now display in user's selected language
- Tested successfully in all three languages
@skhaterina skhaterina force-pushed the internationalize-csv-upload branch from 511d737 to d0f86f6 Compare February 7, 2026 01:02
@skhaterina
Copy link
Contributor Author

@huss Hi huss, thanks for catching that. I've cleaned up the branch; it was including unrelated commits from another feature branch. The pr now contains only the internationalization change. It looks like I forgot to include a licensing header, which I will commit soon.I think is causing that failing check.

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.

internationalize new CSV strings

2 participants