You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue seems to when writing calling parser.toFileFormatted AND only with the ... (three dots)
Ah ok I see the issue here. Because to get the key we do a const keyParts = key.split("."); which splits on the key. I guess this is a limitation and can not be solved in a easy way.
If there are any strings in the key with a '.' it could break the translation process. I just created a simple string Hello World. which breaks the JSON Parser.
It also breaks if there is a period inside of a text to be translated: Hello World. Hello Universe. for example.
This:
"Reference number already in use. Please enter a different reference number": "Reference number already in use. Please enter a different reference number",
results:
"Reference number already in use": {
" Please enter a different reference number": "Reference number already in use. Please enter a different reference number"
},
Update
There actually is a solution to this. When building the map a period is used which then prevents that any key can have this inside of the string. The easiest way to solve this is by using another delimiter. I tested with something like [--] which works but is not really the nice IMHO :-D Any suggestion?
I was testing this GitHub Action with the following *.json input:
The output in the PR was the following:
The text was updated successfully, but these errors were encountered: