this is raw message in Js
$.mage.__("Please enter a valid Street Address not including " , / , \ , &.")
expected message:
Please enter a valid Street Address not including " , / , , &.
csv files:
I try to translate this text in csv file like example bellow but it’s not work! are there any way to fix it ??
"Please enter a valid Street Address not including " , / , \ , &.", "abc abc valid Street Address not including " , / , \ , &."
"Please enter a valid Street Address not including " , / , \ , &.","abc abc valid Street Address not including " , / , \ , &."
"Please enter a valid Street Address not including " , / , \ , &.","abc abc valid Street Address not including " , / , \ , &."
3
Answers
You need to add special characters with javascript code :-
Check this.
In case you need some more special characters then use these code / short codes into your string.
There are some reserved single character escape sequences for use in strings:
In csv you have to care about 2 characters: the separator char and the quote char (most common
,
and"
).If fields contain a separator they have to be enclosed in double quotes, and if fields contain a double quote this has to be escaped with another double quote (or a
Linux style).
So your example file:
becomes:
Also don’t put spaces between the separator and the field, as in the first line. This could cause some problems with certain parsers.
"Please enter a valid Street Address not including " , / , , &.","Please enter a valid Street Address not including " , / , , &."
add translation in your csv file, after run the below commands:
php bin/magento s:up
php bin/magento s:s:d -f {‘your store language code if you use..’}
php bin/magento c:f