Open michael-proulx opened 1 month ago
I added the following HTML code to implement image localization
<img alt="200k subscribers img" data-rosey-attrs-explicit='{"alt":"img-alt", "src": "img-src"}' src="https://cdnweb.devolutions.net/web/common/images/assets/mail-subscribers.png">
In the base.json, everything works fine, and I have added the corresponding translations to /locales/fr.json
base.json
/locales/fr.json
{ "pages/index:83f2d7bd-b09b-4b78-94c6-4da5d6add366:0d65b056-3e90-4d5f-a214-ce347f3aa38e:img-alt": { "original": "200k subscribers img", "value": "200k abonnés" }, "pages/index:83f2d7bd-b09b-4b78-94c6-4da5d6add366:0d65b056-3e90-4d5f-a214-ce347f3aa38e:img-src": { "original": "https://cdnweb.devolutions.net/web/common/images/assets/mail-subscribers.png", "value": "https://cdnweb.devolutions.net/web/common/images/assets/mail-subscribers.fr.png" } }
After running the npx rosey build command, the result is:
npx rosey build
<img alt="200k abonnés" data-rosey-attrs-explicit='{"alt":"img-alt", "src": "img-src"}' src="https://cdnweb.devolutions.net/web/common/images/assets/mail-subscribers.png">
As you can see, the alt attribute is correctly translated, but the src attributte remains unchanged (it still points to the original image URL).
alt
src
Do I need to take any additional steps for the image localization (img-src) to work correctly?
img-src
Thanks!
I added the following HTML code to implement image localization
In the
base.json
, everything works fine, and I have added the corresponding translations to/locales/fr.json
After running the
npx rosey build
command, the result is:As you can see, the
alt
attribute is correctly translated, but thesrc
attributte remains unchanged (it still points to the original image URL).Do I need to take any additional steps for the image localization (
img-src
) to work correctly?Thanks!