The app allows you to generate a resource files out of translate Crowdin strings.
This app allows you to create your own simple bundle generator using JavaScript.
JavaScript code is executed in a sandboxed environment with no access to I/O (file system, network) or external NPM modules.
This application will expose the following variables in the global environment:
strings
- an array of objects containing all strings that Crowdin has identified as translatable. Please refer to the Developer Portal to learn more about the data structures.projectId
- the Crowdin project ID;error
- the error message to return. If set, the import will be aborted and the error message will be shown to the user;code
- this variable should contain the content (string) of the file to be exported after your code is executed;const result = strings.map(s => {
return {
id: s.identifier,
text: s.translations[languageId].text
}
})
content = JSON.stringify(result);
This code exports strings as JSON, an array of objects with two properties, id' and
text'.
Released on Sep 23, 2023
Updated on Sep 26, 2023
Published by Awesome Crowdin
Identifier:custom-bundle-generator