A few months ago, in July 2021, a new Core Core is the set of software required to run WordPress. The Core Development Team builds WordPress.-related translation project was added to translate.wordpress.org: Patterns. The new Pattern Directory was released along with WordPress 5.8, allowing site owners to choose from a selection of block Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. patterns via a new directory.
The patterns currently included in the Pattern Directory were submitted and selected by WordPress community designers. Launching the Directory with these curated patterns was the first milestone. Next is working on allowing anyone to create and submit a new block pattern to include in the Directory.
Localizing block patterns
The current selection of block patterns has a fixed number of strings A string is a translatable part of the software. A translation consists of a multitude of localized strings., all of which can be found in the Patterns project. Note: locales Locale = language version, often a combination of a language code and a region code, for instance es_MX denotes Spanish as it’s used in Mexico. A list of all locales supported by WordPress in https://make.wordpress.org/polyglots/teams/ can also translate the Pattern Directory interface through the Meta > Pattern Directory project. As more patterns are added, two new challenges arise for localizing block patterns:
- The ongoing and growing number of strings from user-submitted block patterns.
- How to handle translating block patterns.
I’ve been thinking about both of these quite a bit and had a really helpful chat with @ryelle (thanks Kelly!) to better understand where development is going for the Directory.
Handling a growing number of strings
Strings for patterns added to the Directory are currently imported regularly into GlotPress GlotPress is the translation management software that powers Translate.WordPress.org. More information is available at glotpress.org. using an API 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.. As new, user-generated patterns are also regularly added, the Patterns project can, and likely will, grow exponentially.
Like other Meta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. projects, there isn’t a threshold for translating Patterns – once a string A string is a translatable part of the software. A translation consists of a multitude of localized strings. is translated, it will show in the Pattern Directory. At the same time, it’s also really satisfying to see that 100% next to a project you’re working on completing. I’m not sure if that will be realistic for future block pattern translations.
When thinking about how to translate all these new strings, one possible option is to skip GlotPress entirely and allow end-users to translate block patterns through the block editor. The result would look like a “forked” pattern, with an original version in English and a second, translated version. (For context, here’s a related Github conversation.)
I see a few benefits to this approach. First, it may be easier for anyone to translate block patterns since they’re basically recreating the pattern in their language. Second, it avoids a gigantic GlotPress project. Would we see more localized patterns this way? Maybe!
The downside: there is no review process. This would depend on users and/or Polyglots to catch any inconsistencies or mistakes by flagging them through the Pattern Directory. In other words, it’s totally separate from our usual translation process.
How to help?
Now is the perfect time for Polyglots to share feedback on the Pattern Directory’s future, especially on the best ways to localize the block pattern experience.
What are your thoughts on:
- How important is it to your community that a translation project is 100% complete?
- If new strings are added every day, what would be helpful for communication and/or notifications?
- How do you feel about a translation mechanism outside GlotPress? How can it help? How would it hurt your locale Locale = language version, often a combination of a language code and a region code, for instance es_MX denotes Spanish as it’s used in Mexico. A list of all locales supported by WordPress in https://make.wordpress.org/polyglots/teams/?
- What else might help support your community in localizing block patterns?
I would like to keep the discussion on this post open until Monday, October 11th, 2021. Then, figure out the best way to share a summarized version of this feedback with the development team working on user-generated patterns. Anyone is welcome to comment and share thoughts!