internationalize new CSV strings
Is your feature request related to a problem? Please describe.
The CSV upload feature has a large number of strings that are returned to the user. They are all in English. They should be internationalized as is the case for other messages for user.
Describe the solution you'd like
The strings are believed to reside in these files:
- src/server/routes/csv.js
- src/server/services/csvPipeline/uploadReadings.js
- src/server/services/pipeline-in-progress/loadCsvInput.js
- src/server/services/pipeline-in-progress/loadArrayInput.js
- src/server/services/pipeline-in-progress/processData.js
- src/server/services/csvPipeline/uploadMeters.js
- src/server/services/csvPipeline/success.js
- src/server/services/csvPipeline/saveCsv.js
Describe alternatives you've considered
For now, the user only sees English.
Additional context
None.
Thanks to @KatherineVickstrom for helping look into this as a quick issue to address. That helped me realize that we have never done translation on the server side so something new seems needed. What is not yet clear but quick thoughts are:
- Get react-intl to work on the server but it does not currently use React. A web search indicated it might be possible outside React but it will mean new code/effort.
- Pass back strings with the data.js translation key to then replace on the client side. Another option might be passing back the string with an error code or the translation key for substitution. (Okay this really needs more thought.)
I'm open to ideas on how to do this as the string are returned to the user. I'm just trying to record the issue.
We are working on this! (Jesse Garcia & Edwin Kofler), and will message Steve shortly.
PR #866 worked on this. We need to decide the direction to go in a future release.
Update 7/24: Since it has now sat for a while, I am closing the PR until decisions are made. We may want to open it back up when someone is ready to work on this.
Can i work on this?
Can i work on this?
@skhaterina Yes, you are welcome to work on this. As the issue indicates, there has been previous work and discussion to consider. Please let me know if we can help (but I'm not expert here).