Cnass commited on
Commit
22c67d3
·
verified ·
1 Parent(s): 4bf295f

Upload 2 files

Browse files
Files changed (2) hide show
  1. test-ui/rpgm.html +0 -14
  2. test-ui/rpgm.js +2 -13
test-ui/rpgm.html CHANGED
@@ -69,20 +69,6 @@
69
  <div id="fileList" class="file-list"></div>
70
  </section>
71
 
72
- <section class="panel" id="reviewPanel" hidden>
73
- <h2>Gözden Geçirilmesi Gerekenler</h2>
74
- <p class="hint">
75
- Çevirisi kontrol kodlarını (<code>\C[2]</code>, <code>\N[1]</code> gibi) koruyamadığı için
76
- <strong>oyuna yazılmayan</strong> satırlar — bunlar kaynak dilde bırakıldı, oyun bozulmaz.
77
- </p>
78
- <div class="table-wrap">
79
- <table id="reviewTable">
80
- <thead><tr><th>Kaynak</th><th>Yazılan</th></tr></thead>
81
- <tbody></tbody>
82
- </table>
83
- </div>
84
- </section>
85
-
86
  <section class="panel">
87
  <h2>Log</h2>
88
  <pre id="log"></pre>
 
69
  <div id="fileList" class="file-list"></div>
70
  </section>
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  <section class="panel">
73
  <h2>Log</h2>
74
  <pre id="log"></pre>
test-ui/rpgm.js CHANGED
@@ -120,7 +120,7 @@ function render(st) {
120
  stat(st.total_units, "Benzersiz Metin"),
121
  stat(st.total_slots, "Toplam Konum"),
122
  stat(STATUS_TR[st.status] || st.status, "Durum"),
123
- stat(st.review_count || 0, "İncelenecek"),
124
  ].join("");
125
 
126
  $("overallBar").style.width = st.percent + "%";
@@ -142,19 +142,9 @@ function render(st) {
142
  ? "Kaldığı Yerden Devam Et" : "Çeviriyi Başlat";
143
  $("btnCancel").hidden = !running;
144
 
145
- const samples = st.review_samples || [];
146
- $("reviewPanel").hidden = samples.length === 0;
147
- document.querySelector("#reviewTable tbody").innerHTML = samples
148
- .map((s) => `<tr><td>${escapeHtml(s.source)}</td><td>${escapeHtml(s.translation)}</td></tr>`)
149
- .join("");
150
-
151
  if (running) startPolling(); else stopPolling();
152
  }
153
 
154
- function escapeHtml(s) {
155
- return String(s).replace(/[&<>"]/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;" }[c]));
156
- }
157
-
158
  // ------------------------------------------------------------------ polling
159
 
160
  function startPolling() {
@@ -173,7 +163,7 @@ async function refresh() {
173
  render(st);
174
  if (wasRunning && !(st.running || st.status === "translating")) {
175
  log(`Çeviri ${STATUS_TR[st.status] || st.status}. ${st.translated_units}/${st.total_units} metin.` +
176
- (st.review_count ? ` ${st.review_count} satır incelenmeli.` : ""));
177
  }
178
  } catch (e) {
179
  log("Durum alınamadı: " + e.message);
@@ -239,7 +229,6 @@ $("btnDelete").addEventListener("click", async () => {
239
  stopPolling();
240
  projectId = null;
241
  $("projectPanel").hidden = true;
242
- $("reviewPanel").hidden = true;
243
  } catch (e) {
244
  log("Silinemedi: " + e.message);
245
  }
 
120
  stat(st.total_units, "Benzersiz Metin"),
121
  stat(st.total_slots, "Toplam Konum"),
122
  stat(STATUS_TR[st.status] || st.status, "Durum"),
123
+ stat(st.failed_units || 0, "Hata"),
124
  ].join("");
125
 
126
  $("overallBar").style.width = st.percent + "%";
 
142
  ? "Kaldığı Yerden Devam Et" : "Çeviriyi Başlat";
143
  $("btnCancel").hidden = !running;
144
 
 
 
 
 
 
 
145
  if (running) startPolling(); else stopPolling();
146
  }
147
 
 
 
 
 
148
  // ------------------------------------------------------------------ polling
149
 
150
  function startPolling() {
 
163
  render(st);
164
  if (wasRunning && !(st.running || st.status === "translating")) {
165
  log(`Çeviri ${STATUS_TR[st.status] || st.status}. ${st.translated_units}/${st.total_units} metin.` +
166
+ (st.failed_units ? ` ${st.failed_units} satırda model hatası oldu, kaynak korundu.` : ""));
167
  }
168
  } catch (e) {
169
  log("Durum alınamadı: " + e.message);
 
229
  stopPolling();
230
  projectId = null;
231
  $("projectPanel").hidden = true;
 
232
  } catch (e) {
233
  log("Silinemedi: " + e.message);
234
  }