Introducing Bulk Pre-Translations for General Translation Editors (GTEs)

We are excited to announce a new functionality designed to enhance the WordPress translation experience: Bulk Pre-Translations. This feature allows GTEs to pre-translate stringsString A string is a translatable part of the software. A translation consists of a multitude of localized strings. using three different technologies:

  • Translation Memory (TM) – Leverages our internal translation database to suggest the most accurate matches.
  • OpenAI (ChatGPT) – Provides AI-generated translations using your custom API key and configuration.
  • DeepL – Utilizes DeepL’s machine translation APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. for supported languages, ensuring high-quality results.

With this new tool, strings are automatically imported into the “Waiting” status, where they await your review. This means you can focus on evaluating, modifying, or approving translations, saving significant time and effort.

How to Use Bulk Pre-Translations

To access this feature, you must be a General Translation EditorGeneral Translation Editor A General Translation Editor (often referred to as GTE) is a person, who has global access to validate strings on all projects for a specific locale. (GTEGeneral Translation Editor A General Translation Editor (often referred to as GTE) is a person, who has global access to validate strings on all projects for a specific locale.). Here’s how you can start:

  • Navigate to the translation table of the project you wish to translate.
  • Select your preferred translation engine:
    • Translation Memory
    • OpenAI
    • DeepL
  • Choose the strings you want to pre-translate—either select all or pick specific ones.
  • Click the “Apply” button to initiate the pre-translation process.

Understanding the Translation Engines

  • Translation Memory: Uses the first suggestion from our internal memory with 100% of accuracy. While it’s fast and often accurate, occasional inconsistencies may occur, especially if multiple translations with similar accuracy exist. We hope we can reduce the number of incorrect translations when we will release the Bulk update tool for the GTE in the Translation Consistency improvement.
  • OpenAI: Relies on your custom API prompt, offering flexibility but requiring fine-tuning to achieve the best results.
  • DeepL: Limited to the languages supported by its API but known for high translation quality.

Limitations to Keep in Mind

While this tool offers numerous benefits, it’s essential to understand its limitations:

  • Translation Memory prioritizes the first 100% match, which may not always be the most appropriate translation.
  • OpenAI and DeepL make external requests for each translation, which can lead to 504 (Gateway Timeout) errors if too many strings are processed simultaneously. Future updates may introduce limits to mitigate this issue.

Benefits of Bulk Pre-Translations

This functionality brings several advantages to the WordPress translation workflow:

  • Faster translation process: Automate bulk translations to handle large projects more efficiently.
  • Improved consistency: Leverage Translation Memory to maintain uniform terminology across projects.
  • Flexibility and customization: Use AI-based engines like OpenAI and DeepL to tailor translations based on your needs.

Suggestions for Optimal Use

To maximize the potential of Bulk Pre-Translations, consider the following tips:

  1. Optimize your OpenAI prompt: Craft a clear and concise prompt to improve translation accuracy.
  2. Limit the number of strings per request: Especially when using OpenAI or DeepL, this helps avoid timeout errors and ensures smoother operation.
  3. Manually review translations: While these tools provide significant assistance, automatic translations may still contain errors or context mismatches. Always review before approving.

We encourage all GTEs to explore this new feature and share feedback on your experience. Your input is invaluable in refining and enhancing the WordPress translation ecosystem.

Happy translating! 😊

#deepl, #openai, #translation, #translation-memory

OpenAI’s gpt-4o-mini model is available at translate.wordpress.org

The last OpenAI model, gpt-4o-mini, released on July 18, 2024, is available to be used at translate.wordpress.org. To update it, you can do it at https://translate.wordpress.org/settings/

The available models at translate.wordpress.org are gpt-3.5-turbo, gpt-4, gpt-4-turbo, gpt-4o, gpt-4o-mini.

#ai, #improve, #openai

Added DeepL Pro and model selection in OpenAI

We have released two updates related with the external tools we have to suggest translations.

DeepL Pro

In the Translation Settings, you can start using DeepL Pro. You need to select the “Use DeepL APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. Pro” checkbox and to add the DeepL Pro API key.

Select the OpenAI model

