One of the goals of Drupal 8 Multilingual Inititive is to refactor Gettext file handling by a component. The first effort was Make gettext .po generation its own abstracted functionality
by Gábor Hojtsy, Sutharsan, fubhy, sun and clemens.tolboom
While I (clemens.tolboom) was working on that issue I skimmed over the Translation component delivered by Symfony to see whether we could match their architecture (why reinvent components?) or even take over their components.
Progressing further and discussing progress with Gábor Hojtsy and sun on #drupal-i18nsun suggested to create a new issue trying to use the Symfony Translation component and see what happens with Let Symfony Translation component handle language messages
This lead me into a new world of GPL versus MIT, php development, git squash, github pull requests etc.
Here are some experiences from my pull requests for Symfony
(click closed button to see all.)
Licenses and the copy paste cat
My initial D8MI related pull request Drupal gettext
was a bummer as I added a slightly changed and objectified copy-paste version of some parts of gettext.inc forgetting GPL does not allow loosening the license into a MIT version.
git squash et al
By having a pull request the receiving party wants a clean commit. But as a developer you commit every new feature into a local commit to make cherry-picking possible. For this to work you need to squash all commits into the commit belonging to the pull request.
Thanks to stloyd
pointed me to Using Git Rebase to Squash Commits
explained a great deal to me and http://symfony.com/doc/master/contributing/code/patches.html
Should we go using Symfony Translation component
The Symfony Trans2drupal
pull request is developed based on the patch for Drupal Let Symfony Translation component handle language messages
. That introduces a brittle dependency as it is not committed. It is not actively commented too. So that's not comforting.
The flip side is we can drop a lot of code and focus on our Drupal code when the pull request lands. In writing the code I learned new ways of coding (more PHP less Drupal) which is nice.
Image taken from http://www.mjdinteractive.com/mjd-blog/2012/04/drupal-8-to-utilize-symfo...