Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Added

- [SIL.Windows.Forms.WritingSystems] Made WritingSystemSetupDialog controls localizable via L10NSharpExtender
- [SIL.Windows.Forms.Archiving, SIL.Windows.Forms.DblBundle] Added `net8.0-windows` target.
- [SIL.Core.Clearshare] Added new classes MetadataCore, CreativeCommonsLicenseInfo, and CustomLicenseInfo; these are Winforms-free base versions of the classes Metadata, CreativeCommonsLicense, and CustomLicense.
- [SIL.Core.Clearshare and SIL.Windows.Forms.Clearshare] Added LicenseUtils and LicenseWithImageUtils to handle the FromXmp method for creating a license. LicenseUtils constructs a bare license object that is Winforms-independent; LicenseWithImageUtils constructs a Winforms-dependent license object with access to license images.
Expand Down
18 changes: 18 additions & 0 deletions SIL.Windows.Forms.WritingSystems.Tests/UITests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@ namespace SIL.Windows.Forms.WritingSystems.Tests
[TestFixture]
public class UITests
{
[Test]
[Explicit("Requires KeyboardController and LocalizationManager infrastructure — run by hand")]
[Apartment(ApartmentState.STA)]
public void WritingSystemSetupDialog_Construct_DoesNotThrow()
{
using (var folder = new TemporaryFolder("WS-Test-Smoke"))
{
var repository = LdmlInFolderWritingSystemRepository.Initialize(folder.Path);
Assert.DoesNotThrow(() =>
{
using (var dlg = new WritingSystemSetupDialog(repository))
{
Assert.That(dlg, Is.Not.Null);
}
});
}
}

//NB: in Mar 2011, I couldn't get these to run in vs 2010 with resharper, because
// of the need to be in single apartment thread mode. The app.config is there, requesting
// it, but it doesn't work. So I had to plug in this CrossThreadTestRunner thing
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions SIL.Windows.Forms.WritingSystems/WritingSystemSetupDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using L10NSharp;
using SIL.Windows.Forms.WritingSystems.WSTree;
using SIL.WritingSystems;

Expand Down Expand Up @@ -74,7 +75,8 @@ private void _closeButton_Click(object sender, EventArgs e)
catch (ArgumentException exception)
{
MessageBox.Show (
this, exception.Message, "Input Systems Error",
this, exception.Message,
LocalizationManager.GetString("WritingSystemSetupDialog.InputSystemsError", "Input Systems Error"),
MessageBoxButtons.OK, MessageBoxIcon.Exclamation
);
}
Expand All @@ -87,7 +89,7 @@ private void _openDirectory_Click(object sender, EventArgs e)
openDir.RootFolder = Environment.SpecialFolder.Personal;

// Set the help text description for the FolderBrowserDialog.
openDir.Description = "Select the folder with Writing Systems";
openDir.Description = LocalizationManager.GetString("WritingSystemSetupDialog.SelectFolderDescription", "Select the folder with Writing Systems");

// Allow the user to create new files via the FolderBrowserDialog.
openDir.ShowNewFolderButton = true;
Expand All @@ -105,7 +107,7 @@ private void _openDirectory_Click(object sender, EventArgs e)

dlg.WritingSystemSuggestor.SuggestVoice = true;
dlg.WritingSystemSuggestor.OtherKnownWritingSystems = null;
dlg.Text = String.Format("Writing Systems in folder {0}", newDir);
dlg.Text = String.Format(LocalizationManager.GetString("WritingSystemSetupDialog.TitleWithFolder", "Writing Systems in folder {0}", "The {0} is replaced with the folder path."), newDir);

dlg.Show();
}
Expand All @@ -117,7 +119,7 @@ private void _openGlobal_Click(object sender, EventArgs e)
dlg.WritingSystemSuggestor.SuggestVoice = true;
dlg.WritingSystemSuggestor.OtherKnownWritingSystems = null;
dlg.DisposeRepository = true;
dlg.Text = String.Format("Writing Systems for all users of this computer");
dlg.Text = LocalizationManager.GetString("WritingSystemSetupDialog.TitleAllUsers", "Writing Systems for all users of this computer");

dlg.Show();
}
Expand Down
Loading