How to add a translatable string when using a theme (Dawn)
Reproduction steps
I created a custom liquid block with the following code:
{%- if product.metafields.custom.origin != blank -%}
{{ 'Origin: ’ | t }}{{ product.metafields.custom.origin }}
{%- endif -%}
The result is ‘Translation missing: fr.origin’
I understand that I need to update the schema of my page (not sure how to) and after that I will need to create an entry in en.json.
But I can’t because this is an auto-generated file.
Is there any work-around to add a translated string string in such a theme
Additional info
If I remove the | t filter, the string is not recognized by Translate and Adapt (I think that custom liquid is not parsed)
Thank you but I can’t update the existing locale files (json) as they are auto-generated and I can’t create a new json (ex: en.product.json) because there is a validation error “FileSaveError: The regional settings ‘en’ already exist”.
This auto-generated disclaimer is just here to tell you that the file can be edited via the back-office interface. On a theme, you can access it on the Themes page → Three dots → Edit theme default content. It is the same as editing it via the code so don’t worry as long as you only edit via these two methods