re-add translit control
This commit is contained in:
@@ -9,7 +9,8 @@
|
|||||||
struct TitleTrans
|
struct TitleTrans
|
||||||
{
|
{
|
||||||
Regex TitleFrom, SubFrom, ArtistFrom;
|
Regex TitleFrom, SubFrom, ArtistFrom;
|
||||||
CString TitleTo, SubTo, ArtistTo; /* plain text */
|
CString TitleTo, SubTo, ArtistTo; /* plain text */
|
||||||
|
CString TitleTransTo, SubTransTo, ArtistTransTo; /* plain text */
|
||||||
|
|
||||||
/* If this is true, no translit fields will be generated automatically. */
|
/* If this is true, no translit fields will be generated automatically. */
|
||||||
bool translit;
|
bool translit;
|
||||||
@@ -60,12 +61,31 @@ void TitleSubst::Subst(CString &title, CString &subtitle, CString &artist,
|
|||||||
subtitle = ttab[i]->SubTo;
|
subtitle = ttab[i]->SubTo;
|
||||||
FontCharAliases::ReplaceMarkers( subtitle );
|
FontCharAliases::ReplaceMarkers( subtitle );
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!ttab[i]->ArtistTo.empty() && artist != ttab[i]->ArtistTo)
|
if(!ttab[i]->ArtistTo.empty() && artist != ttab[i]->ArtistTo)
|
||||||
{
|
{
|
||||||
if(ttab[i]->translit) tartist = artist;
|
if(ttab[i]->translit) tartist = artist;
|
||||||
artist = ttab[i]->ArtistTo;
|
artist = ttab[i]->ArtistTo;
|
||||||
FontCharAliases::ReplaceMarkers( artist );
|
FontCharAliases::ReplaceMarkers( artist );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* These are used when applying kanji to a field that doesn't have the
|
||||||
|
* correct data. Should be used sparingly. */
|
||||||
|
if(!ttab[i]->TitleTransTo.empty())
|
||||||
|
{
|
||||||
|
ttitle = ttab[i]->TitleTransTo;
|
||||||
|
FontCharAliases::ReplaceMarkers( ttitle );
|
||||||
|
}
|
||||||
|
if(!ttab[i]->SubTransTo.empty())
|
||||||
|
{
|
||||||
|
tsubtitle = ttab[i]->SubTransTo;
|
||||||
|
FontCharAliases::ReplaceMarkers( tsubtitle );
|
||||||
|
}
|
||||||
|
if(!ttab[i]->ArtistTransTo.empty())
|
||||||
|
{
|
||||||
|
tartist = ttab[i]->ArtistTransTo;
|
||||||
|
FontCharAliases::ReplaceMarkers( tartist );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,6 +144,9 @@ void TitleSubst::Load(const CString &filename, const CString §ion)
|
|||||||
else if(!id.CompareNoCase("TitleTo")) tr.TitleTo = txt;
|
else if(!id.CompareNoCase("TitleTo")) tr.TitleTo = txt;
|
||||||
else if(!id.CompareNoCase("ArtistTo")) tr.ArtistTo = txt;
|
else if(!id.CompareNoCase("ArtistTo")) tr.ArtistTo = txt;
|
||||||
else if(!id.CompareNoCase("SubtitleTo")) tr.SubTo = txt;
|
else if(!id.CompareNoCase("SubtitleTo")) tr.SubTo = txt;
|
||||||
|
else if(!id.CompareNoCase("TitleTransTo")) tr.TitleTransTo = txt;
|
||||||
|
else if(!id.CompareNoCase("ArtistTransTo")) tr.ArtistTransTo = txt;
|
||||||
|
else if(!id.CompareNoCase("SubtitleTransTo")) tr.SubTransTo = txt;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add the translation if this is a terminator (*) or section
|
/* Add the translation if this is a terminator (*) or section
|
||||||
|
|||||||
Reference in New Issue
Block a user