Issue with translate function - translations of i18n string variable names
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
## 🐛 Bug Report
The translate tool sometimes translates the contents of i18n key variables e.g. `"text {{variable}} text"` becoming `translatedText {{translatedVariable}} translatedText`.
## To Reproduce
Input source JSON into the translate function, the input JSON needs to include variables such as:
```
{"key": "text {{variable}} text"}
```
## Expected behavior
output JSON does not translate {{variable}}, just the surrounding `text` strings.
## Actual behavior
Occasionally the variable gets translated. If the variable gets translated then the i18n string will not render properly.
## Workaround
I created a script to check deeply nested JSON string variables against the original locale source
https://github.com/bitshares/beet/blob/b205710efd26e2150adea036a58180384f27fe89/src/translations/fix_locale_variables_post_translation.js
## Your Environment
Firefox web browser, using https://translate.i18next.com
Contributor guide
Assessment
This issue has not been assessed yet.