File Post-Import Processing Module
The post-import module allows you to modify the strings parsed from your files after the file import. This module works with both the source strings and their respective translations. The pre-import module is especially useful if you’d like to preserve the original file structure and parse it as it is but want to make some changes to source strings, context, string translations or add labels, and maximum length limits for translations, etc.
With the help of the post-import module, you will get a payload with the file content and strings parsed from it. Using the post-import module, you can modify the parsed strings in a number of ways (e.g., split, merge, or add new strings) and return the modified strings. This allows you to customize the strings without directly modifying the file content.
Access
You can grant access to this module to one of the following user categories:
For Crowdin:
- Only me (i.e., project owner)
- All project members
- Selected users
For Crowdin Enterprise:
- Only organization admins
- All users in the organization projects
- Selected users
Structure
Properties
key | Type: Required: yes Description: Module identifier within the Crowdin app. |
url | Type: Required: yes Description: The relative URL triggered on file import, update, and translation upload. |
signaturePatterns | Type: Description: Contains |
Communication between File Processing App and Crowdin
When importing a file, the system detects an appropriate post-import module using the signaturePatterns
parameter and makes an HTTP request to the app’s URL ($baseUrl . $url
) for further processing containing the extracted strings.
The file processing app will modify the received strings according to your needs. The post-import module allows you to split, merge, add new strings, or edit the attributes of the existing ones. Once the modified strings are returned from the post-import module, they are added to the Crowdin project and become available for translation.
Request to the File Processing App
Request payload example:
Properties:
jobType | Type: Value: Description: Specifies the action of the file post-import module. |
file.content , file.contentUrl | Type: Description: Parameters used to pass the base64 encoded source file content ( |
strings , stringsUrl | Type(strings): Type(stringsUrl): Description: Parameters used for extracted strings after the file import. |
Expected Response from the App
Response payload example:
Properties:
data.strings , data.stringsUrl | Type(data.strings): Type(data.stringsUrl): Description: Parameters used to pass the modified strings content. |
error.message | Type: Description: An error message that can be passed from the app to Crowdin and will be visible to a user in the UI. |
Strings Array Structure
Below you can see an example of the strings that app will receive after the import. The same structure is used for the modified strings in the app response.
Payload example:
Properties:
uniqId | Type: Description: Unique identifier within the file. |
identifier | Type: Description: Visible string key. |