更新: 個別フィードの言語タグ除外、製品ID(RJ等)除外とバージョン保持、本文直下へのフォルダ名用タイトル配置
This commit is contained in:
1 parent
20ff5b2eac
commit
62738928fd
1 file changed
+216
-97
@@ -255,35 +255,54 @@ internal class ryuugames
|
|||||||
existingEntries.TryGetValue(guid, out prevEntry);
|
existingEntries.TryGetValue(guid, out prevEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
SyndicationItem item;
|
|
||||||
LanguageType langType;
|
LanguageType langType;
|
||||||
|
|
||||||
// 最新フォーマット(ダウンロードセクション、英語タイトル、および日本語タイトル表示 v4)が含まれているキャッシュのみ再利用
|
// 最新フォーマット(ダウンロードセクション、英語タイトル、およびフォルダ名タイトル表示 v5)が含まれているキャッシュのみ再利用
|
||||||
bool isLatestFormat = prevEntry != null &&
|
bool isLatestFormat = prevEntry != null &&
|
||||||
prevEntry.SummaryHtml.Contains("ryuu-dl-section") &&
|
prevEntry.SummaryHtml.Contains("ryuu-dl-section") &&
|
||||||
prevEntry.SummaryHtml.Contains("ryuu-eng-title") &&
|
prevEntry.SummaryHtml.Contains("ryuu-format-v5");
|
||||||
prevEntry.SummaryHtml.Contains("ryuu-jp-title-v4");
|
|
||||||
|
|
||||||
if (prevEntry != null && !string.IsNullOrEmpty(prevEntry.SummaryHtml) && isLatestFormat)
|
if (prevEntry != null && !string.IsNullOrEmpty(prevEntry.SummaryHtml) && isLatestFormat)
|
||||||
{
|
{
|
||||||
// 【キャッシュヒット(未更新記事)】
|
// 【キャッシュヒット(未更新記事)】
|
||||||
langType = prevEntry.Language;
|
langType = prevEntry.Language;
|
||||||
item = new SyndicationItem(
|
|
||||||
prevEntry.Title,
|
|
||||||
(string?)null,
|
|
||||||
new Uri(link),
|
|
||||||
guid,
|
|
||||||
prevEntry.LastUpdatedTime
|
|
||||||
)
|
|
||||||
{
|
|
||||||
PublishDate = prevEntry.PublishDate,
|
|
||||||
LastUpdatedTime = prevEntry.LastUpdatedTime,
|
|
||||||
Summary = new TextSyndicationContent(prevEntry.SummaryHtml, TextSyndicationContentKind.Html)
|
|
||||||
};
|
|
||||||
|
|
||||||
// カテゴリの追加
|
// 全件用アイテム(言語プレフィックス【】付き)
|
||||||
string langTag = langType == LanguageType.Japanese ? "日本語" : (langType == LanguageType.MachineTranslated ? "MTL翻訳" : "海外向け翻訳");
|
string titleAll = prevEntry.Title;
|
||||||
item.Categories.Add(new SyndicationCategory(langTag));
|
|
||||||
|
// 個別フィード用タイトル(言語プレフィックス【】を除去したフォルダ名形式)
|
||||||
|
string titleSpecific = Regex.Replace(titleAll, @"^【[^】]+】\s*", "").Trim();
|
||||||
|
|
||||||
|
var itemAll = CreateSyndicationItem(
|
||||||
|
titleAll,
|
||||||
|
link,
|
||||||
|
guid,
|
||||||
|
prevEntry.PublishDate,
|
||||||
|
prevEntry.LastUpdatedTime,
|
||||||
|
prevEntry.SummaryHtml,
|
||||||
|
langType,
|
||||||
|
new List<string>());
|
||||||
|
|
||||||
|
var itemSpecific = CreateSyndicationItem(
|
||||||
|
titleSpecific,
|
||||||
|
link,
|
||||||
|
guid,
|
||||||
|
prevEntry.PublishDate,
|
||||||
|
prevEntry.LastUpdatedTime,
|
||||||
|
prevEntry.SummaryHtml,
|
||||||
|
langType,
|
||||||
|
new List<string>());
|
||||||
|
|
||||||
|
allItems.Add(itemAll);
|
||||||
|
|
||||||
|
if (langType == LanguageType.Japanese)
|
||||||
|
{
|
||||||
|
jpItems.Add(itemSpecific);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
transItems.Add(itemSpecific);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -296,49 +315,50 @@ internal class ryuugames
|
|||||||
|
|
||||||
langType = articleInfo.Language;
|
langType = articleInfo.Language;
|
||||||
|
|
||||||
// 整形タイトルを作成
|
// フォルダ名用ベースタイトル([発売元]タイトル バージョン情報、製品ID除外、Windows禁止文字全角化)
|
||||||
string formattedTitle = BuildFormattedTitle(articleInfo);
|
string baseFolderTitle = BuildBaseFolderTitle(articleInfo);
|
||||||
|
|
||||||
// 整形本文 HTML を作成
|
// 全件フィード用タイトル(【日本語】等の言語プレフィックス付き)
|
||||||
string summaryHtml = BuildSummaryHtml(articleInfo, link);
|
string formattedTitleWithLang = BuildFormattedTitle(articleInfo, includeLangPrefix: true);
|
||||||
|
|
||||||
|
// 整形本文 HTML を作成(本文直下にフォルダ名用タイトルを表示)
|
||||||
|
string summaryHtml = BuildSummaryHtml(articleInfo, link, baseFolderTitle);
|
||||||
|
|
||||||
var pubDate = articleInfo.PublishDate != DateTimeOffset.MinValue ? articleInfo.PublishDate : DateTimeOffset.Now;
|
var pubDate = articleInfo.PublishDate != DateTimeOffset.MinValue ? articleInfo.PublishDate : DateTimeOffset.Now;
|
||||||
var modDate = articleInfo.LastUpdatedTime != DateTimeOffset.MinValue ? articleInfo.LastUpdatedTime : pubDate;
|
var modDate = articleInfo.LastUpdatedTime != DateTimeOffset.MinValue ? articleInfo.LastUpdatedTime : pubDate;
|
||||||
|
|
||||||
item = new SyndicationItem(
|
// 全件用アイテム
|
||||||
formattedTitle,
|
var itemAll = CreateSyndicationItem(
|
||||||
(string?)null,
|
formattedTitleWithLang,
|
||||||
new Uri(link),
|
link,
|
||||||
guid,
|
guid,
|
||||||
modDate
|
pubDate,
|
||||||
)
|
modDate,
|
||||||
{
|
summaryHtml,
|
||||||
PublishDate = pubDate,
|
langType,
|
||||||
LastUpdatedTime = modDate,
|
articleInfo.Categories);
|
||||||
Summary = new TextSyndicationContent(summaryHtml, TextSyndicationContentKind.Html)
|
|
||||||
};
|
|
||||||
|
|
||||||
// カテゴリ設定
|
// 個別フィード用アイテム(言語プレフィックス【】なし)
|
||||||
string langTag = langType == LanguageType.Japanese ? "日本語" : (langType == LanguageType.MachineTranslated ? "MTL翻訳" : "海外向け翻訳");
|
var itemSpecific = CreateSyndicationItem(
|
||||||
item.Categories.Add(new SyndicationCategory(langTag));
|
baseFolderTitle,
|
||||||
foreach (var cat in articleInfo.Categories)
|
link,
|
||||||
{
|
guid,
|
||||||
if (!string.IsNullOrWhiteSpace(cat) && !item.Categories.Any(c => c.Name.Equals(cat, StringComparison.OrdinalIgnoreCase)))
|
pubDate,
|
||||||
{
|
modDate,
|
||||||
item.Categories.Add(new SyndicationCategory(cat));
|
summaryHtml,
|
||||||
}
|
langType,
|
||||||
}
|
articleInfo.Categories);
|
||||||
}
|
|
||||||
|
|
||||||
allItems.Add(item);
|
allItems.Add(itemAll);
|
||||||
|
|
||||||
if (langType == LanguageType.Japanese)
|
if (langType == LanguageType.Japanese)
|
||||||
{
|
{
|
||||||
jpItems.Add(item);
|
jpItems.Add(itemSpecific);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
transItems.Add(item);
|
transItems.Add(itemSpecific);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -734,14 +754,120 @@ internal class ryuugames
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// RSSフィード用のタイトルを生成します。
|
/// SyndicationItem を生成し、言語タグおよび指定カテゴリを設定します。
|
||||||
/// 原題(日本語タイトル)がある場合は日本語タイトルを最優先とし、
|
/// </summary>
|
||||||
/// [サークル・開発元]タイトル の形式で整形します。
|
/// <param name="title">記事タイトル</param>
|
||||||
|
/// <param name="link">記事URL</param>
|
||||||
|
/// <param name="guid">GUID</param>
|
||||||
|
/// <param name="pubDate">公開日時</param>
|
||||||
|
/// <param name="modDate">更新日時</param>
|
||||||
|
/// <param name="summaryHtml">本文HTML</param>
|
||||||
|
/// <param name="langType">言語種別</param>
|
||||||
|
/// <param name="categories">カテゴリリスト</param>
|
||||||
|
/// <returns>構築された SyndicationItem インスタンス</returns>
|
||||||
|
private static SyndicationItem CreateSyndicationItem(
|
||||||
|
string title,
|
||||||
|
string link,
|
||||||
|
string guid,
|
||||||
|
DateTimeOffset pubDate,
|
||||||
|
DateTimeOffset modDate,
|
||||||
|
string summaryHtml,
|
||||||
|
LanguageType langType,
|
||||||
|
List<string> categories)
|
||||||
|
{
|
||||||
|
var item = new SyndicationItem(
|
||||||
|
title,
|
||||||
|
(string?)null,
|
||||||
|
new Uri(link),
|
||||||
|
guid,
|
||||||
|
modDate
|
||||||
|
)
|
||||||
|
{
|
||||||
|
PublishDate = pubDate,
|
||||||
|
LastUpdatedTime = modDate,
|
||||||
|
Summary = new TextSyndicationContent(summaryHtml, TextSyndicationContentKind.Html)
|
||||||
|
};
|
||||||
|
|
||||||
|
// カテゴリの追加
|
||||||
|
string langTag = langType == LanguageType.Japanese ? "日本語" : (langType == LanguageType.MachineTranslated ? "MTL翻訳" : "海外向け翻訳");
|
||||||
|
item.Categories.Add(new SyndicationCategory(langTag));
|
||||||
|
|
||||||
|
if (categories != null)
|
||||||
|
{
|
||||||
|
foreach (var cat in categories)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(cat) && !item.Categories.Any(c => c.Name.Equals(cat, StringComparison.OrdinalIgnoreCase)))
|
||||||
|
{
|
||||||
|
item.Categories.Add(new SyndicationCategory(cat));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// [発売元]タイトル バージョン情報 の形式で、Windowsフォルダ名として安全なタイトル文字列を生成します。
|
||||||
|
/// 製品ID(RJ番号等)は完全に除外されます。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="info">記事詳細情報</param>
|
/// <param name="info">記事詳細情報</param>
|
||||||
/// <returns>言語タグおよびサークル名付きの整形タイトル</returns>
|
/// <returns>フォルダ名用の整形タイトル</returns>
|
||||||
private static string BuildFormattedTitle(GameArticleInfo info)
|
private static string BuildBaseFolderTitle(GameArticleInfo info)
|
||||||
{
|
{
|
||||||
|
// サークル・開発元プレフィックスの作成
|
||||||
|
string developerPrefix = string.Empty;
|
||||||
|
if (!string.IsNullOrWhiteSpace(info.Developer))
|
||||||
|
{
|
||||||
|
developerPrefix = $"[{info.Developer}] ";
|
||||||
|
}
|
||||||
|
|
||||||
|
// メインタイトルの選定(原題・日本語タイトルが存在する場合はそれを最優先)
|
||||||
|
string mainTitle;
|
||||||
|
if (!string.IsNullOrWhiteSpace(info.OriginalTitle))
|
||||||
|
{
|
||||||
|
mainTitle = RemoveProductIds(info.OriginalTitle);
|
||||||
|
|
||||||
|
// 元記事タイトルからバージョン表記のみを抽出して付加
|
||||||
|
string versionSuffix = ExtractVersionSuffixes(info.OriginalArticleTitle);
|
||||||
|
if (!string.IsNullOrWhiteSpace(versionSuffix) && !mainTitle.Contains(versionSuffix, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
mainTitle = $"{mainTitle} {versionSuffix}".Trim();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string rawMain = !string.IsNullOrWhiteSpace(info.OriginalArticleTitle) ? info.OriginalArticleTitle : info.GameTitle;
|
||||||
|
mainTitle = RemoveProductIds(rawMain);
|
||||||
|
}
|
||||||
|
|
||||||
|
// タイトル本体の先頭にすでにサークル名が含まれている場合は二重付加を回避
|
||||||
|
if (!string.IsNullOrWhiteSpace(developerPrefix) && mainTitle.StartsWith(developerPrefix.Trim(), StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
developerPrefix = string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
string rawTitle = $"{developerPrefix}{mainTitle}".Trim();
|
||||||
|
|
||||||
|
// Windowsのフォルダ名・ファイル名に使用できない禁止文字を全角へサニタイズ
|
||||||
|
return SanitizeWindowsFileName(rawTitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// RSSフィード用のタイトルを生成します。
|
||||||
|
/// 指定に応じて言語プレフィックス【】を付加します。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="info">記事詳細情報</param>
|
||||||
|
/// <param name="includeLangPrefix">言語プレフィックス【日本語】等を含めるかどうか</param>
|
||||||
|
/// <returns>言語タグ付きまたはフォルダ名形式の整形タイトル</returns>
|
||||||
|
private static string BuildFormattedTitle(GameArticleInfo info, bool includeLangPrefix = true)
|
||||||
|
{
|
||||||
|
string baseFolderTitle = BuildBaseFolderTitle(info);
|
||||||
|
|
||||||
|
if (!includeLangPrefix)
|
||||||
|
{
|
||||||
|
return baseFolderTitle;
|
||||||
|
}
|
||||||
|
|
||||||
string langPrefix;
|
string langPrefix;
|
||||||
switch (info.Language)
|
switch (info.Language)
|
||||||
{
|
{
|
||||||
@@ -757,41 +883,28 @@ internal class ryuugames
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// サークル・開発元プレフィックスの作成
|
return $"{langPrefix} {baseFolderTitle}".Trim();
|
||||||
string developerPrefix = string.Empty;
|
|
||||||
if (!string.IsNullOrWhiteSpace(info.Developer))
|
|
||||||
{
|
|
||||||
developerPrefix = $"[{info.Developer}] ";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// メインタイトルの選定(原題・日本語タイトルが存在する場合はそれを最優先)
|
/// <summary>
|
||||||
string mainTitle;
|
/// 文字列から DLsite や各種配信プラットフォームの製品ID((RJ01512929), [RJxxxxxx], (VJxxxxxx), (d_xxxxxx) 等)を除去します。
|
||||||
if (!string.IsNullOrWhiteSpace(info.OriginalTitle))
|
/// </summary>
|
||||||
|
/// <param name="text">対象文字列</param>
|
||||||
|
/// <returns>製品IDが除去された文字列</returns>
|
||||||
|
private static string RemoveProductIds(string text)
|
||||||
{
|
{
|
||||||
mainTitle = info.OriginalTitle;
|
if (string.IsNullOrWhiteSpace(text))
|
||||||
|
|
||||||
// 元記事タイトルからバージョン表記やRJ番号などの識別サフィックスを抽出して付加
|
|
||||||
string suffix = ExtractSuffixes(info.OriginalArticleTitle);
|
|
||||||
if (!string.IsNullOrWhiteSpace(suffix) && !mainTitle.Contains(suffix, StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
{
|
||||||
mainTitle = $"{mainTitle} {suffix}".Trim();
|
return string.Empty;
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mainTitle = !string.IsNullOrWhiteSpace(info.OriginalArticleTitle) ? info.OriginalArticleTitle : info.GameTitle;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// タイトル本体の先頭にすでにサークル名が含まれている場合は二重付加を回避
|
// (RJ123456), [RJ123456], (VJ123456), (d_123456) などの製品IDパターンを除去
|
||||||
if (!string.IsNullOrWhiteSpace(developerPrefix) && mainTitle.StartsWith(developerPrefix.Trim(), StringComparison.OrdinalIgnoreCase))
|
string cleaned = Regex.Replace(text, @"\s*[\(\[]([rR][jJ]|[vV][jJ]|d_)\d+[\)\]]", "", RegexOptions.IgnoreCase);
|
||||||
{
|
|
||||||
developerPrefix = string.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
string rawTitle = $"{langPrefix} {developerPrefix}{mainTitle}".Trim();
|
// 末尾の -RJxxxxxx などのハイフン区切りパターンも除去
|
||||||
|
cleaned = Regex.Replace(cleaned, @"\s*-[rR][jJ]\d+\b", "", RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
// Windowsのフォルダ名・ファイル名に使用できない禁止文字を全角へサニタイズ
|
return cleaned.Trim();
|
||||||
return SanitizeWindowsFileName(rawTitle);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -821,21 +934,24 @@ internal class ryuugames
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 元記事タイトルから末尾に付加されているバージョン表記やRJ番号等の識別サフィックスを抽出します。
|
/// 元記事タイトルから製品IDを除外し、純粋なバージョン表記((V1.03), (v2.0)等)やステータス((Final), Uncensored等)のみを安全に抽出します。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="originalArticleTitle">元記事タイトル</param>
|
/// <param name="originalArticleTitle">元記事タイトル</param>
|
||||||
/// <returns>抽出されたサフィックス文字列(存在しない場合は空文字)</returns>
|
/// <returns>抽出されたバージョンサフィックス文字列(存在しない場合は空文字)</returns>
|
||||||
private static string ExtractSuffixes(string originalArticleTitle)
|
private static string ExtractVersionSuffixes(string originalArticleTitle)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(originalArticleTitle))
|
if (string.IsNullOrWhiteSpace(originalArticleTitle))
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 末尾の (V1.03), (RJ249958), [RJxxxxxx], (v2.0), (Final), (Completed), (Uncensored), Uncensored などの塊を安全に抽出
|
// 製品IDを除去した文字列からバージョン情報を抽出
|
||||||
|
string cleaned = RemoveProductIds(originalArticleTitle);
|
||||||
|
|
||||||
|
// 末尾の (V1.03), [V1.02], (v2.0), (Final), (Completed), (Uncensored), Uncensored などの塊を安全に抽出
|
||||||
var match = Regex.Match(
|
var match = Regex.Match(
|
||||||
originalArticleTitle,
|
cleaned,
|
||||||
@"(?:\s*(?:\([vV]?\d[^)]*\)|\[[vV]?\d[^\]]*\]|\([rR][jJ]\d+\)|\[[rR][jJ]\d+\]|\(Final\)|\(Completed\)|\(Uncensored\)|Uncensored))+$",
|
@"(?:\s*(?:\([vV]?\d[^)]*\)|\[[vV]?\d[^\]]*\]|\(Final\)|\(Completed\)|\(Uncensored\)|Uncensored))+$",
|
||||||
RegexOptions.IgnoreCase);
|
RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
@@ -848,12 +964,13 @@ internal class ryuugames
|
|||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// RSSリーダー(FreshRSS等)で美しく視認性の高い本文 HTML を構築します。
|
/// RSSリーダー(FreshRSS等)で美しく視認性の高い本文 HTML を構築します。
|
||||||
/// 本文先頭に日本語タイトルおよび英語タイトルを明記します。
|
/// 本文直下にコピー用の「[発売元]タイトル バージョン情報」フォルダ名用タイトルを表示します。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="info">記事詳細情報</param>
|
/// <param name="info">記事詳細情報</param>
|
||||||
/// <param name="articleUrl">記事URL</param>
|
/// <param name="articleUrl">記事URL</param>
|
||||||
|
/// <param name="folderTitle">フォルダ名用タイトル</param>
|
||||||
/// <returns>整形済み HTML 文字列</returns>
|
/// <returns>整形済み HTML 文字列</returns>
|
||||||
private static string BuildSummaryHtml(GameArticleInfo info, string articleUrl)
|
private static string BuildSummaryHtml(GameArticleInfo info, string articleUrl, string folderTitle)
|
||||||
{
|
{
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
|
|
||||||
@@ -878,24 +995,26 @@ internal class ryuugames
|
|||||||
}
|
}
|
||||||
sb.Append("</div>");
|
sb.Append("</div>");
|
||||||
|
|
||||||
// 1.4. 日本語タイトル (Japanese Title) の明記(本文先頭)
|
// 1.3. フォルダ名用タイトル (Folder Name) の明記(本文直下・テキストコピー用)
|
||||||
|
sb.Append("<div class=\"ryuu-folder-title ryuu-format-v5\" style=\"background-color: #f3f4f6; border-left: 4px solid #374151; padding: 10px 14px; margin-bottom: 12px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; border-radius: 0 4px 4px 0;\">");
|
||||||
|
sb.Append("<div style=\"font-size: 11px; font-weight: bold; color: #4b5563; margin-bottom: 4px;\">📁 フォルダ名用タイトル (コピー用):</div>");
|
||||||
|
sb.Append($"<div style=\"font-size: 15px; font-weight: bold; color: #111827; user-select: all; -webkit-user-select: all;\">{WebUtility.HtmlEncode(folderTitle)}</div>");
|
||||||
|
sb.Append("</div>");
|
||||||
|
|
||||||
|
// 1.4. 日本語タイトル (Japanese Title) の明記
|
||||||
string jpTitle = !string.IsNullOrWhiteSpace(info.OriginalTitle)
|
string jpTitle = !string.IsNullOrWhiteSpace(info.OriginalTitle)
|
||||||
? info.OriginalTitle
|
? RemoveProductIds(info.OriginalTitle)
|
||||||
: (info.Language == LanguageType.Japanese ? info.GameTitle : string.Empty);
|
: (info.Language == LanguageType.Japanese ? RemoveProductIds(info.GameTitle) : string.Empty);
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(jpTitle))
|
if (!string.IsNullOrWhiteSpace(jpTitle))
|
||||||
{
|
{
|
||||||
sb.Append("<div class=\"ryuu-jp-title ryuu-jp-title-v4\" style=\"background-color: #f1f8e9; border-left: 4px solid #43a047; padding: 8px 12px; margin-bottom: 8px; font-size: 14px; border-radius: 0 4px 4px 0;\">");
|
sb.Append("<div class=\"ryuu-jp-title\" style=\"background-color: #f1f8e9; border-left: 4px solid #43a047; padding: 8px 12px; margin-bottom: 8px; font-size: 14px; border-radius: 0 4px 4px 0;\">");
|
||||||
sb.Append("<strong style=\"color: #2e7d32;\">日本語タイトル (Japanese Title):</strong> ");
|
sb.Append("<strong style=\"color: #2e7d32;\">日本語タイトル (Japanese Title):</strong> ");
|
||||||
sb.Append($"<span>{WebUtility.HtmlEncode(jpTitle)}</span>");
|
sb.Append($"<span>{WebUtility.HtmlEncode(jpTitle)}</span>");
|
||||||
sb.Append("</div>");
|
sb.Append("</div>");
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
sb.Append("<!-- ryuu-jp-title-v4 -->");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1.5. 英語タイトル (English Title) の明記(本文先頭)
|
// 1.5. 英語タイトル (English Title) の明記
|
||||||
if (!string.IsNullOrWhiteSpace(info.OriginalArticleTitle))
|
if (!string.IsNullOrWhiteSpace(info.OriginalArticleTitle))
|
||||||
{
|
{
|
||||||
sb.Append("<div class=\"ryuu-eng-title\" style=\"background-color: #f0f4f8; border-left: 4px solid #1a73e8; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; border-radius: 0 4px 4px 0;\">");
|
sb.Append("<div class=\"ryuu-eng-title\" style=\"background-color: #f0f4f8; border-left: 4px solid #1a73e8; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; border-radius: 0 4px 4px 0;\">");
|
||||||
|
|||||||
Reference in new issue
Block a user