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
We have a project with three languages (en as default, nl and fr). After we approved a new label and downloading the files with the following code:
for (const language of ['en','nl','fr']) {
const contents = await api.getFileContents({
projectId: ourProjectId,
fileId: fileId,
lang: language,
});
const json = await contents.text();
}
The first two requests always return an empty json object {}. The third request will have the labels.
I noticed that adding a timeout between the requests helps, as the second request will already have the labels as one. Switching the order of the requested languages doesn't make a change.
I think that the getFileContents notices that the files are outdated and returns an empty json object while generating the new files. If these updated files are ready by the time the other requests come in, they'll receive the correct, updated contents.
I haven't tested if this is the same when calling the HTTP endpoints directly instead of through this package.
The text was updated successfully, but these errors were encountered:
Version: 1.0.11-alpha.0
We have a project with three languages (en as default, nl and fr). After we approved a new label and downloading the files with the following code:
The first two requests always return an empty json object
{}
. The third request will have the labels.I noticed that adding a timeout between the requests helps, as the second request will already have the labels as one. Switching the order of the requested languages doesn't make a change.
I think that the
getFileContents
notices that the files are outdated and returns an empty json object while generating the new files. If these updated files are ready by the time the other requests come in, they'll receive the correct, updated contents.I haven't tested if this is the same when calling the HTTP endpoints directly instead of through this package.
The text was updated successfully, but these errors were encountered: