When I tried to translate this
{
"title":"hello"
}
I got {
"título": "hola"
}
Why did it change the key? {
"title":"hello"
}
I got {
"título": "hola"
}
Why did it change the key?Doing it directly with ChatGPT was pretty straight forward.
```
The following is a piece of JSON where the values are strings in the English language.
{
"title":"hello"
}
Please translate the values into Spanish without altering the keys of the JSON object.```
Responded with:
```
{
"title":"hola"
}
```EDIT: Looks like this is the prompt being used:
`Translate a i18n locale json content to ${targetLang}.`
Just my opinion, that prompt needs improvement.
The request and response that I replied to would be a fine starting point. It already gets across keys aren’t translated but values are. I’d add a few more entries to show other things like “match the punctuation/capitalization level” and “use the source text for untranslatable names”.