Problem/Motivation
In #1420364: A simple response object for methods which need to return a true/false *and* a message an object called Available Result and Translatable result were added. Instead of simple boolean values, this objects also contain a message in case the Response is false.
When the Simple Response class is added to TMGMT, the plugins will have to be updated to work with TMGMT again.
Methods which need to return the new object (from the TranslatorPluginInterface):
- public function checkAvailable(TranslatorInterface $translator);
- public function checkTranslatable(TranslatorInterface $translator, JobInterface $job);
Both will return AvailableResult and TranslatableResult.
Proposed resolution
Update the plugin so it works with TMGMT again.
Remaining tasks
Do it, review, commit.
User interface changes
None
API changes
checkAvailable() and checkTranslatable will return a Response object instead of a simple boolean. The AvailableResult/TranslatableResult have an error message in case the Response is false.
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | Response_object_google-2545386-12.patch | 2.91 KB | juanse254 |
| #12 | interdiff-2545386-8-12.txt | 1.71 KB | juanse254 |
| #8 | interdiff-2545386-4-8.txt | 1.25 KB | juanse254 |
| #8 | Response_object_google-2545386-8.patch | 2.28 KB | juanse254 |
| #6 | interdiff-2545386-2-4.txt | 651 bytes | juanse254 |
Comments
Comment #1
juanse254 commentedComment #2
juanse254 commentedComment #3
juanse254 commentedComment #6
juanse254 commentedOops, this is the right one.
Comment #8
juanse254 commentedThis will solve failing tests.
Comment #10
sasanikolic commentedSeems good to me.
Comment #11
berdirSame as microsoft.
Comment #12
juanse254 commentedOkay this should do it.
Comment #13
berdirSame as Microsoft. Message could be better, but lets fix it first.