From 92492a206b2a7f5844d9d519a0249a659c417043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vil=C3=A9m=20Zouhar?= Date: Thu, 24 Jul 2025 10:22:03 -0700 Subject: [PATCH 1/8] update next document button --- .../templates/EvalView/direct-assessment-document-mqm-esa.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html b/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html index c9df8bba..8782642b 100644 --- a/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html +++ b/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html @@ -143,7 +143,7 @@ id="button-next-doc-fake" title="Please first complete all items in the document (error spans + scores)." > - Continue to next document (unavailable) + Continue to next document (finish all segments first) {% endblock %} \ No newline at end of file From 54ea604d79be2b4a6e4ca77e4fada89379fd713c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vil=C3=A9m=20Zouhar?= Date: Thu, 24 Jul 2025 10:29:56 -0700 Subject: [PATCH 2/8] update ESA slider anchor instructions --- EvalView/templates/EvalView/_instructions-esa.html | 10 +++++----- EvalView/templates/EvalView/_slider-mqm-esa.html | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/EvalView/templates/EvalView/_instructions-esa.html b/EvalView/templates/EvalView/_instructions-esa.html index 05e1fa0b..106a1526 100644 --- a/EvalView/templates/EvalView/_instructions-esa.html +++ b/EvalView/templates/EvalView/_instructions-esa.html @@ -14,13 +14,13 @@
  • Missing content: If something is missing, highlight the word [MISSING] to mark the error.
  • -
  • Tip: Highlight the word or general area of the error---it doesn’t need to be exact. Use separate highlights for different errors.
  • +
  • Tip: Highlight the word or general area of the error (it doesn't need to be exact). Use separate highlights for different errors.
  • Score the translation: After marking errors, please use the slider and set an overall score based on meaning preservation and general quality:
  • diff --git a/EvalView/templates/EvalView/_slider-mqm-esa.html b/EvalView/templates/EvalView/_slider-mqm-esa.html index e2eecea8..44ecf29b 100644 --- a/EvalView/templates/EvalView/_slider-mqm-esa.html +++ b/EvalView/templates/EvalView/_slider-mqm-esa.html @@ -1,9 +1,9 @@
    - +
    - - - + + +
    0%: No meaning preserved33%: Some meaning preserved66%: Most meaning preserved0%: Broken/poor33%: Flawed (significant issues)66%: Good (insignificant issues) 100%: Perfect
    From 9021b50a085dce78341d32008e6a4613f3358f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vil=C3=A9m=20Zouhar?= Date: Thu, 24 Jul 2025 10:40:25 -0700 Subject: [PATCH 3/8] fix vertical videos --- .../static/EvalView/css/direct-assessment-document-mqm-esa.css | 1 + 1 file changed, 1 insertion(+) diff --git a/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css b/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css index f7acdc0b..321c14a7 100644 --- a/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css +++ b/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css @@ -71,6 +71,7 @@ .source-text > audio, .source-text > video { width: 100%; + max-height: 550px; } .source-text > img { From 31e1a9a16da5b83772712e3ebe91aec38bf78c85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vil=C3=A9m=20Zouhar?= Date: Thu, 24 Jul 2025 10:44:34 -0700 Subject: [PATCH 4/8] show ESA instructions by default --- .../EvalView/js/direct-assessment-document-mqm-esa.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js b/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js index 8f2c3844..8cc42c7d 100644 --- a/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js +++ b/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js @@ -174,8 +174,14 @@ $(document).ready(() => { // show submit button only on MQM and not ESA $(".button-submit").toggle(MQM_TYPE == "MQM") - let instructions_show = localStorage.getItem("appraise-instructions-show") == "true" + let instructions_show = localStorage.getItem("appraise-instructions-show") if (instructions_show == null) instructions_show = true; + else instructions_show = instructions_show == "true"; + console.log( + localStorage.getItem("appraise-instructions-show"), + localStorage.getItem("appraise-instructions-show") == null, + instructions_show, + ) $("#instructions-show").on("click", () => { instructions_show = !instructions_show; From 8268e3078c1826a273ad0ef375d6790a070a51ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vil=C3=A9m=20Zouhar?= Date: Thu, 24 Jul 2025 13:49:19 -0700 Subject: [PATCH 5/8] update ESA slider anchors --- EvalView/templates/EvalView/_slider-mqm-esa.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EvalView/templates/EvalView/_slider-mqm-esa.html b/EvalView/templates/EvalView/_slider-mqm-esa.html index 44ecf29b..363e8a57 100644 --- a/EvalView/templates/EvalView/_slider-mqm-esa.html +++ b/EvalView/templates/EvalView/_slider-mqm-esa.html @@ -2,8 +2,8 @@ - - + +
    0%: Broken/poor33%: Flawed (significant issues)66%: Good (insignificant issues)33%: Flawed66%: Good 100%: Perfect
    From 3a90994ed6018ea0d478c1659709ab17bb781464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vil=C3=A9m=20Zouhar?= Date: Thu, 24 Jul 2025 16:54:27 -0700 Subject: [PATCH 6/8] add note on LLM usage, resolve #201 --- EvalView/templates/EvalView/_instructions-esa.html | 1 + 1 file changed, 1 insertion(+) diff --git a/EvalView/templates/EvalView/_instructions-esa.html b/EvalView/templates/EvalView/_instructions-esa.html index 2cd34472..38abbe41 100644 --- a/EvalView/templates/EvalView/_instructions-esa.html +++ b/EvalView/templates/EvalView/_instructions-esa.html @@ -24,6 +24,7 @@
  • 100%: Perfect: meaning and style aligned completely with the source
  • +
  • Using external tools for annotations (chatbots, LLMs) is not allowed.
  • \ No newline at end of file From e79e4e9448281ad0466a1e49b343c544354d3562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vil=C3=A9m=20Zouhar?= Date: Fri, 25 Jul 2025 12:16:59 -0700 Subject: [PATCH 7/8] ESA styling, add language tags on the side, resolve #50 --- .../direct-assessment-document-mqm-esa.css | 37 ++++++++++++++++++- .../js/direct-assessment-document-mqm-esa.js | 5 --- .../direct-assessment-document-mqm-esa.html | 20 ++++++---- 3 files changed, 48 insertions(+), 14 deletions(-) diff --git a/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css b/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css index bbaf26fb..4339ea75 100644 --- a/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css +++ b/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css @@ -34,8 +34,23 @@ color: black; } -.quotelike { - border-left: 5px solid #ddd; + +.language_tag_holder { + position: relative; +} + + +.language_tag { + /* transform: rotate(-90deg); */ + transform-origin: top left; + width: 200px; + display: inline-block; + position: absolute; + text-align: right; + left: -210px; + top: 15px; + color: #257; + font-size: small; } .quotelike { @@ -52,6 +67,7 @@ .item-box { margin-bottom: 20px; + border-radius: 4px; } .target-text { @@ -127,6 +143,12 @@ color: black; } +#instructions { + background-color: #d9edf7; + padding: 10px; + border-radius: 4px; +} + .alert_message { position: fixed; top: 25px; @@ -191,4 +213,15 @@ .ui-widget-content { border: none !important; +} + + +/* override defaults */ +.alert-info { + border: none; + color: #257; +} +.navbar-fixed-top { + position: absolute; + top: -2px; } \ No newline at end of file diff --git a/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js b/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js index 8cc42c7d..4256ca56 100644 --- a/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js +++ b/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js @@ -177,11 +177,6 @@ $(document).ready(() => { let instructions_show = localStorage.getItem("appraise-instructions-show") if (instructions_show == null) instructions_show = true; else instructions_show = instructions_show == "true"; - console.log( - localStorage.getItem("appraise-instructions-show"), - localStorage.getItem("appraise-instructions-show") == null, - instructions_show, - ) $("#instructions-show").on("click", () => { instructions_show = !instructions_show; diff --git a/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html b/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html index 8782642b..b37ee003 100644 --- a/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html +++ b/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html @@ -35,14 +35,13 @@ -
    + {% if guidelines %}

    {{ guidelines }}

    {% endif %} @@ -81,11 +80,18 @@
    +
    +
    {{source_language}}
    +
    +
    {{ item.sourceText|safe }}
    - +
    +
    +
    {{target_language}}
    +
    {{item.targetText}}
    From 35bcf1eb8af199df051c448620caf5abea5fbb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vil=C3=A9m=20Zouhar?= Date: Fri, 25 Jul 2025 12:45:20 -0700 Subject: [PATCH 8/8] make ESA interface neater by moving icons to the side --- .../direct-assessment-document-mqm-esa.css | 44 ++++++++++++++----- .../js/direct-assessment-document-mqm-esa.js | 15 +++---- .../direct-assessment-document-mqm-esa.html | 23 +++------- 3 files changed, 47 insertions(+), 35 deletions(-) diff --git a/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css b/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css index 4339ea75..384f7075 100644 --- a/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css +++ b/EvalView/static/EvalView/css/direct-assessment-document-mqm-esa.css @@ -35,21 +35,45 @@ } -.language_tag_holder { - position: relative; +.status-indicator { + display: inline-block; + position: absolute; + left: -35px; + top: 10px; + font-size: small; + width: 20px; + margin: 0px; + padding: 0px; +} + +.button-reset { + display: inline-block; + position: absolute; + left: -40px; + top: 40px; + font-size: small; + background-color: transparent !important; + border: none; + width: 20px; + margin: 0px; + padding: 0px; } +.button-submit { + display: block; + margin-left: auto; + margin-right: auto; +} + +.target-box { + position: relative; + margin-bottom: -10px; +} .language_tag { /* transform: rotate(-90deg); */ - transform-origin: top left; - width: 200px; - display: inline-block; - position: absolute; - text-align: right; - left: -210px; - top: 15px; - color: #257; + float: right; + color: #777; font-size: small; } diff --git a/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js b/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js index 4256ca56..a01cd352 100644 --- a/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js +++ b/EvalView/static/EvalView/js/direct-assessment-document-mqm-esa.js @@ -195,9 +195,8 @@ function _all_sentences_scored() { return items_left == 0; } -function _change_item_status_icon(item_box, icon_name, status_text) { +function _change_item_status_icon(item_box, icon_name) { let icon_box = item_box.find('.status-indicator').removeClass('glyphicon-refresh glyphicon-ok glyphicon-flag'); - item_box.find(".status-text").text(status_text) icon_box.addClass(`glyphicon-${icon_name}`) } @@ -211,21 +210,21 @@ function submit_form_ajax(item_box) { dataType: 'json', beforeSend: function () { console.log('Sending AJAX request, item-id=', item_box.data('item-id')); - _change_item_status_icon(item_box, 'refresh', "Uploading"); + _change_item_status_icon(item_box, 'refresh'); }, success: function (data) { console.log(`Success, saved=${data.saved} next_item=${data.item_id}`); if (data.saved) { - _change_item_status_icon(item_box, 'ok', "Completed"); + _change_item_status_icon(item_box, 'ok'); } else { - _change_item_status_icon(item_box, 'none', "Upload failed"); + _change_item_status_icon(item_box, 'warning-sign'); _show_error_box(data.error_msg, 10_000); } }, error: function (x, s, t) { console.log('Error:', x, s, t); - _change_item_status_icon(item_box, 'none', "Upload failed"); + _change_item_status_icon(item_box, 'warning-sign'); _show_error_box( 'An unrecognized error has occured. ' + 'Please reload the page or try again in a moment. ', @@ -514,10 +513,10 @@ class MQMItemHandler { check_status() { if (this.el.attr("data-item-completed") == "True") { - _change_item_status_icon(this.el, "ok", "Completed") + _change_item_status_icon(this.el, "ok") this.el.find(".button-submit").hide() } else { - _change_item_status_icon(this.el, "flag", "Unfinished") + _change_item_status_icon(this.el, "flag") } } diff --git a/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html b/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html index b37ee003..ef500e95 100644 --- a/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html +++ b/EvalView/templates/EvalView/direct-assessment-document-mqm-esa.html @@ -101,23 +101,12 @@
    {% include 'EvalView/_slider-mqm-esa.html' %}
    - - - - - - - -
    - - - - Item status - - -
    + + + +