Skip to content

Commit c4aba18

Browse files
misc changes
1 parent 34651fb commit c4aba18

File tree

73 files changed

+7757
-4243
lines changed

Some content is hidden

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

73 files changed

+7757
-4243
lines changed

GTranslate/LanguageDictionary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private Dictionary<string, string> BuildLanguageAliases()
135135
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP2_1_OR_GREATER
136136
aliases.TrimExcess();
137137
#endif
138-
138+
139139
return aliases;
140140
}
141141

GTranslate/Results/MicrosoftTransliterationResult.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using System;
2-
using GTranslate.Translators;
1+
using GTranslate.Translators;
2+
using System;
33

44
namespace GTranslate.Results;
55

GTranslate/TranslatorGuards.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
using System;
1+
using GTranslate.Extensions;
2+
using GTranslate.Translators;
3+
using System;
24
using System.Diagnostics.CodeAnalysis;
35
using System.Net.Http;
46
using System.Runtime.CompilerServices;
57
using System.Text.Json;
6-
using GTranslate.Extensions;
7-
using GTranslate.Translators;
88

99
namespace GTranslate;
1010

GTranslate/Translators/AggregateTranslator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
using System;
1+
using GTranslate.Results;
2+
using System;
23
using System.Collections.Generic;
34
using System.Linq;
45
using System.Threading.Tasks;
5-
using GTranslate.Results;
66

77
namespace GTranslate.Translators;
88

GTranslate/Translators/BingTranslator.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
using System;
1+
using GTranslate.Extensions;
2+
using GTranslate.Results;
3+
using System;
24
using System.Collections.Generic;
35
using System.Net.Http;
46
using System.Text.Json;
57
using System.Threading;
68
using System.Threading.Tasks;
7-
using GTranslate.Extensions;
8-
using GTranslate.Results;
99

1010
namespace GTranslate.Translators;
1111

GTranslate/Translators/GoogleTranslator.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
using System;
1+
using GTranslate.Extensions;
2+
using GTranslate.Results;
3+
using System;
24
using System.Collections.Generic;
35
using System.IO;
46
using System.Linq;
57
using System.Net.Http;
68
using System.Text.Json;
79
using System.Threading.Tasks;
8-
using GTranslate.Extensions;
9-
using GTranslate.Results;
1010

1111
namespace GTranslate.Translators;
1212

GTranslate/Translators/GoogleTranslator2.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
using System;
1+
using GTranslate.Extensions;
2+
using GTranslate.Results;
3+
using System;
24
using System.Collections.Generic;
35
using System.IO;
46
using System.Linq;
57
using System.Net.Http;
68
using System.Text.Json;
79
using System.Threading.Tasks;
8-
using GTranslate.Extensions;
9-
using GTranslate.Results;
1010

1111
namespace GTranslate.Translators;
1212

