-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add HttpListener:enable control of project from report * HttpListener: Respond better to difrerent scenarios * HttpListener: Add ChangeStatus endpoint * Two way interaction - first steps * Add Post-Edit Report Viewer * ReportExplorer: convert to MVVM * Report-Studio Integration: Use webView2 messaging instead of HTTP * Sync report and editor comments * Refactoring * Handle multiple target files * Added updateSegmentStatus JS function Added sync buttons in ribbon * Comment update in Studio Editor reflects in report * Move JS functions outside of the XSLT * Add comment functionality (both ways) finished ChangeStatus finished * SyncOn -> No other report selectable * Add actions: Save, Export, Open Report Folder to Ribbon Move Refresh Report List action to ribbon * Export action: delete interactivity elements before exporting * Remove WinForms report Stop autostarting HTML report in browser * Remove WinForms report 2 Stop autostarting HTML report in browser 2 * Remove WinForms report 3 Stop autostarting HTML report in browser 3 * Extend Comparison Report Settings: Add FuzzyMatch bands * Extend Comparison Report Settings: Take FuzzyMatch settings into account * Add ReportViewFilter * Add ReportViewFilter Functionality * ReportFilter: Add fuzzy bands when fuzzy matches selected * Refactoring * Correct solution structure * Fix issues discovered in testing Add Scripts.js as resource * Create Report Wizard: Add more details to error * Enhance filter functionality * ReportViewer: Export to Excel * Excel export: add style for headers and percentages * Add all tables as sheets to excel report * Refactor Try infer original project path when not set Add ErrorHandler Backup synchronized report Change style of excel report * Report Comparison Window: Close after a report has been created * Navigate to report: ask user * Enhance report * Enhance Excel report * Enhance Excel report * Create excel report: Add error handling * Excel report: statuses shown on separate lines Sync ribbon: correct status of SyncOn button
- Loading branch information
Showing
175 changed files
with
4,248 additions
and
1,589 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
Post Edit Compare/Sdl.Community.PostEdit.Compare.Core/AppInitializer.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
Post Edit Compare/Sdl.Community.PostEdit.Compare.Core/Helper/ChangeTracker.cs
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
Post Edit Compare/Sdl.Community.PostEdit.Compare.Core/Helper/EventAggregator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Sdl.Community.PostEdit.Compare.Core; | ||
using Sdl.Desktop.IntegrationApi.Interfaces; | ||
using Sdl.TranslationStudioAutomation.IntegrationApi; | ||
using System; | ||
|
||
namespace Sdl.Community.PostEdit.Compare.Core.Helper; | ||
|
||
public static class EventAggregator | ||
{ | ||
private static IStudioEventAggregator StudioEventAggregator => SdlTradosStudio.Application.GetService<IStudioEventAggregator>(); | ||
|
||
public static void PublishEvent<T>(T message) | ||
{ | ||
StudioEventAggregator.Publish(message); | ||
} | ||
|
||
public static void Subscribe<T>(Action<T> action) | ||
{ | ||
StudioEventAggregator.GetEvent<T>().Subscribe(action); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
Post Edit Compare/Sdl.Community.PostEdit.Compare.Core/Helper/FileIdentifier.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
using System.IO; | ||
using System.Windows; | ||
using System.Xml; | ||
|
||
namespace Sdl.Community.PostEdit.Compare.Core.Helper | ||
{ | ||
public static class FileIdentifier | ||
{ | ||
public static string GetFileInfo(string filepath) | ||
{ | ||
if (string.IsNullOrEmpty(filepath) || !File.Exists(filepath)) | ||
{ | ||
MessageBox.Show($"{nameof(GetFileInfo)}: Original project filepath missing. "); | ||
return null; | ||
} | ||
var filename = Path.GetFileName(filepath); | ||
var currentFileParentDirName = Directory.GetParent(filepath)?.Name; | ||
var fileInfo = $"{currentFileParentDirName}//{filename}"; | ||
return fileInfo; | ||
} | ||
|
||
public static string GetProjectId(string projectFilePath) | ||
{ | ||
var filepath = GetSdlProjFilePathFromProjectFile(projectFilePath); | ||
return ReadProjectId(filepath); | ||
} | ||
|
||
public static string GetSdlProjFilePathFromProjectFile(string projectFilePath) | ||
{ | ||
if (string.IsNullOrEmpty(projectFilePath) || !File.Exists(projectFilePath)) | ||
{ | ||
MessageBox.Show($"{nameof(ReadProjectId)}: Original project filepath missing. "); | ||
return null; | ||
} | ||
|
||
var projectFolderPath = Directory.GetParent(Path.GetDirectoryName(projectFilePath)); | ||
while (projectFolderPath is not null) | ||
{ | ||
var sdlProjFiles = Directory.GetFiles(projectFolderPath.FullName, "*.sdlproj", | ||
SearchOption.TopDirectoryOnly); | ||
|
||
if (sdlProjFiles.Length == 1) return sdlProjFiles[0]; | ||
|
||
projectFolderPath = projectFolderPath.Parent; | ||
} | ||
|
||
return null; | ||
} | ||
|
||
private static string ReadProjectId(string projectFilePath) | ||
{ | ||
if (string.IsNullOrWhiteSpace(projectFilePath)) return null; | ||
|
||
var doc = new XmlDocument(); | ||
doc.Load(projectFilePath); | ||
|
||
var root = doc.DocumentElement; | ||
|
||
return root.Attributes["Guid"].Value; | ||
} | ||
} | ||
} |
Oops, something went wrong.