-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
59 additions
and
4 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
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
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
38 changes: 38 additions & 0 deletions
38
ACT.FFXIVTranslate/ACT.FFXIVTranslate.Test/YandaxTranslateTest.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,38 @@ | ||
using System; | ||
using System.Linq; | ||
using ACT.FFXIVTranslate.localization; | ||
using ACT.FFXIVTranslate.translate.yandax; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace ACT.FFXIVTranslate.Test | ||
{ | ||
[TestClass] | ||
public class YandaxTranslateTest | ||
{ | ||
[TestMethod] | ||
public void TestYandaxTranslate() | ||
{ | ||
var factory = new YandaxTranslateProviderFactory(); | ||
var key = factory.DefaultPublicKey; | ||
var to = LanguageDef.BuildLangFromCulture("zh"); | ||
var provider = factory.CreateProvider(key, null, to); | ||
|
||
var lines = new[] | ||
{ | ||
new ChattingLine {RawContent = "This is a testing string."}, | ||
new ChattingLine {RawContent = "This is another testing string."}, | ||
new ChattingLine {RawContent = "Wow lots of strings!"}, | ||
new ChattingLine {RawContent = "I like the game called 'Final Fantasy XIV'!"}, | ||
new ChattingLine {RawContent = "This is a string <aaa> contains html tag."}, | ||
new ChattingLine {RawContent = "This is a string < contains html tag."}, | ||
new ChattingLine {RawContent = "<"}, | ||
}.Select(it => | ||
{ | ||
provider.PreprocessLine(it); | ||
return it; | ||
}).ToList(); | ||
|
||
provider.Translate(lines); | ||
} | ||
} | ||
} |
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