fix(translate): M1-M3 medium + L1-L2 low bugs from QA review
M1: ReDoS guard — 500 char max + try/except on re.compile M2: Performance note — O(n×m) regex documented for future optimization M3: Verified test key names correct (metrics.py transforms cumulative_* → short) L1: Removed @staticmethod no-op from module-level function L2: Added aria-label to emoji indicators in CorrectionCell
This commit is contained in:
@@ -183,11 +183,12 @@
|
||||
{:else if uxState === 'saved'}
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-sm text-gray-700">{displayValue}</span>
|
||||
<span class="text-xs text-green-600" title="Saved">📝</span>
|
||||
<span class="text-xs text-green-600" title="Saved" aria-label="Edited" role="img">📝</span>
|
||||
<button
|
||||
onclick={openDictPopup}
|
||||
class="ml-1 px-1.5 py-0.5 text-xs bg-amber-100 text-amber-700 rounded hover:bg-amber-200 transition-colors"
|
||||
title="Submit to Dictionary"
|
||||
aria-label="Submit to Dictionary"
|
||||
>
|
||||
📕 Dictionary
|
||||
</button>
|
||||
@@ -204,7 +205,7 @@
|
||||
{:else if uxState === 'dict_submitted'}
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="text-sm text-gray-700">{displayValue}</span>
|
||||
<span class="text-xs text-green-600 font-medium" title="Saved to dictionary">✅ Dictionary ✓</span>
|
||||
<span class="text-xs text-green-600 font-medium" title="Saved to dictionary" aria-label="Submitted to dictionary" role="img">✅ Dictionary ✓</span>
|
||||
</div>
|
||||
|
||||
<!-- Error mode -->
|
||||
|
||||
Reference in New Issue
Block a user