Community Team Training #11

Using Translate Live

Alex Kirk
Alex Kirk
WordPress.orgakirk
Blogalex.kirk.at
Matrix@alex:kirk.at

Translating WordPress

Polyglots Handbook

https://make.wordpress.org/polyglots/handbook/

Typical Translation Environment

The GlotPress UI with strings already translated https://translate.wordpress.org/projects/wp-plugins/friends/dev/de/default

Typical Translation Environment

The GlotPress UI with strings to be translated https://translate.wordpress.org/projects/wp-plugins/friends/dev/el/default

Enter a translation

What am I translating?

The GlotPress UI with strings to be translated The GlotPress UI with the highlighted plugin name and an English string that doesn't seem very representative

Which English Strings are displayed first?

Default sort of translate.wordpress.org is by Priority but also by newest Original

Typical Translation Environment

  • Often starting to translate "somewhere in the middle"
  • Missing Context: is this a headline or a button?
  • But: Ecosystem Tools
    • Discussion & History
    • Placeholders, Warnings & Glossary
    • Translations to other languages
    • Translation Memory & Machine Translation
    • Browser Extensions like GlotDict

Translate Live

  • Hands-on Approach
  • Built on WordPress Playground
  • Runs WordPress+plugin/theme inside your browser
  • Provides Inline Translation through Local GlotPress
  • Submit to translate.wordpress.org when ready

Translate Live

A screenshot of Translate Live which runs the WordPress with the Friends plugin that's almost fully translated. There is a popover offering inline-translation

Translate Live Features

  • Visually see the current translation state of a plugin
  • Add new translations and modify existing ones
  • Try translations without submitting them yet
  • Tools
    • Placeholders, Warnings & Glossary
    • Machine Translation

How to Access Translate Live

The GlotPress UI with the Translate Live link highlighted

Translate Live Demo

Translate Live ... the Good

  • It's very quick to get started
  • Works without a WordPress.org account
    → you receive a PO file instead of submitting directly
  • Very visual to see what you are translating

Translate Live ... Is Good For

  • Translating a plugin/theme to a new language from scratch
  • Reviewing existing translations and improve them on the spot
    • See translated items in context
    • Work with space constraints

Translate Live ... Good to Know

  • Be careful to use the Submit button to save your translations
    The bottom section of Translate Live with a submit button
  • On a 99% translated plugin/theme it's hard to find the missing strings
    → Use the table view for that
  • Performance depends on your computer and network speed
    (~7MB initial download, subsequently cached)

Translate Live ... can be improved

  • It can be hit or miss, sometimes English text is not recognized
  • Very large plugins can be a bit slow
  • Some plugins require a lengthy setup process *
  • Plugins that depend on other plugins don't work well *
* We hope to solve this using plugin provided Blueprints in future, see Meta Trac #7251

Translate Live ... How it works

  • In PHP, English texts are replaced with their translations
  • We log these and transmit them to Javascript
  • After the page loaded, we find the strings in the DOM
  • Wrap them in a HTML tag so it can be right clicked
  • Save the translation in a local GlotPress
  • Export them to a PO file and import it to translate.wordpress.org

Summary of Translate Live

  • An easy way to get new translation contributors started
  • Accessible for all plugins and themes on translate.wordpress.org
    Translate Live link on the top right
  • Local GlotPress with Inline Translation will come in GlotPress 5.0
    → Can be installed on your own WordPress, too

Thank you!

Questions?

Slides & Recording

alex.kirk.at/translate-live-nov-2023/

make.wordpress.org/community/2023/10/18/community-team-training-11-using-the-translate-live-tool/

Find me at

On WordPress.org as akirk

On the web at alex.kirk.at

On Matrix as @alex:kirk.at