Skip to content

Commit 88fd713

Browse files
committed
Merge branch develop v9.3.6-210925.0024
2 parents eb06bf7 + 65f89bb commit 88fd713

File tree

3 files changed

+33
-19
lines changed

3 files changed

+33
-19
lines changed

source/@MasterVersion.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v9.3.5
1+
v9.3.6

source/ACT.Hojoring.Common/Version.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
using System.Reflection;
22

3-
[assembly: AssemblyVersion("9.3.0.5")]
4-
[assembly: AssemblyFileVersion("9.3.0.5")]
3+
[assembly: AssemblyVersion("9.3.0.6")]
4+
[assembly: AssemblyFileVersion("9.3.0.6")]

source/ACT.TTSYukkuri/ACT.TTSYukkuri.Core/KanjiTranslator.cs

+30-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using System;
2-
using System.Runtime.InteropServices;
31
using FFXIV.Framework.Common;
42
using NLog;
3+
using System;
4+
using System.Runtime.InteropServices;
55

66
namespace ACT.TTSYukkuri
77
{
@@ -61,29 +61,39 @@ public void Initialize()
6161
{
6262
lock (lockObject)
6363
{
64-
if (this.IFELang == null)
64+
try
6565
{
66-
this.IFELang = Activator.CreateInstance(Type.GetTypeFromProgID("MSIME.Japan")) as IFELanguage;
67-
6866
if (this.IFELang == null)
6967
{
70-
this.Logger.Error("IFELANG IME initialize faild.");
71-
}
72-
else
73-
{
74-
var hr = this.IFELang.Open();
75-
if (hr != 0)
68+
this.IFELang = Activator.CreateInstance(Type.GetTypeFromProgID("MSIME.Japan")) as IFELanguage;
69+
70+
if (this.IFELang == null)
7671
{
77-
this.Logger.Error("IFELANG IME connection faild.");
78-
this.IFELang = null;
72+
this.Logger.Warn("IFELANG IME initialize failed. Disabled IME reverse translation.");
73+
}
74+
else
75+
{
76+
var hr = this.IFELang.Open();
77+
if (hr != 0)
78+
{
79+
this.Logger.Warn("IFELANG IME connection failed. Disabled IME reverse translation.");
80+
this.IFELang = null;
81+
}
82+
83+
this.Logger.Trace("IFELANG IME Connected.");
7984
}
80-
81-
this.Logger.Trace("IFELANG IME Connected.");
8285
}
8386
}
87+
catch (Exception)
88+
{
89+
this.Logger.Warn("IFELANG IME initialize failed due to an unexpected exception. Disabled IME reverse translation.");
90+
this.IFELang = null;
91+
}
8492
}
8593
}
8694

95+
private volatile bool hasWarned;
96+
8797
/// <summary>
8898
/// 読みがなを取得する
8999
/// </summary>
@@ -110,7 +120,11 @@ public string GetPhonetic(
110120
}
111121
else
112122
{
113-
this.Logger.Error($"IFELANG IME not ready. text={text}");
123+
if (!this.hasWarned)
124+
{
125+
this.hasWarned = true;
126+
this.Logger.Warn($"IFELANG IME has been disabled. text={text}");
127+
}
114128
}
115129

116130
return yomigana;

0 commit comments

Comments
 (0)