Skip to content

Commit a27ebc9

Browse files
committedJul 27, 2018
Fix the TranslationApp
The app could not be run due to missing binding redirects and JTC.
1 parent c048fe7 commit a27ebc9

File tree

7 files changed

+28
-27
lines changed

7 files changed

+28
-27
lines changed
 

‎GitExtUtils/Properties/AssemblyInfo.cs

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
[assembly: InternalsVisibleTo("GitExtensions")]
44
[assembly: InternalsVisibleTo("CommonTestUtils")]
5+
[assembly: InternalsVisibleTo("TranslationApp")]
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
Write-Host "Copying latest english translation before update..."
2-
robocopy .\ ..\..\GitExtensions\bin\Release\Translation English*.xlf
1+
Write-Host "Copying the latest English translation before the update..."
2+
$translationsFolder = Resolve-Path .\
3+
$releaseTranslationsFolder = Resolve-Path ..\..\GitExtensions\bin\Release\Translation
4+
Write-Debug " > $translationsFolder`r`n > $releaseTranslationsFolder"
5+
xcopy "$translationsFolder\English*.xlf" "$releaseTranslationsFolder" /Y
36

4-
pushd ..\..\GitExtensions\bin\Release
5-
Write-Host "Updating english translation..."
6-
Start-Process -FilePath "TranslationApp.exe" -ArgumentList "update" -Wait
7+
$src = Resolve-Path ..\..\GitExtensions\bin\Release
8+
pushd "$src"
9+
Write-Host "Updating the English translation..."
10+
Start-Process -FilePath "$src\TranslationApp.exe" -ArgumentList "update" -Wait
711
popd
812

9-
Write-Host "Copying updated english translation for commit..."
10-
robocopy ..\..\GitExtensions\bin\Release\Translation .\ English*.xlf
13+
Write-Host "Copying the updated English translation to commit..."
14+
Write-Debug " > $releaseTranslationsFolder`r`n > $translationsFolder"
15+
xcopy "$releaseTranslationsFolder\English*.xlf" "$translationsFolder" /Y

‎Plugins/Bitbucket/BitbucketPullRequestForm.cs

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System.Threading.Tasks;
77
using System.Windows.Forms;
88
using GitUI;
9-
using GitUIPluginInterfaces;
109
using JetBrains.Annotations;
1110
using Microsoft.VisualStudio.Threading;
1211
using ResourceManager;

‎ResourceManager/Xliff/TranslationUtil.cs

+1
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ private static bool IsTranslatableItemInComponent(PropertyInfo property)
271271
"SMDiag",
272272
"System",
273273
"vshost",
274+
"Atlassian",
274275
};
275276

276277
/// <summary>true if the specified <see cref="Assembly"/> may be translatable.</summary>

‎TranslationApp/Program.cs

+9-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Windows.Forms;
66
using GitCommands.Utils;
77
using GitUI;
8+
using Microsoft.VisualStudio.Threading;
89
using ResourceManager;
910

1011
namespace TranslationApp
@@ -30,12 +31,19 @@ private static void Main()
3031
NBug.Settings.MaxQueuedReports = 10;
3132
NBug.Settings.StopReportingAfter = 90;
3233
NBug.Settings.SleepBeforeSend = 30;
33-
NBug.Settings.StoragePath = "WindowsTemp";
34+
NBug.Settings.StoragePath = NBug.Enums.StoragePath.WindowsTemp;
3435

3536
AppDomain.CurrentDomain.UnhandledException += NBug.Handler.UnhandledException;
3637
Application.ThreadException += NBug.Handler.ThreadException;
3738
}
3839

40+
// This form created for obtain UI synchronization context only
41+
using (new Form())
42+
{
43+
// Store the shared JoinableTaskContext
44+
ThreadHelper.JoinableTaskContext = new JoinableTaskContext();
45+
}
46+
3947
// required for translation
4048
PluginRegistry.Initialize();
4149
string[] args = Environment.GetCommandLineArgs();

‎TranslationApp/TranslationApp.csproj

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<ApplicationIcon>..\Logo\git-extensions-logo.ico</ApplicationIcon>
1616
<TargetFrameworkProfile>
1717
</TargetFrameworkProfile>
18+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1819
</PropertyGroup>
1920
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2021
<DebugSymbols>true</DebugSymbols>
@@ -86,6 +87,10 @@
8687
<Project>{BD6AA2A2-997D-4AFF-ACC7-B64F6E51D181}</Project>
8788
<Name>GitCommands</Name>
8889
</ProjectReference>
90+
<ProjectReference Include="..\GitExtUtils\GitExtUtils.csproj">
91+
<Project>{0F1F1168-A4B2-4FA2-B17B-735140D17F39}</Project>
92+
<Name>GitExtUtils</Name>
93+
</ProjectReference>
8994
<ProjectReference Include="..\GitUI\GitUI.csproj">
9095
<Project>{CF5B22E7-230F-4E50-BE88-C4F7023CED2C}</Project>
9196
<Name>GitUI</Name>

‎TranslationApp/app.config

-18
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,4 @@
66
<appSettings>
77
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
88
</appSettings>
9-
<runtime>
10-
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
11-
<probing privatePath="plugins" />
12-
<dependentAssembly>
13-
<assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
14-
<bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
15-
</dependentAssembly>
16-
<dependentAssembly>
17-
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
18-
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
19-
</dependentAssembly>
20-
<dependentAssembly>
21-
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
22-
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
23-
</dependentAssembly>
24-
</assemblyBinding>
25-
</runtime>
26-
<connectionStrings></connectionStrings>
279
</configuration>

0 commit comments

Comments
 (0)
Please sign in to comment.