File has checksum?

Before update new translations (post new translation), we want to check file checksum.
Now actual props:

"id": 565,
"projectId": 484497,
"branchId": 557,
"directoryId": 561,
"name": "Localizable.strings",
"title": null,
"context": null,
"type": "macosx",
"path": "/master/mobile/iOS/Localizable.strings",
"status": "active",
"revisionId": 24,
"priority": "normal",
"importOptions": {
"contentSegmentation": false,
"customSegmentation": false
},
"exportOptions": {
"exportPattern": "/iOS/Localizable.strings"
},
"excludedTargetLanguages": null,
"parserVersion": 6,
"createdAt": "2021-11-09T23:30:36+00:00",
"updatedAt": "2025-01-24T11:15:46+00:00"

But is it possible add md5 or file size?

on our side we check with our translation file, if the same, we will not send any network request)

Hi!
Let me check if from our side and we’ll reply to you with the update

Hello there,

Can you clarify, do you want to compare the source file with the translated file? Because it is clear that they will be different. So it is not 100% clear from the request what exactly you want to do.

The typical practice of checking the file content is when downloading translations from Crowdin, but not when uploading translations to Crowdin (we will not add anything).

So, when downloading translations, there is the Build Project File Translation method, where there is an opportunity to check for updates using the If-None-Match header. In other cases, it is not a big deal if you make a network request, Crowdin will skip everything that does not need to be updated.

Hope this helps!

and why I need download translations as typical practice? this is expanded network activity, if I can simply get checksum of file and check this without any downloading?

Hello Dima,
Our case is change source and translation file on new revision.
Next our steps, we don’t know what is stored in the source file under your Crowdin server.
The step:

  1. get files from project
  2. save our new file in storage
  3. put new source to file
  4. update all translations file on new version

But, if file the same? why do we even need to add the file to storage?
if file will be has property as checksum, we don’t move 2-4 steps

I hope I explained this well:)

Hi @Smartlabs
Thanks for the provided details with your workflow, we’ll get back to you with updates

Hi @Smartlabs

The checksum analogue - If-None-Match header is available in the API method of downloading the translated file:
https://support.crowdin.com/developer/api/v2/#tag/Translations/operation/api.projects.translations.builds.files.post