Gitfed
Thomas-PEYROT/japanese-webtranslate / test / page-test.html
<!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="utf-8">
  <title>Page de test — Japanese Web Translate</title>
  <style>
    body { font-family: sans-serif; max-width: 700px; margin: 2em auto; line-height: 1.8; }
    section { margin-bottom: 2em; }
    h2 { font-size: 1.1em; color: #555; }
  </style>
</head>
<body>
  <h1>日本語テストページ</h1>

  <section>
    <h2>Texte simple / 簡単な文</h2>
    <p>私は毎日学校で日本語を勉強しています。漢字を読むのは難しいですが、面白いです。</p>
    <p>昨日、友達と一緒に新しいレストランで美味しい料理を食べました。</p>
  </section>

  <section>
    <h2>Texte mixte / 混在テキスト</h2>
    <p>東京は日本の首都です。This is English mixed in. 電車で渋谷まで行きました。</p>
  </section>

  <section>
    <h2>Texte long / 長文</h2>
    <p id="long-text"></p>
  </section>

  <section>
    <h2>Contenu dynamique / 動的コンテンツ</h2>
    <div id="dynamic"></div>
  </section>

  <script>
    // Texte long pour tester le traitement par lots
    const sentence = "日本の四季はとても美しく、春には桜が咲き、夏には祭りがあり、秋には紅葉が見られ、冬には雪が降ります。";
    document.getElementById("long-text").textContent = sentence.repeat(30);

    // Contenu ajouté après chargement pour tester le MutationObserver
    setTimeout(() => {
      const p = document.createElement("p");
      p.textContent = "この文章は後から追加されました。猫が庭で眠っています。";
      document.getElementById("dynamic").appendChild(p);
    }, 1500);
  </script>
</body>
</html>