Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Conversation

@enzocano
Copy link
Contributor

@enzocano enzocano commented Jul 24, 2018

  • Change Translator.cs code to use new Translator API v3
  • Update unit test and mocks related to the service.
  • Update integration tests related to the service.

@enzocano enzocano requested a review from cleemullins July 24, 2018 20:27
Copy link
Contributor

@cleemullins cleemullins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like this PR is doing a few things:

  1. It's migrating tests from XUnit to MSTest.
  2. Updating Stylecop warnings across the code base.
  3. Moving to Integration Tests for some things.
  4. Migrating from v2 to v3 API

Does the PR need to do all of these things? I would have preferred a single PR for each item to make things easier to track and deal with.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copyright hreader.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// (C) Header

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment on all these files...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling. SentencesLength

@enzocano enzocano force-pushed the southworks/translator/migrate-to-v3 branch from 87dddd0 to 314598c Compare July 25, 2018 12:16
@enzocano
Copy link
Contributor Author

@cleemullins, we rebased this PR on top of the master branch and dropped the commit related to the integration tests.

@cleemullins
Copy link
Contributor

This PR looks good to me. I would like to see @amr-elsehemy or @chrimc62 review as well for sanity, as they are the code owners.

Once one of them signs off (or someone they suggest) we can merge. We'll then have to integrate the same set of changes into the Node codebase.

@cleemullins
Copy link
Contributor

Via Mohamed Afify:

We will get back to you regarding this early next week

{
public class Alignment
{
[JsonProperty("proj")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest changing this to "project" since "proj" is a little bit confusing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The property reflect the json response from Translator API v3 (link).

{
public class DetectedLanguageModel
{
[JsonProperty("language")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest adding some documentation for the new classes to become easier to understand.

@@ -136,71 +110,52 @@ public async Task<List<TranslatedDocument>> TranslateArrayAsync(string[] transla
}

// body of http request
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this comment is correct now, it was related to the old variable 'body'

Copy link
Contributor

@amr-elsehemy amr-elsehemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the PR, the changes looks fine to me and I'd approve with some suggestions written in my comments inline .

Generally I'd encourage adding some documentation to the new added models so that they would be easier to understand , but I don't think this should block the PR for now .

@enzocano
Copy link
Contributor Author

Thanks for your feedback @amr-elsehemy. The added models are not intended to be used outside the translator so we convert them to internal. However, we also added the documentation from v3 Translator Text API reference (link).

@cleemullins cleemullins merged commit 31078e0 into master Jul 30, 2018
@cleemullins cleemullins deleted the southworks/translator/migrate-to-v3 branch July 30, 2018 21:13
tomlm pushed a commit that referenced this pull request Nov 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants