Call for Testing: Lazily Evaluate Translation Strings

While attempting to localize REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/. responses (#44758), GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ contributors identified that there was an order-of-operations issue preventing localeLocale A locale is a combination of language and regional dialect. Usually locales correspond to countries, as is the case with Portuguese (Portugal) and Portuguese (Brazil). Other examples of locales include Canadian English and U.S. English. information from being properly passed in via the REST API. @schlessera had previously worked on a performance optimization patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. to lazily translate strings on demand, which was found to also permit locale information to be set before computing the strings, unblocking the Gutenberg issue.

To get this patch landed quickly, we request assistance from interested contributors to test and validate the patch on ticket #41305.

There has been some recent discussion about additional performance and memory usage optimizations, but I believe the solution proposed in the latest patches is close to being satisfactory. It just needs a little further testing and validation from committers and contributors familiar with translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. handling and PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 performance before we can comfortably land the patch.

We request input by the end of this working week, if possible, to help remove the blockerblocker A bug which is so severe that it blocks a release. to further Gutenberg localization work. Thank you!