Skip to content

Commit 960881a

Browse files
authored
Merge pull request #20 from intento/hotfix/CONTMS-109
CONTMS-109 Trados: replace route key to route description in the name…
2 parents 671ceb4 + 4444fa4 commit 960881a

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

IntentoMTFormOptions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ public string ApiKey
4040
/// Selected type of smart routing
4141
/// </summary>
4242
public string Routing { get; set; }
43+
44+
/// <summary>
45+
/// Display name for routing
46+
/// </summary>
47+
public string RoutingDisplayName { get; set; }
4348

4449
/// <summary>
4550
/// Selected provider id (in case of !SmartRouting)

SmartRoutingState.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Newtonsoft.Json.Linq;
1+
using Intento.MT.Plugin.PropertiesForm.WinForms;
2+
using Newtonsoft.Json.Linq;
23
using System.Collections.Generic;
34
using static Intento.MT.Plugin.PropertiesForm.IntentoTranslationProviderOptionsForm;
45

@@ -83,19 +84,29 @@ public bool SmartRouting
8384
public string Routing
8485
{ get { return routing; } }
8586

87+
public string RoutingDescription
88+
{
89+
get
90+
{
91+
return routingDescription;
92+
}
93+
}
94+
8695
public static void FillOptions(SmartRoutingState state, IntentoMTFormOptions options)
8796
{
8897

8998
if (state == null)
9099
{
91100
options.Routing = "best";
101+
options.RoutingDisplayName = Resource.BestSmartRouteDescription;
92102
options.SmartRouting = true;
93103
ProviderState.FillOptions(null, options);
94104
}
95105
else
96106
{
97107
options.SmartRouting = state.SmartRouting;
98108
options.Routing = state.Routing;
109+
options.RoutingDisplayName = state.RoutingDescription;
99110
ProviderState.FillOptions(state.providerState, options);
100111
}
101112
if (options.SmartRouting)

WinForms/Resource.Designer.cs

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

WinForms/Resource.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,4 +332,7 @@ If you have selected custom model or glossary, please adjust the language pair:<
332332
<data name="FAcheckBoxSaveLocally" xml:space="preserve">
333333
<value>Save settings for the next projects</value>
334334
</data>
335+
<data name="BestSmartRouteDescription" xml:space="preserve">
336+
<value>General routing based on Intento benchmarks</value>
337+
</data>
335338
</root>

0 commit comments

Comments
 (0)