From 399557f35f2580b0a2301d4bd103d9f6e2692364 Mon Sep 17 00:00:00 2001 From: Davide Cucurnia Date: Fri, 3 Apr 2020 22:30:15 +0200 Subject: [PATCH 01/19] first commit --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d1cc169..84f20ac 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ [![Wluper](https://wluper.com/content/themes/main/static/gfx/wluperlogo.png)](https://wluper.com/) +# hello world + # LIDA: Lightweight Interactive Dialogue Annotator **Authors:** Ed Collins, Nikolai Rozanov, Bingbing Zhang, From 29aa82eb0620043ea986bd0558d2fca6e9fae140 Mon Sep 17 00:00:00 2001 From: Davide Cucurnia Date: Mon, 6 Apr 2020 00:14:28 +0200 Subject: [PATCH 02/19] dropdown list --- gui/source/utils/language.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 gui/source/utils/language.js diff --git a/gui/source/utils/language.js b/gui/source/utils/language.js new file mode 100644 index 0000000..e61d491 --- /dev/null +++ b/gui/source/utils/language.js @@ -0,0 +1,26 @@ +/************************************ +* Language Options +*************************************/ + +const gui_languages = { + options:["English", "Italian"], + selectedOption:"English" +} + +new Vue({ + el:"#language-selector", + data:{ + gui_languages + }, + template: + + ` +
+ + +
+ + ` +}) \ No newline at end of file From baa16dfc0788d1ee87d3e00d27f77c635966420d Mon Sep 17 00:00:00 2001 From: Davide Cucurnia Date: Mon, 6 Apr 2020 00:18:15 +0200 Subject: [PATCH 03/19] dropdown list --- gui/admin.html | 4 ++++ gui/assets/css/main.css | 15 +++++++++++++++ gui/index.html | 5 +++++ 3 files changed, 24 insertions(+) diff --git a/gui/admin.html b/gui/admin.html index 3c95f31..b44b286 100644 --- a/gui/admin.html +++ b/gui/admin.html @@ -56,6 +56,9 @@
+ +
+
@@ -77,6 +80,7 @@ + diff --git a/gui/assets/css/main.css b/gui/assets/css/main.css index cd9cdab..56e058d 100644 --- a/gui/assets/css/main.css +++ b/gui/assets/css/main.css @@ -198,4 +198,19 @@ input:focus { background-color: #0e181e; } +.language-list-title-container { + text-align:center; + background: rgba(0,0,0,0.02); + border-top: 1px solid #e6e6e6; + padding: 10px 24px; + vertical-align:bottom; +} + +.droplist_language_selector { + font-family:CoreSansNR35Light; + font-size:14px; + border:0; + outline:none; +} + /* EOF */ diff --git a/gui/index.html b/gui/index.html index d2316be..39e4b52 100644 --- a/gui/index.html +++ b/gui/index.html @@ -60,6 +60,10 @@
+ +
+ +
@@ -81,6 +85,7 @@ + From 249e164817f50716a732622f570a6e45695e812a Mon Sep 17 00:00:00 2001 From: davivcu <44603608+davivcu@users.noreply.github.com> Date: Mon, 6 Apr 2020 00:21:34 +0200 Subject: [PATCH 04/19] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 84f20ac..d1cc169 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ [![Wluper](https://wluper.com/content/themes/main/static/gfx/wluperlogo.png)](https://wluper.com/) -# hello world - # LIDA: Lightweight Interactive Dialogue Annotator **Authors:** Ed Collins, Nikolai Rozanov, Bingbing Zhang, From 2f437d740fcd5c604533af9ca6a5191bff633f20 Mon Sep 17 00:00:00 2001 From: Davide Cucurnia Date: Mon, 6 Apr 2020 22:00:43 +0200 Subject: [PATCH 05/19] italian language main window --- gui/admin.html | 1 - gui/source/admin_view.js | 2 + .../components/all_dialogues_components.js | 20 +++--- .../components/main_admin_components.js | 28 ++++---- gui/source/utils/backend.js | 10 +-- gui/source/utils/backend_interannotator.js | 22 +++--- gui/source/utils/language.js | 67 ++++++++++++++++--- server/interannotator_app.py | 2 +- 8 files changed, 105 insertions(+), 47 deletions(-) diff --git a/gui/admin.html b/gui/admin.html index b44b286..2f27b70 100644 --- a/gui/admin.html +++ b/gui/admin.html @@ -87,7 +87,6 @@ - diff --git a/gui/source/admin_view.js b/gui/source/admin_view.js index 25db3c7..27184e4 100644 --- a/gui/source/admin_view.js +++ b/gui/source/admin_view.js @@ -18,6 +18,8 @@ var mainApp = new Vue({ displayingDialogue: '', status : 'listview', alreadyVisited: [], + //reference to the language file + guiMessages, } }, diff --git a/gui/source/components/all_dialogues_components.js b/gui/source/components/all_dialogues_components.js index d462695..d118e83 100644 --- a/gui/source/components/all_dialogues_components.js +++ b/gui/source/components/all_dialogues_components.js @@ -15,7 +15,9 @@ Vue.component("all-dialogues", { allDialogueMetadata: [], dragging: false, showModal: false, - userName : '' + userName : '', + // Reference to the language item + guiMessages } }, // computed : { @@ -237,7 +239,7 @@ Vue.component("all-dialogues", {

- {{ allDialogueMetadata.length }} Data Items, {{ alreadyVisited.length }} Visited + {{ allDialogueMetadata.length }} {{ guiMessages.selected.admin.dataItems }}, {{ alreadyVisited.length }} {{ guiMessages.selected.admin.visited }}

@@ -258,8 +260,8 @@ Vue.component("all-dialogues", {

- - + +
@@ -279,7 +281,7 @@ Vue.component("all-dialogues", {
- Delete + {{ guiMessages.selected.lida.button_delete }}
@@ -290,10 +292,10 @@ Vue.component("all-dialogues", {
- Visited + {{ guiMessages.selected.admin.visited }}
-
{{dat.num_turns}} Turns
+
{{dat.num_turns}} {{ guiMessages.selected.lida.turns }}
@@ -303,7 +305,7 @@ Vue.component("all-dialogues", {
    -
  • +
  • - Upload File or Drag and Drop + {{ guiMessages.selected.admin.button_upload}}
diff --git a/gui/source/components/main_admin_components.js b/gui/source/components/main_admin_components.js index 5c64624..18687b2 100644 --- a/gui/source/components/main_admin_components.js +++ b/gui/source/components/main_admin_components.js @@ -2,12 +2,10 @@ * All Dialgoues View "aka MAIN LIDA VIEW" *************************************/ - - Vue.component("main-admin", { props: [ - "alreadyVisited" + "alreadyVisited", ], data () { @@ -26,7 +24,10 @@ Vue.component("main-admin", { showAgreement: false, // A list of dialogue IDs for which annotator names should be displayed - showAnnotatorNamesForIds: [] + showAnnotatorNamesForIds: [], + + //Reference to the language data + guiMessages, } }, @@ -157,10 +158,13 @@ Vue.component("main-admin", { document.body.appendChild(link) link.click(); }); + }, + + lang() { + return currentLanguage; } }, - template: `

- {{ allDialogueMetadata.length }} Data Items, {{ alreadyVisited.length }} Visited: + {{ allDialogueMetadata.length }} {{ guiLanguage.selected.admin.dataItems }}, {{ alreadyVisited.length }} {{ guiLanguage.selected.admin.visited }}

@@ -181,8 +185,8 @@ Vue.component("main-admin", {

- - + +
@@ -208,19 +212,19 @@ Vue.component("main-admin", {
- Visited + {{ guiLanguage.selected.admin.visited }}
- Annotators: {{ dat[1] }} + {{ guiLanguage.selected.admin.annotators }}: {{ dat[1] }}
- Annotators: {{ dat[1].length }} + {{ guiLanguage.selected.admin.annotators }}: {{ dat[1].length }}
@@ -240,7 +244,7 @@ Vue.component("main-admin", { diff --git a/gui/source/utils/backend.js b/gui/source/utils/backend.js index d5b55f6..6927cbc 100644 --- a/gui/source/utils/backend.js +++ b/gui/source/utils/backend.js @@ -2,18 +2,14 @@ * CONSTANTS ********************************/ -API_LINK_BASE = `http://127.0.0.1:5000` - - +//API_LINK_BASE = `http://127.0.0.1:5000` +//API_LINK_BASE = "http://dialogo.di.unipi.it:5000" +API_LINK_BASE = "http://192.168.1.45:5000" /******************************** * FILE NAME FUNCTIONS ********************************/ - - - - async function get_name(){ var dialogues = {} diff --git a/gui/source/utils/backend_interannotator.js b/gui/source/utils/backend_interannotator.js index 1b3fde4..1404d03 100644 --- a/gui/source/utils/backend_interannotator.js +++ b/gui/source/utils/backend_interannotator.js @@ -2,11 +2,15 @@ * AGREEMENT SCORES ********************************/ +//API_LINK_BASE = "http://dialogo.di.unipi.it:5001" +//API_LINK_BASE = "127.0.0.1:5001" +API_LINK_BASE = "http://192.168.1.45:5001" + async function get_scores_async(){ var dialogues = {} - const apiLink = `http://127.0.0.1:5000/agreements` + const apiLink = API_LINK_BASE+"/agreements" try { var response = await axios.get( apiLink ); @@ -32,7 +36,7 @@ async function get_errors_async(dialogueId){ var dialogues = {} - const apiLink = `http://127.0.0.1:5000/errors/${dialogueId}` + const apiLink = API_LINK_BASE+"/errors/${dialogueId}" try { var response = await axios.get( apiLink ); @@ -58,7 +62,7 @@ async function put_error_async(error, meta, errorId, dialogueId){ errorId : errorId, dialogueId : dialogueId } - const apiLink = `http://127.0.0.1:5000/errors` + const apiLink = API_LINK_BASE+"/errors" try { var response = await axios.put( apiLink, params ); @@ -84,7 +88,7 @@ async function annotate_query(query){ var dialogues = {} - const apiLink = 'http://127.0.0.1:5000/turns' + const apiLink = API_LINK_BASE+"/turns" try { var response = await axios.post( apiLink, { query: query} ); console.log(response.data) @@ -112,7 +116,7 @@ async function get_annotation_style_async(){ var dialogues = {} - const apiLink = 'http://127.0.0.1:5000/dialogue_annotationstyle' + const apiLink = API_LINK_BASE+"/dialogue_annotationstyle" try { var response = await axios.get(apiLink) @@ -140,7 +144,7 @@ async function get_all_dialogue_ids_async() { var dialogues = {} - const apiLink = 'http://127.0.0.1:5000/dialogues_metadata' + const apiLink = API_LINK_BASE+"/dialogues_metadata" try { @@ -165,7 +169,7 @@ async function get_all_dialogue_ids_async() { async function change_dialogue_name_async(oldName, newName) { - const apiLink = `http://127.0.0.1:5000/dialogues_metadata/${oldName}` + const apiLink = API_LINK_BASE+"/dialogues_metadata/${oldName}" try { @@ -307,8 +311,8 @@ async function RESTdialogues(method, id, params){ console.log("PARAMS "+params) // - if (id==null) {var apiLink = `http://127.0.0.1:5000/dialogues`;} - else {var apiLink = `http://127.0.0.1:5000/dialogues/${id}`;} + if (id==null) {var apiLink = API_LINK_BASE+"/dialogues";} + else {var apiLink = API_LINK_BASE+"/dialogues/${id}";} // if (method=="DELETE") { diff --git a/gui/source/utils/language.js b/gui/source/utils/language.js index e61d491..b597ceb 100644 --- a/gui/source/utils/language.js +++ b/gui/source/utils/language.js @@ -2,24 +2,75 @@ * Language Options *************************************/ -const gui_languages = { - options:["English", "Italian"], - selectedOption:"English" +guiMessages = { + en: { + admin: { + dataItems: "Data Items", + visited: "Visited", + button_downloadAll:"Download All Data", + button_interAgreement:"Inter-annotator Agreement", + annotators:"Annotators", + button_upload:"Upload File or Drag and Drop" + }, + lida: { + button_fileFormatInfo: "File Format Info", + button_delete: "Delete", + turns: "Turns", + button_newDialogue: "Add a New Dialogue", + }, + annotation_app: { + turnId: "Turn Id:" + } + }, + it: { + admin: { + dataItems: "Dialoghi", + visited: "Visitati", + button_downloadAll:"Scarica tutti i dati", + button_interAgreement:"Indice di concordanza", + annotators:"Annotatori", + button_upload:"Carica o trascina un file" + }, + lida: { + button_fileFormatInfo: "Info sui formati", + button_delete: "Cancella", + turns: "Turni", + button_newDialogue: "Aggiungi un nuovo Dialogo", + }, + annotation_app: { + turnId: "Turno Id:" + } + }, } -new Vue({ +guiMessages.selected = guiMessages.en; + +var languageSection = new Vue({ el:"#language-selector", + data:{ - gui_languages + gui_languages: [ + { name:"English", code:"en" }, + { name:"Italian", code:"it"} + ], + currentLanguage: "en", + }, + + methods: { + updateGui(event) { + console.log('---- CHANGING GUI LANGUAGE ----'); + guiMessages.selected = guiMessages[this.currentLanguage]; + } }, + template: `
- +
` diff --git a/server/interannotator_app.py b/server/interannotator_app.py index 4f071c3..ebb8f11 100644 --- a/server/interannotator_app.py +++ b/server/interannotator_app.py @@ -71,7 +71,7 @@ def set_main_path(self, path=None): os.mkdir(self.path) - def run(self, port=5000): + def run(self, port=5001): """ runs the app """ From d7af4285133c761d6886eb39d0ec8f96fa5342ee Mon Sep 17 00:00:00 2001 From: Davide Cucurnia Date: Mon, 6 Apr 2020 22:09:40 +0200 Subject: [PATCH 06/19] italian language main window --- gui/source/utils/backend.js | 4 +--- gui/source/utils/backend_interannotator.js | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/gui/source/utils/backend.js b/gui/source/utils/backend.js index 6927cbc..2096ae6 100644 --- a/gui/source/utils/backend.js +++ b/gui/source/utils/backend.js @@ -2,9 +2,7 @@ * CONSTANTS ********************************/ -//API_LINK_BASE = `http://127.0.0.1:5000` -//API_LINK_BASE = "http://dialogo.di.unipi.it:5000" -API_LINK_BASE = "http://192.168.1.45:5000" +API_LINK_BASE = `http://127.0.0.1:5000` /******************************** * FILE NAME FUNCTIONS diff --git a/gui/source/utils/backend_interannotator.js b/gui/source/utils/backend_interannotator.js index 1404d03..44af28b 100644 --- a/gui/source/utils/backend_interannotator.js +++ b/gui/source/utils/backend_interannotator.js @@ -2,9 +2,7 @@ * AGREEMENT SCORES ********************************/ -//API_LINK_BASE = "http://dialogo.di.unipi.it:5001" -//API_LINK_BASE = "127.0.0.1:5001" -API_LINK_BASE = "http://192.168.1.45:5001" +API_LINK_BASE = "127.0.0.1:5001" async function get_scores_async(){ From 92e1b2696b9013cec3cb1f19e810621503891bb4 Mon Sep 17 00:00:00 2001 From: Davide Cucurnia Date: Tue, 7 Apr 2020 02:26:04 +0200 Subject: [PATCH 07/19] italian language main window --- gui/source/utils/language.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/source/utils/language.js b/gui/source/utils/language.js index b597ceb..1489510 100644 --- a/gui/source/utils/language.js +++ b/gui/source/utils/language.js @@ -17,6 +17,7 @@ guiMessages = { button_delete: "Delete", turns: "Turns", button_newDialogue: "Add a New Dialogue", + interfaceLanguage: "Interface Language:" }, annotation_app: { turnId: "Turn Id:" @@ -35,7 +36,9 @@ guiMessages = { button_fileFormatInfo: "Info sui formati", button_delete: "Cancella", turns: "Turni", - button_newDialogue: "Aggiungi un nuovo Dialogo", + button_newDialogue: "Aggiungi un nuovo Dialogo", + interfaceLanguage: "Lingua Interfaccia:" + }, annotation_app: { turnId: "Turno Id:" @@ -54,6 +57,7 @@ var languageSection = new Vue({ { name:"Italian", code:"it"} ], currentLanguage: "en", + guiMessages, }, methods: { @@ -67,7 +71,7 @@ var languageSection = new Vue({ `
- + From 34817fde1f1e8fb822f7b948257694b6b5f375b5 Mon Sep 17 00:00:00 2001 From: Davide Cucurnia Date: Tue, 7 Apr 2020 02:42:11 +0200 Subject: [PATCH 08/19] italian language main window --- gui/source/components/main_admin_components.js | 14 +++++++------- gui/source/utils/language.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gui/source/components/main_admin_components.js b/gui/source/components/main_admin_components.js index 18687b2..de3d60e 100644 --- a/gui/source/components/main_admin_components.js +++ b/gui/source/components/main_admin_components.js @@ -177,7 +177,7 @@ Vue.component("main-admin", {

- {{ allDialogueMetadata.length }} {{ guiLanguage.selected.admin.dataItems }}, {{ alreadyVisited.length }} {{ guiLanguage.selected.admin.visited }} + {{ allDialogueMetadata.length }} {{ guiMessages.selected.admin.dataItems }}, {{ alreadyVisited.length }} {{ guiMessages.selected.admin.visited }}

@@ -185,8 +185,8 @@ Vue.component("main-admin", {

- - + +
@@ -212,19 +212,19 @@ Vue.component("main-admin", {
- {{ guiLanguage.selected.admin.visited }} + {{ guiMessages.selected.admin.visited }}
- {{ guiLanguage.selected.admin.annotators }}: {{ dat[1] }} + {{ guiMessages.selected.admin.annotators }}: {{ dat[1] }}
- {{ guiLanguage.selected.admin.annotators }}: {{ dat[1].length }} + {{ guiMessages.selected.admin.annotators }}: {{ dat[1].length }}
@@ -244,7 +244,7 @@ Vue.component("main-admin", { diff --git a/gui/source/utils/language.js b/gui/source/utils/language.js index 1489510..b3fccea 100644 --- a/gui/source/utils/language.js +++ b/gui/source/utils/language.js @@ -34,7 +34,7 @@ guiMessages = { }, lida: { button_fileFormatInfo: "Info sui formati", - button_delete: "Cancella", + button_delete: "Elimina", turns: "Turni", button_newDialogue: "Aggiungi un nuovo Dialogo", interfaceLanguage: "Lingua Interfaccia:" From a749e681cf82ab0796e84e72a11a3d0ddb7822fb Mon Sep 17 00:00:00 2001 From: Davide Cucurnia Date: Tue, 7 Apr 2020 03:13:15 +0200 Subject: [PATCH 09/19] italian language components reorganization --- gui/admin.html | 3 +- gui/index.html | 3 +- gui/source/components/language_components.js | 35 +++++++++++++++ gui/source/utils/languages.js | 45 ++++++++++++++++++++ 4 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 gui/source/components/language_components.js create mode 100644 gui/source/utils/languages.js diff --git a/gui/admin.html b/gui/admin.html index 2f27b70..308ef65 100644 --- a/gui/admin.html +++ b/gui/admin.html @@ -80,7 +80,7 @@ - + @@ -89,6 +89,7 @@ + diff --git a/gui/index.html b/gui/index.html index 39e4b52..b948db1 100644 --- a/gui/index.html +++ b/gui/index.html @@ -85,7 +85,7 @@ - + @@ -94,6 +94,7 @@ + diff --git a/gui/source/components/language_components.js b/gui/source/components/language_components.js new file mode 100644 index 0000000..d752872 --- /dev/null +++ b/gui/source/components/language_components.js @@ -0,0 +1,35 @@ +/************************************ +* Language Options +*************************************/ + +var languageSection = new Vue({ + el:"#language-selector", + + data:{ + gui_languages: [ + { name:"English", code:"en" }, + { name:"Italian", code:"it"} + ], + currentLanguage: "en", + guiMessages, + }, + + methods: { + updateGui(event) { + console.log('---- CHANGING GUI LANGUAGE ----'); + guiMessages.selected = guiMessages[this.currentLanguage]; + } + }, + + template: + + ` +
+ + +
+ + ` +}) \ No newline at end of file diff --git a/gui/source/utils/languages.js b/gui/source/utils/languages.js new file mode 100644 index 0000000..a502d94 --- /dev/null +++ b/gui/source/utils/languages.js @@ -0,0 +1,45 @@ +guiMessages = { + en: { + admin: { + dataItems: "Data Items", + visited: "Visited", + button_downloadAll:"Download All Data", + button_interAgreement:"Inter-annotator Agreement", + annotators:"Annotators", + button_upload:"Upload File or Drag and Drop" + }, + lida: { + button_fileFormatInfo: "File Format Info", + button_delete: "Delete", + turns: "Turns", + button_newDialogue: "Add a New Dialogue", + interfaceLanguage: "Interface Language:" + }, + annotation_app: { + turnId: "Turn Id:" + } + }, + it: { + admin: { + dataItems: "Dialoghi", + visited: "Visitati", + button_downloadAll:"Scarica tutti i dati", + button_interAgreement:"Indice di concordanza", + annotators:"Annotatori", + button_upload:"Carica o trascina un file" + }, + lida: { + button_fileFormatInfo: "Info sui formati", + button_delete: "Elimina", + turns: "Turni", + button_newDialogue: "Aggiungi un nuovo Dialogo", + interfaceLanguage: "Lingua Interfaccia:" + + }, + annotation_app: { + turnId: "Turno Id:" + } + }, +} + +guiMessages.selected = guiMessages.en; \ No newline at end of file From 680436eb06111f862571c5ab84d86575981a2763 Mon Sep 17 00:00:00 2001 From: davivcu <44603608+davivcu@users.noreply.github.com> Date: Tue, 7 Apr 2020 03:15:01 +0200 Subject: [PATCH 10/19] Delete language.js no more needed --- gui/source/utils/language.js | 81 ------------------------------------ 1 file changed, 81 deletions(-) delete mode 100644 gui/source/utils/language.js diff --git a/gui/source/utils/language.js b/gui/source/utils/language.js deleted file mode 100644 index b3fccea..0000000 --- a/gui/source/utils/language.js +++ /dev/null @@ -1,81 +0,0 @@ -/************************************ -* Language Options -*************************************/ - -guiMessages = { - en: { - admin: { - dataItems: "Data Items", - visited: "Visited", - button_downloadAll:"Download All Data", - button_interAgreement:"Inter-annotator Agreement", - annotators:"Annotators", - button_upload:"Upload File or Drag and Drop" - }, - lida: { - button_fileFormatInfo: "File Format Info", - button_delete: "Delete", - turns: "Turns", - button_newDialogue: "Add a New Dialogue", - interfaceLanguage: "Interface Language:" - }, - annotation_app: { - turnId: "Turn Id:" - } - }, - it: { - admin: { - dataItems: "Dialoghi", - visited: "Visitati", - button_downloadAll:"Scarica tutti i dati", - button_interAgreement:"Indice di concordanza", - annotators:"Annotatori", - button_upload:"Carica o trascina un file" - }, - lida: { - button_fileFormatInfo: "Info sui formati", - button_delete: "Elimina", - turns: "Turni", - button_newDialogue: "Aggiungi un nuovo Dialogo", - interfaceLanguage: "Lingua Interfaccia:" - - }, - annotation_app: { - turnId: "Turno Id:" - } - }, -} - -guiMessages.selected = guiMessages.en; - -var languageSection = new Vue({ - el:"#language-selector", - - data:{ - gui_languages: [ - { name:"English", code:"en" }, - { name:"Italian", code:"it"} - ], - currentLanguage: "en", - guiMessages, - }, - - methods: { - updateGui(event) { - console.log('---- CHANGING GUI LANGUAGE ----'); - guiMessages.selected = guiMessages[this.currentLanguage]; - } - }, - - template: - - ` -
- - -
- - ` -}) \ No newline at end of file From ca7f802881bec639e449a54706da686dd1625a4e Mon Sep 17 00:00:00 2001 From: Davide Cucurnia Date: Tue, 7 Apr 2020 03:21:25 +0200 Subject: [PATCH 11/19] italian language components reorganization --- gui/source/components/main_admin_components.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gui/source/components/main_admin_components.js b/gui/source/components/main_admin_components.js index de3d60e..90e7578 100644 --- a/gui/source/components/main_admin_components.js +++ b/gui/source/components/main_admin_components.js @@ -160,10 +160,6 @@ Vue.component("main-admin", { }); }, - lang() { - return currentLanguage; - } - }, template: ` From ee4d7229c5de0e013835c25f93dc9cb1b4fb9e7c Mon Sep 17 00:00:00 2001 From: davivcu <44603608+davivcu@users.noreply.github.com> Date: Tue, 7 Apr 2020 03:23:14 +0200 Subject: [PATCH 12/19] Update main_admin_components.js --- gui/source/components/main_admin_components.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gui/source/components/main_admin_components.js b/gui/source/components/main_admin_components.js index de3d60e..90e7578 100644 --- a/gui/source/components/main_admin_components.js +++ b/gui/source/components/main_admin_components.js @@ -160,10 +160,6 @@ Vue.component("main-admin", { }); }, - lang() { - return currentLanguage; - } - }, template: ` From 1a0f44737758fa8d7721965b73061e6cd595371b Mon Sep 17 00:00:00 2001 From: Davide Cucurnia Date: Tue, 7 Apr 2020 16:03:55 +0200 Subject: [PATCH 13/19] italian language annotation view --- .../components/annotation_app_components.js | 28 +++++++++++-------- gui/source/utils/languages.js | 20 +++++++++++-- 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/gui/source/components/annotation_app_components.js b/gui/source/components/annotation_app_components.js index dfabd83..e229b59 100644 --- a/gui/source/components/annotation_app_components.js +++ b/gui/source/components/annotation_app_components.js @@ -260,6 +260,7 @@ Vue.component('dialogue-menu',{ data () { return { editingTitle: false, + guiMessages, } }, @@ -297,7 +298,7 @@ Vue.component('dialogue-menu',{ template: `
- +
@@ -316,8 +317,8 @@ Vue.component('dialogue-menu',{
- All Changes Saved - Unsaved Changes + {{guiMessages.selected.annotation_app.allSaved}} + {{guiMessages.selected.annotation_app.unsaved}}
` @@ -360,7 +361,11 @@ Vue.component('dialogue-turn',{ // primaryElementClass is the class used to select the correct input field // to correctly set the focus when turns are changed with arrow keys or enter props : ["turn","currentId","myId", "primaryElementClass"], - + data: function (){ + return { + guiMessages + } + }, methods :{ turn_updated_string : function(event){ annotationAppEventBus.$emit("turn_updated_string", event ) @@ -404,10 +409,10 @@ Vue.component('dialogue-turn',{
- Turn Id: {{myId}} + {{guiMessages.selected.annotation_app.turnId}}: {{myId}}
- +
@@ -424,7 +429,7 @@ Vue.component('dialogue-turn',{
- Turn Id: {{myId}} + {{guiMessages.selected.annotation_app.turnId}}: {{myId}}
@@ -497,7 +502,8 @@ Vue.component('input-box',{ props : ["message"], data: function (){ return { - input : this.message + input : this.message, + guiMessages } }, methods:{ @@ -518,10 +524,10 @@ Vue.component('input-box',{ `
    -
  • +
  • -
  • -
  • +
  • +
diff --git a/gui/source/utils/languages.js b/gui/source/utils/languages.js index a502d94..6ab9790 100644 --- a/gui/source/utils/languages.js +++ b/gui/source/utils/languages.js @@ -1,3 +1,7 @@ +/************************************ +* Language Config file +*************************************/ + guiMessages = { en: { admin: { @@ -16,7 +20,13 @@ guiMessages = { interfaceLanguage: "Interface Language:" }, annotation_app: { - turnId: "Turn Id:" + turnId: "Turn Id", + enter: "Enter", + save: "Save", + enterQuery:"Enter New Query", + allSaved: "All Changes Saved", + unsaved: "Unsaved Changes", + backToAll: "Back to All Dialogues" } }, it: { @@ -37,7 +47,13 @@ guiMessages = { }, annotation_app: { - turnId: "Turno Id:" + turnId: "Id Turno", + enter: "Invia", + save: "Salva", + enterQuery: "Nuova richiesta", + allSaved: "Modifiche salvate", + unsaved: "Cambiamenti non salvati", + backToAll: "Indietro" } }, } From 9926700380309687cfbcf33963c0e789e7d4e6c8 Mon Sep 17 00:00:00 2001 From: Davide Cucurnia Date: Tue, 7 Apr 2020 16:06:54 +0200 Subject: [PATCH 14/19] italian language annotation view --- gui/source/utils/backend.js | 1 + gui/source/utils/backend_interannotator.js | 1 + 2 files changed, 2 insertions(+) diff --git a/gui/source/utils/backend.js b/gui/source/utils/backend.js index 2096ae6..ad66db2 100644 --- a/gui/source/utils/backend.js +++ b/gui/source/utils/backend.js @@ -4,6 +4,7 @@ API_LINK_BASE = `http://127.0.0.1:5000` + /******************************** * FILE NAME FUNCTIONS ********************************/ diff --git a/gui/source/utils/backend_interannotator.js b/gui/source/utils/backend_interannotator.js index 44af28b..0f24166 100644 --- a/gui/source/utils/backend_interannotator.js +++ b/gui/source/utils/backend_interannotator.js @@ -4,6 +4,7 @@ API_LINK_BASE = "127.0.0.1:5001" + async function get_scores_async(){ var dialogues = {} From 40af9bfe23fa59bc6d38bab3e0758bf72f141938 Mon Sep 17 00:00:00 2001 From: Davide Cucurnia Date: Tue, 7 Apr 2020 19:41:54 +0200 Subject: [PATCH 15/19] italian modal translation --- gui/source/components/modal_components.js | 56 ++++-------- gui/source/utils/languages.js | 101 +++++++++++++++++++++- 2 files changed, 117 insertions(+), 40 deletions(-) diff --git a/gui/source/components/modal_components.js b/gui/source/components/modal_components.js index d6213c0..1d943a1 100644 --- a/gui/source/components/modal_components.js +++ b/gui/source/components/modal_components.js @@ -2,6 +2,11 @@ * MODAL COMPONENT *************************************/ Vue.component('modal', { + data() { + return { + guiMessages + } + }, template: ` @@ -19,39 +24,15 @@ Vue.component('modal', {