In the Translation Settings, you can select the OpenAI model you want to use. We have 4 different models:

  • gpt-3.5-turbo. The default model.
  • gpt-4.
  • gpt-4-turbo.
  • gpt-4o.

Be careful, because the price changes a lot from one model to another. By default, we set the cheapest option.

#chatgpt, #deepl, #improvements, #openai

Adding ChatGPT and DeepL in the Translation Memory

We are testing ChatGPT and DeepL, utilizing their AI translation services, as helpers to improve the translator’s work. We have deployedDeploy Launching code from a local development environment to the production web server, so that it's available to visitors. an update to enable them at translate.wordpress.org. This experimental feature requires an APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. key for it to be enabled and will not be visible until the keys are added (full instructions below).

We’re interested in hearing your feedback about how you’ve found this feature. We’d like users to test this functionality and if it seems like it will be useful, we’ll look into enabling it for all users and use a site-wide API key associated with wordpress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ in the future.

When enabled, you will see the proposed translations as new rows at the bottom of the “Translation Memory”. Please keep in mind that these are just additional suggestions, and that you have to review and improve them manually before using them. But, first, you should activate one or both of the translation services. The next section explains how to enable them.

Enabling OpenAI/ChatGPT

API key

To be able to use it, you need to have an OpenAI account, and you need to create a free API key. Once you have the key, you have to add it in your translation settings.

Custom prompt

You can (and I recommend to) add a custom prompt. ChatGPT will receive these instructions in the translation query, before the glossary content for this translation and language. You can see the custom prompt I have been using to make some translation tests to Galician and to Spanish. More about the prompts below.

Temperature

The temperature is a value between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

Other interesting information

The system is using:

  • The gpt-3.5-turbo model.
  • A maximum number of 1000 tokens.
  • n (how many completions to generate for each prompt) to 1.
  • A 20 s. timeout to query the OpenAI API.

Enabling DeepL

To be able to use it, you need to have a DeepL account, and you need to create a free API key. Once you have the key, you have to add it in your translation settings.

We always translate from EN-US – English (American). DeepL only supports these target languages:

  • BG – Bulgarian
  • CS – Czech
  • DA – Danish
  • DE – German
  • EL – Greek
  • EN-GB – English (British)
  • ES – Spanish
  • ET – Estonian
  • FI – Finnish
  • FR – French
  • HU – Hungarian
  • ID – Indonesian
  • IT – Italian
  • JA – Japanese
  • KO – Korean
  • LT – Lithuanian
  • LV – Latvian
  • NB – Norwegian (Bokmål)
  • NL – Dutch
  • PL – Polish
  • PT-BR – Portuguese (Brazilian)
  • PT-PT – Portuguese (Portugal Portuguese)
  • RO – Romanian
  • RU – Russian
  • SK – Slovak
  • SL – Slovenian
  • SV – Swedish
  • TR – Turkish
  • UK – Ukrainian
  • ZH – Chinese (simplified)

If your language is not supported by DeepL, you will not see this row.

We are using the free layer of DeepL, with a maximum of 500,000 chars translated each month. If you need to use the premium API, please, pingPing The act of sending a very small amount of data to an end point. Ping is used in computer science to illicit a response from a target server to test it’s connection. Ping is also a term used by Slack users to @ someone or send them a direct message (DM). Users might say something along the lines of “Ping me when the meeting starts.” us in the comments.

Disabling them

To disable one of these helpers, or both, you only have to remove the API keys.

Disabling feedback in current, reject and old stringsString A string is a translatable part of the software. A translation consists of a multitude of localized strings.

It doesn’t make sense to use these external services when the translation is in one of these statuses: current, reject or old. If you want to disable the feedback in these situations, decreasing the external API usage (and cost), will have to enable the checkbox you see in the image below.

OpenAI Prompts

The OpenAI prompt showed before is an initial approach, useful for my mother languages. I think it will be very interesting to share the different prompts you will use with the different languages, so we will improve our prompts. Please, add your custom prompt in the comments.

Please, write your prompts in English, because the prompt is added to a query with the glossary parameters and other small things, so if you write your prompt in another language, the query to ChatGPT will use 2 different languages.

#chatgpt, #deepl, #openai