I'm trying to import updated translations for already existing documents and am getting an error. What should I do?
Hi Viljar,
Welcome to the Prismic community, I'm checking this issue with our production team, and I will get back to you ASAP.
Fares
Thanks a lot. If you need any sample files, let me know.
And to clarify - locales: are they case sensitive or not? Would de-DE vs de-de make any difference in file name or JSON data?
Any luck?
I tried case-insensitive locale in file name (de-DE vs de-de) and looks like file name is indeed case sensitive
So,
- Estonian is labeled as “new document” which it isn’t, it’s an update, hence the “fatal error”
- German, despite having correct grouplang ID and matching lowercase lang element in json will be uploaded as a completely new document
Am I doing something wrong?
Hi Viljar,
I apologise for the long delay, can you provide us your repository name if a private message if you prefer so that we try to reproduce the issue.
Hi,
We think it might be an issue with the file naming, the filename that you are using is for importing new documents. If you are updating a file that already exists, then you just need to run the export, find that file, leave the filename the same, make the changes, and do the import.
Please let us know if that fixes the issue.
Fares
Thanks, yes, using each files' unique ID as fie name works.
However, could you take it as a feature request - please allow updating translations with their initial names a la translate_(langgroupID)_(locale).json because the current flow does not scale well without extra scripting.
Translation often takes place in some sort of CAT tool, that can easily export filenames with a certain pattern like above but usually does not support assigning unique names for every single file. Plus you really wouldn't want to do it if you have like 10 files in 10 languages...
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
This is being tracked as an open feature request.
If you have another use-case for this feature, you can 'Flag' this topic to reopen. Please use the button to show your support for the feature and check out our Feature Request Guidelines.
Yes, I will tag this as a feature request and send it to our @features-team.
Hi @Fares ,
Is there any update on this feature request?
I could really use this, having the exact same problem as described above: using the english exported file, translating it with a tier service, then trying to import again with the files named translate_(grouplang)_(locale).json.
I'd like that import to create the document if it doesn't exist OR override the existing documents.
Thanks!
Hi @kolin.w,
A feature request has been created for this and sent to our production team.