Closed (fixed)
Project:
Ray Enterprise Translation
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Aug 2017 at 20:19 UTC
Updated:
1 Nov 2017 at 18:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mdahl328151 commentedComment #3
mdahl328151 commentedComment #5
mdahl328151 commentedComment #7
t.murphy commentedUpdated the API call and added content metadata options in the translation profile form.
Comment #8
t.murphy commentedTest failed because campaign_rating was set as a string in the schema, but should be an integer
Comment #9
t.murphy commentedUpdated the automatic, disabled, and manual profiles in the config
Comment #10
t.murphy commentedChanged the value of the default campaign rating for the default profiles.
Comment #11
t.murphy commentedPatch did not include changes.
Comment #12
t.murphy commentedUpdated the profile config yaml files
Comment #13
t.murphy commentedFixed the handling of Lingotek Metadata in Lingotek.php on line 192 and 227.
Comment #14
t.murphy commentedUpdated the metadata in the API call to check and see if it is even set.
Comment #15
t.murphy commentedFixed two unit tests to account for the changes
Comment #16
t.murphy commentedUpdated one more test
Comment #17
t.murphy commentedSome objects going through the metadata don't have profiles and so I put a try catch around it.
Comment #18
t.murphy commentedAnother attempt at fixing the getEntityProfile call.
Comment #19
t.murphy commentedComment #20
t.murphy commentedComment #21
t.murphy commentedRemoved Client parameter from the API call
Comment #22
t.murphy commentedAdded the ability to send metadata in the document upload and update calls. These metadata can be controlled by the profile the content is using. There is a permission checkbox and text field for each on the profile so that they can be configured. The concept is finished for now and ready to be reviewed.
Comment #23
penyaskitoThis patch doesn't apply with latest HEAD.
Comment #24
t.murphy commentedInterdiff not available because patch 21 won't apply. Just had to update the patch since another patch committed before this one had a conflict with this one.
Comment #25
t.murphy commentedComment #26
penyaskitoThe configuration files changes are invalid, or at least the installation aborts when using config strict checking (which happens in simpletests). Also, as there won't be any option to edit default provided profiles, I don't think it makes sense to duplicate the defaults.
I'm not sure yet, but I think config schema won't complain about not having them.
Comment #27
penyaskitoAdded LingotekIntelligenceMetadataInterface for separating those methods from LingotekProfileInterface.
We will reuse that one for a global intelligence metadata settings that can be overridden by profiles.
Comment #29
penyaskitoFixed typo in method name and coding standards.
Comment #30
t.murphy commentedComment #31
penyaskitoAdded configuration form and services for checking the global intelligence settings.
Added tests for this form.
Comment #33
t.murphy commentedComment #34
t.murphy commentedComment #35
penyaskitoFixed test.
Comment #36
penyaskitoReuse form for the profiles overrides. Add tests for the profile form.
Comment #38
penyaskitoA simple addition to a test discovered a bug. Congrats.
Comment #40
penyaskitoCoding standards.
Comment #41
penyaskitoAdded logic for using the general settings or overriding with the profile settings as needed.
Added some basic test coverage.
Comment #42
penyaskitoA test for using the contact email as author setting.
Comment #43
penyaskitoThere's already a ".indented" class in Drupal classy theme. Let's reuse that one.
As agreed, let's make this a free textfield as the others.
Ensure the newline is there.
I didn't spot this before. We should remove the check for profile here anyway.
But I'm wondering why we do this after already encoding, and why we cannot handle this in a different way.
Instead of using a common prefix, let's add this to a different array ($data['_lingotek_metadata']['_intelligence']?)
Also maybe it should be already given instead of embedded in the same array?
Whatever option we chose, let's remove this code duplication by creating a new method.
Let's add unit tests for ensuring we are passing the rest of the right parameters in the proper way.
Comment #44
t.murphy commentedComment #45
penyaskitoI almost forgot: we need to define the defaults in an upgrade and the upgrade tests!
Comment #47
t.murphy commentedComment #48
penyaskitoTests didn't run, something must be wrong.
Let's call the method instead.
We don't need args as a param. Let's rename the variables to more proper names.
Why can't we do this before the json is decoded?
I think this is not needed to be added to the interface. It's an implementation detail, not needed if we had a different implementation for the LingotekInterface.
Comment #49
t.murphy commentedComment #50
penyaskitoFixed assertions in upgrade tests.
Fixed syntax errors on Lingotek.php
Removed getIntelligenceMetadata from interface.
Comment #52
penyaskitoThe upgrade path didn't save the config. Fixed coding standards (NULL instead of null, FALSE instead of false, TRUE instead of true).
Comment #54
penyaskitoFixed tests now that the structure of the array changed.
Comment #55
penyaskitoLet's extend the API so an array is accepted.
If we change how we use the API we avoid JSON encoding/decoding twice.
Comment #57
penyaskitoThis failed because we are assuming now in our tests that content will be always an array. We need to modify that mock as we modified the production code for ensuring we accept string and array.
Comment #59
penyaskitoFixed unit tests. We were testing with an invalid JSON string, so let's ensure that still works.
Probably we should add more testing with arrays and valid JSON strings, but not in this ticket.
Also we could add testing for update functions + metadata, we are only testing upload here. But let's try to close this as is.
Comment #61
penyaskitoTJ reviewed it.
Committed d5122fb and pushed to 8.x-2.x. Thanks!