Right you can import language pack, but there no detailed information shown about actual phrases/e-mail templates that were added/changed/deleted in the process. Maybe this information isn't that important to average website administrator, however it's invaluable for Deployment Script.
Sometimes, while working with Deployment Script, I see situations where phrases are reported as being deleted locally, but I'm sure I wasn't deleting anything. It all ends with fact, that some part of
/modules/custom/install/english.lang file wasn't imported. Without import log this is pretty hard to analyze later on.
There are 2 use cases at least, where it will be used:
- deployment script
- direct language pack import from "Regional" section
Because of it we need to make sure, that logging format isn't hardcoded within language importing code. To implement that we need to:
- create single class per each use case (2 classes for now), that would implement this interface
LanguagePackImportHelper::setListenermethod, that would allow for listener to be set
- each add/change/delete operation would be reported to a listener (see example below)
Also it would be wise to replace any reporting text, that is the same each time with class named constants.