Skip to content

Commit 2c3ba42

Browse files
oerodgervlabramov
andauthored
Release/2.2.23 (#26)
* Default account name instead of "via intento" in dropdown * Fix language combobox index setting * CONTMS-88 TMS: trados prompsit: Provider selecting errors * CONTMS-67 All custom routing are named "industry-specific routing based on Intento benchmarks" * CONTMS-105 Transfer: Memoq public version changes: don't show custom parser checkbox * COMTMS-105 Transfer: contms-58-59-61-settings-form-enhancement * CONTMS-105 Transfer: contms-40 & 66 * CONTMS-105 Transfer: contms-72 & 74 * COMTMS-105 Transfer: contms-76-cancel-saves-changes * CONTMS-105 Transfer: contms-80-link-to-presentation, * CONTMS-105 Transfer * Fix: not saving api key until check and uncheck smart routing * Add: smart default routing when setting up for the first time * Fix: Missing intento instance in case of saving settings without testing * CONTMS-81 Only_a_single_character_can_be_typed_into_the_MODEL_field_in_between_other_characters * Bugfix/setting up routing settings (#22) * CONTMS-67 fix route settings * Contms 105 make memo q public and private plugin version consistent (#24) * COMTMS-105 Transfer: contms-45-improved-ui-settings-form * CONTMS-101 TMS: Trados: Create build scripts Co-authored-by: Vladimir Abramov <[email protected]>
1 parent 960881a commit 2c3ba42

File tree

133 files changed

+1919
-644980
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+1919
-644980
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net45</TargetFramework>
5+
6+
<IsPackable>false</IsPackable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="IntentoSDK" Version="1.5.2" />
11+
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
12+
<PackageReference Include="NUnit" Version="3.12.0" />
13+
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
14+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
15+
</ItemGroup>
16+
17+
<ItemGroup>
18+
<ProjectReference Include="..\Intento.MT.Plugin.PropertiesForm\Intento.MT.Plugin.PropertiesForm.csproj" />
19+
</ItemGroup>
20+
21+
<ItemGroup>
22+
<Reference Include="Microsoft.CSharp" />
23+
<Reference Include="System.Windows.Forms" />
24+
</ItemGroup>
25+
26+
</Project>

Tests.cs renamed to Intento.MT.Plugin.PropertiesForm.Test/Tests.cs

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,12 @@
22
using System.Collections.Generic;
33
using System.Drawing;
44
using System.Linq;
5-
using System.Resources;
6-
using System.Text;
7-
using System.Threading.Tasks;
85
using System.Windows.Forms;
9-
using Intento.MT.Plugin.PropertiesForm.WinForms;
10-
using Microsoft.VisualStudio.TestTools.UnitTesting;
11-
using Newtonsoft;
126
using Newtonsoft.Json.Linq;
13-
using static Intento.MT.Plugin.PropertiesForm.ApiKeyState;
14-
using static Intento.MT.Plugin.PropertiesForm.IntentoTranslationProviderOptionsForm;
7+
using NUnit.Framework;
158

16-
namespace Intento.MT.Plugin.PropertiesForm
17-
{
18-
[TestClass]
9+
namespace Intento.MT.Plugin.PropertiesForm.Test
10+
{
1911
public sealed class Tests
2012
{
2113
private IntentoSDK.IntentoAiTextTranslate Fabric(string apiKey, string userAgent, IntentoSDK.ProxySettings proxySettings)
@@ -409,7 +401,7 @@ Form InitializeForm(Form form)
409401
#endregion all parametries filled, auth - delegated, models & glossary - delegated
410402

411403
#region auth - not delegated (the provider has no predefined), models & glossary - empty
412-
[TestMethod]
404+
[Test]
413405
public void InitionalFillOptionsForm2()
414406
{
415407
IntentoTranslationProviderOptionsForm form;
@@ -491,9 +483,9 @@ public void InitionalFillOptionsForm2()
491483
Assert.AreEqual(true, form.groupBoxMTConnect2.Visible);
492484
Assert.AreEqual(options.ApiKey, form.apiKey_tb.Text);
493485
Assert.AreEqual(options.ProviderName, form.textBoxProviderName.Text);
494-
Assert.AreEqual(Resource.Empty, form.textBoxAccount.Text);
495-
Assert.AreEqual(Resource.Empty, form.textBoxModel.Text);
496-
Assert.AreEqual(Resource.Empty, form.textBoxGlossary.Text);
486+
Assert.AreEqual(string.Empty, form.textBoxAccount.Text);
487+
Assert.AreEqual(string.Empty, form.textBoxModel.Text);
488+
Assert.AreEqual(string.Empty, form.textBoxGlossary.Text);
497489
Assert.AreEqual(true, form.buttonContinue.Enabled);
498490
form.formMT.Close();
499491
qqq.Refresh();
@@ -502,7 +494,7 @@ public void InitionalFillOptionsForm2()
502494
#endregion auth - not delegated (the provider has no predefined), models & glossary - empty
503495

504496
#region all parametries filled, auth - delegated, models & glossary - not delegated
505-
[TestMethod]
497+
[Test]
506498
public void InitionalFillOptionsForm3()
507499
{
508500
options = new IntentoMTFormOptions()
@@ -712,7 +704,7 @@ public void InitionalFillOptionsForm3()
712704
//}
713705
#endregion only API key filled, smartRouting - true
714706

715-
[TestMethod]
707+
[Test]
716708
public void CleanOptionsOnChangeProvider()
717709
{
718710
#region all parametries filled, auth - not delegated, models & glossary - delegated
@@ -772,7 +764,7 @@ public void CleanOptionsOnChangeProvider()
772764
qqq.Close();
773765
}
774766

775-
[TestMethod]
767+
[Test]
776768
public void CleanOptionsOnChangeCreditionals()
777769
{
778770
// all parametries filled, auth, models & glossary - delegated
@@ -856,7 +848,8 @@ public void CleanOptionsOnChangeCreditionals()
856848
}
857849

858850
#region ChangeOfLanguageOnChangeModel: all parametries filled, auth - delegated, models & glossary - delegated
859-
[TestMethod]
851+
852+
[Test]
860853
public void ChangeOfLanguageOnChangeModel()
861854
{
862855
options = new IntentoMTFormOptions()
@@ -878,7 +871,7 @@ public void ChangeOfLanguageOnChangeModel()
878871
};
879872
using (form = new IntentoTranslationProviderOptionsForm(options, langPair, Fabric, true))
880873
{
881-
testProviderData.delegated_credentials = true;
874+
testProviderData.delegated_credentials = true;
882875
form.testListProvidersData = testProvidersData;
883876
form.testOneProviderData = testProviderData;
884877
form.testAuthData = testAuthDataGoogle;
@@ -950,7 +943,7 @@ public void ChangeOfLanguageOnChangeModel()
950943
Assert.AreEqual(options.ApiKey, form.apiKey_tb.Text);
951944
Assert.AreEqual(options.ProviderName, form.textBoxProviderName.Text);
952945
Assert.AreEqual("test1", form.textBoxAccount.Text);
953-
Assert.AreEqual(Resource.Empty, form.textBoxModel.Text);
946+
Assert.AreEqual(string.Empty, form.textBoxModel.Text);
954947
Assert.AreEqual("gloss_ru_en", form.textBoxGlossary.Text);
955948
Assert.AreEqual(true, form.buttonContinue.Enabled);
956949
form.formMT.Close();

Intento.MT.Plugin.PropertiesForm.sln

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.28010.2050
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.31105.61
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Intento.MT.Plugin.PropertiesForm", "Intento.MT.Plugin.PropertiesForm.csproj", "{A4374128-DD01-4CE3-B62C-4CC3460620C0}"
7-
EndProject
86
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestForm", "TestForm\TestForm.csproj", "{A963C442-DFD3-4FE8-A2E1-9917AC274695}"
97
ProjectSection(ProjectDependencies) = postProject
108
{A4374128-DD01-4CE3-B62C-4CC3460620C0} = {A4374128-DD01-4CE3-B62C-4CC3460620C0}
119
EndProjectSection
1210
EndProject
11+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Intento.MT.Plugin.PropertiesForm.Test", "Intento.MT.Plugin.PropertiesForm.Test\Intento.MT.Plugin.PropertiesForm.Test.csproj", "{5954BDAE-A274-4615-9E94-2D0A6FA8B786}"
12+
EndProject
13+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Intento.MT.Plugin.PropertiesForm", "Intento.MT.Plugin.PropertiesForm\Intento.MT.Plugin.PropertiesForm.csproj", "{A4374128-DD01-4CE3-B62C-4CC3460620C0}"
14+
EndProject
1315
Global
1416
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1517
Debug|Any CPU = Debug|Any CPU
1618
Release|Any CPU = Release|Any CPU
1719
EndGlobalSection
1820
GlobalSection(ProjectConfigurationPlatforms) = postSolution
21+
{A963C442-DFD3-4FE8-A2E1-9917AC274695}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22+
{A963C442-DFD3-4FE8-A2E1-9917AC274695}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{5954BDAE-A274-4615-9E94-2D0A6FA8B786}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{5954BDAE-A274-4615-9E94-2D0A6FA8B786}.Release|Any CPU.ActiveCfg = Release|Any CPU
1925
{A4374128-DD01-4CE3-B62C-4CC3460620C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2026
{A4374128-DD01-4CE3-B62C-4CC3460620C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
2127
{A4374128-DD01-4CE3-B62C-4CC3460620C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
2228
{A4374128-DD01-4CE3-B62C-4CC3460620C0}.Release|Any CPU.Build.0 = Release|Any CPU
23-
{A963C442-DFD3-4FE8-A2E1-9917AC274695}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24-
{A963C442-DFD3-4FE8-A2E1-9917AC274695}.Debug|Any CPU.Build.0 = Debug|Any CPU
25-
{A963C442-DFD3-4FE8-A2E1-9917AC274695}.Release|Any CPU.ActiveCfg = Release|Any CPU
26-
{A963C442-DFD3-4FE8-A2E1-9917AC274695}.Release|Any CPU.Build.0 = Release|Any CPU
2729
EndGlobalSection
2830
GlobalSection(SolutionProperties) = preSolution
2931
HideSolutionNode = FALSE
File renamed without changes.
File renamed without changes.

BaseState.cs renamed to Intento.MT.Plugin.PropertiesForm/BaseState.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,13 @@ private bool ShowErrorMessage()
6262
form.errors = form.errors.Where(i => i != null).ToList();
6363
if ((form.errors == null || form.errors.Count == 0))
6464
{
65-
form.buttonContinue.Enabled = true;
6665
form.formMT.buttonSave.Enabled = true;
6766
SetErrorMessage();
6867
return true;
6968
}
7069
else
7170
{
7271
SetErrorMessage(string.Join(", ", form.errors.Where(i => i != null)));
73-
form.buttonContinue.Enabled = false;
7472
form.formMT.buttonSave.Enabled = false;
7573
return false;
7674
}

GlossaryState.cs renamed to Intento.MT.Plugin.PropertiesForm/GlossaryState.cs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -175,26 +175,27 @@ public string SelectedGlossaryFrom
175175

176176
#endregion Properties
177177

178-
void Clear()
179-
{
180-
internalControlChange = true;
181-
formMT.comboBoxGlossaries.Items.Clear();
182-
formMT.textBoxGlossary.Text = string.Empty;
183-
internalControlChange = false;
184-
}
178+
void Clear(bool clearTextBox = true, bool clearComboBox = true)
179+
{
180+
internalControlChange = true;
181+
if (clearComboBox) formMT.comboBoxGlossaries.Items.Clear();
182+
if (clearTextBox) formMT.textBoxGlossary.Text = string.Empty;
183+
internalControlChange = false;
184+
}
185+
185186

186-
private void FillGlossaryControls()
187+
private void FillGlossaryControls()
187188
{
188189
if (!authState.IsOK)
189190
return;
190191

191-
Clear();
192192

193193
if (!providerState.custom_glossary)
194194
{ // glossaries are not supported by provider
195195
mode = StateModeEnum.prohibited;
196196
formMT.groupBoxGlossary.Enabled = false;
197-
return;
197+
Clear();
198+
return;
198199
}
199200

200201
mode = StateModeEnum.optional;
@@ -204,8 +205,9 @@ private void FillGlossaryControls()
204205

205206
if (isList)
206207
{
207-
// Fill Glossary and choose SelectedIndex
208-
formMT.comboBoxGlossaries.Items.Insert(0, "");
208+
Clear();
209+
// Fill Glossary and choose SelectedIndex
210+
formMT.comboBoxGlossaries.Items.Insert(0, "");
209211
foreach (string x in glossaries.Select(x => (string)x.Key).OrderBy(x => x))
210212
{
211213
int n = formMT.comboBoxGlossaries.Items.Add(x);
@@ -216,7 +218,8 @@ private void FillGlossaryControls()
216218
}
217219
else
218220
{
219-
formMT.textBoxGlossary.Text = options.Glossary;
221+
Clear(clearTextBox: false);
222+
formMT.textBoxGlossary.Text = options.Glossary;
220223
formMT.textBoxGlossary.Visible = true;
221224
}
222225
}
File renamed without changes.

Intento.MT.Plugin.PropertiesForm.csproj renamed to Intento.MT.Plugin.PropertiesForm/Intento.MT.Plugin.PropertiesForm.csproj

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,22 @@
1212
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<Deterministic>true</Deterministic>
15+
<DoSign Condition="'$(DoSign)' == ''">0</DoSign>
16+
<IntentoSDKPath Condition="'$(IntentoSDKPath)' == ''">..\intento-csharp\bin\</IntentoSDKPath>
1517
</PropertyGroup>
1618
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1719
<DebugSymbols>true</DebugSymbols>
1820
<DebugType>full</DebugType>
1921
<Optimize>false</Optimize>
20-
<OutputPath>bin\</OutputPath>
22+
<OutputPath Condition="'$(OutputPath)' == ''">bin\</OutputPath>
2123
<DefineConstants>DEBUG;TRACE</DefineConstants>
2224
<ErrorReport>prompt</ErrorReport>
2325
<WarningLevel>4</WarningLevel>
2426
</PropertyGroup>
2527
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2628
<DebugType>pdbonly</DebugType>
2729
<Optimize>true</Optimize>
28-
<OutputPath>bin\</OutputPath>
30+
<OutputPath Condition="'$(OutputPath)' == ''">bin\</OutputPath>
2931
<DefineConstants>TRACE</DefineConstants>
3032
<ErrorReport>prompt</ErrorReport>
3133
<WarningLevel>4</WarningLevel>
@@ -34,19 +36,14 @@
3436
<SignAssembly>true</SignAssembly>
3537
</PropertyGroup>
3638
<PropertyGroup>
37-
<AssemblyOriginatorKeyFile>intento.pfx</AssemblyOriginatorKeyFile>
39+
<AssemblyOriginatorKeyFile>intento_sn.snk</AssemblyOriginatorKeyFile>
3840
</PropertyGroup>
3941
<ItemGroup>
40-
<Reference Include="IntentoSDK">
41-
<HintPath>..\intento-csharp\bin\IntentoSDK.dll</HintPath>
42+
<Reference Include="IntentoSDK, Version=1.5.3.0, Culture=neutral, PublicKeyToken=7fbf26cf2c5f5508, processorArchitecture=MSIL">
43+
<HintPath>..\..\packages\IntentoSDK.1.5.3\lib\net45\IntentoSDK.dll</HintPath>
4244
</Reference>
43-
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
44-
<SpecificVersion>False</SpecificVersion>
45-
<HintPath>..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll</HintPath>
46-
</Reference>
47-
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
48-
<SpecificVersion>False</SpecificVersion>
49-
<HintPath>..\intento-csharp\bin\Newtonsoft.Json.dll</HintPath>
45+
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
46+
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
5047
</Reference>
5148
<Reference Include="System" />
5249
<Reference Include="System.Core" />
@@ -61,7 +58,6 @@
6158
</ItemGroup>
6259
<ItemGroup>
6360
<Compile Include="Logs.cs" />
64-
<Compile Include="Tests.cs" />
6561
<Compile Include="WinForms\IntentoFormIgnoreError.cs">
6662
<SubType>Form</SubType>
6763
</Compile>
@@ -150,11 +146,11 @@
150146
</EmbeddedResource>
151147
</ItemGroup>
152148
<ItemGroup>
153-
<None Include=".gitignore" />
149+
<None Include="app.config" />
154150
<None Include="githashForm.bat" />
155-
<None Include="intento.pfx" />
151+
<None Include="intento_sn.snk" />
156152
<None Include="packages.config" />
157-
<None Include="README.md" />
153+
<None Include="Properties\Intento.MT.Plugin.PropertiesForm.nuspec" />
158154
</ItemGroup>
159155
<ItemGroup>
160156
<None Include="Resources\intento.ico" />
@@ -163,4 +159,7 @@
163159
<PropertyGroup>
164160
<PreBuildEvent>$(ProjectDir)githashForm.bat &gt;$(ProjectDir)GitHash.cs</PreBuildEvent>
165161
</PropertyGroup>
162+
<PropertyGroup>
163+
<PostBuildEvent Condition="'$(DoSign)' == '1'">powershell -ExecutionPolicy RemoteSigned $(ProjectDir)postbuild.ps1 '$(TargetDir)$(TargetName).dll'</PostBuildEvent>
164+
</PropertyGroup>
166165
</Project>

0 commit comments

Comments
 (0)