Skip to content

Commit

Permalink
I'm a shiitty speller. Its language NOT langauge!!
Browse files Browse the repository at this point in the history
  • Loading branch information
tig committed May 3, 2020
1 parent 3828d2b commit 3ab9cb7
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/WinPrint.Console/OutWinPrint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ await Task.Run(() => ServiceLocator.Current.UpdateService.GetLatestVersionAsync(
return;
}

// If Langauge is provided, use it instead of CTE.
// If Language is provided, use it instead of CTE.
if (!MyInvocation.BoundParameters.TryGetValue("Language", out var contentType)) {
if (!MyInvocation.BoundParameters.TryGetValue("ContentTypeEngine", out contentType)) {
// If neither were specified, smartly pick CTE
Expand Down Expand Up @@ -530,7 +530,7 @@ await Task.Run(() => ServiceLocator.Current.UpdateService.GetLatestVersionAsync(
Log.Information("FileName: {FileName}", FileName ?? "");
Log.Information("Title: {title}", Title ?? "");
Log.Information("Content Type: {contentType}", _print.SheetViewModel.ContentType);
Log.Information("Langauge: {langauge}", _print.SheetViewModel.Language);
Log.Information("Language: {Language}", _print.SheetViewModel.Language);
Log.Information("Content Type Engine: {cte}", _print.SheetViewModel.ContentEngine.GetType().Name);
Log.Information("Printer: {printer}", _print.PrintDocument.PrinterSettings.PrinterName);
Log.Information("Paper Size: {size}", _print.PrintDocument.DefaultPageSettings.PaperSize.PaperName);
Expand Down
2 changes: 1 addition & 1 deletion src/WinPrint.Console/WinPrint.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AssemblyName>winprint</AssemblyName>
<StartupObject></StartupObject>

<Version>2.0.5.100</Version>
<Version>2.0.5.102</Version>
<Company>Kindel Systems</Company>
<Product>winprint</Product>
<Authors>Charlie Kindel</Authors>
Expand Down
6 changes: 3 additions & 3 deletions src/WinPrint.Core/ContentTypeEngines/ContentTypeEngineBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public virtual async Task<int> RenderAsync(System.Drawing.Printing.PrinterResolu
/// </summary>
/// <param name="contentType"></param>
/// <returns>ContentEngine, ContentType, Language</returns>
public static (ContentTypeEngineBase cte, string languageId, string langauge) CreateContentTypeEngine(string contentType) {
public static (ContentTypeEngineBase cte, string languageId, string Language) CreateContentTypeEngine(string contentType) {
Debug.Assert(!string.IsNullOrEmpty(contentType));
Debug.Assert(ModelLocator.Current.FileTypeMapping != null);
Debug.Assert(ModelLocator.Current.FileTypeMapping.ContentTypes != null);
Expand Down Expand Up @@ -194,7 +194,7 @@ public static (ContentTypeEngineBase cte, string languageId, string langauge) Cr
language = lang.Title;
}

// Is it a language name found in a langauge alias? (ansi)
// Is it a language name found in a Language alias? (ansi)
lang = ModelLocator.Current.FileTypeMapping.ContentTypes
.FirstOrDefault(l => l.Aliases
.Where(i => CultureInfo.CurrentCulture.CompareInfo.Compare(i, contentType, CompareOptions.IgnoreCase) == 0).Count() > 0);
Expand Down Expand Up @@ -295,7 +295,7 @@ public static string GetContentType(string filePath) {
// If not text or html, is it a language?
//if (!contentType.Equals("text/plain") && !contentType.Equals("text/html")) {
// // Technically, because we got the assocation from FilesAssocation, this should always work
// if (!((List<Langauge>)ModelLocator.Current.Associations.Languages).Exists(lang => lang.Id == contentType))
// if (!((List<Language>)ModelLocator.Current.Associations.Languages).Exists(lang => lang.Id == contentType))
// contentType = "text/plain";
//}
return contentType;
Expand Down
2 changes: 1 addition & 1 deletion src/WinPrint.Core/Models/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public static Settings CreateDefaultSettings() {
var defaultHFFontSize = 10F;
var defaultHFFontStyle = FontStyle.Bold;

var defaultHeaderText = "{DateRevised:D}|{FileName}|Langauge: {Language}";
var defaultHeaderText = "{DateRevised:D}|{FileName}|Language: {Language}";
var defualtFooterText = "Printed with love by WinPrint||Page {Page} of {NumPages}";

var settings = new Settings {
Expand Down
2 changes: 1 addition & 1 deletion src/WinPrint.Core/Services/FileTypeMappingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public FileTypeMapping Load() {
// Merge in any language defintions set in settings file
var langs = new List<ContentType>(associations.ContentTypes);
var langsSettings = new List<ContentType>(ModelLocator.Current.Settings.FileTypeMapping.ContentTypes);
// TODO: overide Equals and GetHashCode for Langauge
// TODO: overide Equals and GetHashCode for Language
var result = langsSettings.Union(langs).ToList();

associations.ContentTypes = result;
Expand Down
4 changes: 2 additions & 2 deletions src/WinPrint.Core/ViewModels/SheetViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public string Title {
private string _title;

/// <summary>
/// Content type (e.g. text/x-csharp). Langauge.Id
/// Content type (e.g. text/x-csharp). Language.Id
/// </summary>
public string ContentType {
get => _contentType;
Expand All @@ -84,7 +84,7 @@ public string ContentType {
private string _contentType;

/// <summary>
/// The langauge (Language.Title or Alias)
/// The Language (Language.Title or Alias)
/// </summary>
public string Language {
get => _language;
Expand Down
2 changes: 1 addition & 1 deletion src/WinPrint.Core/WinPrint.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Platforms>AnyCPU;x64;x86</Platforms>
<Version>2.0.5.100</Version>
<Version>2.0.5.102</Version>
<Company>Kindel Systems</Company>
<Product>winprint</Product>
<Authors>Charlie Kindel</Authors>
Expand Down
2 changes: 1 addition & 1 deletion src/WinPrint.WinForms/WinPrint.WinForms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<AssemblyTitle>winprint GUI</AssemblyTitle>
<AssemblyName>winprintgui</AssemblyName>

<Version>2.0.5.100</Version>
<Version>2.0.5.102</Version>
<Company>Kindel Systems</Company>
<Product>winprint</Product>
<Authors>Charlie Kindel</Authors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void TestDefaultConfigFiletypeMappkng()
}

[Fact]
public void TestDefaultConfigLangauges()
public void TestDefaultConfigLanguages()
{
ServiceLocator.Current.SettingsService.SettingsFileName = $"WinPrint.{GetType().Name}.json";
File.Delete(ServiceLocator.Current.SettingsService.SettingsFileName);
Expand Down Expand Up @@ -82,7 +82,7 @@ public void TestDefaultConfigLangauges()
}

[Fact]
public void TestLangauges()
public void TestLanguages()
{
ServiceLocator.Current.SettingsService.SettingsFileName = $"WinPrint.{GetType().Name}.json";
File.Delete(ServiceLocator.Current.SettingsService.SettingsFileName);
Expand Down

0 comments on commit 3ab9cb7

Please sign in to comment.