Tilpasset MT-app

Indhold kan oversættes vha. maskinoversættelsesmotorer i Crowdin. Hvis den motor, der behøves, ikke ses blandt de understøttede MT-motorer, kan en egen motor tilsluttes ved at oprette en app.

Oprettelse af en Tilpasset MT-app

Alle kan oprette apps, som udvider funktionaliteten af Crowdin. For detailed instructions, read articles Getting started with Crowdin apps and Creating an OAuth app.

The functionality of some apps is implemented using webhook events, while others use modules. For this kind of app, you’ll need to utilize modules. Moduler er de funktionelle dele, som integrerer hver app med bestemte dele af Crowdin-UI’en og interagerer med den. Sørg for at bruge modulet “custom-mt” i app-manifestet.

Note: Ensure your app uses the same language codes as Crowdin supports. Hvis nogle sprog ikke matcher, så opsæt sprogassociering.

Anmodningseks.:

Anmodningsbrødtekst:

{"strings": ["Start", "Next"] }

Forespørgsel:

  "target": "de"
  "source": "en"
  "jwtToken": "jwt token"

Svareks.:

{
  "data": {
    "translations": ["Start", "Nächste"]
}

Handling of Non-Translatable Elements by Your MT Engine

For strings containing non-translatable elements (e.g., tags, placeholders, etc.), Crowdin replaces these elements with special notranslate tags. This ensures that these elements remain in their original state after the string is translated by the MT engine. Crowdin uses this approach to avoid potential issues that could break exported translation files.

Below you can see the examples of a string before and after the modification.

Here is an example of how a string containing non-translatable elements (tags, placeholders, etc.) looks in Crowdin:

<strong>Task:</strong>

This is how Crowdin modifies the above string before sending it to the MT engine:

<span class="notranslate">0</span>Task:<span class="notranslate">1</span>

If your MT engine already has a similar feature but implements it differently from Crowdin, we recommend adjusting the handling of non-translatable elements in your Custom MT app to match your MT engine’s implementation. Specifically, replace Crowdin’s defaults, like

<span class="notranslate">%index%</span>

with do-not-translate elements specific to your MT engine.

Here you can explore an implementation example of do-not-translate elements in Amazon Translate: Using do-not-translate in Amazon Translate.

If the MT engine sends a translation to Crowdin that doesn’t include all tags in their original state or if they are somehow altered (e.g., translated), Crowdin will ignore such translations and won’t save them to the string.

Installation af en Tilpasset MT-app

Once you create the app, you can install it in Crowdin via manifest.json.

To install the app, follow these steps:

  1. Go to Account Settings > Crowdin Applications.
  2. Click Manual install.
  3. In the appeared dialog, paste the manifest in the Manifest URL field.

Now, you can connect this MT to your projects:

  1. Open your profile home page and go to the Machine Translation tab.
  2. Scroll down to the Custom MT Translator section and select the app you connected from the drop-down list.

Once connected, you can use it to pre-translate content or show translation suggestions in the Editor.

Var denne artikel nyttig?