Identifying strings with the unique key - Crowdin and other localization tools

Hi,

We are using Crowdin plugin for localization with Prismic and we are facing the following challenge:

Prismic is currently not assigning keys to the translations itself (it is treated as a regular json key:value where key is always text). This is fine from dev perspective, but when it comes to localization this causes a bit of an issue as any change in the file causes localization software to think that the entire file has changed. Usually when content is tracked with the unique keys this kind of software is able to recognize where exactly the change is and apply it there.

Have you had any considerations around this particular problem? Maybe you saw some possible solutions for it?

Feature Idea (one per thread): adding unique key to each translation key

Issue that it solves: ability to partially update content rather than re-translating entire document after an update

Screenshot or video of the issue (if applicable):

Hi, @damianb

I'm doing some tests and gathering some information and will get back to you soon,

Fares

Hi @damianb I will not be available in the next week and I hand this to someone from the@Prismic-Support-Team

Hello Damian.

Could you show us an example of the object that the Crowdin plugin is trying to interpret?

Every document within your repository has metadata. The values of lang and alternate_languages are part of every document and its translations. Perhaps these values can help you to carry out your translations.

{
  ...
  "lang": "en-us",
  "alternate_languages": [ ],
  ...
}

I haven't personally used Crowdin's API, but I'm assuming they require the JSON to have a specific format, and maybe the documents don't have that exact one. This is just speculation.

Hello @damianb

We close the threads after seven days without new activity. If you want to continue the conversation, you can easily flag it to reopen it and add a new comment.

Thanks.

Threads close after a period of inactivity. Flag this thread to re-open it and continue the conversation.

Hi Pau,

The issue in question has nothing to do with the meta data.

Issue is related to the text to be translated, currently prismic returns them as:

"text": "text to be translated"
"text": "text to be translated 2"
....

which means that Crowdin and other localization software do not have a way to know which string has actually changed as they rely on keys, and in this case - the key is not unique. So when I have a change on the json file to even 1 letter within the string, the entire document is considered to be new and requires retranslation.

For this kind of software, you should provide

string1:"text to be translated"
string2:"text to be translated 2"

where string1 and string2 are unique. If needed it can be wrapped in "text" or any other object, the key here is that "key" must be unique.

I understand. Thanks for the clarification.
For the moment, Prismic doesn't offer this type of implementation within the JSON response.
Since it is a tool outside of Prismic, we have no control over how it behaves with your repository API.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.