simplesamlphp / governance

0 stars 1 forks source link

2024-02-024 MoU M2 SimpleSAMLphp community contributions complete #21

Closed monkeyiq closed 6 months ago

monkeyiq commented 7 months ago

SimpleSAMLphp had moved to using gettext and using binary translation files in the 2.1 release series. This has lead to an update to how SSP uses gettext in the 2.2+ series. A few issues were discovered with this system, two of which are detailed here.

One issue is that installing SSP through composer did not run the post install script to generate mo files. If one installs SSP directly with composer then the mo files would be made. If you install SSP as a dependency with composer then the post install script are not run and this leaves the install without generated mo files.

A second issue is to do with easy module installation. After a module was installed the binary translations would have to be generated which is a step that may be forgotten.

In order the generate less git chatter the po files are themselves now stored in sorted order: https://github.com/simplesamlphp/simplesamlphp/pull/1961

In preparation of the 2.2 release the code was updated to attempt to load translations from po files if the binary mo files are not generated https://github.com/simplesamlphp/simplesamlphp/pull/1968

The 2.2 series also now does not make mo files any more https://github.com/simplesamlphp/simplesamlphp/pull/1985

It was discovered that the 2.1 series was removing the gettext domain from translations during the process of compiling them from po to mo files. This was relied on by the code to find translations. An update to the 2.2 release series was done to restore functionality and allow translations to function again https://github.com/simplesamlphp/simplesamlphp/pull/2010

A more advanced solution was prototyped to allow the domains to be respected with fallback to the main messages domain. This is not merged yet, I plan to do that shortly after more testing. In short this allow a module to have it's own translations and use the main translations too. But does protect and isolate a module from another module's translations. https://github.com/simplesamlphp/simplesamlphp/issues/2013

Moving away from translations...

One PR and one issue has been raised over time to allow SPs to be loaded from individual files. In response to this I created pr 2018 which allows loading from both php and xml files from a directory of files if configured to do so. https://github.com/simplesamlphp/simplesamlphp/pull/2018

Some documentation for new and returning developers has been made. There are a number of things to come up to speed with in the project, so hopefully the documentation can help people focus on the problem they are wanting to solve rather than the logistics of how to get the PR ready. https://github.com/simplesamlphp/simplesamlphp/pull/1970

I noticed that questions about the entityID needing to be explicitly specified when upgrading to 2.x of SSP were common on slack and have have updated the documentation to contain more information to help people in this process. https://github.com/simplesamlphp/simplesamlphp/pull/1983

Some initial cross branch cherry picking https://github.com/simplesamlphp/simplesamlphp/pull/1990 https://github.com/simplesamlphp/simplesamlphp/pull/1994

I have since adopted using git cherry-pick for the cross branch updates. Once I clarify some things I will likely add that to the dev docs to help keep knowledge of the process alive in one place.

dedrac commented 6 months ago

Hi @monkeyiq On behalf of the SSP Board, this Milestone is approved. Do I need to do anything other than note that here? This is the first time I am handling this part, so let me know what else I need to do if anything. Thank you!

monkeyiq commented 6 months ago

This has been paid. Thank you!