Skip to content

Commit

Permalink
added translation support for previous items.
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoBoer committed Dec 5, 2022
1 parent 90d4535 commit b8d9556
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
7 changes: 3 additions & 4 deletions editor/js/toolbox.js
Expand Up @@ -4606,7 +4606,7 @@ var EDITOR = (function ($, parent) {
.append(td1)
.append(td2)));
break;
case 'datagrid':
case 'datagrid':
var id = 'grid_' + form_id_offset;
form_id_offset++;
html = $('<div>')
Expand All @@ -4623,7 +4623,7 @@ var EDITOR = (function ($, parent) {
var form_id = "excel_upload_" + name;
excel_form = $("<form method='post' enctype='multipart/form-data' id =" + form_id + "></form>")
excel_form.append('<input type="file" name="fileToUpload" id="fileToUpload_' + name +'" accept=".csv" required>');
excel_form.append('<input type="submit" value="Upload csv">');
excel_form.append('<input type="submit" value="' + language.UploadCSV.UploadCSVBtn.$label + '">');
excel_form.append('<input type="hidden" name="colNum" value=' + options.columns + '>');
excel_form.append('<input type="hidden" name="type" value=' + name + '>');
excel_form.append('<input type="hidden" name="gridId" value=' + id + '>');
Expand All @@ -4636,8 +4636,7 @@ var EDITOR = (function ($, parent) {
})

function upload_file(form_data){
//TODO add translation support?
if(confirm("Let op dit overschrijft de huidige tabel")) {
if(confirm(language.UploadCSV.Info.$label)) {
$.ajax({
type: 'POST',
dataType: 'text',
Expand Down
4 changes: 4 additions & 0 deletions languages/wizard_en-GB.xml
Expand Up @@ -236,4 +236,8 @@
<error>Add {x} to project first</error>
<errorEmpty>Add data to {x} first</errorEmpty>
</categoryList>
<UploadCSV>
<UploadCSVBtn label = "Upload csv"/>
<Info label = "Warning: This will overwrite the current table, are you sure?"> </Info>
</UploadCSV>>
</language>
5 changes: 4 additions & 1 deletion languages/wizard_nl-NL.xml
Expand Up @@ -188,5 +188,8 @@
<course deprecated="Verouderd - de rode waarde staat niet meer in de lijst in management.php">
<FreeText label="Anders"></FreeText>
</course>

<UploadCSV>
<UploadCSVBtn label = "Upload csv"/>
<Info label = "Let op dit overschrijft de huidige tabel"> </Info>
</UploadCSV>>
</language>

0 comments on commit b8d9556

Please sign in to comment.