See http://gengo.com/api/developer-docs/best-practices/
As the myGengo third party ecosystem continues to grow and generate traffic, it becomes more difficult to discern whether a specific version of an application is running into problems. Since the API is very "write-heavy", it's beneficial to be able to narrow down how bad translation requests make it into the system. If you provide us proper header information, we can spot this as it comes up and work with you to ensure your application is working as it needs to.
If you're not using one of our programming libraries that are on tap, we ask that you send us a User-Agent in the following format:
myGengo app_name; Version app_version; your_site_url;
The documentation provided by the libraries we offer should give examples on how to provide app information. Any questions related to the libraries themselves can be asked on their respective repositories over at our GitHub account.
Right now, we send 'User-Agent' => 'Drupal myGengo Translation Interface v0.1',, we should update this to return the actual version and the site URL.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | tmgmt_mygengo-user_ageng-1695806-2.patch | 1.23 KB | blueminds |
| #2 | tmgmt_mygengo-user_agent-1695806-1.patch | 1.35 KB | blueminds |
Comments
Comment #1
miro_dietikerComment #2
blueminds commentedI suggest following data being passed:
Drupal TMGMT/7.x-1beta; Gengo/7.x-1beta; http://example.com
See attached patch
Comment #3
berdirMight be easier and more performant to use http://api.drupal.org/api/drupal/modules%21system%21system.module/functi... to get the version.
Also, I think the default should be 7.x-1.x-dev for both if not defined.
We will also need to check with them that whatever mechanism they use to detect jobs sent by this module doesn't get broken by this.
Comment #4
miro_dietikerI'm currently checking with Gengo, if that header structure is fine.
BTW: Is there a mechanism to track the creation date of a -dev plugin? A stat() on the .info file might help to get the creation day of right that file... Dunno if this is a good idea...
Comment #5
berdirNo.
dev snapshots downloaded from d.o have a version and look like this: 7.x-1.0-beta1+20-dev
The only ones that do not have one are git checkouts. We can't fix that.
Comment #6
berdirThis requires a re-roll now.
Comment #7
issam.zeibak commentedThe header is fine, but for Gengo to detect it properly we need "drupal" to be part of the header. As long as that word is in the header then it is ok.
Comment #8
berdirThe suggestion is "Drupal TMGMT/..." so that sounds fine to me.
Comment #9
blueminds commentedUsed system_get_info(); Rerolled.
Comment #10
miro_dietikerLooks fine.
Comment #11
berdirCommited.