@@ -109,7 +109,7 @@ public async Task<GoogleTranslationResult> TranslateAsync(string text, ILanguage
109109

110110
string target = root[1][1].GetString() ?? toLanguage.ISO6391;
111111
string source = root[1][3].GetString() ?? string.Empty;
112-
112+
113113
if (source == "auto")
114114
{
115115
source = root.ElementAtOrDefault(2).GetStringOrDefault()

GTranslate/Translators/ITranslator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using System.Threading.Tasks;
2-
using GTranslate.Results;
1+
using GTranslate.Results;
2+
using System.Threading.Tasks;
33

44
namespace GTranslate.Translators;
55

GTranslate/Translators/MicrosoftTranslator.cs

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using System;
1+
using GTranslate.Extensions;
2+
using GTranslate.Results;
3+
using System;
24
using System.Collections.Generic;
35
using System.Collections.ObjectModel;
46
using System.IO;
@@ -9,8 +11,6 @@
911
using System.Text.Json;
1012
using System.Threading;
1113
using System.Threading.Tasks;
12-
using GTranslate.Extensions;
13-
using GTranslate.Results;
1414

1515
namespace GTranslate.Translators;
1616

@@ -90,40 +90,40 @@ public sealed class MicrosoftTranslator : ITranslator, IDisposable
9090
/// </summary>
9191
public static IReadOnlyDictionary<string, IReadOnlyCollection<string>> Scripts { get; }
9292
= new ReadOnlyDictionary<string, IReadOnlyCollection<string>>(new Dictionary<string, IReadOnlyCollection<string>>
93-
{
94-
["ar"] = new[] { "Latn", "Arab" },
95-
["as"] = new[] { "Latn", "Beng" },
96-
["be"] = new[] { "Latn", "Cyrl" },
97-
["bg"] = new[] { "Latn", "Cyrl" },
98-
["bn"] = new[] { "Latn", "Beng" },
99-
["el"] = new[] { "Latn", "Grek" },
100-
["fa"] = new[] { "Latn", "Arab" },
101-
["gu"] = new[] { "Latn", "Gujr" },
102-
["he"] = new[] { "Latn", "Hebr" },
103-
["hi"] = new[] { "Latn", "Deva" },
104-
["ja"] = new[] { "Latn", "Jpan" },
105-
["kk"] = new[] { "Latn", "Cyrl" },
106-
["kn"] = new[] { "Latn", "Knda" },
107-
["ko"] = new[] { "Latn", "Kore" },
108-
["ky"] = new[] { "Latn", "Cyrl" },
109-
["mk"] = new[] { "Latn", "Cyrl" },
110-
["ml"] = new[] { "Latn", "Mlym" },
111-
["mn"] = new[] { "Latn", "Cyrl" },
112-
["mr"] = new[] { "Latn", "Deva" },
113-
["or"] = new[] { "Latn", "Orya" },
114-
["pa"] = new[] { "Latn", "Guru" },
115-
["ru"] = new[] { "Latn", "Cyrl" },
116-
["sd"] = new[] { "Latn", "Arab" },
117-
["si"] = new[] { "Latn", "Sinh" },
118-
["ta"] = new[] { "Latn", "Taml" },
119-
["te"] = new[] { "Latn", "Telu" },
120-
["tg"] = new[] { "Latn", "Cyrl" },
121-
["tt"] = new[] { "Latn", "Cyrl" },
122-
["uk"] = new[] { "Latn", "Cyrl" },
123-
["ur"] = new[] { "Latn", "Arab" },
124-
["zh-CN"] = new[] { "Latn", "Hans" }, // zh-Hans
125-
["zh-TW"] = new[] { "Latn", "Hant" } // zh-Hant
126-
});
93+
{
94+
["ar"] = new[] { "Latn", "Arab" },
95+
["as"] = new[] { "Latn", "Beng" },
96+
["be"] = new[] { "Latn", "Cyrl" },
97+
["bg"] = new[] { "Latn", "Cyrl" },
98+
["bn"] = new[] { "Latn", "Beng" },
99+
["el"] = new[] { "Latn", "Grek" },
100+
["fa"] = new[] { "Latn", "Arab" },
101+
["gu"] = new[] { "Latn", "Gujr" },
102+
["he"] = new[] { "Latn", "Hebr" },
103+
["hi"] = new[] { "Latn", "Deva" },
104+
["ja"] = new[] { "Latn", "Jpan" },
105+
["kk"] = new[] { "Latn", "Cyrl" },
106+
["kn"] = new[] { "Latn", "Knda" },
107+
["ko"] = new[] { "Latn", "Kore" },
108+
["ky"] = new[] { "Latn", "Cyrl" },
109+
["mk"] = new[] { "Latn", "Cyrl" },
110+
["ml"] = new[] { "Latn", "Mlym" },
111+
["mn"] = new[] { "Latn", "Cyrl" },
112+
["mr"] = new[] { "Latn", "Deva" },
113+
["or"] = new[] { "Latn", "Orya" },
114+
["pa"] = new[] { "Latn", "Guru" },
115+
["ru"] = new[] { "Latn", "Cyrl" },
116+
["sd"] = new[] { "Latn", "Arab" },
117+
["si"] = new[] { "Latn", "Sinh" },
118+
["ta"] = new[] { "Latn", "Taml" },
119+
["te"] = new[] { "Latn", "Telu" },
120+
["tg"] = new[] { "Latn", "Cyrl" },
121+
["tt"] = new[] { "Latn", "Cyrl" },
122+
["uk"] = new[] { "Latn", "Cyrl" },
123+
["ur"] = new[] { "Latn", "Arab" },
124+
["zh-CN"] = new[] { "Latn", "Hans" }, // zh-Hans
125+
["zh-TW"] = new[] { "Latn", "Hant" } // zh-Hant
126+
});
127127

128128
/// <summary>
129129
/// Initializes a new instance of the <see cref="MicrosoftTranslator"/> class.

GTranslate/Translators/YandexTranslator.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
using System;
1+
using GTranslate.Extensions;
2+
using GTranslate.Results;
3+
using System;
24
using System.Collections.Generic;
35
using System.IO;
46
using System.Linq;
57
using System.Net;
68
using System.Net.Http;
79
using System.Text.Json;
810
using System.Threading.Tasks;
9-
using GTranslate.Extensions;
10-
using GTranslate.Results;
1111

1212
namespace GTranslate.Translators;
1313

0 commit comments

Comments
 (0)