OED icon indicating copy to clipboard operation
OED copied to clipboard

internationalize new CSV strings

Open huss opened this issue 3 years ago • 3 comments

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.

huss avatar Jan 27 '22 17:01 huss

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.

huss avatar Jul 11 '22 01:07 huss

We are working on this! (Jesse Garcia & Edwin Kofler), and will message Steve shortly.

davidNicolas-cecs avatar Feb 05 '23 03:02 davidNicolas-cecs

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.

huss avatar Apr 22 '23 15:04 huss

Can i work on this?

skhaterina avatar Nov 19 '25 02:11 skhaterina

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

huss avatar Nov 19 '25 03:11 huss