Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | 30x 7381x 30x 448x 13164x 501x 12663x 12663x 448x | /** The query carries display language through portable report URLs and history. */
const japanese: Readonly<Record<string, string>> = {
"← Quality Overview": "← 品質概要",
"Moura Requirement Coverage": "Moura 要求カバレッジ",
"Moura Quality Reports": "Moura 品質レポート",
"Verification completeness against project requirements.":
"プロジェクトの要求に対する検証の完了状況です。",
"Overall Status": "総合ステータス",
"Required verification and its Evidence determine this status.":
"必要な検証とそのエビデンスに基づくステータスです。",
"Requirement Coverage": "要求カバレッジ",
"Missing Evidence": "不足エビデンス",
"View verification gaps →": "検証の不足を確認 →",
"Test Results": "テスト結果",
Passed: "成功",
Failed: "失敗",
Skipped: "スキップ",
"Code Coverage": "コードカバレッジ",
Lines: "行",
"Detailed Reports": "詳細レポート",
"Declared traceability and verification status":
"宣言されたトレーサビリティと検証状況",
"Allure Report": "Allure レポート",
"Test execution details": "テスト実行の詳細",
"Source code coverage": "ソースコードのカバレッジ",
Unavailable: "利用不可",
"Open →": "開く →",
PASS: "合格",
INCOMPLETE: "未完了",
FAIL: "失敗",
"Source:": "ソース:",
"Commit:": "コミット:",
"Coverage of declared traceability and evidence. Moura does not prove that a test semantically verifies the specification it declares.":
"宣言されたトレーサビリティとエビデンスのカバレッジ。Moura は、テストが宣言した仕様を意味的に検証していることを証明しません。",
"Requirement Map": "要求マップ",
"Expand a Requirement or Case to inspect exact verification and Evidence.":
"要求やケースを展開して検証とエビデンスの詳細を確認できます。",
"Required verification layers": "必須検証レイヤー",
Evidence: "エビデンス",
"Technical details": "技術詳細",
MISSING: "不足",
UNIMPLEMENTED: "未実装",
SKIPPED: "スキップ",
BROKEN: "実行エラー",
"No Evidence available": "エビデンスなし",
Requirements: "要求",
Scenarios: "シナリオ",
Cases: "ケース",
"Required Case × layer pairs": "必須のケース × レイヤーの組み合わせ",
"Pair statuses": "組み合わせのステータス",
"Per-layer coverage": "レイヤー別カバレッジ",
Layer: "レイヤー",
"PASS / required": "PASS / 必須",
"Requirement hierarchy and exact verification gaps": "要求の階層と検証の不足",
"Reverse Traceability": "逆方向トレーサビリティ",
"Evidence Issues": "エビデンスの問題",
"✓ No issues found": "✓ 問題なし",
"Unable to complete diagnostics; see Evidence Issues.":
"診断できません。エビデンスの問題を確認してください。",
"← Requirement Coverage": "← 要求カバレッジ",
Specification: "仕様",
"English canonical source; Japanese is a translation.":
"英語が正本です。日本語は翻訳です。",
"Japanese translation unavailable; showing English.":
"日本語訳がないため英語の原文を表示しています。",
};
function escapeHtml(value: string): string {
return value
.replaceAll("&", "&")
.replaceAll("<", "<")
.replaceAll(">", ">")
.replaceAll('"', """);
}
/** Inline to keep standalone reports usable without a server or external assets. */
export const reportLocaleScript = `(() => {
const url = new URL(location.href);
const locale = url.searchParams.get('lang') === 'ja' ? 'ja' : 'en';
const source = document.querySelector('[data-source-content]');
const translation = document.querySelector('template[data-translation]');
document.documentElement.lang = source && !translation ? 'en' : locale;
document.querySelectorAll('[data-ja]').forEach(element => {
if (locale === 'ja') element.textContent = element.dataset.ja;
});
if (source && translation && locale === 'ja') source.innerHTML = translation.innerHTML;
const fallback = document.querySelector('[data-fallback]');
if (fallback) fallback.hidden = locale !== 'ja' || !!translation;
document.querySelectorAll('a[href]').forEach(link => {
const href = link.getAttribute('href');
if (!href || !href.startsWith('.')) return;
const target = new URL(href, location.href);
target.searchParams.set('lang', locale);
link.setAttribute('href', href.split(/[?#]/)[0] + target.search + target.hash);
});
document.querySelectorAll('[data-language]').forEach(link => {
const target = new URL(location.href);
target.searchParams.set('lang', link.dataset.language);
link.href = target.href;
link.setAttribute('aria-current', link.dataset.language === locale ? 'true' : 'false');
});
if (location.hash && source && translation && locale === 'ja') {
const anchor = document.getElementById(decodeURIComponent(location.hash.slice(1)));
if (anchor) anchor.scrollIntoView();
}
})();`;
export function withReportLocale(html: string): string {
const localized = html.replace(
/<(h[1-4]|p|strong|span|th|a|title|summary)([^>]*)>([^<]+)<\/(h[1-4]|p|strong|span|th|a|title|summary)>/gu,
(
match: string,
tag: string,
attributes: string,
text: string,
closing: string,
) => {
if (
attributes.includes("data-map-title=") ||
attributes.includes("data-evidence-name") ||
attributes.includes("data-ja=")
)
return match;
const translation = japanese[text];
return translation
? `<${tag}${attributes} data-ja="${escapeHtml(translation)}">${text}</${closing}>`
: match;
},
);
return localized
.replace(
"<main>",
'<main><nav aria-label="Language"><a href="?lang=ja" data-language="ja" lang="ja">日本語</a> | <a href="?lang=en" data-language="en" lang="en">English</a></nav>',
)
.replace("</body>", `<script>${reportLocaleScript}</script></body>`);
}
|