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.

Comments

miro_dietiker’s picture

Assigned: Unassigned » blueminds
blueminds’s picture

Status: Active » Needs review
StatusFileSize
new1.35 KB

I suggest following data being passed:

Drupal TMGMT/7.x-1beta; Gengo/7.x-1beta; http://example.com

See attached patch

berdir’s picture

+++ b/tmgmt_mygengo.plugin.incundefined
@@ -765,4 +765,23 @@ class TMGMTMyGengoTranslatorPluginController extends TMGMTDefaultTranslatorPlugi
+    $path = drupal_get_path('module', 'tmgmt') . '/tmgmt.info';
+    $info = drupal_parse_info_file($path);
+    $tmgmt_version = isset($info['version']) ? $info['version'] : 'dev';
+
+    $path = drupal_get_path('module', 'tmgmt_mygengo') . '/tmgmt.info';
+    $info = drupal_parse_info_file($path);
+    $gengo_version = isset($info['version']) ? $info['version'] : 'dev';

Might 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.

miro_dietiker’s picture

I'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...

berdir’s picture

No.

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.

berdir’s picture

Status: Needs review » Needs work

This requires a re-roll now.

issam.zeibak’s picture

Assigned: blueminds » berdir

The 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.

berdir’s picture

Assigned: berdir » blueminds

The suggestion is "Drupal TMGMT/..." so that sounds fine to me.

blueminds’s picture

Status: Needs work » Needs review
StatusFileSize
new1.23 KB

Used system_get_info(); Rerolled.

miro_dietiker’s picture

Looks fine.

berdir’s picture

Status: Needs review » Fixed

Commited.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.