Fix for parsing plural entries in PO files with multi-line strings, Health Checks UI feature - This week in Orchard (12/05/2023)

Gábor Domonkos's avatar
Admin UI, Localization, This week in Orchard

Add post-install/update scripts to simplify package management, fix for parsing plural entries in PO files with multi-line strings, and a demo about the Health Checks UI Feature! Check out our post for the details!

Orchard Core updates

Add post-install/update scripts to simplify package management

This simplifies the package process. Instead of defining a command to install each project, we use node script to find all projects/themes containing package.json and install/update it.

With this addition, we no longer need to update the root package.json to add a command for every project we want to build.

The new command node .scripts/install.js will be executed every time the npm install is executed. It'll apply the same command on every project in the solution that contains the package.json file.

If you want to execute npm update on all projects, you can run npm run update-projects.

If you want to run npm install on a specific project, you may execute npm run install-project {ProjectName}. For example, to install app packages in the TheAdmin theme only, you would run npm run install-project TheAdmin. Similarly, to update a project, you can run npm run update-project TheAdmin.

The newly added install.js script

Fix for parsing plural entries in PO files with multi-line strings

When parsing a PO file with a plural message which also contains multi-line strings, the PoParser class incorrectly parses the message key as the concatenation of msgid and msgid_plural values.

Example:

msgid ""
"Here is an example of how one might continue a very long string\n"
"for the common case the string represents multi-line output."
msgid_plural ""
"Here are examples of how one might continue a very long string\n"
"for the common case the string represents multi-line output."
msgstr[0] ""
"Here is an example of how one might continue a very long translation\n"
"for the common case the string represents multi-line output."
msgstr[1] ""
"Here are examples of how one might continue a very long translation\n"
"for the common case the string represents multi-line output."

Parses as a single entry with a key: Here is an example of how one might continue a very long string\nfor the common case the string represents multi-line output. Here are examples of how one might continue a very long string\nfor the common case the string represents multi-line output.

But the key to the translation should be the value of msgid: Here is an example of how one might continue a very long string\nfor the common case the string represents multi-line output. So, this fix is about adding a test for the PoParser class and fixing the bug in PoParser for plural entries with multi-line strings.

The ParseReadsPluralAndMultilineText unit test

Demos

Health Checks UI feature

A few weeks ago, we mentioned a module called the Health Checks module, which provides health checks for your website by displaying the status of some services by navigating to the given endpoint. Now, let's check out a new feature, called the Health Checks UI feature, which displays the statuses of the tenants and the statuses of some enabled features with a nice UI.

Health Checks UI feature

When you enable it and navigate to the /health-ui endpoint, you will see this screen. It's the default tenant, meaning you can see the health checks of the current default tenant but also there is another option that allows you to see the health check of all of the available tenants by clicking on the Show Tenants Service Health button.

The Tenants Service Health UI

And as always, if you would like to learn more about this feature, don't forget to check out this recording on YouTube!

News from the community

Orchard Harvest Online

As many of you know, we have been working hard over the past months to organize the next Orchard Harvest in Las Vegas after the last Harvest in 2017. Unfortunately, based on the current economic situation and personal feedback, Las Vegas won’t work this year. Not to mention that unfortunately Microsoft Build, announced after we decided on our dates, also falls in line with the original dates we chose. So, a date change was also necessary.

However, we did not want to let go of this opportunity to meet completely. Therefore, we are pleased to inform you that we will be holding our first online Orchard Harvest starting on the 31st of May at 13:00 UTC. You can start your registration for the event right now.

Of course, we are still looking for speakers. You can apply to present by 12 May at the following link: https://forms.office.com/e/pfiExtEUuZ. Check out the details on the official site of Orchard Core!

Orchard Harvest 2023

Orchard Dojo Newsletter

Lombiq's Orchard Dojo Newsletter has 456 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course.

Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here!

If you are interested in more news about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!

No Comments

Add a Comment