WordCamp Asia 2024

Translate Live

in-context translation using
WordPress Playground

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

Entering a Translation

A screenshot of the translation form on translate.wordpress.org

What am I translating?

A screenshot of the translation table with strings to translate on the left and space for translation on the right Highlighted text: plugin → A plugin... Highlighted text: Friends → Called Friends Highlighted text: Enter URL → Which URL? Highlighted column of translations → why translate these first? Highlighted column of translations → why translate these first? The plugin is about URLs? Highlighted column of translations → why translate these first? The plugin is about URLs? I thought it was called Friends

Which English Strings are displayed first?

A screenshot of the filter section of GlotPress A screenshot of the filter section of GlotPress, with the priority radio box highlighted which is the default A screenshot of the filter section of GlotPress, with the Date Added (original) radio box highlighted which is the second default if no priority is defined

What would be better?

A screenshot of the translation table with strings to translate on the left and space for translation on the right, this time with more useful strings on the left A screenshot of the more useful translation table with the strings section highlighted: makes more sense! Probably what the user sees first

How do you display useful strings first?

The filter section again, with settings specific to this plugin The updated filter sections highlighted with a search for filename welcome.php, stating that this works for this plugin The updated filter sections, stating that these filters work for this plugin but there is no universal way of doing this The updated filter sections, asking whether we could approach this differently?

Typical Translation Environment

translate.wordpress.org

  • 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 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

Translate Live

A screenshot of Translate Live in action with a translation popup over a partially translated UI that has text highlighted: English in red, translated text in yellow and green A screenshot of Translate Live, with the popup highlighted, labelled: Right Click on colored text to get this popup A screenshot of Translate Live, with a text highlighted in green, labelled: Already Translated String A screenshot of Translate Live, with a text highlighted in yellow, labelled: Waiting String A screenshot of Translate Live, with unhighlighted text, labelled: Not a plugin string A screenshot of Translate Live, with an underlined word in the popup highlighted, labelled: Glossary A screenshot of Translate Live, with red and green colored placeholder markers below the input field, labelled: PLaceholder Checks

Translate Live

Another screenshot of Translate Live, showing a bigger popup with the lower sections for machine translation A screenshot of Translate Live, with the Save Translation button in the popup highlighted, labelled: Save and reinsert translation A screenshot of Translate Live, with a textbox highlighted that contains a query for machine translation, labelled: Auto-query Machine Translation including glossary terms A screenshot of Translate Live, with the Requery button in the popup highlighted, labelled: Requery after modifying the query A screenshot of Translate Live, with the suggested translation along with a Copy button in the popup highlighted, labelled: Copy the suggestion and modify it before saving

How to Access Translate Live?

A screenshot of the translation table interface on translate.wordpress.org A screenshot of the translation table interface on translate.wordpress.org, with the Translate Live link highlighted on the top right

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 showing an unsubmitted translaton with a button: Submit to translate.wordpress.org
  • 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 *
* Plugin Developers: Provide a Blueprint! → Boots your plugin to a configured state
https://make.wordpress.org/meta/2023/12/08/plugin-previews-are-now-available-for-opt-in/

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

alex.kirk.at/wcasia2024/

Find me at

On WordPress.org as akirk

On the web at alex.kirk.at

On Matrix as @alex:kirk.at