Closed katinthehatsite closed 2 weeks ago
I suggest adding Sentry or sanitizing the strings with a custom function. My concern is that some translation would include a single quote: ' , which would break the string replacements.
Yeah I think you are right, I tried to break it and it did break. Let me conjure something for this. I will re-request review once I am ready
@sejas I added something simple in https://github.com/Automattic/studio/pull/228/commits/6c1f64f57fe4b160f557c8142d5009734ee10d2b to handle the '
to ensure that it is rendered.
I also found that we have something like https://www.npmjs.com/package/@wordpress/escape-html that we already have available and installed but a single quote breaks when I try to use escapeAtrribute
or escapeHMTL
. Do you think the fix about would be sufficient for this case in combination with Sentry capture?
Closes https://github.com/Automattic/dotcom-forge/issues/7522
Proposed Changes
This PR makes the strings in the "About Studio" window translatable.
Testing Instructions
locale.ts
ingetPreferredSystemLanguages
to return French:src/translations/studio-fr.jed.json
nvm use && npm install && npm start
Notes:
Pre-merge Checklist