Модулі

Modules allow apps to extend the Crowdin user interface, create integrations with external services, etc.

Supported Modules

  • Integrations module – insert a new integration page in Crowdin.
  • Editor-panels module – create additional panels in the Editor.
  • Resources module – create an additional panel in the project owner’s resources.
  • Project menu module – create a new tab in the project.
  • Custom MT module – connect machine translation engines, that aren’t supported in Crowdin by default yet.

More Crowdin Apps modules are coming soon.

Integrations Module

Integrations module provides a possibility to create and insert a new integration within the Crowdin project. You can find it in your project’s Applications tab. This module is available to project members with manager permissions (or higher).

Integration module structure:

{
  "integrations": [
    {
      "key": "my-module-key",
      "name": "Module name",
      "description": "Module description",
      "logo": "/logo.png",
      "url": "/integration-page"
    }
  ]
}

Properties:

ключ

Type: string

Required: yes

Description: Module identifier within the Crowdin app.

name

Type: string

Required: yes

Description: The human-readable name of the module.

description

Type: string

Description: The human-readable description of what the module does.
The description will be visible in the Crowdin UI.

logo

Type: string

Required: yes

Description: The relative URL to the integration's logo, that will be displayed in the Crowdin UI.
The recommended resolution is 48x48 pixels.

url

Type: string

Required: yes

Description: The relative URL to the content page of the module, that will be integrated into the Crowdin UI.

Editor-panels Module

Editor-panels module provides a possibility to create additional tabs in the Editor. When using this module in your Crowdin app, you can choose the Editor mode where you’d like the additional tabs to be displayed. Editor-panels module is available only to the project members that have access to the Editor.

Editor-panel module structure:

{
  "editor-panels": [
    {
      "key": "my-module-key",
      "position": "right",
      "name": "Module name",
      "modes": ["translate", "proofread"],
      "url": "/editor-page"
    }
  ]
}

Properties:

ключ

Type: string

Required: yes

Description: Module identifier within the Crowdin app.

position

Type: string

Required: yes

Allowed values: right

Description: The position where the module will be placed.

name

Type: string

Required: yes

Description: The human-readable name of the module.

modes

Type: array

Required: yes

Allowed values: assets, review, translate, proofread

Description: The Editor's mode list where the module will be available.

url

Type: string

Required: yes

Description: The relative URL to the content page of the module, that will be integrated into the Crowdin UI.

Resources Module

Resources module provides a possibility to create an additional panel in the project owner’s resources. This module is available only to project owner.

Resource module structure:

{
  "resources": [
    {
      "key": "my-module-key",
      "name": "Module name",
      "url": "/resource-page"
    }
  ]
}

Properties:

ключ

Type: string

Required: yes

Description: Module identifier within the Crowdin app.

name

Type: string

Required: yes

Description: The human-readable name of the module.

url

Type: string

Required: yes

Description: The relative URL to the content page of the module, that will be integrated into the Crowdin UI.

Project Menu Module

Project menu module provides a possibility to create a new tab in the project. This module is available to project members with manager permissions (or higher).

Project menu module structure:

{
  "project-menu": [
    {
      "key": "my-module-key",
      "name": "Module name",
      "url": "/project-page"
    }
  ]
}

Properties:

ключ

Type: string

Required: yes

Description: Module identifier within the Crowdin app.

name

Type: string

Required: yes

Description: The human-readable name of the module.

url

Type: string

Required: yes

Description: The relative URL to the content page of the module, that will be integrated into the Crowdin UI.

Custom MT (Machine Translation) Module

This module helps you connect machine translation engines that are not supported by Crowdin yet. Once you create this kind of app, you’ll be able to pre-translate your content with the connected MT or enable translation suggestions made by it to be shown in the editor for translators.

Custom MT module structure:

{
   "custom-mt": [
     {
            "key": "custom-mt",
            "name": "Custom MT",
            "url": "/translate"
      }
    ]
}

Properties:

ключ

Type: string

Required: yes

Description: Module identifier within the Crowdin app.

name

Type: string

Required: yes

Description: The human-readable name of the module.

url

Type: string

Required: yes

Description: The relative URL to the content page of the module, that will be integrated with Crowdin.

Add modules to your Crowdin app

To use a module in your app, declare the module in your App Descriptor file under modules, including any required properties. The properties you include control the customization options for your module.

Basic module structure:

{
  "{module_type}": [
    {
      "key": "my-module-key",
      "name": "Module Name",
      "description": "Module description"
    }
  ]
}

Properties

{module_type}

Type: string

Required: yes

Allowed values integrations

Description: The type of module Crowdin app uses.

ключ

Type: string

Required: yes

Description: Module identifier within the Crowdin app.

name

Type: string

Required: yes

Description: The human-readable name of the module.

description

Type: string

Description: A human-readable description of what the module does.
The description will be visible in the Crowdin UI.

Ця стаття була корисною?