diff --git a/.gitmodules b/.gitmodules index c444012..7b12095 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,9 +16,9 @@ [submodule "l10n/musdb"] path = l10n/musdb url = gitea:museum-digital/translation-musdb.git -[submodule "l10n/importer"] - path = l10n/importer - url = gitea:museum-digital/translations-importer.git [submodule "classes/MD_QA"] path = classes/MD_QA url = gitea:museum-digital/MD_QA.git +[submodule "l10n/translation-csvxml"] + path = l10n/translation-csvxml + url = gitea:museum-digital/translation-csvxml.git diff --git a/inc/constants.php b/inc/constants.php index 928a282..d33a7c7 100644 --- a/inc/constants.php +++ b/inc/constants.php @@ -14,7 +14,7 @@ const ALLOWED_LANGS = ['de', 'en', 'hu']; const TL_FILE_DIRS = [ __DIR__ . "/../l10n/musdb/", - __DIR__ . "/../l10n/importer/", + __DIR__ . "/../l10n/translation-csvxml/", __DIR__ . "/../classes/MDAllowedValueSets/l18n/", ]; diff --git a/l10n/importer b/l10n/importer deleted file mode 160000 index 3bfb6f9..0000000 --- a/l10n/importer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3bfb6f9ac2abcbad91136e684db0372f2a7291d8 diff --git a/l10n/translation-csvxml b/l10n/translation-csvxml new file mode 160000 index 0000000..f4dbfcc --- /dev/null +++ b/l10n/translation-csvxml @@ -0,0 +1 @@ +Subproject commit f4dbfcc5bf910c360ac7414ecb9d308bbc8abdc1 diff --git a/public/assets/js/csvxmlV2.js b/public/assets/js/csvxmlV2.js index bbb7f08..4aec725 100644 --- a/public/assets/js/csvxmlV2.js +++ b/public/assets/js/csvxmlV2.js @@ -703,6 +703,8 @@ class CsvxmlPage { const div = document.createElement("div"); div.appendChild(appendQA(app.tls.help_where_am_i, app.tls.help_where_am_i_content)); + div.appendChild(appendQA(app.tls.help_what_is_csv, app.tls.help_what_is_csv_content)); + div.appendChild(appendQA(app.tls.help_how_to_format_csv, app.tls.help_how_to_format_csv_content)); app.domHelpWrapper.appendChild(div); diff --git a/public/assets/js/csvxmlV2.min.js b/public/assets/js/csvxmlV2.min.js index 721b6cf..51ea9bb 100644 --- a/public/assets/js/csvxmlV2.min.js +++ b/public/assets/js/csvxmlV2.min.js @@ -53,7 +53,7 @@ renderGenHeader(){const header=document.createElement("header");header.id="mainH lNews.textContent=this.tls.news;lNews.href="https://blog.museum-digital.org/";nav.appendChild(lNews);header.appendChild(nav);document.body.appendChild(header);} renderHeader(){const appHeader=document.createElement("header");const h1=document.createElement("h1");const img=document.createElement("img");img.width="70";img.height="70";img.src="assets/img/mdlogo-csvxml.svg";img.alt="";h1.appendChild(img);const h1Span=document.createElement("span");h1Span.textContent="museum-digital:csvxml";h1.appendChild(h1Span);appHeader.appendChild(h1);document.body.appendChild(appHeader);} renderHelpTexts(){let app=this;(async function(){function appendQA(question,answer){const div=document.createElement("div");div.classList.add("qaDiv");const qElem=document.createElement("h3");qElem.textContent=question;qElem.style.cursor="pointer";div.appendChild(qElem);qElem.addEventListener('click',function(){console.log("Listing validation errors");const dialogueContent=document.createElement("div");const headline=document.createElement("h3");headline.textContent=question;headline.appendChild(app.generateDialogueCloseButton());dialogueContent.appendChild(headline);const answerDiv=document.createElement("div");answerDiv.textContent=answer;dialogueContent.appendChild(answerDiv);CsvxmlDialogue.drawDialogue(dialogueContent);});return div;} -const div=document.createElement("div");div.appendChild(appendQA(app.tls.help_where_am_i,app.tls.help_where_am_i_content));app.domHelpWrapper.appendChild(div);})();document.body.appendChild(this.domHelpWrapper);} +const div=document.createElement("div");div.appendChild(appendQA(app.tls.help_where_am_i,app.tls.help_where_am_i_content));div.appendChild(appendQA(app.tls.help_what_is_csv,app.tls.help_what_is_csv_content));div.appendChild(appendQA(app.tls.help_how_to_format_csv,app.tls.help_how_to_format_csv_content));app.domHelpWrapper.appendChild(div);})();document.body.appendChild(this.domHelpWrapper);} renderUploader(){let app=this;(async function(){const h2=document.createElement("h2");h2.textContent=app.tls.upload;app.domUploaderWrapper.appendChild(h2);const form=document.createElement("form");const label=document.createElement("label");label.textContent=app.tls.select_csv_file_for_upload;label.setAttribute("for","fileToUpload");form.appendChild(label);const input=document.createElement("input");input.type="file";input.id="fileToUpload";input.setAttribute("tabindex","1");input.accept=".csv";input.required="required";input.addEventListener('change',async function(){app.uploadFileForValidation(input.files[0]);});form.appendChild(input);app.domUploaderWrapper.appendChild(form);})();document.body.appendChild(this.domUploaderWrapper);} doForFieldList(callback){let fieldLists=document.getElementsByClassName("fieldList");for(let i=0,max=fieldLists.length;i $tlLoader->tl("csvxml-overview", "csvxml_overview", 'help_where_am_i'), 'help_where_am_i_content' => $tlLoader->tl("csvxml-overview", "csvxml_overview", 'help_where_am_i_content'), + 'help_what_is_csv' => $tlLoader->tl("csvxml-overview", "csvxml_overview", 'help_what_is_csv'), + 'help_what_is_csv_content' => $tlLoader->tl("csvxml-overview", "csvxml_overview", 'help_what_is_csv_content'), + 'help_how_to_format_csv' => $tlLoader->tl("csvxml-overview", "csvxml_overview", 'help_how_to_format_csv'), + 'help_how_to_format_csv_content' => $tlLoader->tl("csvxml-overview", "csvxml_overview", 'help_how_to_format_csv_content'), ]); }