Localizing TJAs by parsing language-specific Title/Subtitle (#315)
* Localizing TJAs by parsing language-specific Title/Subtitle Follows a similar style to Taiko Web's localized title/subtitle metadata by adding an abbreviation of the user's selected language to the TITLE and SUBTITLE command name. * Using a more proper method for localizing title/subtitle Hang on, that was a really bad method now that I looked at it. Now has a readonly string instead of constantly concating strings.
This commit is contained in:
parent
22ec0f9716
commit
82d6a6f911
@ -1314,6 +1314,9 @@ namespace TJAPlayer3
|
||||
private string[] dlmtEnter = { "\n" };
|
||||
private string[] dlmtCOURSE = { "COURSE:" };
|
||||
|
||||
private readonly string langTITLE = "TITLE" + CLangManager.fetchLang().ToUpper();
|
||||
private readonly string langSUBTITLE = "SUBTITLE" + CLangManager.fetchLang().ToUpper();
|
||||
|
||||
private int nスクロール方向 = 0;
|
||||
//2015.09.18 kairera0467
|
||||
//バタフライスライドみたいなアレをやりたいがために実装。
|
||||
@ -5005,6 +5008,15 @@ namespace TJAPlayer3
|
||||
this.TITLE = subTitle.Substring(5);
|
||||
//tbTitle.Text = strCommandParam;
|
||||
}
|
||||
else if (strCommandName.Equals(langTITLE))
|
||||
{
|
||||
var subTitle = "";
|
||||
for (int i = 0; i < strArray.Length; i++)
|
||||
{
|
||||
subTitle += strArray[i];
|
||||
}
|
||||
this.TITLE = subTitle.Substring(7);
|
||||
}
|
||||
if (strCommandName.Equals("SUBTITLE"))
|
||||
{
|
||||
if (strCommandParam.StartsWith("--"))
|
||||
@ -5029,6 +5041,15 @@ namespace TJAPlayer3
|
||||
this.SUBTITLE = subTitle.Substring(10);
|
||||
}
|
||||
}
|
||||
else if (strCommandName.Equals(langSUBTITLE))
|
||||
{
|
||||
var subTitle = "";
|
||||
for (int i = 0; i < strArray.Length; i++)
|
||||
{
|
||||
subTitle += strArray[i];
|
||||
}
|
||||
this.SUBTITLE = subTitle.Substring(10);
|
||||
}
|
||||
else if (strCommandName.Equals("LEVEL"))
|
||||
{
|
||||
var level = (int)Convert.ToDouble(strCommandParam);
|
||||
|
Loading…
x
Reference in New Issue
Block a user