Toolhub/Progress reports/2021-12-03

← week ending 2021-11-19 Toolhub progress reports week ending 2021-12-03 week ending 2021-12-10 →

Report on activities in the Toolhub project for the 2 weeks ending 2021-12-03.

Fun with GNU Portable Object files and the qqq pseudo-localeEdit

Tracked in Phabricator:
task T296301 resolved

The Django backend of Toolhub uses GNU Portable Object files (PO) as the storage system for translatable messages. We generate an English language file using the standard makemessages command from Django. This file is read from our Gerrit repository by an import process at (TWN) where the community then produces translations into multiple other languages. A couple of times a week TWN then compiles these translations into language specific PO files and sends them back to us in the form a Gerrit commit.

This past week we received an updated PO file for the qqq pseudo-locale which is used on the TWN side to provide translators with contextual information about each translation unit which broke our PipelineLib container building process. Our build broke because our process of compiling the plain text PO files into binary Machine Object files (MO) including attempting to compile the qqq locale. This compilation began failing because the updated PO file included a description of a source message with replacement parameters where the qqq description did not also include replacement parameters. This mismatch of the expectation of the message having replacement parameters caused the compilation of the PO to an MO to fail with an error message describing the failed expectation.

On the application side we do not have a need for the qqq file contents, so we decided to exclude them from the build step. At the suggestion of Nikerabbit from TWN we also changed the configuration of the TWN export job to stop exporting the qqq data back to our git repository. We no longer have the qqq locale in our git repository, and if it does return for some reason we will ignore it when compiling PO files to MO files for runtime use.

Bug fix: graph configurationEdit

Tracked in Phabricator:
task T293133 resolved

Slavina's first patch has been merged. She found and fixed an issue with our use of the vue-chartjs library where we thought we were configuring line graphs to always use 0 as the Y axis (vertical) origin, but were incorrectly passing this data to the upstream component.

New tool types: Lua module & templateEdit

Tracked in Phabricator:
task T295702 resolved

A new v1.2.1 JSON schema for toolinfo.json files has been created. This update adds two new valid values for the tool_type parameter: "lua module" and "template". These types are now available for use in the demo site and will become available in the production site when we next deploy there.

Visual indication of required fieldsEdit

Tracked in Phabricator:
task T294941 resolved

Seve requested and Raymond implemented an update to our user interface to add an asterisk (*) to the end of field labels for form fields which are required for form submission. The previous behavior of highlighting empty required fields in red on blur and submission remains. We hope this small visual indicator will help users notice which fields are required more easily when initially filling out forms.

Developer documentation improvementsEdit

A patch from Slavina documenting some useful post-install commands for using the web crawler feature and recovering from a corrupt install have been merged. Slavina and Raymond will continue to expand the developer documentation as they find more issues which Bryan forgot to document previously. We hope that this documentation will help not only the team, but also members of the Wikimedia technical community who become interested in helping improve and maintain Toolhub's code base.

Wrap upEdit

The team continues to work on both improving Toolhub and learning how to work together as a group. We are now meeting twice a week to discuss technical issues and the history of the project in addition to our prior weekly meeting with Seve to discuss new features and requirements. This coming week we hope to start talking a bit more about team practices that we can use to help streamline our collaboration.