Skip to content

Commit

Permalink
add support for converting non-japansese words
Browse files Browse the repository at this point in the history
  • Loading branch information
smdn committed Nov 17, 2023
1 parent 372daef commit ef48a07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private static SortedList<string, string> LoadDictionary(Stream stream)

var key = entries[1].Trim().RemoveChars(dictionaryPunctuationChars);

dictionary[KanaUtils.ConvertWideHiraganaToKatakana(key)] = entries[2].Trim();
dictionary[KanaUtils.ConvertWideHiraganaToKatakana(key).ToLowerInvariant()] = entries[2].Trim().ToLowerInvariant();
}

return dictionary;
Expand Down
2 changes: 1 addition & 1 deletion src/Smdn.Text.Ondulish/Smdn.Text.Ondulish/Translator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public void Translate(

var fragments =
ConvertWithDictionary(
ConvertToKatakana(line),
ConvertToKatakana(line).ToLowerInvariant(),
PhraseDictionary
)
.SelectMany(f =>
Expand Down

0 comments on commit ef48a07

Please sign in to comment.