Skip to content

Commit cc0e137

Browse files
Amazon Translate MT provider 5.0.1.0 - SDLCOM-6469:
- Modified the Translation Unit to NMT - Enhanced the Search Segment to prevent returning a hardcoded translation for already translated segments - Updated the CreateSearchResult method to include a Translation Proposal
1 parent 18e93cd commit cc0e137

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

Amazon Translate MT provider/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929
// [assembly: AssemblyVersion("1.0.*")]
3030

3131
[assembly: AssemblyVersion("5.0.0.0")]
32-
[assembly: AssemblyFileVersion("5.0.0.3")]
32+
[assembly: AssemblyFileVersion("5.0.1.0")]
3333

Amazon Translate MT provider/Sdl.Community.AmazonTranslateTradosPlugin.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
<ItemGroup>
7575
<Content Include="Resources\%24this.Icon.ico" />
76-
<EntityDeploy Include="Resources\AmazonTranslate.ico" />
76+
<None Include="Resources\AmazonTranslate.ico" />
7777
<None Include="Resources\Question.ico" />
7878
<None Include="Resources\ForumIcon.ico" />
7979
<None Include="Resources\Download.ico" />

Amazon Translate MT provider/Studio/TranslationProvider/TranslationProviderLanguageDirection.cs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,6 @@ public SearchResults SearchSegment(SearchSettings settings, Segment segment)
9797
SourceSegment = segment.Duplicate()
9898
};
9999

100-
if (!_options.ResendDrafts && _inputTu.ConfirmationLevel != ConfirmationLevel.Unspecified) //i.e. if it's status is other than untranslated
101-
{ //don't do the lookup, b/c we don't need to pay google to translate text already translated if we edit a segment
102-
translation.Add(PluginResources.TranslationLookupDraftNotResentMessage);
103-
//later get these strings from resource file
104-
results.Add(CreateSearchResult(segment, translation, segment.ToString()));
105-
return results;
106-
}
107-
108100
// Look up the currently selected segment in the collection (normal segment lookup).
109101

110102
string translatedText;
@@ -228,9 +220,12 @@ private SearchResult CreateSearchResult(Segment searchSegment, Segment translati
228220
tu.ResourceId = new PersistentObjectToken(tu.GetHashCode(), Guid.Empty);
229221

230222
var score = 0; //score to 0...change if needed to support scoring
231-
tu.Origin = TranslationUnitOrigin.MachineTranslation;
232-
var searchResult = new SearchResult(tu);
233-
searchResult.ScoringResult = new ScoringResult();
223+
tu.Origin = TranslationUnitOrigin.Nmt;
224+
var searchResult = new SearchResult(tu)
225+
{
226+
TranslationProposal = new TranslationUnit(tu),
227+
ScoringResult = new ScoringResult(),
228+
};
234229
searchResult.ScoringResult.BaseScore = score;
235230
tu.ConfirmationLevel = ConfirmationLevel.Draft;
236231

Amazon Translate MT provider/pluginpackage.manifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
<PluginPackage xmlns="http://www.sdl.com/Plugins/PluginPackage/1.0">
33
<PlugInName>Amazon Translate MT provider</PlugInName>
4-
<Version>5.0.0.3</Version>
4+
<Version>5.0.1.0</Version>
55
<Description>This plugin provides machine translation from the Amazon Translate Service AWS.</Description>
66
<Author>Trados AppStore Team</Author>
77
<Include>

0 commit comments

Comments
 (0)